Skip to content

Fix/245 notification read unread distinction#278

Merged
Mosas2000 merged 31 commits intomainfrom
fix/245-notification-read-unread-distinction
Mar 16, 2026
Merged

Fix/245 notification read unread distinction#278
Mosas2000 merged 31 commits intomainfrom
fix/245-notification-read-unread-distinction

Conversation

@Mosas2000
Copy link
Copy Markdown
Owner

Closes #245

Initialize both the ref and a new state variable from localStorage so
the timestamp can be exposed to consumers and trigger re-renders when
updated.
When the user marks all notifications as read, update both the ref
(for immediate unread-count filtering) and the state (for downstream
consumers that need the value as a prop).
Consumers can now pass this timestamp to NotificationBell to
distinguish read from unread notification items.
Uses lastSeenTimestamp to check if a notification arrived after the
last time the user opened the dropdown. Returns false when the prop
is null to treat everything as read by default.
The green dot now only appears next to notifications that arrived
after lastSeenTimestamp. Read notifications no longer show the dot.
Unread items get a light blue background (bg-blue-50 in light mode,
bg-blue-900/20 in dark mode) to make them visually distinct from
already-read notifications.
Covers empty address, event filtering, and unread count based on
lastSeen timestamp.
Covers: unread dot visibility, read dot hiding, background highlight,
mixed read/unread items, null lastSeenTimestamp treating all as read,
and zero lastSeenTimestamp treating all as unread.
…side

Adds boundary tests for exact and one-second-after lastSeen, loading
and empty state rendering, aria-label correctness, region role, and
click-outside dropdown dismissal.
Covers item rendering, 20-item limit, dot CSS classes, simultaneous
highlight of multiple unread items, and mark-all-read button behavior.
@Mosas2000 Mosas2000 merged commit 000f2e4 into main Mar 16, 2026
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NotificationBell shows all items as unread with no visual distinction

1 participant