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
chore(NotificationBadge): remove deprecated isread prop #8626
chore(NotificationBadge): remove deprecated isread prop #8626
Conversation
Preview: https://patternfly-react-pr-8626.surge.sh A11y report: https://patternfly-react-pr-8626-a11y.surge.sh |
children, | ||
variant = isRead ? 'read' : 'unread', | ||
variant, |
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.
@tlabaj hmmm the default in what sense?
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.
@mmenestr In terms of the variant read
, unread
or attention
https://www.patternfly.org/v4/components/notification-badge#basic
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.
@tlabaj @mmenestr default and read do look the same. The core docs do say to specify a modifier for the state, though the requirement to add a state may have been a requirement from the previous designs, and looking at the code, it looks like the read modifier and default (no modifier) are the same more by chance, not because it's coded that way on purpose. A read notification badge is basically just an icon.
Unless we want to potentially introduce a "default" (no modifier) state for the notification badge that's different from "read", I think either updating the styling to be read by default (we would remove .pf-m-read
) or assigning a default value for variant
(variant={NotificationBadgeVariant.read}
) (like the variant prop, since a button also requires a modifier) would be fine.
A default/no-modifier badge could be something like
- neither read or unread, maybe you haven't clicked on it, or there is no state change regardless what you do to it
- we want a default state to be the regular icon button color (color-200) and the "read" color to be more grey, and/or italic (if there is text) or something
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.
lgtm other than the question about the default. Currently no variant
(or an invalid one) renders the component without a modifier and the core docs mention the component needs a specified state, so if we keep that requirement, I think we would add "read" as the default for variant
6ed1ca5
to
d1fae98
Compare
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.
LGTM
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.
👍👍
Your changes have been released in:
Thanks for your contribution! 🎉 |
What: Closes #8090