-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add CheckboxGroup and RadioGroup components #830
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 790fa13 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🟢 No design token changes found |
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.
Copilot reviewed 16 out of 26 changed files in this pull request and generated no suggestions.
Files not reviewed (10)
- packages/react/src/forms/InputGroup/InputGroup.module.css: Language not supported
- packages/react/src/forms/RadioGroup/RadioGroup.tsx: Evaluated as low risk
- packages/react/src/forms/CheckboxGroup/CheckboxGroup.stories.tsx: Evaluated as low risk
- packages/react/src/forms/CheckboxGroup/CheckboxGroup.test.tsx: Evaluated as low risk
- packages/react/src/forms/index.ts: Evaluated as low risk
- packages/react/src/forms/CheckboxGroup/index.ts: Evaluated as low risk
- .changeset/popular-seas-yawn.md: Evaluated as low risk
- packages/react/src/forms/InputGroup/index.ts: Evaluated as low risk
- packages/react/src/forms/RadioGroup/RadioGroup.stories.tsx: Evaluated as low risk
- packages/react/src/forms/RadioGroup/index.ts: Evaluated as low risk
Comments skipped due to low confidence (3)
packages/react/src/forms/CheckboxGroup/CheckboxGroup.visual.spec.ts:8
- Consider removing the eslint-disable comment and ensuring that the code adheres to the i18n-text/no-en rule.
// eslint-disable-next-line i18n-text/no-en
packages/react/src/forms/InputGroup/InputGroup.tsx:20
- The error message should be more concise and specific, e.g., 'useInputGroup must be used within an InputGroupProvider.'
throw new Error('useInputGroup must be used within an InputGroupProvider. Did you forget to wrap your component in a <InputGroupProvider>?')
packages/react/src/forms/CheckboxGroup/CheckboxGroup.tsx:14
- [nitpick] Consider adding a comment explaining that CheckboxGroup is currently just an alias for InputGroup to provide context for future maintainers.
export const CheckboxGroup = InputGroup
Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more
🟢 No visual differences foundOur visual comparison tests did not find any differences in the UI. |
Summary
Adds
CheckboxGroup
andRadioGroup
components which, for the time being, are just implementations of the new privateControlGroup
component. These components allow us to groupRadio
andCheckbox
components using a<fieldset>
and label them with a<legend>
, providing a more accessible and semantic way to group related form elements.List of notable changes:
ControlGroup
component (alternate name suggestions welcome)CheckboxGroup
andRadioGroup
components, tests, and storiesStill to do (in future PRs)
What should reviewers focus on?
Steps to test:
Supporting resources (related issues, external links, etc):
Contributor checklist:
update snapshots
label to the PR)Reviewer checklist:
Screenshots: