From 497d9849d36f3e1a076b7632be7a180a5f8ba2ff Mon Sep 17 00:00:00 2001 From: David Taylor Date: Fri, 29 Jul 2022 00:03:53 +0100 Subject: [PATCH] FIX: Ensure all public topic-query options can be used via Ember (#17706) --- .../discourse/app/controllers/discovery-sortable.js | 7 +++++++ lib/topic_query.rb | 1 + 2 files changed, 8 insertions(+) diff --git a/app/assets/javascripts/discourse/app/controllers/discovery-sortable.js b/app/assets/javascripts/discourse/app/controllers/discovery-sortable.js index 7f6580a9902..6730ed46ef7 100644 --- a/app/assets/javascripts/discourse/app/controllers/discovery-sortable.js +++ b/app/assets/javascripts/discourse/app/controllers/discovery-sortable.js @@ -14,6 +14,13 @@ export const queryParams = { bumped_before: { replace: true, refreshModel: true }, f: { replace: true, refreshModel: true }, period: { replace: true, refreshModel: true }, + topic_ids: { replace: true, refreshModel: true }, + group_name: { replace: true, refreshModel: true }, + tags: { replace: true, refreshModel: true }, + match_all_tags: { replace: true, refreshModel: true }, + no_subcategories: { replace: true, refreshModel: true }, + no_tags: { replace: true, refreshModel: true }, + exclude_tag: { replace: true, refreshModel: true }, }; // Basic controller options diff --git a/lib/topic_query.rb b/lib/topic_query.rb index 1be440da8d0..f525bb195d8 100644 --- a/lib/topic_query.rb +++ b/lib/topic_query.rb @@ -40,6 +40,7 @@ class TopicQuery end def self.public_valid_options + # For these to work in Ember, add them to `controllers/discovery-sortable.js` @public_valid_options ||= %i(page before