From ce2388e40b44a10a7b1577b689c9d5042c0c6dbe Mon Sep 17 00:00:00 2001 From: Martin Brennan Date: Wed, 8 May 2024 10:00:40 +1000 Subject: [PATCH] FEATURE: Remove "Enable Sidebar" step from setup wizard (#26926) This keeps coming up in user testing as something we want to get rid of. The `navigation_menu` setting has been set to sidebar by default for some time now, and we are rolling out admin sidebar widely. It just doesn't make sense to let people turn this off in the first step of the wizard -- we _want_ people to use the sidebar. --- config/locales/server.en.yml | 3 --- lib/wizard/builder.rb | 7 ------- spec/lib/wizard/wizard_builder_spec.rb | 4 +--- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 2fa9a55ad68..3a6013a1da1 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -5306,9 +5306,6 @@ en: chat_enabled: placeholder: "Enable chat" extra_description: "Engage with your members in real time" - enable_sidebar: - placeholder: "Enable sidebar" - extra_description: "Access your favorite spaces with ease" ready: title: "Your site is ready!" diff --git a/lib/wizard/builder.rb b/lib/wizard/builder.rb index 1f6c395366d..8711f855c69 100644 --- a/lib/wizard/builder.rb +++ b/lib/wizard/builder.rb @@ -89,13 +89,6 @@ class Wizard ) end - step.add_field( - id: "enable_sidebar", - type: "checkbox", - icon: "bars", - value: SiteSetting.navigation_menu == NavigationMenuSiteSetting::SIDEBAR, - ) - step.on_update do |updater| updater.update_setting(:login_required, updater.fields[:login_required]) updater.update_setting(:invite_only, updater.fields[:invite_only]) diff --git a/spec/lib/wizard/wizard_builder_spec.rb b/spec/lib/wizard/wizard_builder_spec.rb index 1f29450798b..7a428aa0496 100644 --- a/spec/lib/wizard/wizard_builder_spec.rb +++ b/spec/lib/wizard/wizard_builder_spec.rb @@ -79,7 +79,7 @@ RSpec.describe Wizard::Builder do chat_enabled_field = fields.second_to_last if defined?(::Chat) navigation_menu_field = fields.last - count = defined?(::Chat) ? 5 : 4 + count = defined?(::Chat) ? 4 : 3 expect(fields.length).to eq(count) expect(login_required_field.id).to eq("login_required") expect(login_required_field.value).to eq(true) @@ -91,8 +91,6 @@ RSpec.describe Wizard::Builder do expect(chat_enabled_field.id).to eq("chat_enabled") expect(chat_enabled_field.value).to eq(true) end - expect(navigation_menu_field.id).to eq("enable_sidebar") - expect(navigation_menu_field.value).to eq(true) end end