-
Notifications
You must be signed in to change notification settings - Fork 100
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: updated components to use standalone checkbox/radio #5355
chore: updated components to use standalone checkbox/radio #5355
Conversation
Preview: https://patternfly-pr-5355.surge.sh A11y report: https://patternfly-pr-5355-a11y.surge.sh |
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.
Nice! Just a couple of nits/questions - curious your feedback. The PR is fine as-is though, we can follow up on those in another issue (or not at all).
Also wdyt about these two? From the react component perspective, would it be beneficial to use our check component for uses like this - ease of creating, attaching events, etc? It's probably easier to leave them as they are from core's perspective. If we use the check component, we will probably need to bump the specificity of the existing CSS that references the elements.
https://github.com/patternfly/patternfly/blob/main/src/patternfly/components/Switch/switch-input.hbs
https://github.com/patternfly/patternfly/blob/main/src/patternfly/components/Card/card-sr-input.hbs
{{#> check-input | ||
check-input--IsChecked=(concat dropdown-toggle-check--CheckboxIsChecked) | ||
check--IsDisabled=(concat dropdown-toggle--IsDisabled dropdown-toggle-check--IsInProgress) | ||
check-input--attribute=(concat 'id="' dropdown--id '-toggle-check" aria-label="' (ternary dropdown-toggle-check--aria-label dropdown-toggle-check--aria-label 'check')'"' (ternary dropdown-toggle--split-button--text (concat 'aria-labelledby="' dropdown--id '-toggle-check ' dropdown--id '-toggle-check-text"') '')) |
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.
🤯👍
I was considering both of these when going through things that had a sort of standalone checkbox/radio. They both felt independent enough from our checkbox component to not really need to be updated. It would probably depend if we'd need/want any of the styling coming from any of the |
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.
Nice work!!
🎉 This PR is included in version 5.0.0-alpha.11 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Closes #3830