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.
|
||
|---|---|---|
| .. | ||
| notification-types | ||
| reviewable-types | ||
| allow-lister-test.js | ||
| autocomplete-test.js | ||
| bookmark-test.js | ||
| category-badge-test.js | ||
| click-track-test.js | ||
| computed-test.js | ||
| deprecated-test.js | ||
| dom-from-string-test.js | ||
| download-calendar-test.js | ||
| ember-action-modifer-test.js | ||
| ember-events-test.js | ||
| emoji-test.js | ||
| formatter-test.js | ||
| get-url-test.js | ||
| highlight-search-test.js | ||
| highlight-syntax-test.js | ||
| i18n-test.js | ||
| icon-library-test.js | ||
| key-value-store-test.js | ||
| keyboard-shortcuts-test.js | ||
| link-lookup-test.js | ||
| link-mentions-test.js | ||
| load-script-test.js | ||
| oneboxer-test.js | ||
| parse-bbcode-tag-test.js | ||
| plugin-api-test.js | ||
| preload-store-test.js | ||
| pretty-text-test.js | ||
| sanitizer-test.js | ||
| search-test.js | ||
| sharing-test.js | ||
| suffix-trie-test.js | ||
| text-direction-test.js | ||
| text-test.js | ||
| time-shortcut-test.js | ||
| time-utils-test.js | ||
| to-markdown-test.js | ||
| upload-short-url-test.js | ||
| uploads-test.js | ||
| uppy-checksum-plugin-test.js | ||
| uppy-media-optimization-plugin-test.js | ||
| url-test.js | ||
| user-search-test.js | ||
| utilities-test.js | ||