Skip to content

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

FEATURE: revert redirect from wizard to guide (#26873)

Krzysztof Kotlarek74f1a79d36a9
diff --git a/app/assets/javascripts/discourse/app/templates/wizard/step.gjs b/app/assets/javascripts/discourse/app/templates/wizard/step.gjs
index acdfd268f59..f2e0f6f5e20 100644
--- a/app/assets/javascripts/discourse/app/templates/wizard/step.gjs
+++ b/app/assets/javascripts/discourse/app/templates/wizard/step.gjs
@@ -2,7 +2,6 @@ import Component from "@glimmer/component";
import { action } from "@ember/object";
import { service } from "@ember/service";
import RouteTemplate from "ember-route-template";
-import DiscourseURL from "discourse/lib/url";
import { defaultHomepage } from "discourse/lib/utilities";
import WizardCanvas from "discourse/static/wizard/components/wizard-canvas";
import WizardStep from "discourse/static/wizard/components/wizard-step";
@@ -35,16 +34,6 @@ export default RouteTemplate(
return this.step.id === "ready";
}
- #goHomeOrQuickStart() {
- if (this.siteSettings.bootstrap_mode_enabled) {
- DiscourseURL.routeTo(
- `/t/${this.siteSettings.admin_quick_start_topic_id}`
- );
- } else {
- this.router.transitionTo(`discovery.${defaultHomepage()}`);
- }
- }
-
@action
goNext(response) {
const next = this.step.next;
@@ -54,7 +43,7 @@ export default RouteTemplate(
} else if (response?.success && next) {
this.router.transitionTo("wizard.step", next);
} else if (response?.success) {
- this.#goHomeOrQuickStart();
+ this.router.transitionTo(`discovery.${defaultHomepage()}`);
}
}
@@ -65,7 +54,7 @@ export default RouteTemplate(
@action
goHome() {
- this.#goHomeOrQuickStart();
+ this.router.transitionTo(`discovery.${defaultHomepage()}`);
}
}
);
diff --git a/spec/system/wizard_spec.rb b/spec/system/wizard_spec.rb
index 1d1fae26938..9e0bfe54f16 100644
--- a/spec/system/wizard_spec.rb
+++ b/spec/system/wizard_spec.rb
@@ -15,14 +15,4 @@ describe "Wizard", type: :system do
expect(page).to have_current_path("/latest")
end
-
- it "redirects to admin guide when wizard is completed and bootstrap mode is enabled" do
- SiteSetting.bootstrap_mode_enabled = true
- SiteSetting.admin_quick_start_topic_id = topic.id
-
- visit("/wizard/steps/ready")
- wizard_page.click_jump_in
-
- expect(page).to have_current_path("/t/admin-guide-with-15-chars/#{topic.id}")
- end
end