Skip to content

feat(ui): group notifications by app with optional filter tabs#2960

Draft
karlitschek wants to merge 1 commit intomasterfrom
split/07-grouping-filters
Draft

feat(ui): group notifications by app with optional filter tabs#2960
karlitschek wants to merge 1 commit intomasterfrom
split/07-grouping-filters

Conversation

@karlitschek
Copy link
Copy Markdown
Member

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.

    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.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants