Skip to content
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

Enhanced toast notifications #3059

Open
ashwin-pc opened this issue Dec 10, 2022 · 1 comment
Open

Enhanced toast notifications #3059

ashwin-pc opened this issue Dec 10, 2022 · 1 comment
Labels
discuss enhancement New feature or request

Comments

@ashwin-pc
Copy link
Member

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:

  1. 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.
  2. Once dismissed or timed out, there is no way for the user to see past notifications
  3. No way to act on a notification

Describe the solution you'd like

There are a few ways we can address the different problems:

  1. 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+)
  2. Notification Drawer: Notifications when emitted can be optionally be added to a notification drawer that the user can manually clear or take action from.
  3. 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.

https://github.com/ashwin-pc/OpenSearch-Dashboards/blob/0640b4646415b18da84414199d2331d6dfba4d61/src/plugins/dashboard/public/application/actions/replace_panel_flyout.tsx#L64-L79

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants