From e0155b6955e90c53b7d2b75d8efd31a1d204398e Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Mon, 27 Mar 2023 10:08:11 +0800 Subject: [PATCH] DEV: Introduce dedicated controller and route for `discovery.filter` (#20837) Instead of being tied to the old implementation and constraints, a dedicated route and controller for the `discovery.filter` app route will allow us to iterate on changes much faster. --- .../discourse/app/components/d-navigation.hbs | 44 ++++++--------- .../discourse/app/components/d-navigation.js | 9 ---- .../app/controllers/discovery-filter.js | 33 ++++++++++++ .../app/controllers/discovery-sortable.js | 27 ---------- .../app/controllers/navigation/default.js | 1 - .../app/controllers/navigation/filter.js | 12 +++++ .../dynamic-route-builders.js | 7 --- .../discourse/app/routes/discovery-filter.js | 53 +++++++++++++++++++ .../app/templates/navigation/default.hbs | 2 - .../app/templates/navigation/filter.hbs | 20 +++++++ 10 files changed, 133 insertions(+), 75 deletions(-) create mode 100644 app/assets/javascripts/discourse/app/controllers/discovery-filter.js create mode 100644 app/assets/javascripts/discourse/app/controllers/navigation/filter.js create mode 100644 app/assets/javascripts/discourse/app/routes/discovery-filter.js create mode 100644 app/assets/javascripts/discourse/app/templates/navigation/filter.hbs diff --git a/app/assets/javascripts/discourse/app/components/d-navigation.hbs b/app/assets/javascripts/discourse/app/components/d-navigation.hbs index 95098c83b71..e91c42db8ba 100644 --- a/app/assets/javascripts/discourse/app/components/d-navigation.hbs +++ b/app/assets/javascripts/discourse/app/components/d-navigation.hbs @@ -1,33 +1,19 @@ -{{#if this.isQueryFilterMode}} -
-
- {{d-icon "filter" class="topic-query-filter__icon"}} - -
-
-{{else}} - + - {{#unless this.additionalTags}} - {{! nav bar doesn't work with tag intersections }} - - {{/unless}} -{{/if}} +{{#unless this.additionalTags}} + {{! nav bar doesn't work with tag intersections }} + +{{/unless}}