Repository navigation
Introduce State collection and rename validationState prop to state (#723) - #776
adamkudrna wants to merge 2 commits into
Conversation
|
There was a problem hiding this comment.
🟢 Approval recommended
The API migration is consistent, state priority matches the ADR, and comprehensive visual coverage includes the new behavior.
0 open findings
What changed in this PR
Introduces the State collection, adds the changed form-field state, and completes the breaking rename from validationState to state.
Changes:
- Adds state-specific types, colors, styling, and documentation.
- Migrates supported form components and exports to the new API.
- Implements and tests InputGroup state priority.
| File | Description |
|---|---|
src/types/*, src/index.ts |
Replaces ValidationState with State. |
src/styles/**, src/theme.scss |
Defines state tokens and form-field styling. |
src/components/_helpers/* |
Maps states to CSS classes. |
src/components/{CheckboxField,FileInputField,FormLayout,Radio,SelectField,TextArea,TextField,Toggle}/** |
Migrates component APIs and adds changed-state support. |
src/components/InputGroup/** |
Implements state aggregation and priority tests. |
src/components/TextLink/README.md |
Updates state documentation link. |
src/docs/** |
Documents the collection, colors, and theming. |
tests/playwright/** |
Replaces shared validation-state cases with state cases. |
| Component snapshot suites | Updates renamed snapshots and adds changed-state coverage. |
webpack.config.js |
Raises the production bundle limit. |
.claude/rules/frontend.md |
Updates the shared-type guidance. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
fe2598d to
e27bd0e
Compare
bedrich-schindler
left a comment
There was a problem hiding this comment.
I will review rest when we clarify conflicts between state and validation state. Generally, implementation seems fine, but I am not still sure whether we want to call it state, validation state or what. It is a now mixture of both. If we want to call it state, everything must be migrated. Let's clarify this to me at each comment. If needed, you can call me on Slack on mobile to speed the process up
Adds a
changedstate to form fields, as proposed in the ADR in #735. Validation states become a State collection (valid,invalid,warning,changed), withInputGrouppriorityinvalid>warning>changed>valid.Breaking changes
validationStateprop is renamed tostate, and theValidationStatetype toState.--rui-color-state-*tokens instead of Feedback colours. The defaults look the same, but themes that recolour form fields through--rui-color-feedback-*need to override--rui-color-state-*instead.#validation-statesis now#states.--rui-FormField--<STATE>--*token names are unchanged. The bundle size limit is raised to 470 kB.Closes #723