-
Notifications
You must be signed in to change notification settings - Fork 210
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
(feat) O3-2546: Add the ability to use actions in the existing toast #822
Conversation
Size Change: -716 kB (-21%) 🎉 Total Size: 2.75 MB
ℹ️ View Unchanged
|
@ibacher @denniskigen this PR is ready for review, please take a look. |
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.
Thanks @hadijahkyampeire! A few comments and questions here.
packages/apps/esm-implementer-tools-app/src/implementer-tools.component.tsx
Outdated
Show resolved
Hide resolved
packages/framework/esm-react-utils/__mocks__/openmrs-esm-styleguide.mock.tsx
Outdated
Show resolved
Hide resolved
packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx
Outdated
Show resolved
Hide resolved
packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx
Outdated
Show resolved
Hide resolved
@@ -44,6 +44,7 @@ | |||
<body> | |||
<%= htmlWebpackPlugin.tags.bodyTags %> | |||
<div class="omrs-toasts-container"></div> | |||
<div class="omrs-actionable-toasts-container"></div> |
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.
Have we looked into how things look when there are both toasts and actionable toasts?
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.
Actually not yet but I am going to test and see.
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.
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.
@ibacher would you propose we just modify the existing toast to accept actions or let new actionable toast use the same container for toast.
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.
Missed this since it got marked as resolved. I'd favour having all toasts in a single container.
0d434f7
to
3fd2ed6
Compare
@ibacher @denniskigen I have updated this PR to add the implementation to allow the use of an action, so it won't break anything as far as the existing toast works and for the parts where we want to add an action it can also allow. Please see the attached recording and review the changes. |
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.
Couple of things. Last question: are we sure that all actionable notifications should always remain until the user does something with them? I'd favour a more flexible system to allow the producer of the notification to decide. (For example, email applications now tend to offer an "undo send" feature, which displays an action you can take up until a certain timeout, after which the action goes away because the email has been sent).
packages/framework/esm-styleguide/src/toasts/toast.component.tsx
Outdated
Show resolved
Hide resolved
@ibacher I have implemented the changes, please take another look. |
02d9bb3
to
04f9aab
Compare
Is this good to go, @ibacher? |
Yes, I think so. |
Thanks @ibacher |
Requirements
For changes to apps
If applicable
Summary
Screenshots
Recording
toast-actions.mov
Related Issue