-
Notifications
You must be signed in to change notification settings - Fork 421
RI-7254 Update the visuals of the toast notifications #4963
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
Conversation
- update the interface and the way we serve the data for the infinite notification, so it will resemble more closely the expected format by Redis UI - rework the way we show the default "X" button for dismissing notifications - update the variant to reflect the expected design re #RI-7254
Code Coverage - Frontend unit tests
Test suite run success5129 tests passing in 676 suites. Report generated by 🧪jest coverage report action from 6490b87 |
| ...options, | ||
| delay: 100, | ||
| closeOnClick: false, | ||
| onClose, |
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.
Redis UI depends on React Toastify, which supports out of the box a callback handler when you dismiss a notification. If we want to follow the Figma design, we should rely on the built-in "dismiss" button, instead of adding a custom action button with an icon, and this is the only way to preserve the telemetry collection on close.
Before
We used to render an action button, with "X" icon and attach callback handler to it.
Also, when having more than a single action, we can't order them, and we end up with the dismiss action left to the primary one, which I think looks wrong.
After
However, Redis UI provides a built-in way to show a dismiss button.
So, here it is, the same thing, but using the native dismiss button.
And also, when we need to pair it with an action button.
…fications re #RI-7254
…tification re #RI-7254
…st notification re #RI-7254
…ification re #RI-7254
…ite notifications re #RI-7254
…notification re #RI-7254
…cation re #RI-7254
…ification re #RI-7254
Description
Update the visuals of the infinite notification to resemble more closely the Redis UI toasts, and the FIgma designs.
How it was tested
There are numerous use cases in which we use infinite notifications. Although we have a common way to dispatch these types of notifications, I still had to update the way we build up the data for each notification. Here are all of the updated notifications:
Authenticating
Or, dispatch manually the notification anywhere in the code:
Pending cloud database creation
Or, dispatch manually the notification anywhere in the code:
_Note: This notification can display different titles, based on the step in the process:
Successfully created Cloud database
Follow the steps from the previous use case (#Pending cloud database creation) and wait till the end, to see the success toast notification.
Or, dispatch manually the notification anywhere in the code:
Note: Here, we don't use the action button, because we have a lot of content and it becomes very ugly if we reduce it width (to make room for the two action buttons). Still, we can't use the semantic colored buttons, so the following visuals look off.
Database already exists
Follow the steps from the previous use case ([#Successfully created Cloud database](#successfully-created-cloud database)) and wait till the end, to see the toast notification that such a database already exists.
Or, dispatch manually the notification anywhere in the code:
Cloud Import Forbidden
I was not able to find a way to reproduce this scenario in the app, but you can manually open the notification this way:
Subscription already exists
I was not able to find a way to reproduce this scenario in the app, but you can manually open the notification this way:
Automatic creation of a database
I was not able to find a way to reproduce this scenario in the app, but you can manually open the notification this way:
App Update Available
Wait for a minute, and you'll notice the notification, suggesting you to restart the app
Or, dispatch manually the notification anywhere in the code:
Successfully deployed RDI pipeline
Wait for the action to complete, and you'll see the notification.
Or, dispatch the notification manually anywhere in the code: