Is your feature request related to a problem? Please describe.
Today toast notifications provided by the notifications service have a few drawback and limitations that can cause user frustration and require hacky solutions by individual plugins to overcome. Some of these issues are:
It can easily overwhelm the user since they have very little controls to prevent frequent rerender errors from spewing out multiple toasts for the same event.
Once dismissed or timed out, there is no way for the user to see past notifications
No way to act on a notification
Describe the solution you'd like
There are a few ways we can address the different problems:
Notification ID: Multiple notifications with the same ID will result inthe notification being displayed only once with the timeout being reset each time and the count displayed with some truncation limit (e.g. 99+)
Notification Drawer: Notifications when emitted can be optionally be added to a notification drawer that the user can manually clear or take action from.
Notification actions: Add a provision to add actions to toasts that the user can take to act on a notification directly
Describe alternatives you've considered
-
Additional context
Here is an example of how the dashboards plugin makes sure that no more than one notification is shown at a time.
Is your feature request related to a problem? Please describe.
Today toast notifications provided by the notifications service have a few drawback and limitations that can cause user frustration and require hacky solutions by individual plugins to overcome. Some of these issues are:
Describe the solution you'd like
There are a few ways we can address the different problems:
Describe alternatives you've considered
-
Additional context
Here is an example of how the dashboards plugin makes sure that no more than one notification is shown at a time.
https://github.com/ashwin-pc/OpenSearch-Dashboards/blob/0640b4646415b18da84414199d2331d6dfba4d61/src/plugins/dashboard/public/application/actions/replace_panel_flyout.tsx#L64-L79