Skip to content

A platform for community discussion. Free, open, simple.

UX: Remove "Getting Started" button in header when in bootstrap mode (#36231)

Penar Musarajf64b89b96ba9
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index ce2fb81ea0f..c42beb0db86 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -320,7 +320,6 @@ en:
message: "We've updated this site, <span>please refresh</span> to keep things working smoothly."
dismiss: "Dismiss"
- bootstrap_mode: "Getting started"
back_button: "Back"
welcome_banner:
diff --git a/frontend/discourse/app/components/bootstrap-mode-notice.gjs b/frontend/discourse/app/components/bootstrap-mode-notice.gjs
deleted file mode 100644
index a3cbaf17d68..00000000000
--- a/frontend/discourse/app/components/bootstrap-mode-notice.gjs
+++ /dev/null
@@ -1,24 +0,0 @@
-import Component from "@glimmer/component";
-import { action } from "@ember/object";
-import { service } from "@ember/service";
-import DButton from "discourse/components/d-button";
-import DiscourseURL from "discourse/lib/url";
-
-export default class BootstrapModeNotice extends Component {
- @service siteSettings;
-
- @action
- routeToAdminGuide() {
- DiscourseURL.routeTo(
- `/t/-/${this.siteSettings.admin_quick_start_topic_id}`
- );
- }
-
- <template>
- <DButton
- @action={{this.routeToAdminGuide}}
- @label="bootstrap_mode"
- class="btn-default bootstrap-mode"
- />
- </template>
-}
diff --git a/frontend/discourse/app/components/header/contents.gjs b/frontend/discourse/app/components/header/contents.gjs
index 162956ab80b..8d501527be7 100644
--- a/frontend/discourse/app/components/header/contents.gjs
+++ b/frontend/discourse/app/components/header/contents.gjs
@@ -4,8 +4,6 @@ import { ALL_PAGES_EXCLUDED_ROUTES } from "discourse/components/welcome-banner";
import deprecatedOutletArgument from "discourse/helpers/deprecated-outlet-argument";
import lazyHash from "discourse/helpers/lazy-hash";
import { applyValueTransformer } from "discourse/lib/transformer";
-import { and } from "discourse/truth-helpers";
-import BootstrapModeNotice from "../bootstrap-mode-notice";
import PluginOutlet from "../plugin-outlet";
import HeaderSearch from "./header-search";
import HomeLogo from "./home-logo";
@@ -14,8 +12,6 @@ import TopicInfo from "./topic/info";
export default class Contents extends Component {
@service site;
- @service currentUser;
- @service siteSettings;
@service header;
@service router;
@service navigationMenu;
@@ -103,16 +99,6 @@ export default class Contents extends Component {
{{#if @topicInfoVisible}}
<TopicInfo @topicInfo={{@topicInfo}} />
- {{else if
- (and
- this.siteSettings.bootstrap_mode_enabled
- this.currentUser.staff
- this.site.desktopView
- )
- }}
- <div class="d-header-mode">
- <BootstrapModeNotice />
- </div>
{{/if}}
{{#if this.showHeaderSearch}}
diff --git a/frontend/discourse/tests/acceptance/bootstrap-mode-notice-test.js b/frontend/discourse/tests/acceptance/bootstrap-mode-notice-test.js
deleted file mode 100644
index ef90ee5e311..00000000000
--- a/frontend/discourse/tests/acceptance/bootstrap-mode-notice-test.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { visit } from "@ember/test-helpers";
-import { test } from "qunit";
-import { acceptance } from "discourse/tests/helpers/qunit-helpers";
-
-acceptance("Bootstrap Mode Notice", function (needs) {
- needs.user({ admin: true });
- needs.site({ wizard_required: true });
- needs.settings({
- bootstrap_mode_enabled: true,
- bootstrap_mode_min_users: 50,
- });
-
- test("is displayed if bootstrap mode is enabled", async function (assert) {
- this.siteSettings.bootstrap_mode_enabled = true;
- await visit("/");
- assert.dom(".bootstrap-mode").exists();
- });
-
- test("is hidden if bootstrap mode is disabled", async function (assert) {
- this.siteSettings.bootstrap_mode_enabled = false;
- await visit("/");
- assert.dom(".bootstrap-mode").doesNotExist();
- });
-});
diff --git a/spec/system/wizard_spec.rb b/spec/system/wizard_spec.rb
index bf9953b6720..d54aba3d1fc 100644
--- a/spec/system/wizard_spec.rb
+++ b/spec/system/wizard_spec.rb
@@ -47,17 +47,6 @@ describe "Wizard", type: :system do
expect(page).to have_current_path("/")
end
- it "redirects to homepage even when bootstrap mode is enabled" do
- topic = Fabricate(:topic_with_op, title: "Admin Getting Started Guide")
- SiteSetting.bootstrap_mode_enabled = true
- SiteSetting.admin_quick_start_topic_id = topic.id
-
- wizard_page.go_to_step("setup")
- wizard_page.fill_field("text", "title", "My Test Site")
- wizard_page.click_jump_in
- expect(page).to have_current_path("/")
- end
-
it "prevents submission when title is empty" do
wizard_page.go_to_step("setup")
wizard_page.fill_field("text", "title", "")