DEV: Add bookmarks tab to the new user menu (#17814)

Some of the changes in this commit are extracted from https://github.com/discourse/discourse/pull/17379.

The bookmarks tab in the new user menu is different from the other tabs in that it can display a mixture of notifications and bookmarks. When there are unread bookmark reminder notifications, the tab displays all of these notifications at the top and fills the remaining space in the menu with the rest of the bookmarks. The bubble/badge count on the bookmarks tab indicates how many unread bookmark reminder notifications there are.

On the technical aspect, since this commit introduces a new `bookmark-item` component, we've done some refactoring so that all 3 "item" components (`notification-item`, `reviewable-item` and the new `bookmark-item`) inherit from a base component and get identical HTML structure so they all look consistent.

Internal tickets: t70584 and t65045.
This commit is contained in:
Osama Sayegh
2022-08-08 17:24:04 +03:00
committed by GitHub
parent 94ac8611f4
commit 4fdb275683
47 changed files with 1024 additions and 135 deletions

View File

@@ -77,6 +77,7 @@ class CurrentUserSerializer < BasicUserSerializer
:sidebar_category_ids,
:sidebar_tag_names,
:likes_notifications_disabled,
:grouped_unread_high_priority_notifications,
:redesigned_user_menu_enabled
delegate :user_stat, to: :object, private: true
@@ -345,6 +346,10 @@ class CurrentUserSerializer < BasicUserSerializer
redesigned_user_menu_enabled
end
def include_grouped_unread_high_priority_notifications?
redesigned_user_menu_enabled
end
def include_unseen_reviewable_count?
redesigned_user_menu_enabled
end