UX: Don't hide new navigation item in experimental new new view (#26094)

Why this change?

Before this change, the new navigation item in the topic list will be
hidden when there are no new or unread topics for the user. We have
started to find this behaviour confusing UX wise so we decided to stop
hiding it.
This commit is contained in:
Alan Guo Xiang Tan
2024-03-08 09:26:09 +08:00
committed by GitHub
parent 05653e11cb
commit 26df6dfc5f
3 changed files with 13 additions and 4 deletions

View File

@@ -32,14 +32,14 @@ export default Component.extend({
return contentFilterType === filterType;
},
@discourseComputed("content.count")
isHidden(count) {
@discourseComputed("content.count", "content.name")
isHidden(count, name) {
return (
!this.active &&
this.currentUser &&
!this.currentUser.new_new_view_enabled &&
this.currentUser.trust_level > 0 &&
(this.content.get("name") === "new" ||
this.content.get("name") === "unread") &&
(name === "new" || name === "unread") &&
count < 1
);
},