UX: puts tags and categories on same line in search-menu-results (#7830)

UX: puts tags and categories on same line in search-menu-results (#7830)

diff --git a/app/assets/javascripts/discourse/widgets/search-menu-results.js.es6 b/app/assets/javascripts/discourse/widgets/search-menu-results.js.es6
index 026f150..83439e9 100644
--- a/app/assets/javascripts/discourse/widgets/search-menu-results.js.es6
+++ b/app/assets/javascripts/discourse/widgets/search-menu-results.js.es6
@@ -148,24 +148,27 @@ createSearchResult({
   builder(result, term) {
     const topic = result.topic;
 
-    const linkContent = [
-      h("div.header", [
-        this.attach("topic-status", { topic, disableActions: true }),
-        h("span.topic-title", new Highlighted(topic.fancyTitle, term))
-      ]),
+    const firstLine = [
+      this.attach("topic-status", { topic, disableActions: true }),
+      h("span.topic-title", new Highlighted(topic.fancyTitle, term))
+    ];
+
+    const secondLine = [
       this.attach("category-link", {
         category: topic.category,
         link: false
       })
     ];
-
     if (Discourse.SiteSettings.tagging_enabled) {
-      linkContent.push(
+      secondLine.push(
         this.attach("discourse-tags", { topic, tagName: "span" })
       );
     }
 
-    const link = h("span.topic", linkContent);
+    const link = h("span.topic", [
+      h("div.first-line", firstLine),
+      h("div.second-line", secondLine)
+    ]);
 
     return postResult.call(this, result, link, term);
   }
diff --git a/app/assets/stylesheets/common/base/search-menu.scss b/app/assets/stylesheets/common/base/search-menu.scss
index e29caca..170142a 100644
--- a/app/assets/stylesheets/common/base/search-menu.scss
+++ b/app/assets/stylesheets/common/base/search-menu.scss
@@ -253,6 +253,17 @@
     .topic {
       display: inline-block;
       line-height: $line-height-medium;
+
+      .second-line {
+        display: flex;
+        flex-wrap: wrap;
+        align-items: center;
+
+        .discourse-tags {
+          flex-wrap: wrap;
+          display: contents;
+        }
+      }
     }
 
     .topic-title {

GitHub sha: af58049e