Repository navigation
spec(TextInput, TextArea, search, ChatComposer): touch keyboard props and return-key defaults - #9424
Merged
Merged
Conversation
… and return-key defaults
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
AI review status for this pull request.
|
Contributor
Author
|
/approve-spec 59c50a3 |
This was referenced Nov 2, 2026
This branch was successfully deployed
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.
Maintainer impact
People typing into Astryx text fields on a phone get the keyboard each field needs. Callers can ask TextInput and TextArea for a phone pad, a number pad, or a URL keyboard, a Return key that says Next, Go, or Done, and no capitalization or correction for names and codes. Search fields show a Search key and stop autocorrecting queries. The chat composer's Return key says Send, because Enter sends. Desktop browsers ignore all of this, and what Enter does is unchanged everywhere (TextInput FR10, ChatComposerInput FR2). Every prop is optional and renders nothing when unset.
Nothing is built yet: every new rule carries an implementation gap and an evidence-gap verification row. This unblocks #8157, #8166, and #8167, with these required changes:
EnterKeyHint,InputMode, andAutoCapitalize(closed unions, nostringwidening), add'off'and'on'toAutoCapitalize, add the type test that rejects an arbitrary string, and take the keyboard props and thesearch,tel, andurltypes out of the generated Swift TextInput contract until the Swift field applies them (Swift TextInput FR6).enterKeyHintas the exportedEnterKeyHint, and add the type test.Exact decision needed
May callers set the touch keyboard on text fields, and do search fields and the chat composer label their own Return key?
Existing authority searched
architecture:public-component-api(INV2 naming, INV3 one concept per prop and closed unions, INV4 derive what you can, INV5 and INV25 admission),spec:AST-002DEC-1,spec:AST-082FR3 and DEC-14,spec:AST-017FR3, FR5, FR7, and FR59,family:input-fields, and the TextInput, Swift TextInput, TextArea, ChatComposerInput, CommandPaletteInput, and NumberInput records.BaseProps.tsleavesenterKeyHint,inputMode,autoCapitalize,autoCorrect, andspellCheckout on purpose, so INV5 does not admit them, and no current record decided them. TextInput listed keyboard hints as uncontracted.Decision
The owner chose keyboard A and return A on 2026-11-01. About
enterKeyHint, the owner added: "make sure it's a set enum then".enterKeyHint(EnterKeyHint:'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'). TextInput and TextArea also acceptinputMode(InputMode:'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'),autoCapitalize(AutoCapitalize:'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters'), andhasAutoCorrect. TextInput also acceptshasSpellCheck, and itstypeacceptssearch,tel, andurl. The three value types are closed unions exported from the package entry, with nostringwidening (INV3). The names follow INV2: native names stay, and on/off natives becomehas…, as TextAreahasSpellCheckalready is. Each API row is decided in TextInput's Public concepts table, FR16, and DEC-1, TextArea FR13, and ChatComposerInput FR17 (INV25). For Swift,spec:AST-082FR3 and DEC-14 apply: the Swift TextInput contract carries a keyboard prop ortypevalue only where its field applies it. Today the field applies none of them, which is recorded as an implementation gap (Swift TextInput FR6).enterkeyhint="search"andautocorrect="off"(family FR12 and DEC-10, CommandPaletteInput FR6). ChatComposerInput defaults toenterKeyHint="send", and its prop overrides that default (FR17, DEC-2). The search members have no caller prop for these hints: keyboard A admits the props only on TextInput, TextArea, and ChatComposerInput. These are keyboard hints only, so Enter's behavior is unchanged (TextInput FR10, ChatComposerInput FR2).[feat].typeare additive (spec:AST-017FR5, FR7).[feat]. The browser's default key label and autocorrection were undocumented, so they were never a released contract (FR3). No caller has to change source to keep working (FR1), and the change intentionally sets new keyboard direction rather than restoring an existing contract (FR7).enterKeyHint="enter"as the way to keep the plain Return key.Rejected alternatives
Claim scope and non-goals
The new claims are the touch-keyboard props and their value types, TextInput's three added types and the searchbox role (AR6), the search-input and composer defaults, and Swift's omission. Nothing else changes: Enter handling, the rest of each component's API, the other family members, and visual design.
Evidence and implementation relationship
This PR is spec-only. #8166 implements keyboard A for TextInput and TextArea, #8167 implements the composer prop and its Send default, and #8157 implements the search defaults. Each needs the changes listed under Maintainer impact.
Changed records
docs/specs/components/TextInput/TextInput.spec.md(contract table, compatibility, ownership, public concepts, FR16, AR6, verification, current-state impact, DEC-1)docs/specs/components/TextInput/TextInput.swift.spec.md(FR6, verification, contract table)docs/specs/components/TextArea/TextArea.spec.md(contract table, compatibility, ownership, public concepts, FR13, verification, current-state impact)docs/specs/components/Chat/ChatComposerInput.spec.md(contract table, compatibility, ownership, public concepts, FR17, verification, DEC-2)docs/families/input-fields.md(FR12, implementation gaps, verification, DEC-10)docs/specs/components/CommandPalette/CommandPaletteInput.spec.md(contract table, compatibility, FR6, verification)Writing rubric results
Rejected:line, because neither option the owner declined is likely to come back.Scope
Validation
pnpm install --frozen-lockfile: okpnpm check:knowledge: "Knowledge templates and records are aligned."git diff --check: ok