From 46ea69a73c64303991cb812d742396a4f8e4ca4e Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Wed, 8 May 2019 14:15:13 +0800 Subject: [PATCH] UX: Initialize client side category model with right search_priority. This is strictly a UX change since the default value of the column is 0. --- .../javascripts/discourse/routes/discovery-categories.js.es6 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/routes/discovery-categories.js.es6 b/app/assets/javascripts/discourse/routes/discovery-categories.js.es6 index 2b77d5bc25b..2b390dab919 100644 --- a/app/assets/javascripts/discourse/routes/discovery-categories.js.es6 +++ b/app/assets/javascripts/discourse/routes/discovery-categories.js.es6 @@ -5,6 +5,7 @@ import { defaultHomepage } from "discourse/lib/utilities"; import TopicList from "discourse/models/topic-list"; import { ajax } from "discourse/lib/ajax"; import PreloadStore from "preload-store"; +import { searchPriorities } from "discourse/components/concerns/category_search_priorities"; const DiscoveryCategoriesRoute = Discourse.Route.extend(OpenComposer, { renderTemplate() { @@ -109,7 +110,8 @@ const DiscoveryCategoriesRoute = Discourse.Route.extend(OpenComposer, { available_groups: groups.map(g => g.name), allow_badges: true, topic_featured_link_allowed: true, - custom_fields: {} + custom_fields: {}, + search_priority: searchPriorities.normal }); showModal("edit-category", { model });