Revert "FEATURE: category setting for default list filter."

Revert “FEATURE: category setting for default list filter.”

This reverts commit 6f03d14c2340397b0ce9d175a2270ebae4180987.

diff --git a/app/assets/javascripts/discourse/app/components/edit-category-settings.js b/app/assets/javascripts/discourse/app/components/edit-category-settings.js
index c811ce2..5844e45 100644
--- a/app/assets/javascripts/discourse/app/components/edit-category-settings.js
+++ b/app/assets/javascripts/discourse/app/components/edit-category-settings.js
@@ -69,13 +69,6 @@ export default buildCategoryPanel("settings", {
   },
 
   @discourseComputed
-  availableListFilters() {
-    return ["all", "none"].map(p => {
-      return { name: I18n.t(`category.list_filters.${p}`), value: p };
-    });
-  },
-
-  @discourseComputed
   searchPrioritiesOptions() {
     const options = [];
 
diff --git a/app/assets/javascripts/discourse/app/models/category.js b/app/assets/javascripts/discourse/app/models/category.js
index eaca16a..78802cb 100644
--- a/app/assets/javascripts/discourse/app/models/category.js
+++ b/app/assets/javascripts/discourse/app/models/category.js
@@ -187,8 +187,7 @@ const Category = RestModel.extend({
         ),
         search_priority: this.search_priority,
         reviewable_by_group_name: this.reviewable_by_group_name,
-        read_only_banner: this.read_only_banner,
-        default_list_filter: this.default_list_filter
+        read_only_banner: this.read_only_banner
       },
       type: id ? "PUT" : "POST"
     });
diff --git a/app/assets/javascripts/discourse/app/templates/components/edit-category-settings.hbs b/app/assets/javascripts/discourse/app/templates/components/edit-category-settings.hbs
index 2218fc2..ab17a30 100644
--- a/app/assets/javascripts/discourse/app/templates/components/edit-category-settings.hbs
+++ b/app/assets/javascripts/discourse/app/templates/components/edit-category-settings.hbs
@@ -196,22 +196,6 @@
       {{/unless}}
     </div>
   </section>
-
-  <section class="field">
-    <label for="category-default-filter">
-      {{i18n "category.default_list_filter"}}
-    </label>
-    <div class="controls">
-      {{combo-box
-        id="category-default-filter"
-        valueProperty="value"
-        content=availableListFilters
-        value=category.default_list_filter
-        none="category.list_filters.all"
-      }}
-    </div>
-  </section>
-
   {{#if isParentCategory}}
     <section class="field show-subcategory-list-field">
       <label>
diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb
index 20e02ab..8a36480 100644
--- a/app/controllers/categories_controller.rb
+++ b/app/controllers/categories_controller.rb
@@ -329,7 +329,6 @@ class CategoriesController < ApplicationController
         :required_tag_group_name,
         :min_tags_from_required_group,
         :read_only_banner,
-        :default_list_filter,
         custom_fields: [params[:custom_fields].try(:keys)],
         permissions: [*p.try(:keys)],
         allowed_tags: [],
diff --git a/db/migrate/20200524181959_add_default_list_filter_to_categories.rb b/db/migrate/20200524181959_add_default_list_filter_to_categories.rb
deleted file mode 100644
index 4c43b5c..0000000
--- a/db/migrate/20200524181959_add_default_list_filter_to_categories.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddDefaultListFilterToCategories < ActiveRecord::Migration[6.0]
-  def change
-    add_column :categories, :default_list_filter, :string, limit: 20, default: 'all'
-  end
-end

GitHub sha: e1af91f5

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/new-non-functional-in-category-settings-page/153270/4