Skip to content

spec(SegmentedControl): React Native platform record - #12831

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

imdreamrunner wants to merge 4 commits into
chore/knowledge-react-native-platform-recordsfrom
spec/segmentedcontrol-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 segmented control and when a host exists), spec:AST-127 (#12555, icons) 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 SegmentedControl: which control draws the segments (UISegmentedControl or Astryx's control) and for which shapes, what Astryx's control draws, how labels behave at every text size, and how selection, the keyboard, the disabled state and accessibility work on iOS and Android.

Existing authority searched

  • component:SegmentedControl and component:SegmentedControlItem (docs/specs/components/SegmentedControl/): the props, states and words this record keeps; core FR5 truncates a label in a narrow segment, and core FR9–FR14 state the selection motion.
  • component:Tooltip FR5: a disabled control's reason opens on a tap under touch.
  • spec:AST-126 (open draft): owns UISegmentedControl's native contract (FR6), FR2's rule for when SegmentedControl uses it, including the shapes that stay drawn, and DEC-2 (a shape the system control cannot show draws the Astryx control).
  • spec:AST-112 amendment (open draft): FR21 defines render and records the package's presentation spelling as a gap.
  • spec:AST-082 FR3, FR4, FR7, FR11, FR17 and DEC-2: the core and platform contracts, icon slots, base props, native-first and theme-only visuals.
  • No React Native SegmentedControl record exists, and no other open pull request carries one.

Decision

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

  • React Native exports SegmentedControl and SegmentedControlItem with core's props and meanings; an item's icon is a shared icon name; xstyle stays in the web contract, and neither takes a ref (FR1).
  • The iOS contract adds render: auto is UISegmentedControl wherever its host exists; Android has no host for Material 3's segmented button, so its contract has no render and the control is always Astryx's there (DEC-2: a prop a platform does not honor is not offered there). This departs from spec:AST-082 FR3 and from spec:AST-126 FR2, which offers render on both platforms; the record lists the departure under Current-state impact. On iOS, Astryx's control draws for a disabled reason, a segment with both an icon and a label, large text, a word break, a control wider than its room, and items in an app's wrapper component (FR2, marked human decision since its bases are open drafts).
  • The system control shows titles or SF Symbols with UIKit's own motion and feedback, and no library haptic (FR3). Astryx's control draws the theme's track and raised selected surface, with a capsule shape when the theme's render.default is system (FR4).
  • Astryx's control never cuts a label: a long label wraps at word breaks, and at large text or a word break the segments wrap into balanced rows (FR6, DEC-1). This departs from core FR5's truncation; DEC-1 gives the reason.
  • Selection, the hardware-keyboard model and the disabled state follow core; a disabled reason is each segment's hint and opens on a tap (FR5, FR7, FR8).
  • Accessibility: a radio group named by a hidden label read first, each segment a radio with its checked state, no announcement on a change (AR1–AR4).
  • Android's platform control is Material 3's segmented button, which the package has no host for; Android's drawn control is a spec:AST-082 FR11 gap line, and OQ1 (held by spec:AST-126 OQ2) asks whether Android gets that host.
  • FRn gap lines state where the package differs: no render prop, an icon the system control drops, no slide, drag or lift, one Tab stop per segment, and a long press for the disabled reason.

Rejected alternatives

None recorded in the record.

Claim scope and non-goals

The record covers only what React Native adds to component:SegmentedControl and component:SegmentedControlItem or does differently. The system control's native contract, render and icons 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 SegmentedControl and SegmentedControlItem, their generated contracts, and the platform segmented control's host. The gap lines state where the package differs from the requirements.

Writing rubric results

  • R1 narration: none; the record is in the present tense.
  • R2 research in the record: none; one-sentence reasons inside FR2, 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: SegmentedControl, SegmentedControlItem (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 7:48am UTC

Request Review

@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, 7:55 AM UTC

@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 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 a spec decision: this record adds draft requirements that no current record states yet, so an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. The owners need to settle FR2's choice of control, which relies on spec:AST-112 FR21 and spec:AST-126 (neither is on main yet), and the wrapping in FR6 and DEC-1, which departs from the truncation in component:SegmentedControl FR5 and component:SegmentedControlItem FR3.

One fix is needed whatever the owners decide:

  • On Android the record draws Astryx's control without naming the platform control it looked for (Material 3's segmented button) or why it does not fit, as spec:AST-093 FR2 requires, so name that control and the reason, or list Android's drawn control as a departure from spec:AST-082 FR11 under Current-state impact (lines 190-191).

Two smaller points are in the inline comments.

Claims and files checked

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

  • Claim: stacked on the change that accepts React Native platform records, and merges after it. Verified: the base branch holds that change, which is still an open draft.
  • Claim: the record cites the controls, icons and foundation-amendment drafts, and the amendment defines render and the theme default. Verified: the amendment adds FR21; all three are open drafts and absent from main.
  • Claim: no React Native SegmentedControl record exists, and no other open pull request carries one. Verified: none exists on main or the base, and a search of open pull requests found none.
  • Claim: the pull request holds specification records only and no implementation. Verified: one Markdown file.
  • Claim: the record was read against the React Native package's SegmentedControl, its generated contracts and the platform host. Not verifiable here: no such package or component is in this repository.
  • Claim: the decision bullets for FR1 to FR8, AR1 to AR4 and the gap lines. Verified against the record, except that the FR2 bullet leaves out the hidden-label-without-symbol shape.
  • Claim: FR6 departs from core FR5's truncation, for the reason DEC-1 gives. Verified; it also departs from SegmentedControlItem FR3.
  • Claim: writing rubric R1 to R7 show no issues. Verified; "not yet released" appears only in the template's readiness cell and lifecycle line.
  • Claim: the knowledge check reports no finding in this record, Prettier is clean, and the whitespace check is clean. Verified at this head.
  • Claim: public text has no internal context. Verified.
  • File: docs/specs/components/SegmentedControl/SegmentedControl.react-native.spec.md: one blocking finding (the Android platform control, lines 190-191) and two non-blocking notes (line 31, and basis cells that cite records not yet on main).

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 a spec decision: this record adds draft requirements that no current record states yet, so an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. The owners need to settle three things:

  • FR2's choice of control relies on spec:AST-112 FR21 and spec:AST-126, neither of which is on main yet.
  • On Android, FR2 draws Astryx's control where Material 3's segmented button exists, which the record now lists as a departure from spec:AST-082 FR11 with OQ1 open; if that departure stands, spec:AST-082 FR11 is the claim to update for it.
  • FR6 and DEC-1 wrap labels where component:SegmentedControl FR5 and component:SegmentedControlItem FR3 truncate them.

No blocking defect remains: the earlier Android point is fixed, since the record now names Material 3's segmented button and records the departure. Two small citation points are in the inline comments.

Claims and files checked

Review mode: full; reason: spec-record

  • Claim: stacked on the change that accepts React Native platform records, and merges after it. Verified: the base branch holds that change, which is still an open draft.
  • Claim: merges after the controls, icons and foundation-amendment drafts it cites, and the amendment defines render and the theme default. Verified: the amendment adds FR21; all three are open drafts and absent from main.
  • Claim: core FR5 truncates a narrow segment's label, core FR9 to FR14 state the selection motion, and Tooltip FR5 opens a disabled control's reason on a tap. Verified.
  • Claim: the controls draft owns the system control's native contract, the rule for when SegmentedControl uses it including the shapes that stay drawn, and DEC-2. Partly: its FR2 lists four of the seven shapes this record's FR2 lists (inline comment).
  • Claim: the amendment's FR21 records the package's presentation spelling as a gap. Verified; this record's first FR2 gap line describes that gap differently (inline comment).
  • Claim: no React Native SegmentedControl record exists, and no other open pull request carries one. Verified: none on main or the base, and a search of open pull requests found none.
  • Claim: the decision bullets for FR1 to FR8 and AR1 to AR4. Verified against the record, except that the FR2 bullet leaves out the hidden-label-without-symbol shape.
  • Claim: Android's platform control is Material 3's segmented button, which the package has no host for; the drawn control is an FR11 gap line; OQ1, held by the controls draft's OQ2, asks whether Android gets that host. Verified.
  • Claim: FR6 departs from core FR5's truncation, for the reason DEC-1 gives. Verified; it also departs from SegmentedControlItem FR3.
  • Claim: no rejected alternatives are recorded. Verified.
  • Claim: the pull request holds specification records only and no implementation. Verified: one Markdown file.
  • Claim: the record was read against the React Native package's SegmentedControl, its generated contracts and the platform host. Not verifiable here: no such package is in this repository.
  • Claim: writing rubric R1 to R7 show no issues, and OQ1 lists no options. Verified.
  • Claim: the knowledge check reports no finding in this record, Prettier is clean, and the whitespace check is clean. Verified at this head.
  • Claim: public text has no internal context. Verified.
  • File: docs/specs/components/SegmentedControl/SegmentedControl.react-native.spec.md: no blocking finding; two non-blocking citation notes (lines 63-66 and 116) and one carried note (basis cells cite records not yet on main).

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 a spec decision, and one fix is needed either way. This record adds draft requirements that no current record states yet, so an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner. The owners need to settle three things: FR2's iOS render, which relies on spec:AST-112 FR21 and spec:AST-126, neither yet on main; Android's drawn control in place of Material 3's segmented button, a recorded departure from spec:AST-082 FR11 (OQ1); and FR6's wrapping, where core truncates labels.

Blocking:

  • FR2 removes render from the Android contract because "a prop no value of which Android honors is not offered", but its own drawn and auto behave as defined on Android, so it does not meet spec:AST-082 FR3's rule that a prop is limited to one platform only when no honest behavior exists on the others; keep render on Android as spec:AST-126 FR2 does (system draws Astryx's control and warns once), or record an iOS-only render as a departure from spec:AST-082 FR3 under Current-state impact and amend spec:AST-126 FR2 to match.

