Skip to content
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

Merged
merged 4 commits into from Jan 31, 2023

Conversation

thatblindgeye
Copy link
Contributor

Closes #3830

@patternfly-build
Copy link

patternfly-build commented Jan 26, 2023

Copy link
Contributor

@mcoker mcoker left a 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

src/patternfly/components/DataList/data-list-check.hbs Outdated Show resolved Hide resolved
{{#> 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"') ''))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤯👍

@thatblindgeye
Copy link
Contributor Author

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.

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 .pf-c-check... classes applying to the Switch or hidden Card input for any reason. In React there are some props already on Checkbox that are being applied to the input elements, but the same thing might apply re: the pf-c-check classes.

Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!!

@patternfly-build
Copy link

🎉 This PR is included in version 5.0.0-alpha.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

mattnolting pushed a commit to mattnolting/patternfly that referenced this pull request Feb 15, 2023
mattnolting pushed a commit to mattnolting/patternfly that referenced this pull request Feb 15, 2023
mattnolting pushed a commit to mattnolting/patternfly that referenced this pull request Feb 22, 2023
mattnolting pushed a commit to mattnolting/patternfly that referenced this pull request Feb 22, 2023
mattnolting pushed a commit to mattnolting/patternfly that referenced this pull request Feb 22, 2023
mattnolting pushed a commit to mattnolting/patternfly that referenced this pull request Feb 22, 2023
mattnolting pushed a commit to mattnolting/patternfly that referenced this pull request Mar 2, 2023
mattnolting pushed a commit to mattnolting/patternfly that referenced this pull request Mar 2, 2023
mattnolting pushed a commit to mattnolting/patternfly that referenced this pull request Mar 2, 2023
mattnolting pushed a commit to mattnolting/patternfly that referenced this pull request Mar 2, 2023
mattnolting pushed a commit to mattnolting/patternfly that referenced this pull request Mar 2, 2023
mattnolting pushed a commit to mattnolting/patternfly that referenced this pull request Mar 2, 2023
mattnolting pushed a commit to mattnolting/patternfly that referenced this pull request May 18, 2023
mattnolting pushed a commit to mattnolting/patternfly that referenced this pull request Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update components with single check/radio input to use check/radio component
3 participants