UX: do not show site header on wizard pages (#18037)
This commit is contained in:
parent
4ca6717994
commit
5d44c31bfa
|
@ -81,6 +81,11 @@ export default Controller.extend({
|
||||||
return enableSidebar;
|
return enableSidebar;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@discourseComputed("router.currentRouteName")
|
||||||
|
showSiteHeader(currentRouteName) {
|
||||||
|
return !currentRouteName.startsWith("wizard");
|
||||||
|
},
|
||||||
|
|
||||||
@action
|
@action
|
||||||
toggleSidebar() {
|
toggleSidebar() {
|
||||||
// enables CSS transitions, but not on did-insert
|
// enables CSS transitions, but not on did-insert
|
||||||
|
|
|
@ -3,16 +3,18 @@
|
||||||
<DDocument />
|
<DDocument />
|
||||||
<PluginOutlet @name="above-site-header" @connectorTagName="div" />
|
<PluginOutlet @name="above-site-header" @connectorTagName="div" />
|
||||||
|
|
||||||
<SiteHeader
|
{{#if this.showSiteHeader}}
|
||||||
@canSignUp={{this.canSignUp}}
|
<SiteHeader
|
||||||
@showCreateAccount={{route-action "showCreateAccount"}}
|
@canSignUp={{this.canSignUp}}
|
||||||
@showLogin={{route-action "showLogin"}}
|
@showCreateAccount={{route-action "showCreateAccount"}}
|
||||||
@showKeyboard={{route-action "showKeyboardShortcutsHelp"}}
|
@showLogin={{route-action "showLogin"}}
|
||||||
@toggleMobileView={{route-action "toggleMobileView"}}
|
@showKeyboard={{route-action "showKeyboardShortcutsHelp"}}
|
||||||
@toggleAnonymous={{route-action "toggleAnonymous"}}
|
@toggleMobileView={{route-action "toggleMobileView"}}
|
||||||
@logout={{route-action "logout"}}
|
@toggleAnonymous={{route-action "toggleAnonymous"}}
|
||||||
@sidebarEnabled={{this.sidebarEnabled}}
|
@logout={{route-action "logout"}}
|
||||||
@toggleSidebar={{action "toggleSidebar"}} />
|
@sidebarEnabled={{this.sidebarEnabled}}
|
||||||
|
@toggleSidebar={{action "toggleSidebar"}} />
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<SoftwareUpdatePrompt />
|
<SoftwareUpdatePrompt />
|
||||||
|
|
||||||
|
|
|
@ -101,13 +101,6 @@ acceptance(
|
||||||
exists(".sidebar-container"),
|
exists(".sidebar-container"),
|
||||||
"does not display the sidebar on wizard route"
|
"does not display the sidebar on wizard route"
|
||||||
);
|
);
|
||||||
|
|
||||||
await click(".hamburger-dropdown");
|
|
||||||
|
|
||||||
assert.ok(
|
|
||||||
exists(".sidebar-hamburger-dropdown"),
|
|
||||||
"navigation around the site can still be done via the sidebar hamburger"
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test("showing and hiding sidebar", async function (assert) {
|
test("showing and hiding sidebar", async function (assert) {
|
||||||
|
|
|
@ -14,6 +14,10 @@ acceptance("Wizard", function (needs) {
|
||||||
test("Wizard starts", async function (assert) {
|
test("Wizard starts", async function (assert) {
|
||||||
await visit("/wizard");
|
await visit("/wizard");
|
||||||
assert.ok(exists(".wizard-container"));
|
assert.ok(exists(".wizard-container"));
|
||||||
|
assert.notOk(
|
||||||
|
exists(".d-header-wrap"),
|
||||||
|
"header is not rendered on wizard pages"
|
||||||
|
);
|
||||||
assert.strictEqual(currentRouteName(), "wizard.step");
|
assert.strictEqual(currentRouteName(), "wizard.step");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue