Repository navigation
feat(notifications): preference delivery preview before save - #1199
Merged
llinsss merged 1 commit intoOct 30, 2026
Merged
Conversation
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.
closes #1112
Summary
Adds an accessible delivery preview to the notification preferences screen (issue #1112) so an owner can see exactly what they will receive before saving — the channels a message travels on, and the precise event categories that will trigger delivery.
What changed (all additive; the panel only gains a preview section)
src/utils/notificationPreview.ts— pure, dependency-free helperbuildNotificationPreview(prefs)that derives, from the current selections: enabled channels (in-app is always available; sound / vibration / browser push reflect the toggles), the list of event categories that will trigger delivery, a privacy-mode note when Do Not Disturb quiet hours are on, and anisEmptyflag when no event type is enabled.src/components/Notifications/NotificationPreferencePreview.tsx— a keyboard- and screen-reader-friendly panel (<section>+ real<ul>lists, a liverole="status"summary, status text that does not rely on colour alone) rendered above the Save button, updating live as the owner toggles channels and categories.src/components/Notifications/NotificationPreferencesPanel.tsx— mounts the preview; no existing toggle or behaviour was changed.notificationPreview.test.ts(channel/category derivation, DND quiet-hours summary, empty/denied state, single-category boundary) andNotificationPreferencePreview.test.tsx(render + jest-axe accessibility, no violations).Privacy & scope
Verification
jest(ts-jest): 16/16 new tests passing across the two suites; full suite failure count unchanged vs baseline (104 pre-existing, environment-related) — zero regression.tsc --noEmit: no type errors in the added/changed files.