From c002911bed71ab4b0255f5bbcae3b92044255ec6 Mon Sep 17 00:00:00 2001 From: Kris Date: Fri, 9 Aug 2024 16:39:12 -0400 Subject: [PATCH] UX: set "topics" link in sidebar as active for hot, unseen, and my posts filters (#28305) --- .../sidebar/common/community-section/everything-section-link.js | 2 +- .../javascripts/discourse/tests/fixtures/site-fixtures.js | 2 ++ .../javascripts/discourse/tests/fixtures/site-settings.js | 1 + app/assets/javascripts/discourse/tests/helpers/site.js | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/everything-section-link.js b/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/everything-section-link.js index 6f2c659a073..7dacb08e0cd 100644 --- a/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/everything-section-link.js +++ b/app/assets/javascripts/discourse/app/lib/sidebar/common/community-section/everything-section-link.js @@ -51,7 +51,7 @@ export default class EverythingSectionLink extends BaseSectionLink { } get currentWhen() { - return "discovery.latest discovery.new discovery.unread discovery.top"; + return "discovery.latest discovery.new discovery.unread discovery.top discovery.hot discovery.unseen discovery.posted"; } get badgeText() { diff --git a/app/assets/javascripts/discourse/tests/fixtures/site-fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/site-fixtures.js index dc964df13aa..514dbd9f674 100644 --- a/app/assets/javascripts/discourse/tests/fixtures/site-fixtures.js +++ b/app/assets/javascripts/discourse/tests/fixtures/site-fixtures.js @@ -42,6 +42,7 @@ export default { "search", "bookmarks", "hot", + "unseen" ], periods: ["all", "yearly", "quarterly", "monthly", "weekly", "daily"], top_menu_items: [ @@ -54,6 +55,7 @@ export default { "categories", "hot", "bookmarks", + "unseen", ], anonymous_top_menu_items: ["latest", "hot", "categories"], uncategorized_category_id: 17, diff --git a/app/assets/javascripts/discourse/tests/fixtures/site-settings.js b/app/assets/javascripts/discourse/tests/fixtures/site-settings.js index 43bb3cca3d9..feff0ae07c5 100644 --- a/app/assets/javascripts/discourse/tests/fixtures/site-settings.js +++ b/app/assets/javascripts/discourse/tests/fixtures/site-settings.js @@ -52,6 +52,7 @@ export default { "read", "posted", "bookmarks", + "unseen", ], list_type: "compact", }, diff --git a/app/assets/javascripts/discourse/tests/helpers/site.js b/app/assets/javascripts/discourse/tests/helpers/site.js index 2af4ceb2d26..bee0fb8c719 100644 --- a/app/assets/javascripts/discourse/tests/helpers/site.js +++ b/app/assets/javascripts/discourse/tests/helpers/site.js @@ -44,6 +44,7 @@ PreloadStore.store("site", { "read", "posted", "bookmarks", + "unseen", ], periods: ["all", "yearly", "monthly", "weekly", "daily"], top_menu_items: [ @@ -55,6 +56,7 @@ PreloadStore.store("site", { "posted", "categories", "hot", + "unseen", ], anonymous_top_menu_items: ["latest", "categories", "hot"], uncategorized_category_id: 17,