-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Description
We need to implement a global notification system that persists across all open workspaces in CodeEdit. This system will ensure that important events and alerts are accessible from any workspace while maintaining synchronization across all open instances of the application.
When a notification is triggered, it will temporarily appear in the active workspace for a few seconds before automatically hiding. The notification count in the toolbar will update across all open workspaces, ensuring consistency. Users can click the notification button to view all notifications in a popover, allowing them to take action even after the temporary display disappears.
Notifications will include an icon, title, description, and two buttons:
- Dismiss: Removes the notification.
- Action Button: Custom label depending on the notification type.
Unread notifications will persist in the popover until dismissed, and interactions will stay in sync across all workspaces.
Requirements
Global Scope
- Notifications apply to the entire application, not individual workspaces.
- If multiple workspaces are open, the notification indicator updates in real-time across all instances.
Notification UI
- A notification button will be added to the toolbar in each workspace when unread notifications exist.
- This button displays the count of unread notifications.
- Clicking the button opens a popover displaying all notifications.
Temporary Notification Display
- New notifications should temporarily appear in the active workspace for a few seconds.
- They do not appear in inactive workspaces but will update the toolbar count.
- Hovering over the notification should reset the timer, preventing it from disappearing.
Notification Details
Each notification should contain:
- An icon to visually differentiate types of notifications.
- A title describing the notification.
- A description providing additional context.
- Two buttons:
- Dismiss: Removes the notification.
- Action Button: Custom label for the relevant action.
Synchronization
- Notifications should stay in sync across all open workspaces.
- Dismissing a notification in one workspace should update all other workspaces accordingly.
Persistence
- Unread notifications should persist in the popover until dismissed.
- Read/unread status should be tracked so users know what requires attention.
Additional Context
Technical Considerations
- Implement a centralized notification store to manage notifications globally.
- Use a publish-subscribe pattern or another event-driven mechanism for real-time updates.
- Ensure dismissed notifications are properly removed across all workspaces.
- Use lightweight animations for temporary notification displays to keep the UI smooth.
Future Enhancements
- Notification Categories: Consider adding types of notifications (e.g., system alerts, updates, user messages).
- Customization Options: Allow users to configure how long notifications remain visible.
Prototype
I’ve created a prototype video showcasing how this might look.
Screen.Recording.2025-02-10.at.9.33.52.AM.mov
Tasks
- Design and implement the notification UI (button, popover, and temporary display).
- Implement the global notification store and synchronization logic.
- Ensure real-time updates across all open workspaces.
- Implement dismiss and action button functionality.
- Add persistence for unread notifications.
- Handle edge cases (e.g., opening new workspaces, closing workspaces, app restarts).
- Test for performance and responsiveness.
Related Issues
Metadata
Metadata
Assignees
Labels
Type
Projects
Status