-
Notifications
You must be signed in to change notification settings - Fork 788
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
Implement Notification layer #2846
Comments
On the subject of the message itself: it would be tempting to allow any sort of renderable, but because the message may end up being routed somewhere other than the Textual application itself, we should stick with a string. The exception here though is that we will allow Rich markup as that can be handled within the application, while also capable of simply bring stripped or translated into some other markup. |
Early proof-of-concept, it very little code! Screen.Recording.2023-06-27.at.16.39.04.mov |
The initial version of this works fine, but is per-screen (which makes sense given that that's how Textual's DOM works). However, in further discussion, it's been decided that the notifications should work "above" the screens (in other words if you have a set of notifications visible, then push a fresh screen, those notifications should still be visible; likewise if you're a number of screens into the stack and add a notification and then pop a screen or 3 the currently-visible and still-not-expired notifications should still be visible). The initial work will be set aside (copying some of the visual ideas over, of course) in favour of a newer |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
We need a notification layer which presents text notification to the user. Notification should appear on the bottom right (configurable) and disappear after a few seconds (also configurable). Multiple notifications should stack as they appear.
Widgets should have a
notify
method to display a notification. Something like the following:Note that in the future these notifications may be displayed somewhere other than the Textual app.
Things to consider:
The text was updated successfully, but these errors were encountered: