feat: redesign notification system#3018
Merged
MartinCupela merged 8 commits intomasterfrom Mar 17, 2026
Merged
Conversation
oliverlaz
reviewed
Mar 17, 2026
Comment on lines
+21
to
+22
| /** @deprecated use isNotificationTargetPanel */ | ||
| export const isNotificationOriginPanel = isNotificationTargetPanel; |
Member
There was a problem hiding this comment.
Was this code isolated from somewhere else? Otherwise, pushing new deprecated code doesn't make a lot of sense.
Maybe we can remove this.
oliverlaz
reviewed
Mar 17, 2026
| const latestNotificationRef = useRef<Notification | null>(null); | ||
| const listRef = useRef<HTMLDivElement | null>(null); | ||
| const observedElementRef = useRef<HTMLDivElement | null>(null); | ||
| const startedTimeoutIdsRef = useRef(new Set<string>()); |
Member
There was a problem hiding this comment.
Suggested change
| const startedTimeoutIdsRef = useRef(new Set<string>()); | |
| const startedTimeoutIdsRef = useRef<Set<string>>(); | |
| if (!startedTimoutIdsRef.current) { | |
| startedTimeoutIdsRef.current = new Set(); | |
| } |
lets avoid creating new Set() on every re-render.
0f142a7 to
de34cb3
Compare
# Conflicts: # package.json # yarn.lock
|
Size Change: +4.23 kB (+0.99%) Total Size: 431 kB
ℹ️ View Unchanged
|
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.
🎯 Goal
Depends on GetStream/stream-chat-js#1706
Introduce a notification targeting system that lets SDK components emit notifications that are consumed by panel-specific
NotificationListinstances.channel,thread,channel-list,thread-list.useNotificationTargetis available and used instead of repeating local panel detection logic.NotificationListcan consume notifications for a specific panel via shared targeting/filtering helpers.NotificationListdisplays single notification at once. Once that is dismissed / expires, the next one in the queue is displayed.Channel.tsxThread.tsxChannelList.tsxThreadList.tsxBREAKING CHANGE: replaced addNotification from ChannelStateContenxt with client.notifications API