You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds complete, operable FormGroup Storybook controls in React and Web Components. Public FormGroup properties now have correctly typed defaults and controls, including the outer FormGroup rendered by the Web Components AI-label example.
Changelog
New
Added React controls and defaults for class name, disabled state, invalid state, legend ID, legend text, message visibility, and message text.
Added Web Components controls and defaults for invalid state, legend ID, legend text, message visibility, and message text.
Added outer FormGroup controls to the Web Components AI-label story.
Changed
Removed React control filtering that previously hid valid legendId and invalid controls.
Limited the React exclusion to the non-editable children prop.
Updated Web Components story templates to bind all public FormGroup properties.
Removed
None.
Testing / Reviewing
Use the repository Node version and start React Storybook:
nvm use
yarn workspace @carbon/react storybook
Open Components/FormGroup.
Verify class name, disabled, invalid, legend ID, legend text, message, and message-text controls update the group.
Start Web Components Storybook:
yarn workspace @carbon/web-components storybook
Open the FormGroup Default story and verify invalid, legend ID, legend text, message, and message-text controls.
Open the AI-label story and verify those same FormGroup controls affect the outer group while the existing child-state and AI-label controls continue working.
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.59%. Comparing base (cf4d689) to head (0fbc15c). ⚠️ Report is 19 commits behind head on main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #20925
Adds complete, operable FormGroup Storybook controls in React and Web Components. Public FormGroup properties now have correctly typed defaults and controls, including the outer FormGroup rendered by the Web Components AI-label example.
Changelog
New
Changed
legendIdandinvalidcontrols.childrenprop.Removed
Testing / Reviewing
Use the repository Node version and start React Storybook:
Open
Components/FormGroup.Verify class name, disabled, invalid, legend ID, legend text, message, and message-text controls update the group.
Start Web Components Storybook:
Open the FormGroup Default story and verify invalid, legend ID, legend text, message, and message-text controls.
Open the AI-label story and verify those same FormGroup controls affect the outer group while the existing child-state and AI-label controls continue working.
Run the focused checks:
Test Screenshot

PR Checklist
As the author of this PR, before marking ready for review, confirm you:
Tested for cross-browser consistencyMore details can be found in the [pull request guide](https://github.com/carbon-design-system/carbon/blob/main/docs/guides/reviewing-pull-requests.md).