stream-chat-react icon indicating copy to clipboard operation
stream-chat-react copied to clipboard

feat: Implement a notification system for the whole application

Open MartinCupela opened this issue 1 year ago • 0 comments

Motivation

Provide a notification system that would serve as an independent module / service, exposing API for addition and removal of notification messages.

There is a component that renders message notifications called MessageListNotifications that is tightly coupled to the logic of message list (props hasNewMessages, isNotAtLatestMessageSet, ...)

Current state

  1. context provider of notification API - ChannelStateProvider
  2. context consumer hook for accessing the API - useChannelStateContext
  3. notification rendering component - MessageListNotifications

Acceptance Criteria

Introduction of:

  1. context provider of notification API
  2. context consumer hook for accessing the API
  3. notification rendering component

Some requirements:

  1. The notifications should be rendered at the top of the tree, not deeply as in MessageList
  2. The display duration of each message notifications should be configurable:
    1. be displayed until removed programmatically
    2. be displayed for a x configurable timeout long period
    3. be displayed until removed manually by clicking a close button
  3. Integrators should be able to provide own rendering component => control the visual part of the notifications
  4. CSS with configurable theme variables should be included

MartinCupela avatar Jul 13 '22 16:07 MartinCupela