Skip to content

spec(TextInput): React Native platform record - #12821

Draft
imdreamrunner wants to merge 3 commits into
chore/knowledge-react-native-platform-recordsfrom
spec/textinput-react-native-record
Draft

imdreamrunner wants to merge 3 commits into
chore/knowledge-react-native-platform-recordsfrom
spec/textinput-react-native-record

Conversation

@imdreamrunner

@imdreamrunner imdreamrunner commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #12592; merges after it.

Merge order: this record also cites spec:AST-126 (#12556, the system text box and when a host exists), spec:AST-127 (#12555, icons), spec:AST-129 (#12552, the keyboard) and the AST-112 amendment (#12563), whose FR21 defines render and the theme's render.default. It merges after those too.

Exact decision needed

How React Native presents TextInput: which core props each platform offers, which text box draws the field (the system text box or Astryx's field) and what each draws, and how the field's states, keyboard and accessibility behave on iOS and Android.

Existing authority searched

  • component:TextInput (docs/specs/components/TextInput/TextInput.spec.md): the props, states and words this record keeps; its FR16 puts the touch-keyboard props in the web contract and lets a platform carry one where its field applies it.
  • component:Tooltip FR5: a disabled control's reason opens on a tap under touch.
  • component:swift/TextInput: the Swift record, which carries text, password and email and no keyboard props; no React Native rendering.
  • family:input-fields: the labelled field, status placements, the clear control and grouped admission, which this record keeps.
  • spec:AST-126 (open draft): owns the system text box's native contract and FR2's rule for when a field uses it, including the shapes that stay drawn (inside an InputGroup, a start icon on Android).
  • spec:AST-112 amendment (open draft): FR21 defines render (auto, system, drawn) and records the package's presentation spelling as a gap.
  • spec:AST-082 FR3, FR4, FR7, FR17 and DEC-14: the core and platform contracts, portable forms, base props and icon names.
  • No other open pull request carries a React Native TextInput record.

Decision

docs/specs/components/TextInput/TextInput.react-native.spec.md (component:react-native/TextInput, platform_of: component:TextInput):

  • React Native exports TextInput under its core name with core's props and meanings. changeAction, onKeyDown, htmlName, autoComplete, width and the container*/control* styling inputs stay in the web contract, each with its reason (FR2). onChange receives the value alone; startIcon takes an icon name.
  • It adds onFocus and onBlur (no argument, any focus source), render, and an InputHandle ref (DEC-1).
  • The iOS and Android contracts carry the touch-keyboard props each platform's field applies: previous is an Android Return key only, and hasSpellCheck is iOS only, since Android's spelling marks follow autocorrect (FR4). Unset, capitalization and correction follow the type.
  • type takes text, password and email; inputMode brings up the search, phone and URL keyboards. Whether type also takes search, tel and url is OQ1.
  • render="auto" is the system text box wherever a host exists, as spec:AST-126 FR2 states; the field stays Astryx's field inside an InputGroup, with statusVariant="tooltip" (the system box has no status icon to carry the message), and with a start icon the system box cannot draw (FR6, marked human decision since its bases are open drafts). In the system box, the label, description and status stay Astryx's; an attached or detached status shows as core's detached placement, with its glyph below the box, so every status keeps a cue other than colour (FR7, AV3).
  • Astryx's field is React Native's TextInput in the field family's control box; its height grows with the text size, and its placeholder is drawn text that wraps and is never cut (FR8, FR9, DEC-2).
  • Disabled, read-only, clear, status, busy, Return (with core FR10's input-method exception), autofocus, base props and the grouped field are stated where React Native differs from the web (FR10–FR16). A disabled field's reason opens on a tap, as component:Tooltip FR5 states for touch. The theme reaches the system box only through spec:AST-126 FR11's list (FR17).
  • Accessibility: one element named once; on Android the field is labelled by its visible label so TalkBack does not name it by its text; the disabled reason is a hint and shows on a tap (AR1–AR6).
  • Where the package differs today, FRn gap lines say so: the presentation spelling and its default, a start icon, a tooltip status and a status with no message in the system box, enterKeyHint="previous" on iOS, hasSpellCheck on Android, inputMode="none" in the system box, and the disabled reason (a long press in Astryx's field, none in the system box).

Rejected alternatives

None recorded in the record.

Claim scope and non-goals

The record covers only what React Native adds to component:TextInput or does differently. The system text box's native contract, render, icons, the keyboard and the field family's shared rules stay with their owners, which the ownership lines name.

Evidence and implementation relationship

The record is a specification only and has no implementation in this pull request. It was read against the React Native package's TextInput, its generated contract, the field family's shared pieces and the platform text box, and against React Native's own TextInput props (spellCheck is iOS only; previous is an Android return key). The gap lines state where the package differs from the requirements.

Writing rubric results

  • R1 narration: none; the record is in the present tense, and DEC-2 states the placeholder rule with its reason in the present tense.
  • R2 research in the record: none; one-sentence reasons inside FR2, FR4, FR6, DEC-1 and DEC-2 only.
  • R3 evidence naming a change: none; every basis cell names records and claims.
  • R4 rejected alternatives over one line or outside a decision: none; the record keeps no Rejected: lines.
  • R5 pull request or issue references remaining: none in the record.
  • R6 ruled open questions still listing options: none; OQ1 is unanswered and lists no options.
  • R7 project status (build status or work order): package differences are stated as FRn gap lines; "not yet released" appears only in the template's lifecycle field and readiness cell.

Scope

Components: TextInput (React Native)

  • This PR contains specification records only.
  • It records observable behavior and preserves equivalent internal implementations.
  • Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract.
  • Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
  • It records one intentional durable decision, not a rescue for a separable tagalong.
  • The canonical knowledge owner, affected current claims, and overlapping open work are named; any ownership collision is resolved or called out for human decision.
  • Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them.
  • Public text and artifacts contain no internal Meta context.

Validation

  • node scripts/check-knowledge.mjs: knowledge templates and records are aligned; no finding in this record.
  • Prettier: --check clean on the record.
  • git diff --check: clean.

@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 19, 2026 6:47am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 19, 2026
@astracat-bot

astracat-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Nov 19, 2026, 6:54 AM UTC

@astracat-bot astracat-bot Bot left a comment

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.

Approval waits on an engineering owner's decision on this draft record, and four requirements need fixing first.

To fix:

  • FR7 shows a tooltip status as a detached message in the system box that the default render="auto" picks, but the input-field family requires every input to offer tooltip and a platform may not accept a value it only partly honors, so keep Astryx's field for a tooltip status (as for a start icon) or draw the status icon outside the box.
  • FR10, AR4 and the disabled-with-a-reason state open a disabled field's reason on a long press and attribute that to core, but core's touch behavior opens a disabled control's reason on a tap (Tooltip FR5), so use a tap and cite that clause.
  • FR14 says Return always calls onEnter, which drops core FR10's exception for a Return that commits an input-method conversion, an exception the record's own verification row still expects.
  • FR6 is marked settled, but its bases (AST-112 FR21, AST-126 FR2 and FR5) are not current records, so mark it human decision.

Owner decision: the record adds requirements no current record states, and FR6 names the text-box choice render where the public component API calls a surface choice presentation with adaptive-… values. An engineering owner approves or amends the record, including that naming, by commenting /approve-spec <full head SHA> on the head that carries the fixes; the author may do so as an engineering owner.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim: builds on the platform-records change, whose head is this pull request's base: verified.
  • Claim: cites four other open draft records and merges after them: verified; all four are open drafts.
  • Claim: core TextInput keeps the keyboard props in the web contract and a platform carries one only where its field applies it: verified (core FR16 names the Swift contract; the native-first surfaces spec FR3 states the general rule).
  • Claim: the Swift record carries text, password and email and no keyboard props: verified (Swift FR6).
  • Claim: the native-controls draft owns the system text box and the shapes that stay drawn: verified in its open pull request (FR2, FR5).
  • Claim: the foundation amendment's FR21 defines render and records the presentation spelling as a gap: verified in its open pull request.
  • Claim: the native-first surfaces spec's FR3, FR4, FR7, FR17 and DEC-14 cover the contracts, portable forms, base props and icon names: verified.
  • Claim: no other open pull request carries a React Native TextInput record: consistent with a repository search.
  • Claim: each decision bullet matches the record (FR1–FR17, AR1–AR6, the gap lines): verified; four of those requirements are the findings above.
  • Claim: specification only, with no implementation: verified (one Markdown file).
  • Claim: writing rubric results R1–R7: verified against the record.
  • Claim: no internal context in public text: verified.
  • Claim: the knowledge check, Prettier and the whitespace check are clean: verified at this head.
  • File: docs/specs/components/TextInput/TextInput.react-native.spec.md: the four findings above.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

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.

Approval waits on an engineering owner's decision on this draft record, and one requirement needs fixing first.

To fix:

  • Miss: in the system box that the default render="auto" picks, an attached status (core TextInput's default) colours only the border and shows no status glyph (FR7, AV3), but core TextInput requires every status to carry a cue other than colour, so show attached there as detached, with its glyph in the message box, and say what cue a status with no message keeps.

Owner decision: the record adds requirements no current record states, and FR6 names the text-box choice render where the public component API calls a surface choice presentation with adaptive-… values. An engineering owner approves or amends the record, including that naming, by commenting /approve-spec <full head SHA> on the head that carries the fix; the author may do so as an engineering owner.

The earlier four fixes are in: FR6's review state, the tooltip placement, the tap that opens a disabled reason, and Return during an input-method conversion. A non-blocking point: the native-controls draft's list of shapes that keep Astryx's field does not yet include the tooltip placement this record adds.

Claims and files checked

Review mode: full; reason: spec-record

  • Claim: builds on the platform-records change, whose head is this pull request's base: verified.
  • Claim: cites four other open draft records and merges after them: verified; all four are open drafts.
  • Claim: core TextInput keeps the touch-keyboard props in the web contract and a platform carries one only where its field applies it: verified (core FR16; the native-first surfaces spec's FR3).
  • Claim: the Tooltip record opens a disabled control's reason on a tap under touch: verified (Tooltip FR5).
  • Claim: the Swift record carries text, password and email and no keyboard props: verified (Swift FR6).
  • Claim: the input-field family owns the labelled field, status placements, the clear control and grouped admission: verified.
  • Claim: the native-controls draft owns the system text box and lists the shapes that stay drawn (inside an InputGroup, a start icon on Android): verified in its open pull request (FR2, FR5).
  • Claim: the foundation amendment's FR21 defines render and records the presentation spelling as a gap: verified in its open pull request.
  • Claim: the native-first surfaces spec's FR3, FR4, FR7, FR17 and DEC-14 cover the contracts, portable forms, base props and icon names: verified.
  • Claim: no other open pull request carries a React Native TextInput record: consistent with a repository search.
  • Claim: each decision bullet matches the record (FR1–FR17, AR1–AR6, AV3, the gap lines): verified; the system box's attached status is the finding above.
  • Claim: no rejected alternatives are recorded: verified.
  • Claim: specification only, with no implementation: verified (one Markdown file).
  • Claim: writing rubric results R1–R7: verified against the record.
  • Claim: the knowledge check, Prettier and the whitespace check pass: verified at this head.
  • Claim: no internal context in public text: verified.
  • File: docs/specs/components/TextInput/TextInput.react-native.spec.md: one finding (FR7, AV3) and one non-blocking note (FR6); the rest conforms or waits on the owner decision.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

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.

Approval waits only on an engineering owner's decision on this draft record: the earlier fix is in, as the record now gives every status in the system box its glyph below the box (FR7, AV3), and no record fix remains.

Owner decision: the record adds requirements no current record states, and FR6 names the text-box choice render where the public component API calls a surface choice presentation with adaptive-… values; an engineering owner approves or amends the record, that naming included, by commenting /approve-spec <full head SHA> on this head, and the author may do so as an engineering owner.

Non-blocking: the native-controls draft's list of shapes that keep Astryx's field does not yet include the tooltip placement FR6 adds.

Claims and files checked

Review mode: full; reason: spec-record

  • Claim: builds on the platform-records change, whose head is this pull request's base, and merges after it: verified.
  • Claim: cites four other open draft records and merges after them: verified; all four are open drafts.
  • Claim: core TextInput keeps the touch-keyboard props in the web contract and a platform carries one only where its field applies it: verified (core FR16; the native-first surfaces spec's FR3).
  • Claim: the Tooltip record opens a disabled control's reason on a tap under touch: verified (Tooltip FR5).
  • Claim: the Swift record carries text, password and email and no keyboard props: verified (Swift FR6).
  • Claim: the input-field family owns the labelled field, status placements, the clear control and grouped admission: verified.
  • Claim: the native-controls draft owns the system text box and its rule for when a field uses it, including the shapes that stay drawn: verified in its open pull request (FR2, FR5).
  • Claim: the foundation amendment's FR21 defines render and records the presentation spelling as a gap: verified in its open pull request.
  • Claim: the native-first surfaces spec's FR3, FR4, FR7, FR17 and DEC-14 cover the contracts, portable forms, base props and icon names: verified.
  • Claim: no other open pull request carries a React Native TextInput record: consistent with a repository search.
  • Claim: each decision bullet matches the record (FR1–FR17, AR1–AR6, the system-box status shown as detached with its glyph, the gap lines): verified.
  • Claim: no rejected alternatives are recorded: verified.
  • Claim: specification only, with no implementation: verified (one Markdown file).
  • Claim: writing rubric results R1–R7: verified against the record.
  • Claim: the knowledge check, Prettier and the whitespace check pass: verified at this head.
  • Claim: no internal context in public text: verified.
  • File: docs/specs/components/TextInput/TextInput.react-native.spec.md: no blocking finding; one non-blocking note (FR6 against the native-controls draft's list); the rest conforms or waits on the owner decision.

Automated review (maintainer link)

This branch was successfully deployed

1 active deployment
Preview — 9305bcaf Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant