-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(notification): change box-shadow to border #4299
fix(notification): change box-shadow to border #4299
Conversation
This change also makes inline notification's text color non-themeable for now, given the background color is non-themeable and making it themeable requires themeable component-specific token (or new global theme tokens). This stop-gap approach may be enough for short team because IIRC low-contrast notifications is there for a backword-compatibility reason. Refs carbon-design-system#4282.
Deploy preview for the-carbon-components ready! Built with commit e6a76de https://deploy-preview-4299--the-carbon-components.netlify.com |
Deploy preview for carbon-elements ready! Built with commit e6a76de |
Deploy preview for carbon-components-react ready! Built with commit e6a76de https://deploy-preview-4299--carbon-components-react.netlify.com |
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.
packages/components/src/components/notification/_inline-notification.scss
Outdated
Show resolved
Hide resolved
…cation.scss Co-Authored-By: emyarod <emyarod@users.noreply.github.com>
@asudoh should this address the Toast variation as well? Noticed this: |
672d7cd
to
6bad633
Compare
Great catch @abbeyhrt! Fixed. |
Oops another good catch @abbeyhrt! 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.
Yeah our notifications kind of break our theming modal (without component level tokens). I think its ok for now if we make these non-themeable. I think its more important that they look right for use at IBM than allowing people to theme them. I know there were issues brought up around this last time we tried to update notifications and I'm not sure where the discussion ended with that.
The Gray 10 and White low contrast notifications look good!
However, the low contrast notifications in the gray 90 and gray 100 themes still aren't correct according to the new spec (let me know if its not possible to achieve this in code then we'll need to evaluate what the options are).
@aagonzales Thank you for the review! The problem is that we don't have a theme token that achieves the color switch as you specified. Does this make sense...? |
Ok so is achieving this style of dark notification not possible? Can it only be the same color as the Gray 10 and white ones? How can we resolve this? I need some help on the technical side to figure out how we can move forward or what the next round of design parameters should include base off of technical constraints. Can we hard code these values across the themes? Do we need to have a component level tokens (if we can't then why not?). Is the only solution to have one style for all 4 themes? |
@aagonzales Thank you for your further thoughts!
Yes with the status quo of underlying codebase.
Here are some options I can think of:
BTW from your below comment, I'm kind of under impression that you may be thinking of changing colors in application code (instead of us doing that) based on the theme of their choice. Please let me know if it's the case.
|
Ok so I think maybe we can go ahead with adding the border style into the components because at least those will be correct in the White and Gray 10 themes. Then in a separate issue/PR we can figure out how to correctly implement the low contrast notifications in the dark themes. Changes needed before merging:
|
Thanks for the updated spec @aagonzales! 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.
Oops thank you for catching that @aagonzales! 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.
Looks good to me!
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.
Yup, looks good for now. Thanks for fixing!
(Note: we will address the low contrast dark theme issues separately)
This change also makes inline notification's text color non-themeable for now (good to have your thoughts here @aagonzales given it's different from your latest spec), given the background color is non-themeable and making it themeable requires themeable component-specific token (or new global theme tokens).
This stop-gap approach may be enough for short team because IIRC low-contrast notifications is there for a backword-compatibility reason. (CC @shixiedesign to verify my memory)
Refs #4282.
Changelog
Changed
Testing / Reviewing
Testing should make sure our inline notification is not broken.