[RFC] Application Notifications #3380
Janpot
announced in
Early feedback
Replies: 1 comment
-
Similar issue in core mui/material-ui#18098 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Which problem do we want to solve?
How do we solve the problem?
API
Notification types
We will support the following snackbar types, per the
severity
option:undefined
: plain snackbar. See https://mui.com/material-ui/react-snackbar/'info'
,'warning'
,'error'
,'success'
: alert in snackbar. See https://mui.com/material-ui/react-snackbar/#use-with-alertsDeduplication
Provide a
key
to the options to automatically deduplicate similar snackbars. Snackbars opened with the samekey
of an already open one doesn’t re-open.Concurrent notifications
When a notification comes in while another one is already open, the original one will be closed automatically.
As a further expansion of the notification feature we can imagine a stacking behavior, where opened notifications are queued, with a counter to indicate the amount of queued notifications. This is out of scope for this RFC.
Auto hide
Snackbars hide automatically after
autoHideDuration
(milliseconds) when provided.Actions
A notification can specify an action which renders as a button on the notification. The
onAction
handler is called when the user clicks that button.Example:
Beta Was this translation helpful? Give feedback.
All reactions