A platform for community discussion. Free, open, simple.
Rename humburger_menu_categories_count site setting to header_dropdown_category_count
Vinoth Kannanece3cb73dfec
diff --git a/app/assets/javascripts/discourse/widgets/hamburger-menu.js.es6 b/app/assets/javascripts/discourse/widgets/hamburger-menu.js.es6index 0c361e7c1f7..651cf97360f 100644--- a/app/assets/javascripts/discourse/widgets/hamburger-menu.js.es6+++ b/app/assets/javascripts/discourse/widgets/hamburger-menu.js.es6@@ -178,7 +178,7 @@ export default createWidget("hamburger-menu", {listCategories() {const maxCategoriesToDisplay = this.siteSettings- .hamburger_menu_categories_count;+ .header_dropdown_category_count;let categories = this.site.get("categoriesByCount");if (this.currentUser) {diff --git a/app/serializers/current_user_serializer.rb b/app/serializers/current_user_serializer.rbindex c55d3ece8a5..cd44c75f663 100644--- a/app/serializers/current_user_serializer.rb+++ b/app/serializers/current_user_serializer.rb@@ -168,7 +168,7 @@ class CurrentUserSerializer < BasicUserSerializerWHEN notification_level = 4 THEN 3END").pluck(:category_id)- .slice(0, SiteSetting.hamburger_menu_categories_count)+ .slice(0, SiteSetting.header_dropdown_category_count)enddef dismissed_banner_keydiff --git a/config/locales/server.en.yml b/config/locales/server.en.ymlindex ae2ed3a40da..067f43833c8 100644--- a/config/locales/server.en.yml+++ b/config/locales/server.en.yml@@ -1655,7 +1655,7 @@ en:suppress_uncategorized_badge: "Don't show the badge for uncategorized topics in topic lists."- hamburger_menu_categories_count: "How many categories can be displayed in the hamburger menu."+ header_dropdown_category_count: "How many categories can be displayed in the header dropdown menu."permalink_normalizations: "Apply the following regex before matching permalinks, for example: /(topic.*)\\?.*/\\1 will strip query strings from topic routes. Format is regex+string use \\1 etc. to access captures"diff --git a/config/site_settings.yml b/config/site_settings.ymlindex 1aabd59c5d1..ee0b96c9cc9 100644--- a/config/site_settings.yml+++ b/config/site_settings.yml@@ -1415,7 +1415,7 @@ uncategorized:client: truedefault: true- hamburger_menu_categories_count:+ header_dropdown_category_count:client: truedefault: 8diff --git a/test/javascripts/widgets/hamburger-menu-test.js.es6 b/test/javascripts/widgets/hamburger-menu-test.js.es6index c8eacfa0d7d..e94233df476 100644--- a/test/javascripts/widgets/hamburger-menu-test.js.es6+++ b/test/javascripts/widgets/hamburger-menu-test.js.es6@@ -138,8 +138,8 @@ widgetTest("top categories - anonymous", {anonymous: true,beforeEach() {- this.siteSettings.hamburger_menu_categories_count = 8;- maxCategoriesToDisplay = this.siteSettings.hamburger_menu_categories_count;+ this.siteSettings.header_dropdown_category_count = 8;+ maxCategoriesToDisplay = this.siteSettings.header_dropdown_category_count;categoriesByCount = this.site.get("categoriesByCount");},@@ -162,8 +162,8 @@ widgetTest("top categories", {template: '{{mount-widget widget="hamburger-menu"}}',beforeEach() {- this.siteSettings.hamburger_menu_categories_count = 8;- maxCategoriesToDisplay = this.siteSettings.hamburger_menu_categories_count;+ this.siteSettings.header_dropdown_category_count = 8;+ maxCategoriesToDisplay = this.siteSettings.header_dropdown_category_count;categoriesByCount = this.site.get("categoriesByCount").slice();categoriesByCount.every(c => {if (!topCategoryIds.includes(c.id)) {