-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented Global Notification System #1984
base: main
Are you sure you want to change the base?
Conversation
… UI. Improved aesthetics of notification banner
…he notification overlay UI previously just used for temporary notifications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nitpicks and a suggestion for some duplicated initializers. Adding the FeatureIcon
was a good idea! Documentation is also top notch.
CodeEdit/Features/InspectorArea/FileInspector/FileInspectorView.swift
Outdated
Show resolved
Hide resolved
|
||
import SwiftUI | ||
|
||
struct CloseButtonStyle: ButtonStyle { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably be in it's own file
CodeEdit/Features/Notifications/Views/NotificationOverlayView.swift
Outdated
Show resolved
Hide resolved
CodeEdit/Features/Notifications/Views/NotificationOverlayView.swift
Outdated
Show resolved
Hide resolved
CodeEdit/Features/Notifications/Views/NotificationOverlayView.swift
Outdated
Show resolved
Hide resolved
- Add system notification action button that, when clicked, focuses CodeEdit, runs the action, and dismisses the corresponding CodeEdit notification. - Dismissing a CodeEdit notification now also dismisses its corresponding system notification, and vice versa. - The notification panel in a workspace now closes when clicking outside of it, behaving like other menus. - Refactored notification state management: Moved display-related state from `NotificationService` to a dedicated view model to ensure notification panels remain independent across workspaces.
…ector can be enabled with a setting found in the hidden developer settings page.
…ification panel is presented. Removed notification tests and made the notification test in the dev inspector more configurable.
…nOverlay to notificationPanel. Fixed SwiftLint errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last question, and reopened a comment that I think was mistakenly resolved
CodeEdit/Features/Documents/WorkspaceDocument/WorkspaceDocument.swift
Outdated
Show resolved
Hide resolved
Oh whoops. I closed it not by mistake. I created the OverlayButtonStyle but didn't realize I left CloseButtobStyle there. I'll remove it. |
Description
This PR introduces a global notification system in CodeEdit that allows users to receive and manage notifications across all open workspaces. Notifications provide important alerts and updates while ensuring consistency across multiple instances of the application.
Note
To test, go to Settings, press F12. Go to the Developer page and toggle on "Show Internal Development Inspector". In a workspace, in the inspector, open the new internal development inspector by clicking the hammer icon.
Key Features
Temporary Notifications:
Sticky Notifications:
Notification Button & Popover:
Behavior:
Screenshots
Screen.Recording.2025-02-14.at.4.09.29.PM.mp4
Screen.Recording.2025-02-14.at.5.36.32.PM.mov
The following screen recording showcases the first iteration. In the design channel on Discord, @thecoolwinter suggested moving in this direction. While it required a bit more effort, I agree that it ultimately results in a much cleaner and more polished look.
Screen.Recording.2025-02-12.at.12.42.55.PM.mov
Usage
With a symbol (works with both SF Symbols and CodeEditSymbols)
The icon defaults to the users accent color if one isn't specified however you can specify a color here...
With a custom image...
With an emoji...
With text...
Future Considerations
Currently, NotificationManager is shared between workspaces. This is intentional because notifications should generally speaking be global and not workspace specific. We may at some point allow for workspace specific notifications in addition to global notifications.
Related Issues
Checklist