Repository navigation
spec(native): Switch labelPosition and labelSpacing are web-only; Apple rows follow the system toggle layout - #8362
Conversation
…le rows follow the system toggle layout
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 88fd5ff |
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewNo new or modified components detected. Bundle Size SummaryNo component packages changed. Accessibility AuditStatus: No accessibility violations detected. Visual Regression48 of 502 shot(s) changed. A change here is a question, not a failure: check whether the after is the
and 28 more. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
There was a problem hiding this comment.
Changes requested: the Switch ruling is approved for this head by an engineering owner and fits AST-082 FR3, but the new general sentence in A2 reaches further than the Switch-only scope the pull request states. As written, "a prop that sets a layout the platform's own control fixes belongs to the web contract" also covers Selector's indicatorPosition, which the generated iOS and macOS SelectorProps still declare and which the Current state section does not list. Please either scope that sentence to Switch's two props, or keep the general rule and add Selector's indicatorPosition to the Current state bullet. The new commit then needs a fresh /approve-spec <full head SHA> from an engineering owner.
[Automated review]
| which only macOS can honor with the system switch. A prop that sets a layout | ||
| the platform's own control fixes belongs to the web contract: Switch's | ||
| `labelPosition` and `labelSpacing` are web-only, because an Apple switch row |
There was a problem hiding this comment.
This general rule reaches beyond Switch: Selector's indicatorPosition also sets a layout the system picker fixes (the edge that carries the selection mark), and the generated iOS and macOS SelectorProps still declare it. Either scope this sentence to Switch's two props, or keep the rule and add Selector's indicatorPosition to the Current state bullet.
|
/approve-spec 071a3a7 |
There was a problem hiding this comment.
Requesting changes to the description only: the record text is fine and already carries an engineering owner's approval for this exact head. Two open pull requests edit this same file, #8288 (moves it to packages/native/specs/swift/component-api.spec.md as a current record) and #8310 (amends A4), and architecture:knowledge-contracts INV13 asks the "Existing authority searched" section to record open work like that. Please list both there and say which should merge first, so the later one carries the new A2 sentence and check row. Editing the description adds no commit, so the existing approval still applies.
[Automated review]
Exact decision needed
Apply the owner's ruling of Oct 24: Switch's
labelPositionandlabelSpacingare web-only. On Apple platforms a switch row follows the system toggle layout: the label leading, the switch trailing, and the system's spacing between them.What changes for people
A person using an Astryx Switch on iPhone, iPad, or Mac sees a settings row laid out the way every other switch on their device is, and the label reads first with VoiceOver. An iOS developer gets no parameter that would move the switch to an un-Apple position or change spacing the system owns.
Existing authority searched
spec:AST-082FR3 (current): a prop a platform cannot honor with its own control belongs to the platforms that can; a platform never offers a prop it does not fully honor.architecture:public-component-apiINV2: a name carries the same meaning everywhere.main(A2, with Switchsizeas macOS-only), which this pull request extends with the same kind of rule.Search terms (repository records and open pull requests):
labelPosition,labelSpacing,Switchwithnative,web-onlywithnative,component-apiA2. Records found: only the Swift component API spec's existing Switchsizerule; no record states Switch's label layout on any platform. Overlapping open pull requests inspected: #8027 (native screenshot CI), #8306 (Swift Avatar), #8321 (Swift Item); none touches Switch or these props. No other open pull request nameslabelPositionorlabelSpacing.Decision
labelPositionandlabelSpacingare web-only; an Apple switch row follows the system toggle layout. No general rule is added; other components' layout props are decided on their own.SwitchPropsstill declare both props on iOS and macOS. Removing them from the native contracts is a generator change that follows this record.Rejected alternatives
None recorded in the records.
Claim scope and non-goals
Only Switch's two label-layout props. The web Switch keeps both, unchanged. The generator change and the Swift Switch view are separate pull requests.
Writing rubric results
Scope
packages/native/.