Notification center โ€” a panel for application notifications.

Page Title
Empty state
No items
No objects have been added here yet

The notification list opens from the main menu. The menu shows an unread message counter: it is hidden when the count is 0, and displays "99+" when the count exceeds 99.

New notifications appear in the list and are grouped by date, with the newest at the top. Each item has a title and timestamp; optionally it may include a caption and actions. A delete button appears on hover or focus. Messages can be cleared per day or all at once.

The date adapter and the formatter have to be provided at the application root โ€” importProvidersFrom(KbqLuxonDateModule, KbqFormattersModule) at bootstrap, or the Moment equivalent. KbqNotificationCenterService is providedIn: 'root' and reads both, so an adapter provided on a feature module or on a component does not reach it.

The date of a notification is any value the configured DateAdapter parses without an explicit format โ€” ISO 8601, RFC 2822 or SQL for the Luxon adapter. It drives both the date group and the ordering. A value the adapter cannot parse is shown verbatim as its own group heading and sorted last, instead of breaking the list.

Unread messages are marked with a blue dot and by an "Unread" label for screen readers. Dwelling on an item โ€” with the pointer or with keyboard focus โ€” or interacting with it (link, button, delete) marks the message as read.

In the empty state, a "No notifications" message is displayed and the "Delete all" button is hidden.

Page Title
Empty state
No items
No objects have been added here yet

If notifications fail to load, a "Failed to load notifications" message and a "Repeat" button are shown instead of the list. Enable this state with setErrorMode, and subscribe to KbqNotificationCenterService.onReload to retry loading when the button is pressed.

Page Title
Empty state
No items
No objects have been added here yet

The list can load notifications page by page as the user scrolls to the bottom. Subscribe to KbqNotificationCenterService.onNextPage to fetch the next page, append the result to items, and control the flow with setLoadingMore, setHasMore and setLoadMoreErrorMode. The threshold at which loading starts is configured with the scrolledToBottomOffset input.

Page Title
Empty state
No items
No objects have been added here yet

Notifications can be removed one by one, by date group, or all at once. Subscribe to KbqNotificationCenterService.onDelete to react to a removal โ€” for example, to delete the items on the server. The event fires for all three cases and carries type ('item', 'group' or 'all') and items โ€” the notifications that were removed. Removing a notification that is not in the list is a no-op and emits nothing, so a stale reference cannot trigger a phantom deletion on the server.

The notification center can be opened in a popover. For example, when placed in a horizontal menu.

App name
Issues
Projects
Suggestions for improvement
If you found a mistake or want to improve the article, create an issue on GitHub.