DEV: allows to decorate topic header class (#9427)

DEV: allows to decorate topic header class (#9427)

diff --git a/app/assets/javascripts/discourse/widgets/header-topic-info.js b/app/assets/javascripts/discourse/widgets/header-topic-info.js
index 2e73b32..c6488d0 100644
--- a/app/assets/javascripts/discourse/widgets/header-topic-info.js
+++ b/app/assets/javascripts/discourse/widgets/header-topic-info.js
@@ -57,6 +57,18 @@ createWidget("topic-header-participant", {
 export default createWidget("header-topic-info", {
   tagName: "div.extra-info-wrapper",
 
+  buildFancyTitleClass() {
+    const baseClass = ["topic-link"];
+    const flatten = array => [].concat.apply([], array);
+    const extraClass = flatten(
+      applyDecorators(this, "fancyTitleClass", this.attrs, this.state)
+    );
+    return baseClass
+      .concat(extraClass)
+      .filter(Boolean)
+      .join(" ");
+  },
+
   html(attrs, state) {
     const topic = attrs.topic;
 
@@ -87,7 +99,7 @@ export default createWidget("header-topic-info", {
       const titleHTML = new RawHtml({ html: `<span>${fancyTitle}</span>` });
       heading.push(
         this.attach("link", {
-          className: "topic-link",
+          className: this.buildFancyTitleClass(),
           action: "jumpToTopPost",
           href,
           attributes: { "data-topic-id": topic.get("id") },

GitHub sha: 8c583199

This commit appears in #9427 which was approved by davidtaylorhq. It was merged by jjaffeux.