The earlier points on naming Android's platform control, the glance row's shape list and the first FR2 gap line are fixed; a new inline note covers the glance row's screen-reader wording, and the earlier inline note on the shape list that spec:AST-126 FR2 gives still applies.

Claims and files checked

Review mode: full; reason: spec-record

  • Claim: stacked on the change that accepts React Native platform records, and merges after it. Verified: the base branch is that change, which is still an open draft.
  • Claim: also merges after the controls, icons and foundation-amendment drafts, whose FR21 defines render and the theme default. Verified: all three are open drafts and absent from main; FR21 exists only in the amendment.
  • Claim: core FR5 truncates a narrow segment's label, core FR9 to FR14 state the selection motion, and Tooltip FR5 opens a disabled control's reason on a tap. Verified.
  • Claim: the controls draft owns the system control's contract, the rule for when SegmentedControl uses it including the shapes that stay drawn, and DEC-2. Partly false: its FR2 gives SegmentedControl render on both platforms and lists four of this record's seven shapes.
  • Claim: the amendment's FR21 defines render and records the package's presentation spelling as a gap. Verified.
  • Claim: the cited core-and-platform, icon, base-prop, native-first and theme-only rules of the native-first system spec. Verified.
  • Claim: no React Native SegmentedControl record exists, and no other open pull request carries one. Verified: none on main or the base, and a search of open pull requests found none.
  • Claim: the iOS contract adds render, and Android, with no host for Material 3's segmented button, has none. Describes the record accurately; the stated reason conflicts with the native-first spec's FR3 (blocking finding above).
  • Claim: the decision bullets for FR1 and FR3 to FR8 and AR1 to AR4. Verified against the record; "each segment a radio" holds for Astryx's control only.
  • Claim: Android's drawn control is an FR11 gap line, and OQ1 asks whether Android gets a host. Verified.
  • Claim: FR6 departs from core FR5's truncation for the reason DEC-1 gives. Verified; it also departs from SegmentedControlItem FR3.
  • Claim: the gap lines state where the package differs. Verified as written; the package is not in this repository, so its behavior could not be checked.
  • Claim: no rejected alternatives are recorded, and the pull request holds a specification only, with no implementation. Verified: one Markdown file.
  • Claim: the record was read against the React Native package and its generated contracts. Not verifiable here: no such package is in this repository.
  • Claim: writing rubric R1 to R7 show no issues. Verified; "not yet released" appears only in the template's compatibility field and readiness cell.
  • Claim: public text has no internal context. Verified.
  • Claim: the knowledge check, Prettier and the whitespace check pass. Verified at this head.
  • File: docs/specs/components/SegmentedControl/SegmentedControl.react-native.spec.md: one blocking finding (FR2's Android render, line 115) and two non-blocking notes (the glance row on line 32, and FR2's shape list against the controls draft).

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 owner decision on this record's draft requirements, which no current record states yet; nothing else needs fixing. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. The owners need to settle:

  • FR2's iOS render, the theme's render.default and the seven shapes that force Astryx's control, which rely on spec:AST-112 FR21 and spec:AST-126; neither is on main yet.
  • Three departures from current records, each now stated in the record: the iOS-only render against spec:AST-082 FR3 (DEC-2), Android's drawn control against spec:AST-082 FR11 (OQ1), and FR6's wrapping against core's truncation; each either stands as a recorded gap or the current record is amended first.

