This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse
Sam 0df7743d78
FIX: tag dropdown not working with default_list_filter (#20608)
If you set a category to `default_list_filter` none. Information
was not passed to the tag route and routing was incorrect.

This patch fails, cause on reload route does not point to the right place.


```
-- a/app/assets/javascripts/discourse/app/routes/tag-show.js
+++ b/app/assets/javascripts/discourse/app/routes/tag-show.js
@@ -89,6 +89,8 @@ export default DiscourseRoute.extend(FilterModeMixin, {
       filter = `tag/${tagId}/l/${topicFilter}`;
     }
     const list = await findTopicList(
       this.store,
       this.topicTrackingState,
@@ -123,7 +125,7 @@ export default DiscourseRoute.extend(FilterModeMixin, {
   },

   setupController(controller, model) {
-    const noSubcategories =
+    this.noSubcategories =
       this.noSubcategories === undefined
         ? model.category?.default_list_filter === NONE
         : this.noSubcategories;
@@ -133,7 +135,7 @@ export default DiscourseRoute.extend(FilterModeMixin, {
       ...model,
       period: model.list.for_period,
       navMode: this.navMode,
-      noSubcategories,
+      noSubcategories: this.noSubcategories,
       loading: false,
     });
 ```

Long term we don't want to hide this logic from the routing (even in
the category case) it just cause unneeded confusion and fragility.
2023-03-10 11:37:55 +11:00
..
app FIX: tag dropdown not working with default_list_filter (#20608) 2023-03-10 11:37:55 +11:00
config DEV: Unsilence and resolve setting-on-hash deprecation (#20611) 2023-03-09 13:44:31 +00:00
lib DEV: Enable parallel babel processing in ember-cli (#20215) 2023-02-09 16:24:24 +00:00
public/assets/scripts DEV: Enable @cached decorator for themes and plugins (#19261) 2022-11-30 15:53:54 +00:00
scripts Drop support for iOS < 15.7 (#19847) 2023-01-16 17:28:59 +00:00
tests FIX: tag dropdown not working with default_list_filter (#20608) 2023-03-10 11:37:55 +11:00
.ember-cli REFACTOR: Sync up master with changes for Ember-CLI (#11671) 2021-01-12 10:13:21 -05:00
.npmrc DEV: Prevent npm usage (#13945) 2021-08-04 22:04:58 +02:00
ember-cli-build.js DEV: Enable parallel babel processing in ember-cli (#20215) 2023-02-09 16:24:24 +00:00
jsconfig.json DEV: Add discourse/tests to jsconfig (#19031) 2022-11-15 11:33:56 +00:00
package.json Build(deps): Bump webpack in /app/assets/javascripts (#20598) 2023-03-08 23:24:51 +01:00
testem.js DEV: Move shouldLoadPluginTestJs() (#19045) 2022-11-16 11:07:58 +01:00