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:
Alan Guo Xiang Tan 2022-07-05 15:50:25 +08:00 committed by GitHub
parent 843907d1ac
commit 526e6e7a3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View File

@ -153,7 +153,9 @@ createWidget("user-menu-links", {
});
}
if (!this.currentUser.experimental_sidebar_enabled) {
glyphs.push(this.bookmarksGlyph());
}
if (this.siteSettings.enable_personal_messages || this.currentUser.staff) {
glyphs.push(this.messagesGlyph());

View File

@ -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", {
template: hbs`{{mount-widget widget="user-menu"}}`,