Skip to content

Add ADR for the State collection (#723) - #735

Open
adamkudrna wants to merge 1 commit into
masterfrom
docs/state-collection-adr
Open

Add ADR for the State collection (#723)#735
adamkudrna wants to merge 1 commit into
masterfrom
docs/state-collection-adr

Conversation

@adamkudrna

Copy link
Copy Markdown
Member

Records the decision to introduce a State collection (valid, invalid, warning, changed) and to rename the form-field prop validationState to state, as the first architecture decision record in this project.

This is the record of the decision only — no implementation. Relates to #723, but deliberately does not close it: the changed state itself is still to be built.

What's here

  • src/docs/contribute/decisions/0001-state-collection.md — the ADR, status Proposed.
  • mkdocs.yml — a new Decisions group under Guides › Contribute, so the page isn't an orphan in the nav.

Open questions in the ADR

The document ends with four questions that need a decision before implementation starts:

  1. Do Switch helpText and validationText order #711 and helpText color #712 ride along in the same breaking-change window?
  2. Is changed the right word (vs. modified, unsaved, dirty)?
  3. Which hue for --rui-color-state-changed? Every blue-ish slot is taken.
  4. Does Card land in the same change or a follow-up?

Notes

  • No ADR structure existed before, so this PR establishes the location and numbering. No index page yet — worth adding once there's a second ADR.
  • Verified: npm run lint, mkdocs build, npm run build and npm run test:jest all pass. npm run test:playwright-ct:all could not run — the playwright container aborts with EBADDEVENGINES (Node v24.17.0 vs. the ^22.23.0 || ^24.19.0 pin from dd332ed). This is pre-existing on master and unrelated to this change; the container image likely needs rebuilding.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 31, 2026
@adamkudrna
adamkudrna temporarily deployed to pr-preview/pr-735 August 31, 2026 17:52 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://react-ui-org.github.io/react-ui/pr-preview/pr-735/

Built to branch gh-pages at 2026-08-31 20:43 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-project-automation github-project-automation Bot moved this to 💡Ideas in The Board Aug 31, 2026
@adamkudrna adamkudrna moved this from 💡Ideas to 👀 In review in The Board Aug 31, 2026
Record the decision to introduce a `State` collection (`valid`, `invalid`,
`warning`, `changed`) and rename the form-field prop `validationState` to
`state`, as the first architecture decision record in this project.

## Open questions

1. **Do #711 and #712 ride along?** All three rework the same rendering block,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think they should be a separate commit in the same release so consumers only deal with BC change once.

2. **Is `changed` the right word?** Alternatives: `modified`, `unsaved` (names
the workflow rather than the element), `dirty` (React jargon, reads poorly in
end-user documentation). Hard to change later.
3. **Which hue?** Every blue-ish slot is taken (`note` and `selected` `#007bff`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The consumer apps generally speaking redefine these, so I would let @adamkudrna pick whatever he likes.

what #712 is about, and their order is what #711 is about. Folding them together
would destroy the distinction those issues exist to sharpen.

## Alternatives considered

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm unsure about the relationship of the members of the state dictionary. Should they be mutually exclusive?

If we go with the proposal, then the usage would be:

  • invalid: used for modified and unmodified data that fail validation
  • warning: used for modified and unmodified data that fail validation soflty
  • valid: unused
  • changed: used for changed and valid data (as invalid data use the invalid state)

This seems somehow asymmetrical to me.

@adamkudrna what arguments do we have against using valid for modified and valid?

the same `surrounding-text-color` token and the same documentation sections.
One breaking-change window means dependent projects migrate once instead of
twice; separate PRs are cleaner to review. Leaning towards bundling.
2. **Is `changed` the right word?** Alternatives: `modified`, `unsaved` (names

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would go with either changed or modified. I have no clear preference between these two.

Comment thread mkdocs.yml
- CSS Guidelines: 'docs/contribute/css.md'
- Releasing: 'docs/contribute/releasing.md'
- Decisions:
- '1. State Collection': 'docs/contribute/decisions/0001-state-collection.md'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like having the ADRs public


## Open questions

1. **Do #711 and #712 ride along?** All three rework the same rendering block,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unfortunately the hash syntax does not work in *.md files:

Image

We need to use regular link I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

2 participants