docs(contracts): M1 DataEntry contracts — FormField, TextField, SelectField, DateField, NumberField, CheckboxField - #272
Conversation
…tField, DateField, NumberField, CheckboxField Author Semantic + Interaction contracts for the six shipping DataEntry components in @sunfish/ui-react, per ADR 0017-A1 Phase M1 reverse-spec workflow. Each Semantic contract includes the ADR 0110 Definition of Done block citing the demo-story and visual-test gates. FormField is the field-wrapper that threads FormFieldContext (describedBy) to child inputs — the WCAG 2.2 AA compliance mechanism. Every field component documents its useFormField() wiring per the directive note. Native-input components (TextField, DateField, NumberField) and Radix-built components (SelectField, CheckboxField) are contracted honestly: known gaps (no HTML attribute passthrough, no onBlur callbacks, CheckboxField indeterminate suppression, NumberField wheel-scroll papercut) are flagged as council open questions rather than papered over. Every contract remains in Draft state — the frontend-architect council flip to Accepted lands separately, per ADR 0017 §A1.4. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 47 minutes and 23 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (12)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Summary
Authors Semantic + Interaction contracts for the six shipping DataEntry
components per ADR 0017-A1 Phase M1 reverse-spec workflow:
DataEntry/FormField.Semantic.md+.Interaction.mdDataEntry/TextField.Semantic.md+.Interaction.mdDataEntry/SelectField.Semantic.md+.Interaction.mdDataEntry/DateField.Semantic.md+.Interaction.mdDataEntry/NumberField.Semantic.md+.Interaction.mdDataEntry/CheckboxField.Semantic.md+.Interaction.mdEach Semantic contract carries the ADR 0110 Definition of Done block citing
the
demo-storyandvisual-testgates (baseline PNG path:src/components/forms/__screenshots__/).FormField is documented as the WCAG 2.2 AA compliance mechanism: the
FormFieldContext.describedBywiring is specified in §6 of theFormField.Semantic.md, and every field component's Semantic contract
documents how it consumes
useFormField()per the directive note.Native-input components (TextField, DateField, NumberField) and Radix-built
components (SelectField, CheckboxField) are contracted honestly. Known gaps
are flagged as council open questions:
onBlur/onFocuscallbacks (host owns blur-commit semantics).'indeterminate'payload — tri-stateis a deferred feature.
browser papercut).
<input type="date">picker — appearance andsome keyboard nuances are browser-owned.
Every contract remains in Draft state per ADR 0017 §A1.4.
Scope
companion PR (no cross-dependency — separate file paths).
origin/main; no implementation changes.Verification
git show origin/main:packages/ui-react/src/components/forms/<file>.tsxread for all six components plus FormFieldContext.tsx; contracts describe
observed behaviour.
integration section matches the actual
useFormField()consumer in source.baseline path
src/components/forms/__screenshots__/.Test plan
🤖 Generated with Claude Code