chore(Form/FormGroup): Include OUIAProps for Form and FormGroup#12426
chore(Form/FormGroup): Include OUIAProps for Form and FormGroup#12426mshriver wants to merge 2 commits into
Conversation
Co-authored-by: Claude <noreply@anthropic.com>
WalkthroughThis PR adds OUIA (OpenUI5 Unified API) support to the Form and FormGroup components in PatternFly React Core. Both components now accept optional ChangesOUIA Support for Form Components
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsStopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Preview: https://pf-react-pr-12426.surge.sh A11y report: https://pf-react-pr-12426-a11y.surge.sh |
Includes Form and FormGroup ActionGroup and LoginForm too, as they use Forms
There was a problem hiding this comment.
Pull request overview
Adds Open UI Automation (OUIA) attribute support to the Form and FormGroup components in react-core to improve automated testability, and updates related documentation/tests to reflect the new attributes.
Changes:
- Add
OUIAPropssupport anduseOUIAPropsintegration toFormandFormGroup. - Update OUIA documentation list to include
FormandFormGroup. - Update relevant Jest snapshots to include the new
data-ouia-*attributes.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/react-core/src/helpers/OUIA/OUIA.md | Adds Form and FormGroup to the documented list of OUIA-compliant components. |
| packages/react-core/src/components/Form/Form.tsx | Implements OUIA props on the <form> root element. |
| packages/react-core/src/components/Form/FormGroup.tsx | Implements OUIA props on the FormGroup root <div>. |
| packages/react-core/src/components/LoginPage/tests/snapshots/LoginForm.test.tsx.snap | Updates snapshots to include OUIA attributes emitted by Form/FormGroup (and resulting generated IDs). |
| packages/react-core/src/components/Form/tests/snapshots/Form.test.tsx.snap | Updates Form snapshots for new OUIA attributes. |
| packages/react-core/src/components/Form/tests/snapshots/FormGroup.test.tsx.snap | Updates FormGroup snapshots for new OUIA attributes (and nested Form usage in some cases). |
| packages/react-core/src/components/Form/tests/snapshots/ActionGroup.test.tsx.snap | Updates snapshot due to Form now emitting OUIA attributes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [cssMaxWidth.name]: maxWidth, | ||
| ...props.style | ||
| } as React.CSSProperties | ||
| })} | ||
| {...props} |
There was a problem hiding this comment.
This is true for the main branch and I'd rather not include this change to the props processing behavior in this PR
What:
Add OUIAProps support to Form and FormGroup, for better test automation support.
First contribution, believe I've followed contributing guidelines.
Opus/Sonnet used for initial commit and mentioned as co-author.
Tear it up! Thanks for review and consideration.
Summary by CodeRabbit
New Features
ouiaId(number or string) andouiaSafe(boolean) properties.ouiaSafedefaulting to true.Documentation