feat(ui): group notifications by app with optional filter tabs#2960
Draft
karlitschek wants to merge 1 commit intomasterfrom
Draft
feat(ui): group notifications by app with optional filter tabs#2960karlitschek wants to merge 1 commit intomasterfrom
karlitschek wants to merge 1 commit intomasterfrom
Conversation
The notification list is now rendered as one collapsible <ul> per app instead of a flat transition-group, with a per-group count badge in the header. Group headers are only shown when there is more than one app, so single-app users see the same flat list as before. A row of filter tabs (All / Mentions / Files / Other) appears when notifications span at least three categories. Switching filter rebuilds the groups; if the active filter ends up empty, it falls back to "All". Group expand/collapse is local UI state only — collapsed items remain in the DOM (v-show) so toggling stays cheap. Items also get a subtle staggered entrance animation via a CSS variable `--anim-index`. * NotificationsApp.vue: notificationGroups, filterTabs, showFilterTabs computed; collapsedGroups, activeFilter data; toggleGroup, formatAppName, visibleIndex helpers; watcher resets stale filters * onRemove(index) becomes onRemove(notification) since the v-for now iterates groups, not the flat array * styles.scss: filter tabs, group header, staggered item animation Note: this PR has known performance implications on accounts with many notifications and the grouping logic is expected to move to the server side. Tracked as follow-up. Signed-off-by: Frank Karlitschek <frank@nextcloud.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The notification list is now rendered as one collapsible
per app instead of a flat transition-group, with a per-group count badge in the header. Group headers are only shown when there is more than one app, so single-app users see the same flat list as before.- NotificationsApp.vue: notificationGroups, filterTabs, showFilterTabs computed; collapsedGroups, activeFilter data; toggleGroup, formatAppName, visibleIndex helpers; watcher resets stale filters
- onRemove(index) becomes onRemove(notification) since the v-for now iterates groups, not the flat array
- styles.scss: filter tabs, group header, staggered item animation
A row of filter tabs (All / Mentions / Files / Other) appears when notifications span at least three categories. Switching filter rebuilds the groups; if the active filter ends up empty, it falls back to "All".
Group expand/collapse is local UI state only — collapsed items remain in the DOM (v-show) so toggling stays cheap. Items also get a subtle staggered entrance animation via a CSS variable
--anim-index.Note: this PR has known performance implications on accounts with many notifications and the grouping logic is expected to move to the server side. Tracked as follow-up.