From f95464ba8180019431b25c138f892654fc4ab59d Mon Sep 17 00:00:00 2001 From: Martin Brennan Date: Tue, 11 Feb 2025 12:47:40 +1000 Subject: [PATCH] Revert "UX: Hide inner site settings sidebar if admin sidebar enabled (#31047)" (#31267) This reverts commit 91e9c1c81343990d5ebbb3a3bb7c68ec4445d610. After feedback, for now we are reverting this change. This is not permanent, the settings sidebar will be removed again, after we: * Visually group the settings the same way as the sidebar does on All Settings * Add more settings pages to the main admin sidebar to cover the ~250 settings not yet represented there --- .../admin-site-settings-filter-controls.gjs | 2 - .../addon/controllers/admin-site-settings.js | 16 ++---- .../addon/routes/admin-site-settings-index.js | 13 ++--- .../templates/site-settings-category.hbs | 15 ++--- .../admin/addon/templates/site-settings.hbs | 55 ++++++++----------- .../common/admin/site-settings.scss | 7 --- config/locales/client.en.yml | 3 - 7 files changed, 38 insertions(+), 73 deletions(-) diff --git a/app/assets/javascripts/admin/addon/components/admin-site-settings-filter-controls.gjs b/app/assets/javascripts/admin/addon/components/admin-site-settings-filter-controls.gjs index 39818db2413..73d837d9555 100644 --- a/app/assets/javascripts/admin/addon/components/admin-site-settings-filter-controls.gjs +++ b/app/assets/javascripts/admin/addon/components/admin-site-settings-filter-controls.gjs @@ -6,7 +6,6 @@ import { action } from "@ember/object"; import didInsert from "@ember/render-modifiers/modifiers/did-insert"; import didUpdate from "@ember/render-modifiers/modifiers/did-update"; import DButton from "discourse/components/d-button"; -import autoFocus from "discourse/modifiers/auto-focus"; import { i18n } from "discourse-i18n"; export default class AdminSiteSettingsFilterControls extends Component { @@ -72,7 +71,6 @@ export default class AdminSiteSettingsFilterControls extends Component { {{/if}} {{/each}} {{#if this.category.hasMore}} - {{#if this.currentUser.use_admin_sidebar}} -

{{i18n - "admin.site_settings.more_site_setting_results_no_category_sidebar" - count=this.category.maxResults - }}

- {{else}} -

{{i18n - "admin.site_settings.more_site_setting_results" - count=this.category.maxResults - }}

- {{/if}} +

{{i18n + "admin.site_settings.more_site_setting_results" + count=this.category.maxResults + }}

{{/if}} {{else}} diff --git a/app/assets/javascripts/admin/addon/templates/site-settings.hbs b/app/assets/javascripts/admin/addon/templates/site-settings.hbs index e7da32e1c77..4b4b33d6b45 100644 --- a/app/assets/javascripts/admin/addon/templates/site-settings.hbs +++ b/app/assets/javascripts/admin/addon/templates/site-settings.hbs @@ -19,39 +19,32 @@ @onToggleMenu={{this.toggleMenu}} /> -{{#if this.showSettingCategorySidebar}} -
-
-{{/if}} + {{category.name}} + {{#if category.count}} + ({{category.count}}) + {{/if}} + + + {{/each}} + + -
+
{{outlet}}
diff --git a/app/assets/stylesheets/common/admin/site-settings.scss b/app/assets/stylesheets/common/admin/site-settings.scss index 121302471af..82683559988 100644 --- a/app/assets/stylesheets/common/admin/site-settings.scss +++ b/app/assets/stylesheets/common/admin/site-settings.scss @@ -19,10 +19,3 @@ } } } - -.admin-site-settings { - .admin-detail.-without-inner-sidebar { - border-left: 0; - width: 100%; - } -} diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index cd03168a0a6..bdead0ea318 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -7250,9 +7250,6 @@ en: more_site_setting_results: one: "There is more than %{count} result. Please refine your search or select a category." other: "There are more than %{count} results. Please refine your search or select a category." - more_site_setting_results_no_category_sidebar: - one: "There is more than %{count} result. Please refine your search." - other: "There are more than %{count} results. Please refine your search." clear_filter: "Clear" add_url: "add URL" add_host: "add host"