The earlier blocking point on Android's render and the glance row's screen-reader wording are fixed; the earlier inline note on aligning FR2 with spec:AST-126 FR2's platforms and shapes still applies.

Claims and files checked

Review mode: full; reason: spec-record

  • Claim: stacked on the change that accepts React Native platform records, and merges after it. Verified: the base branch is that change, which is still an open draft.
  • Claim: also merges after the controls, icons and foundation-amendment drafts, whose FR21 defines render and the theme default. Verified: all three are open drafts and absent from main; FR21 exists only in the amendment.
  • Claim: core FR5 truncates a label in a narrow segment, core FR9 to FR14 state the selection motion, and Tooltip FR5 opens a disabled control's reason on a tap. Verified.
  • Claim: the controls draft owns the system control's contract, the rule for when SegmentedControl uses it including the shapes that stay drawn, and DEC-2. Verified as a statement about that draft; this record lists three shapes that the draft's FR2 does not (non-blocking note).
  • Claim: the amendment's FR21 defines render and records the package's presentation spelling as a gap. Verified.
  • Claim: the native-first spec's FR3, FR4, FR7, FR11, FR17 and DEC-2 are the core and platform, icon, base-prop, native-first and theme-only rules. Verified.
  • Claim: no React Native SegmentedControl record exists, and no other open pull request carries one. Verified: there is none on main or the base, and a search of open pull requests found none.
  • Claim: the iOS contract adds render, Android has none, and the record lists the departure from the native-first spec's FR3 and the controls draft's FR2 under Current-state impact. Verified (lines 77–80 and DEC-2).
  • Claim: on iOS, Astryx's control draws for a disabled reason, an icon with a label, large text, a word break, too little room and wrapped items. Verified; FR2 also lists a hidden label whose icon has no SF Symbol.
  • Claim: the system control uses UIKit's motion and feedback with no library haptic, and Astryx's control draws the theme's track, with a capsule when render.default is system. Verified (FR3, FR4).
  • Claim: Astryx's control never cuts a label, which departs from core FR5's truncation for the reason DEC-1 gives. Verified; it also departs from SegmentedControlItem FR3.
  • Claim: selection, the keyboard and the disabled state follow core, and a disabled reason is each segment's hint and opens on a tap. Verified (FR5, FR7, FR8).
  • Claim: accessibility is a radio group named by a hidden label read first, with no announcement on a change. Verified for Astryx's control (AR1–AR4); the system control gives its segments the system's selected state.
  • Claim: Android's platform control is Material 3's segmented button, its drawn control is an FR11 gap line, and OQ1 asks whether Android gets a host. Verified.
  • Claim: the gap lines state where the package differs. Verified as written; the package is not in this repository, so its behavior could not be checked.
  • Claim: no rejected alternatives are recorded, and the pull request holds a specification only, with no implementation. Verified: one Markdown file.
  • Claim: the record was read against the React Native package and its generated contracts. Not verifiable here: no such package is in this repository.
  • Claim: writing rubric R1 to R7 show no issues. Verified; "not yet released" appears only in the template's compatibility field and readiness cell.
  • Claim: the public text has no internal context. Verified.
  • Claim: the knowledge check, Prettier and the whitespace check pass. Verified at this head.
  • File: docs/specs/components/SegmentedControl/SegmentedControl.react-native.spec.md: no blocking finding; one carried non-blocking note (FR2 against the controls draft's render platforms and shape list).

Automated review (maintainer link)

This branch was successfully deployed

1 active deployment
Preview — ef48a4f2 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