UX: Hide user menu bookmark link when experimental sidebar is enabled (#17336)
Sidebar has a link to bookmarks by default
This commit is contained in:
parent
843907d1ac
commit
526e6e7a3b
|
@ -153,7 +153,9 @@ createWidget("user-menu-links", {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
glyphs.push(this.bookmarksGlyph());
|
if (!this.currentUser.experimental_sidebar_enabled) {
|
||||||
|
glyphs.push(this.bookmarksGlyph());
|
||||||
|
}
|
||||||
|
|
||||||
if (this.siteSettings.enable_personal_messages || this.currentUser.staff) {
|
if (this.siteSettings.enable_personal_messages || this.currentUser.staff) {
|
||||||
glyphs.push(this.messagesGlyph());
|
glyphs.push(this.messagesGlyph());
|
||||||
|
|
|
@ -154,6 +154,21 @@ discourseModule(
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
componentTest("bookmarks - experimental sidebar enabled", {
|
||||||
|
template: hbs`{{mount-widget widget="user-menu"}}`,
|
||||||
|
|
||||||
|
beforeEach() {
|
||||||
|
this.currentUser.setProperties({ experimental_sidebar_enabled: true });
|
||||||
|
},
|
||||||
|
|
||||||
|
async test(assert) {
|
||||||
|
assert.notOk(
|
||||||
|
exists(".user-bookmarks-link"),
|
||||||
|
"user bookmark link is not displayed"
|
||||||
|
);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
componentTest("bookmarks", {
|
componentTest("bookmarks", {
|
||||||
template: hbs`{{mount-widget widget="user-menu"}}`,
|
template: hbs`{{mount-widget widget="user-menu"}}`,
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue