DEV: Add class to header-topic-info widget (#9475)

DEV: Add class to header-topic-info widget (#9475)

diff --git a/app/assets/javascripts/discourse/widgets/header-topic-info.js b/app/assets/javascripts/discourse/widgets/header-topic-info.js
index c6488d0..1e31cf5 100644
--- a/app/assets/javascripts/discourse/widgets/header-topic-info.js
+++ b/app/assets/javascripts/discourse/widgets/header-topic-info.js
@@ -57,6 +57,10 @@ createWidget("topic-header-participant", {
 export default createWidget("header-topic-info", {
   tagName: "div.extra-info-wrapper",
 
+  buildClasses(attrs) {
+    return this.showCategory(attrs.topic) ? "two-rows" : "";
+  },
+
   buildFancyTitleClass() {
     const baseClass = ["topic-link"];
     const flatten = array => [].concat.apply([], array);
@@ -112,11 +116,7 @@ export default createWidget("header-topic-info", {
     const category = topic.get("category");
 
     if (loaded || category) {
-      if (
-        category &&
-        (!category.get("isUncategorizedCategory") ||
-          !this.siteSettings.suppress_uncategorized_badge)
-      ) {
+      if (this.showCategory(topic)) {
         const parentCategory = category.get("parentCategory");
         const categories = [];
         if (parentCategory) {
@@ -208,6 +208,14 @@ export default createWidget("header-topic-info", {
     );
   },
 
+  showCategory(topic) {
+    return (
+      topic.category &&
+      (!topic.category.isUncategorizedCategory ||
+        !this.siteSettings.suppress_uncategorized_badge)
+    );
+  },
+
   jumpToTopPost() {
     const topic = this.attrs.topic;
     if (topic) {

GitHub sha: e5233f5c

This commit appears in #9475 which was merged by markvanlan.