-
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(InlineNotification): make statusIconDescription optional #5528
fix(InlineNotification): make statusIconDescription optional #5528
Conversation
Given `statucIconDescription` in `<InlineNotification>` and one in `<ToastNotification>` have a fallback value, they shouldn't have `isRequired` in their prop types. This change fixes that. Fixes carbon-design-system#5527.
ef11fd8
to
4b2ce6e
Compare
Deploy preview for carbon-elements ready! Built with commit ef11fd8 |
Deploy preview for carbon-components-react ready! Built with commit ef11fd8 https://deploy-preview-5528--carbon-components-react.netlify.com |
Deploy preview for carbon-components-react ready! Built with commit c957756 https://deploy-preview-5528--carbon-components-react.netlify.com |
Deploy preview for carbon-elements ready! Built with commit c957756 |
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
Would we prefer to not include the fallback value? It seems to not be adding much value and seemingly would read better if we had people specify a value. Also would understand if we wanted to improve the fallback value and make this change? Down either way. |
@tw15egan Any thoughts on the fallback value? Thanks! |
We should be consistent with other SVG description props throughout our components, so if we do not normally require them / provide fallback values, then they should be removed |
Good point @tw15egan, one question on this front. Though we have a fallback value, I think most application needs to provide |
If we're going to keep it required, then yeah we should remove the fallback since they will need to specify their own to satisfy g11n requirements. However, it seems like This seems to be another example of prop inconsistency that should be a major focus for v11. If we are requiring a prop, should we provide fallbacks that get picked up in testing, or make the user handle these cases right away by having a console warning? The initial prop was just added because it was initially just getting the same text as the close button. So I guess there are two options:
|
Good question, here's what I understand; The fallback value like one for For React |
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.
👍 ✅
Given `statucIconDescription` in `<InlineNotification>` and one in `<ToastNotification>` have a fallback value, they shouldn't have `isRequired` in their prop types. This change fixes that. Fixes #5527.
Given
statucIconDescription
in<InlineNotification>
and one in<ToastNotification>
have a fallback value, they shouldn't haveisRequired
in their prop types. This change fixes that.Fixes #5527.
Changelog
Changed
statusIconDescription
prop optional.Testing / Reviewing
Testing should make sure
<InlineNotification>
and<ToastNotification>
are not broken