-
Notifications
You must be signed in to change notification settings - Fork 370
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
fix: [M3-8342] - Toast Notifications for Images #10664
fix: [M3-8342] - Toast Notifications for Images #10664
Conversation
link, | ||
hasSupportLink | ||
); | ||
if (failureMessage) { |
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.
Just added if
statements to ensure we only call enqueueSnackbar
if the message is defined
'&.notistack-MuiContent': { | ||
flexWrap: 'unset', | ||
}, |
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.
The Snackbar container defaults to flexWrap: 'wrap'
. We don't want the close button to wrap, so I added this to disable flex wrap.
Coverage Report: β
|
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 - looks good and the wrapping issue is now fixed β
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.
Changes LGTM
Semi-related, is it expected that the toast background in light mode now matches the variant instead of being white? (Personally, I am not a fan of the colored background)
Screen.Recording.2024-07-10.at.1.57.28.PM.mov
Yea it's part of CDS 2.0 |
Description π
useToastNotifications
that caused toasts to show up with no message π§maxWidth
to Toast Notifications on larger screens so that they don't take up the full width of the screenWithLongMessage
Storybook story πPreview π·
before-cancel-upload-toast.mov
after-cancel-upload-toast.mov
before-capture-error-toast.mov
after-capture-error-toast.mov
How to test π§ͺ
yarn storybook
and verify that all Toast variants look correct in both light π and dark mode πAs an Author I have considered π€