Repository navigation
docs(decisions): make Input Field-aware (option A) + prototype - #630
Draft
interacsean wants to merge 4 commits into
Draft
interacsean wants to merge 4 commits into
interacsean wants to merge 4 commits into
Conversation
Contributor
Code Metrics Report
Details | | main (cc749d5) | #630 (d15c6d5) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 89.3% | 89.3% | +0.0% |
| Files | 228 | 229 | +1 |
| Lines | 7241 | 7252 | +11 |
+ | Covered | 6471 | 6482 | +11 |
+ | Test Execution Time | 2m54s | 2m43s | -11s |Code coverage of files in pull request scope (100.0% → 100.0%, patch 100.0%)
Reported by octocov |
Contributor
Author
|
This is an impact assessment of fixing the odd-one-out unconnected nature of Input component, so that it is aware of Field, and its intended usage aligns with all other form input components we provide. The prototype included in this PR (now) handles the situation where Input is provided as the render prop of Field.Control. Field.Control looks for this anti-pattern, sorts it out internally and emits a deprecation warning. This is largely to reduce the impact on the large number of consumers who already use the pattern we are moving away from There are a number of implementations that will require a little more hand-holding, but it is manageable (My guided) claude findings follow: |
interacsean
force-pushed
the
docs/input-field-proposal
branch
from
October 23, 2026 05:33
c65c25d to
3bedd34
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
interacsean
force-pushed
the
docs/input-field-proposal
branch
from
October 23, 2026 05:34
3bedd34 to
51ef488
Compare
Input now renders Base UI's Field.Control, so inside a Field.Root it links
the label, description and error, takes the field's name and disabled
state, and submits through Form. When Field.Control renders it
(render={<Input />}), it keeps the old native element so the field has one
control, and logs a once-per-page deprecation warning.
Adds a before/after showcase page and tests covering the common ways Input
is composed with Field.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
interacsean
force-pushed
the
docs/input-field-proposal
branch
from
October 23, 2026 06:53
cc57b39 to
d77bdd2
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Decision record and prototype for making
InputField-aware (option A). Follows #629.Decision record
decisions/input-field.mdrecords why option A (rewireInputin place, next minor, released as a fix) was chosen over adding a separateInputField, or changing only the docs and warnings.Prototype (not ready to merge as-is)
Inputrenders Base UI'sField.Control. Inside aField.Rootit links the label, description and error, takes the field'snameanddisabled, and submits throughForm.Field.Controlrenders it (render={<Input />}),Inputkeeps the old native element. The field still has one control, and a deprecation warning logs once per page.input-field.test.tsxcovers the common waysInputis composed withField./showcase/input-fieldin the vite example shows the before and after side by side for 11 cases.Notable result:
noValidatedoes not stop Field validation, so a newly wiredInputwithtype="email",min/maxorrequiredcan now blockonFormSubmit.🤖 Generated with Claude Code