A platform for community discussion. Free, open, simple.
UX: replace "all subcategories" with "remove filter", reorder tag dropdown (#27473)
Krise92323c81e05
diff --git a/app/assets/javascripts/discourse/tests/integration/components/select-kit/tag-drop-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/tag-drop-test.jsindex e77a1db6f1e..d3892cefa8b 100644--- a/app/assets/javascripts/discourse/tests/integration/components/select-kit/tag-drop-test.js+++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/tag-drop-test.js@@ -53,13 +53,13 @@ module("Integration | Component | select-kit/tag-drop", function (hooks) {assert.strictEqual(content[0].name,- I18n.t("tagging.selector_no_tags"),- "it has the translated label for no-tags"+ I18n.t("tagging.selector_remove_filter"),+ "it has the correct label for removing the tag filter");assert.strictEqual(content[1].name,- I18n.t("tagging.selector_remove_filter"),- "it has the correct label for removing the tag filter"+ I18n.t("tagging.selector_no_tags"),+ "it has the translated label for no-tags");await this.subject.fillInFilter("dav");diff --git a/app/assets/javascripts/select-kit/addon/components/category-drop.js b/app/assets/javascripts/select-kit/addon/components/category-drop.jsindex c218b924d0c..74c0c22d7e9 100644--- a/app/assets/javascripts/select-kit/addon/components/category-drop.js+++ b/app/assets/javascripts/select-kit/addon/components/category-drop.js@@ -159,7 +159,7 @@ export default ComboBoxComponent.extend({}if (this.selectKit.options.subCategory) {- return I18n.t("categories.all_subcategories", {+ return I18n.t("categories.remove_filter", {categoryName: this.parentCategoryName,});}diff --git a/app/assets/javascripts/select-kit/addon/components/tag-drop.js b/app/assets/javascripts/select-kit/addon/components/tag-drop.jsindex 132fb988b29..93bcd65b7ce 100644--- a/app/assets/javascripts/select-kit/addon/components/tag-drop.js+++ b/app/assets/javascripts/select-kit/addon/components/tag-drop.js@@ -96,17 +96,17 @@ export default ComboBoxComponent.extend(TagsMixin, {shortcuts: computed("tagId", function () {const shortcuts = [];- if (this.tagId !== NONE_TAG) {+ if (this.tagId) {shortcuts.push({- id: NO_TAG_ID,- name: I18n.t("tagging.selector_no_tags"),+ id: ALL_TAGS_ID,+ name: I18n.t("tagging.selector_remove_filter"),});}- if (this.tagId) {+ if (this.tagId !== NONE_TAG) {shortcuts.push({- id: ALL_TAGS_ID,- name: I18n.t("tagging.selector_remove_filter"),+ id: NO_TAG_ID,+ name: I18n.t("tagging.selector_no_tags"),});}diff --git a/config/locales/client.en.yml b/config/locales/client.en.ymlindex 4d79a13e8d8..bf23d0f7574 100644--- a/config/locales/client.en.yml+++ b/config/locales/client.en.yml@@ -1076,7 +1076,6 @@ en:categories:categories_label: "categories"subcategories_label: "subcategories"- all_subcategories: "all subcategories"no_subcategories: "no subcategories"remove_filter: "remove filter"plus_more_count: