Repository navigation
spec(Button): React Native platform record - #12817
imdreamrunner wants to merge 9 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
This draft React Native record for Button needs an engineering owner's spec decision and five fixes before it can be approved.
Approval waits on an engineering owner approving or rejecting the record's draft requirements (FR1–FR13, ORD1–ORD6, AR1–AR7, DEC-1–DEC-3) by commenting /approve-spec <full head SHA>, which the author may do as an engineering owner; that decision should also settle whether the prop stays render, since current records already call the native-or-Astryx choice presentation (spec:AST-043 FR1). The surface prop also needs an existing spec updated: current spec:AST-082 DEC-2 and spec:AST-093 FR4 reject a per-platform visual prop, so the open amendment to them has to be approved first.
Fix in the record:
- FR12 gives Button a toggle (
isPressed/onPressedChange) that runsonPressedChangebeforeonClick, while currentfamily:buttonsAV1 leaves the toggle to ToggleButton and FR5 runs a calleronClickfirst, so the toggle belongs in a React Native ToggleButton record. - FR2's
onPress,accessibilityLabelandaccessibilityHintduplicate concepts that core'sonClick,labelandtooltipalready own, which spec:AST-082 FR7 keeps out of a platform contract, andonPresssilently skips a caller'sonClick. - FR9 never announces a Button that first renders loading, while core Button AR4 announces it on the next frame and spec:AST-082 FR3 keeps announcements the same on every platform.
- DEC-1 cites spec:AST-082 FR4 to keep
childrenandendContenton the web, but FR4 places free-form content in any platform contract whose implementation runs React. - FR4 adds a set
elevationto the shapes that force the Astryx button and cites spec:AST-126 FR2, which does not list it.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: stacked on the knowledge-tooling pull request and merges after it: verified (the base is that branch).
- Claim: the six cited drafts exist as open pull requests covering the named topics: verified.
- Claim: core Button's record is current and has no React Native rendering: verified.
- Claim: the Swift Button record is a draft and this record follows its shape: verified.
- Claim: AST-126 FR2 maps Button onto
renderand lists the shapes the system button cannot show: verified; FR4 addselevation, which that list lacks. - Claim: AST-123 FR7 and DEC-7, the AST-112 FR21 amendment and the AST-082 DEC-2 amendment say what the description states: verified at their current heads.
- Claim: AST-082 FR3, FR4 and FR7 cover which props a platform offers, the portable
widthand icon slot, and base props: verified; FR7 also excludesonPressand the accessibility label. - Claim: no open pull request covers a React Native Button record: verified.
- Claim: the Decision bullets match FR1–FR13 and DEC-1–DEC-3: verified.
- Claim: Current-state impact lists the four package differences: verified as written; the package is not in this repository.
- Claim: writing-rubric results R1–R7: verified.
- Claim: every ownership collision is named or called out: false (family:buttons AV1, spec:AST-082 FR7).
- Claim: public text carries no internal context: verified.
- Claim: the knowledge check, Prettier and the whitespace check are clean: verified.
- File:
docs/specs/components/Button/Button.react-native.spec.md: findings 1–5 above.
…ing render; elevation as DEC-4
There was a problem hiding this comment.
This draft React Native record for Button needs an engineering owner's spec decision and two fixes before it can be approved; the toggle, the second press, name and hint props, the first-render announcement and the elevation basis raised last time are fixed.
Approval waits on an engineering owner, the author included, approving or rejecting the draft requirements (FR1–FR12, ORD1–ORD6, AR1–AR6, PR1–PR3, DEC-1–DEC-4) by commenting /approve-spec <full head SHA>, a decision that also settles whether the prop stays render beside the current presentation (spec:AST-043 FR1) and whether drawn may draw the Astryx button where the platform has its own button (spec:AST-082 FR11 allows a custom control only where the platform has none). The surface prop also needs the open amendment to spec:AST-082 DEC-2 and spec:AST-093 FR4 approved first, since those current claims reject a per-platform visual prop.
Fix in the record and the description:
- DEC-1 keeps
childrenandendContentoff React Native, while spec:AST-082 FR4 places free-form content in any platform contract whose implementation runs React and FR4 of this record already sends shapes the system button cannot show to the Astryx button, so either offer them through the Astryx button or name an amendment to spec:AST-082 FR4 (DEC-1 also cites FR4 for droppingclickActionas a promise-returning callback, which FR4 does not say). - The description cites FR13 for the disabled colours, which is FR12 at this head, and cites spec:AST-130 for haptics, which the record no longer uses.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: stacked on the knowledge-tooling pull request and merges after it: verified (the base is that branch's head).
- Claim: the six cited drafts exist as open pull requests covering the system button and
rendermapping, glass paint andsurface,renderandrender.default, icons, the URL opener, andsurfaceon Button: verified. - Claim: the AST-130 draft is cited for haptics: false (the record uses no haptic).
- Claim: core Button's record is current and has no React Native rendering: verified.
- Claim: the Swift Button record is a draft and this record follows its shape: verified.
- Claim: AST-126 FR2 maps Button onto
renderand lists the shapes the system button cannot show: verified; it still lists a toggle and notelevation, which this record handles by DEC-4. - Claim: AST-123 FR7 and DEC-7, the AST-112 FR21 amendment and the AST-082 DEC-2 amendment say what the description states: verified at their current heads.
- Claim: AST-082 FR3, FR4 and FR7 cover which props a platform offers, the portable
widthand icon slot, and base props: verified; FR4 also places free-form content in React contracts. - Claim: no open pull request covers a React Native Button record: verified.
- Claim: the Decision bullets match the record: verified except "FR13, DEC-3", which is FR12 at this head.
- Claim: Current-state impact lists the package differences named in the description: verified as written; the package is not in this repository.
- Claim: writing-rubric results R1–R7: verified.
- Claim: affected current claims and ownership collisions are named or called out: false (spec:AST-082 FR4).
- Claim: public text carries no internal context: verified.
- Claim: the knowledge check, Prettier and the whitespace check are clean: verified (re-run on this head).
- File:
docs/specs/components/Button/Button.react-native.spec.md: findings 1 and 2 above; non-blocking: AST-126 FR2 and this record's FR4 disagree on the toggle andelevation.
There was a problem hiding this comment.
This draft React Native record for Button needs an engineering owner's spec decision and one fix before it can be approved; the children/endContent contradiction and the stale description references raised last time are fixed.
Approval waits on an engineering owner approving or rejecting the draft requirements (FR1–FR12, ORD1–ORD6, AR1–AR6, PR1–PR3, DEC-1–DEC-4) by commenting /approve-spec <full head SHA>, which the author may do as an engineering owner. That decision also settles the render name and its drawn value against the existing presentation vocabulary and the native-first rule, and surface needs its amendment to the native-first surfaces record to be current first.
Blocking
- ORD5 and AR1 name every Button by
label, but FR1 says the record keeps core Button's naming (ORD4), which also reads text inendContent, so a screen reader would say "Inbox" on React Native where the web says "Inbox 3": name the Button as ORD4 does and compare the tooltip hint (FR10) with that name.
Non-blocking: FR9 shows the ring at once for any explicit isLoading, while core Button FR8 delays it on an interruptible Button; and the system-button draft's list of shapes that force the Astryx button (it still has a toggle, and lacks elevation and composed content) should match FR4.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: stacked on the knowledge-tooling pull request and merges after it: verified (the base branch is that pull request's head).
- Claim: the record cites open drafts for the system button, glass,
render, icons, the URL opener andsurface: verified; all six are open drafts and say what the record cites. - Claim: core Button is current and the Swift Button record is draft: verified.
- Claim: no other open pull request covers a React Native Button record: verified by a repository search.
- Claim: React Native takes every core prop with core's meaning,
children,endContentandclickActionincluded, and leaves the form, element and link-target props andisIconOnlyon the web: verified (FR1, DEC-1). - Claim: only
renderandsurfaceare added, with no second names and no pressed state: verified (FR2). - Claim:
autodraws the system button unless the theme default overrides it, and composed content, glass, groups,elevationand an Android icon force the Astryx button: verified (FR3, FR4, ORD3). - Claim:
surfacedraws plain, glass or follows the chrome paint when unset: verified (FR6). - Claim: the label wraps and disabled uses theme colours instead of opacity: verified (FR5, DEC-2, FR12, DEC-3).
- Claim: a Button first rendered loading is announced on the next frame, as on the web: verified (FR9).
- Claim: package differences are stated as gap lines: verified (Current-state impact); the package itself is outside this repository.
- Claim: no rejected alternatives and the writing rubric results R1–R7: verified.
- Claim: affected current claims are named and collisions called out: false in part, since the naming contradiction with core Button is not called out (the blocking finding).
- Claim: no internal context in public text: verified.
- Claim: the knowledge check, Prettier and whitespace checks pass: verified on this head.
- File
docs/specs/components/Button/Button.react-native.spec.md: one blocking finding (naming), two non-blocking notes.
…on an interruptible Button
There was a problem hiding this comment.
This draft React Native record for Button needs an engineering owner's spec decision and two fixes before it can be approved; the spoken-name finding and the ring-timing note raised last time are fixed.
Approval waits on an engineering owner approving or rejecting the draft requirements (FR1–FR12, ORD1–ORD6, AR1–AR6, PR1–PR3, DEC-1–DEC-4) by commenting /approve-spec <full head SHA>, which the author may do as an engineering owner. That decision also settles the render name and its drawn value against the existing presentation vocabulary and the native-first rule, and surface needs its amendment to the native-first surfaces record (AST-082 DEC-2) to be current first.
Blocking
- Miss: FR10 shows a disabled or busy Button's tooltip only on a long press, but AST-082 FR3 makes a touch platform open a tooltip the way core's Tooltip does (FR5: a tap on a trigger that cannot act opens it, and a long press does not), so FR10, FR12, the disabled-with-tooltip state row, the verification row and the FR10 gap line should follow the tap, or the record should name an amendment to AST-082 FR3.
- Miss: PR1 says a Button holds no timers or tasks and that loading is only a caller prop, but FR9 requires core's ring delay and a next-frame "Loading" announcement and FR1's
clickActionmakes the Button pending on its own, so PR1 should state core Button's PR1 (an idle Button schedules nothing; only a Button first rendered pending defers its announcement by one frame).
Non-blocking: the system-button draft's list of shapes that force the Astryx button (it still has a toggle, and lacks elevation and composed content) should match FR4.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: stacked on the knowledge-tooling pull request and merges after it: verified (the base branch is that pull request's head).
- Claim: the record cites open drafts for the system button, glass,
render, icons, the URL opener andsurface, and merges after them: verified; all six are open drafts and say what the record cites. - Claim: core Button is current and the Swift Button record is draft: verified.
- Claim: the React Native TopNav, TabBar and FileInput records are open, and no other open pull request covers a React Native Button record: verified by reading those pull requests and a repository search.
- Claim: React Native takes every core prop with core's meaning,
children,endContentandclickActionincluded, and leaves the form, element and link-target props andisIconOnlyon the web: verified (FR1, DEC-1). - Claim: only
renderandsurfaceare added, with no second names and no pressed state: verified (FR2). - Claim:
autodraws the system button unless the theme default overrides it, and composed content, glass, groups,elevationand an Android icon force the Astryx button: verified (FR3, FR4, ORD3). - Claim:
surfacedraws plain, glass or follows the chrome paint when unset: verified (FR6). - Claim: the label wraps and disabled uses theme colours instead of opacity: verified (FR5, DEC-2, FR12, DEC-3).
- Claim: loading, the tooltip under a finger,
href, sizes, touch targets and accessibility each have one requirement, and a Button first rendered loading is announced as on the web: verified (FR7–FR12, AR1–AR6). - Claim: package differences are stated as gap lines, and the evidence section lists the same differences: verified (Current-state impact); the package itself is outside this repository.
- Claim: no rejected alternatives, and the writing rubric results R1–R7: verified.
- Claim: affected current claims are named and collisions called out: false in part, since the tooltip gesture's conflict with the native-first surfaces record is not called out (blocking finding 1).
- Claim: no internal context in public text: verified.
- Claim: the knowledge check, Prettier and whitespace checks pass: verified on this head.
- File
docs/specs/components/Button/Button.react-native.spec.md: two blocking findings, one non-blocking note.
…ip does; core's idle-work rule
There was a problem hiding this comment.
This draft React Native record for Button needs an engineering owner's spec decision and one fix before it can be approved; the tooltip-tap and idle-work findings from the last review are fixed.
- Approval waits on an engineering owner deciding the draft requirements (FR1–FR12, ORD1–ORD6, AR1–AR6, PR1–PR3, DEC-1–DEC-4), including
render(auto/system/drawn) beside the existingpresentationname,drawnbeside the native-first rule that draws a custom control only where the platform has none, andsurfacebeside the current rule against platform-only visual props, once the records it cites and thesurfaceamendment are current. - Miss: FR12 gives every disabled Astryx button the muted fill and disabled words while FR6 and ORD6 put glass first, so a disabled
surface="glass"Button (always the Astryx button under FR4), or an unset one the Astryx button draws in a bar, has two contradictory looks; state which applies, make ORD6 agree, and add the case to the states and verification rows.
An engineering owner records the decision by commenting /approve-spec <full head SHA>, and the author may do so as an engineering owner. Non-blocking suggestions are inline (FR4's forced fallback under an explicit render="system", and FR11's preventDefault()), and the Governing rules row should add the Tooltip and Button claims that FR10 and PR1 now cite.
Claims and files checked
Review mode: full; reason: spec-record
- Stacked on the record-kind change and merges after it: verified (the base branch is that change).
- Cites six open draft records and amendments and merges after them: verified (all six are open drafts).
- Existing authority searched (core Button current, Swift Button draft, the system-button, glass, foundation and native-first drafts): verified against those records' current text.
- Decision bullets (core props, the two added props, the control choice and forced shapes,
surface, wrapping label, disabled colours, loading, tooltip,href): verified against FR1–FR12 and DEC-1–DEC-4. - No rejected alternatives in the record: verified.
- Specification only, with package differences as gap lines: verified; the summary of the tooltip gap omits that the package uses a long press rather than a tap, and the package itself is not in this repository.
- Writing rubric results R1–R7: verified (no pull request references, no rejected lines, the open question keeps two options, "not yet released" only in the lifecycle field and readiness cell).
- Knowledge check, Prettier and whitespace clean: verified by rerunning them.
docs/specs/components/Button/Button.react-native.spec.md: one blocking finding (disabled glass look), three non-blocking notes.
…the web; onClick cannot stop the open
There was a problem hiding this comment.
This draft React Native record for Button needs an engineering owner's spec decision before it can be approved; the disabled-glass finding and both suggestions from the last review are fixed.
- Approval waits on an engineering owner deciding the draft requirements (FR1–FR12, ORD1–ORD6, AR1–AR6, PR1–PR3, DEC-1–DEC-4, with OQ1 open), including
render(auto/system/drawn) beside the existingpresentationname,drawnbeside the native-first rule that draws a custom control only where the platform has none, the web-onlyclickAction, andsurfacebeside the current rule against platform-only visual props, once the records it cites and thesurfaceamendment are current.
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. Two non-blocking suggestions are also inline:
- FR6: say whether a disabled glass Button lights under a finger, and whether a disabled
primarykeeps its accent tint. - Miss: FR4 and DEC-4 do not say whether
elevation="none", core's default, counts as "a setelevation".
Claims and files checked
Review mode: full; reason: spec-record
- Stacked on the record-kind change and merges after it: verified (the base branch is that change).
- Cites six open draft records and amendments and merges after them: verified (all six are open drafts).
- Existing authority searched (core Button current, Swift Button draft, the controls, surfaces, foundation and native-first drafts, the open TopNav, TabBar and FileInput records): verified against those records' text.
- No open pull request covers a React Native Button record: not contradicted by a repository search, which cannot prove absence.
- Decision bullets (core props with
childrenandendContent, the web-only list withclickAction, the two added props, the control choice and forced shapes,surface, the wrapping label, disabled colours and the disabled glass capsule, loading, tooltip,href): verified against FR1–FR12 and DEC-1–DEC-4. - No rejected alternatives in the record: verified.
- Specification only, with package differences as gap lines: verified; the package itself is not in this repository.
- Writing rubric results R1–R7: verified (present tense, no pull request references, no rejected lines, OQ1 keeps two options, "not yet released" only in the lifecycle field and readiness cell).
- Knowledge check, Prettier and whitespace clean: verified by rerunning them.
docs/specs/components/Button/Button.react-native.spec.md: no blocking finding; two non-blocking notes.
…at can act; elevation low, med or high
There was a problem hiding this comment.
This draft React Native record for Button needs an engineering owner's spec decision before it can be approved; both suggestions from the last review are fixed.
- Approval waits on an engineering owner deciding the draft requirements (FR1–FR12, ORD1–ORD6, AR1–AR6, PR1–PR3, DEC-1–DEC-4, with OQ1 open), including
render(auto/system/drawn) beside the existingpresentationname,drawnbeside the native-first rule that draws a custom control only where the platform has none, the web-onlyclickAction, andsurfacebeside the current rule against platform-only visual props, once the records it cites and thesurfaceamendment are current.
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. Three non-blocking suggestions are also inline:
- Miss: FR4 sends every iOS icon to the system button as an SF Symbol, but an app-defined icon can be an image the app ships; consider forcing the Astryx button for an icon that does not resolve to a platform symbol.
- Miss: an unset Button in a bar follows the chrome row's glass (FR6), yet FR4 forces the Astryx button only for
surface="glass"; say which control draws it, or widen OQ1. - Miss: AV1's highlight or ripple has no "Button that can act" condition, unlike FR6, so a disabled Button's tooltip tap could show press feedback.
Claims and files checked
Review mode: full; reason: spec-record
- Stacked on the record-kind change and merges after it: verified (the base branch is that change, an open draft).
- Cites six open draft records and amendments and merges after them: verified (all six are open drafts).
- Existing authority searched (core Button current, Swift Button draft, the controls, surfaces, foundation and native-first drafts, the open TopNav, TabBar and FileInput records): verified against those records' text.
- No open pull request covers a React Native Button record: not contradicted by a repository search, which cannot prove absence.
- Decision bullets (core props with
childrenandendContent, the web-only list withclickAction, the two added props, the control choice withelevationlow,medorhighforcing the Astryx button andnonekeeping the system button,surface, the wrapping label, disabled colours and the disabled glass capsule, loading, tooltip,href): verified against FR1–FR12 and DEC-1–DEC-4. - No rejected alternatives in the record: verified.
- Specification only, with package differences as gap lines, including the glass of a disabled or busy glass Button that still lights: verified; the package itself is not in this repository.
- Writing rubric results R1–R7: verified (present tense, no pull request references, no rejected lines, OQ1 keeps two options, "not yet released" only in the lifecycle field and readiness cell).
- Knowledge check, Prettier and whitespace clean: verified by rerunning them.
docs/specs/components/Button/Button.react-native.spec.md: no blocking finding; three non-blocking notes.
| | FR1 | React Native's `Button` MUST take core's `label`, `variant`, `size`, `elevation`, `isLoading`, `isInterruptible`, `isDisabled`, `icon`, `children`, `endContent`, `width`, `tooltip`, `onClick` and `href` with core's names, meaning and defaults. `icon` is a shared icon name (`spec:AST-082` FR4, FR17); `children` and `endContent` take React content, as a platform contract whose implementation runs React may (`spec:AST-082` FR4), and the Button keeps core's naming for them (`component:Button` ORD4); and `width` is `content` or `fill`. Base props are `id` and `isHidden` (`spec:AST-082` FR7) on the Button's root. It MUST NOT offer web's `type`, `name`, `value`, `form`, `as`, `target`, `rel`, `clickAction` or `isIconOnly` (DEC-1). | `component:Button` FR1–FR13, ORD4; `spec:AST-082` FR3, FR4, FR7; DEC-1 | verify | | ||
| | FR2 | React Native MUST add two props, each for a platform reason: `render` (FR3), because a phone has a system button to draw with, and `surface` (FR6), because the same Button sits on a plain page in one place and over a photo in another (`spec:AST-082` DEC-2, `spec:AST-123` DEC-7). It MUST NOT offer a second name for a concept a core prop owns: `label` is the spoken name, `tooltip` the hint (FR10) and `onClick` the press (`spec:AST-082` FR7). It MUST NOT offer a pressed state: a toggle with words is `ToggleButton` (`family:buttons` AV1). | `spec:AST-082` FR3, FR7, DEC-2; `spec:AST-123` DEC-7; `family:buttons` AV1 | verify | | ||
| | FR3 | `render` MUST say who draws the Button's pixels (`spec:AST-112` FR21). `system` draws `AstryxNativeButton`: UIButton with UIButton.Configuration on iOS, a Material 3 button on Android (`spec:AST-126` FR3). `drawn` draws the Astryx button. `auto`, the default, is the system button wherever its native piece is present (`spec:AST-082` FR11) and the Astryx button elsewhere, silently, unless the theme's `render.default` overrides every `auto`. `system` where the native piece is absent draws the Astryx button and warns once in development. Under the system button, the props keep their meaning, the theme reaches it through the tokens `spec:AST-126` FR11 lists, and a theme value outside that list is named once in development. | `spec:AST-112` FR21; `spec:AST-126` FR2, FR3, FR11; `spec:AST-082` FR11 | verify | | ||
| | FR4 | A Button MUST draw the Astryx button, whatever `render` says and with no warning, when its shape is one the system button cannot show: `children` or `endContent`, which the system button's title and symbol cannot hold (`spec:AST-126` FR3), `surface="glass"`, a member of a connected group (`ButtonGroup`, `InputGroup`), an `elevation` of `low`, `med` or `high` (DEC-4), or an `icon` on Android; `elevation="none"`, core's default, keeps the system button. An `icon` on iOS draws as the system button's SF Symbol. | `spec:AST-126` FR2, FR3; `spec:AST-082` FR3; DEC-4 | verify | |
There was a problem hiding this comment.
Non-blocking (Miss): "An icon on iOS draws as the system button's SF Symbol" covers every iOS icon, but the icon slot resolves to "a defined icon, else the platform's symbol, else a drawn glyph" (Native pieces), and spec:AST-082 FR17 lets an app or theme define an icon as an image it ships ({assetName: …}) that replaces the platform default. Suggest adding an icon that resolves to anything other than a platform symbol to the forced shapes here and in the FR3/FR4 verification row.
|
|
||
| ### Allowed variation | ||
|
|
||
| - **AV1 — The platform's press feedback.** The Astryx button's press shows the |
There was a problem hiding this comment.
Non-blocking (Miss): the highlight or ripple here has no condition, while FR10 makes a tap on a disabled or busy Button open its tooltip and component:Button FR15 paints no press on a Button exposed as disabled or busy ("shows no overlay and no press scale"). FR6 now says "of a Button that can act" for glass; the same words here would keep press feedback off a disabled Button's tooltip tap.
| | loading with an icon | the ring in the icon's place; same size; busy | the ring's look | | ||
| | loading, no icon | the ring over the label, which keeps its width | the ring's look | | ||
| | disabled | disabled colours, no opacity; no press | none | | ||
| | disabled on glass, set or unset in a bar | the glass capsule, or the opaque paint under contrast settings; disabled words; no press | the system's glass | |
There was a problem hiding this comment.
Non-blocking (Miss): this row expects the glass capsule for a disabled Button "set or unset in a bar", and FR6 makes an unset Button in a bar follow the chrome row's glass. FR4 forces the Astryx button only for surface="glass", so ORD3 gives that unset Button to the system button under auto, leaving its glass to the system's button style, the option OQ1 keeps open. Suggest listing an unset surface that FR6 resolves to glass in FR4, or widening OQ1 to cover it.
There was a problem hiding this comment.
This draft React Native record for Button needs an engineering owner's spec decision and two fixes before it can be approved.
- Approval waits on an engineering owner deciding the draft requirements (FR1–FR13, ORD1–ORD6, AR1–AR6, PR1–PR3, DEC-1–DEC-4, with OQ1 open), including whether
render(auto/system/drawn) and a themerender.defaultstay now that the foundation record and the controls draft have dropped their render rule and existing records name this choicepresentation, whetherdrawnand the Android icon may draw a custom button where the platform has its own, andsurfacebeside the current rule against platform-only visual props. - FR13 says a system-drawn Button shows its
surfaceas the platform's matching style and its verification row expects a system-drawnglasscapture, but FR4 always draws aglassButton as the Astryx button, so the two requirements give opposite results forrender="system" surface="glass". - Regression: FR3, the governing-rules row and the theme values cite the foundation record's FR21 for
renderandrender.default, which that FR21 no longer defines, so the record should state them as its own decision or cite where they are defined now, and the description should stop saying the merged amendment adds them.
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 three earlier suggestions (iOS icons that are not SF Symbols, an unset Button in a bar, press feedback on a Button that cannot act) still apply.
Claims and files checked
Review mode: full; reason: spec-record
- Stacked on the record-kind change and merges after it: verified (the base branch is that open change).
- Merges after the controls, surfaces, icons and system-modules drafts and the
surfaceamendment: verified (all are open drafts). - The foundation amendment defines
renderandrender.defaultand this record merges after it: false (that amendment merged, and a follow-up removed both from the foundation record). - Existing authority searched: core Button current, Swift Button draft, and the open TopNav, TabBar and FileInput records: verified; the controls draft maps Button onto
render: false at that draft's current head; the surfaces draft makessurfacea per-call-site prop: verified; thesurfaceamendment givesplainorglasswith no default: verified. - No open pull request covers a React Native Button record: not contradicted by a repository search, which cannot prove absence.
- Decision bullets (core props with
childrenandendContent, the web-only list, the two added props, the forced shapes withelevationlow,medorhigh,surface, the wrapping label, disabled colours and the disabled glass capsule, loading, the tooltip,href, gap lines): verified against FR1–FR12 and DEC-1–DEC-4; theautomapping "as the controls draft's FR2 states": false at that draft's current head. - No rejected alternatives in the record: verified.
- Specification only, with the listed package differences as gap lines: verified; the package itself is not in this repository.
- Writing rubric results R1–R7: verified, except that R6 still describes OQ1 as comparing the controls draft with the foundation record's wording, while OQ1 now cites FR13 (the follow-up section says so).
- Knowledge check, Prettier and whitespace clean: verified by rerunning them.
- FR13 moves here from the foundation record with its verification row, and OQ1 cites FR13: verified (FR13 matches the foundation record's Button sentence; the move itself is an open pull request).
docs/specs/components/Button/Button.react-native.spec.md: two blocking findings (FR13 against FR4; therendercitations) and three carried non-blocking notes.
| | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | ------------------ | | ||
| | FR1 | React Native's `Button` MUST take core's `label`, `variant`, `size`, `elevation`, `isLoading`, `isInterruptible`, `isDisabled`, `icon`, `children`, `endContent`, `width`, `tooltip`, `onClick` and `href` with core's names, meaning and defaults. `icon` is a shared icon name (`spec:AST-082` FR4, FR17); `children` and `endContent` take React content, as a platform contract whose implementation runs React may (`spec:AST-082` FR4), and the Button keeps core's naming for them (`component:Button` ORD4); and `width` is `content` or `fill`. Base props are `id` and `isHidden` (`spec:AST-082` FR7) on the Button's root. It MUST NOT offer web's `type`, `name`, `value`, `form`, `as`, `target`, `rel`, `clickAction` or `isIconOnly` (DEC-1). | `component:Button` FR1–FR13, ORD4; `spec:AST-082` FR3, FR4, FR7; DEC-1 | verify | | ||
| | FR2 | React Native MUST add two props, each for a platform reason: `render` (FR3), because a phone has a system button to draw with, and `surface` (FR6), because the same Button sits on a plain page in one place and over a photo in another (`spec:AST-082` DEC-2, `spec:AST-123` DEC-7). It MUST NOT offer a second name for a concept a core prop owns: `label` is the spoken name, `tooltip` the hint (FR10) and `onClick` the press (`spec:AST-082` FR7). It MUST NOT offer a pressed state: a toggle with words is `ToggleButton` (`family:buttons` AV1). | `spec:AST-082` FR3, FR7, DEC-2; `spec:AST-123` DEC-7; `family:buttons` AV1 | verify | | ||
| | FR3 | `render` MUST say who draws the Button's pixels (`spec:AST-112` FR21). `system` draws `AstryxNativeButton`: UIButton with UIButton.Configuration on iOS, a Material 3 button on Android (`spec:AST-126` FR3). `drawn` draws the Astryx button. `auto`, the default, is the system button wherever its native piece is present (`spec:AST-082` FR11) and the Astryx button elsewhere, silently, unless the theme's `render.default` overrides every `auto`. `system` where the native piece is absent draws the Astryx button and warns once in development. Under the system button, the props keep their meaning, the theme reaches it through the tokens `spec:AST-126` FR11 lists, and a theme value outside that list is named once in development. | `spec:AST-112` FR21; `spec:AST-126` FR2, FR3, FR11; `spec:AST-082` FR11 | verify | |
There was a problem hiding this comment.
Regression: spec:AST-112 FR21 on main no longer defines render. Its render rule was removed after the amendment merged; FR21 now covers surface and material and says the public API uses "surface and presentation", and defineNativeTheme has no render.default. The Governing rules row (line 36) and Theme values read (lines 259–260) cite the same claim, and the open spec:AST-126 draft that line 280 names as owner of the render mapping dropped its render rule too. Suggest stating render and render.default as this record's own decision, or citing the record that defines them now.
There was a problem hiding this comment.
This draft React Native record for Button needs an engineering owner's spec decision and one fix before it can be approved; the FR13 conflict from the last review is fixed.
- Approval waits on an engineering owner deciding the draft requirements (FR1–FR13, ORD1–ORD6, AR1–AR6, PR1–PR3, DEC-1–DEC-4, with OQ1 open), including whether
render(auto/system/drawn) and a themerender.defaultstay now that the foundation record and the controls draft define no render rule and existing records name this choicepresentation, whetherdrawnand the Android icon may draw a custom button where the platform has its own, andsurfacebeside the current rule against platform-only visual props. - Regression: FR3, the governing-rules row, the theme values, the rendering concept row and the family relationships line cite the foundation record's FR21 and the controls draft's FR2 for
renderandrender.default, which neither defines, so the record should state them as its own decision or cite where they are defined now, and the description should stop saying those records add them.
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 three earlier suggestions (iOS icons that are not SF Symbols, an unset Button in a bar, press feedback on a Button that cannot act) still apply.
Claims and files checked
Review mode: full; reason: spec-record
- Stacked on the record-kind change and merges after it: verified (the base branch is that open change).
- Merges after the controls, surfaces, icons and system-modules drafts and the
surfaceamendment: verified (all are open drafts). - The foundation amendment supplies
renderandrender.default: false (that amendment merged, and a later change removed both from the foundation record). - The controls draft supplies the
rendermapping and its FR2 maps Button ontorender: false (its FR2 lists the shapes the system button cannot show and maps nothing ontorender). - Existing authority searched (core Button current, Swift Button draft, the surfaces draft's glass paint and per-call-site
surface, thesurfaceamendment withplainorglassand no default, the core platform rules on props, content and base props, the open TopNav, TabBar and FileInput records): verified. - No open pull request covers a React Native Button record: not contradicted by a title search, which cannot prove absence.
- Decision bullets (core props with
childrenandendContent, the web-only list, the two added props, the forced shapes withelevationlow,medorhigh,surface, the wrapping label, disabled colours and the disabled glass capsule, loading, the tooltip,href, gap lines): verified against FR1–FR13 and DEC-1–DEC-4; theautomapping "as the controls draft's FR2 states": false. - No rejected alternatives in the record: verified.
- Specification only, with the listed package differences as gap lines: verified; the package itself is not in this repository.
- Writing rubric results R1–R7: verified, except that R6 still describes OQ1 as comparing the controls draft with the foundation record's wording, while OQ1 cites FR13.
- Knowledge check, Prettier and whitespace clean: verified by rerunning them.
- FR13 moves here from the foundation record with its verification row, the follow-up that removes it there is open, and FR13 now covers only the surfaces FR4 leaves to the system button: verified.
docs/specs/components/Button/Button.react-native.spec.md: one blocking finding (therendercitations), three carried non-blocking notes, and the FR13 conflict fixed.
Stacked on #12592; merges after it.
Merge order: this record cites
spec:AST-126(#12556) for the system button and therendermapping,spec:AST-123(#12557) for glass paint andsurface, the AST-112 amendment (#12563) forrenderandrender.default,spec:AST-127(#12555) for icons,spec:AST-130(#12553) for the URL opener, and the AST-082 DEC-2 amendment (#12801) forsurfaceonButton. It merges after those too.Exact decision needed
How React Native renders core's Button: which of core's props it offers and which it adds, which control draws it (the system button or the Astryx button), and how the Astryx button lays out its label, shows its states and behaves under a finger.
Existing authority searched
component:Button(docs/specs/components/Button/Button.spec.md, current): the props, pending and disabled states and link mode this record keeps; no React Native rendering.component:swift/Button(docs/specs/components/Button/Button.swift.spec.md, draft): the Swift platform record; this record follows its shape.spec:AST-126(native controls, open draft): FR2 maps Button ontorenderand lists the shapes the system button cannot show; FR3, FR10–FR12 own the system button itself.spec:AST-123(surfaces and glass, open draft): FR7 paints a glass Button and an unset Button in a bar; DEC-7 makessurfacea per-call-site prop.render(auto,system,drawn) andsurface, and addsrender.defaulttodefineNativeTheme.ButtonandIconButtonthesurfaceprop (plainorglass, no default).spec:AST-082FR3, FR4, FR7 (current): which props a platform offers, the portablewidthand icon slot, base props.renderwording this record reuses. No open pull request covers a React Native Button record.Decision
docs/specs/components/Button/Button.react-native.spec.md(component:react-native/Button,platform_of: component:Button):Buttonunder core's name with core's props, meaning and defaults,childrenandendContentincluded (free-form content is allowed in a React platform contract,spec:AST-082FR4);iconis a shared icon name andwidthiscontentorfill. Web's form, element and link-target props,clickAction(its run depends on a preventedonClickevent, and React Native'sonClickreceives none) andisIconOnlystay on the web (FR1, DEC-1).renderandsurface.label,tooltipandonClickown the spoken name, the hint and the press (spec:AST-082FR7), and a toggle with words isToggleButton(family:buttonsAV1), so the record offers no React Native second names and no pressed state (FR2).render="auto"draws the system button wherever its native piece is present, unless the theme'srender.defaultoverrides it (FR3, asspec:AST-126FR2 states). A Button withchildrenorendContent, a glass Button, a connected-group member, anelevationoflow,medorhigh(DEC-4: the system button has no shadow scale;nonekeeps the system button) and an icon on Android draw the Astryx button whateverrendersays (FR4).surface:plaindraws the variant's fill,glassa capsule on the platform's glass whose words are never cut, and unset follows the chrome paint in a bar and stays plain elsewhere (FR6).tooltipunder a finger,hrefthrough the app's link opener, sizes, touch targets and accessibility each have one requirement (FR7–FR12, AR1–AR6).FRn gapline says so (Current-state impact).Rejected alternatives
None recorded in the record.
Claim scope and non-goals
The record covers only what React Native adds to
component:Buttonor does differently. The system button, glass paint, icons, connected groups, the toggle and the icon-only button 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. The Current-state impact lines state where the package differs from the requirements: it does not offer
childrenorendContent; it also takesonPress,accessibilityLabel,accessibilityHint,isPressedandonPressedChange;renderis spelledpresentationwith a drawn default; a Button first rendered loading announces nothing;surfaceis spelleddefault/glasswith a default; anelevationoflow,medorhighunder the system button draws its floating style; the glass of a disabled or busy glass Button still lights under a finger; and a blocked Button opens its tooltip on a long press instead of a tap (none under the system button).Writing rubric results
Rejected:lines.system, wherespec:AST-126FR2 and the AST-112 FR21 wording differ) is unanswered and keeps its two options.FRn gaplines; "not yet released" appears only in the template's lifecycle field and readiness cell.Scope
Components: Button (React Native)
Validation
node scripts/check-knowledge.mjs(with this branch's knowledge-path tooling): knowledge templates and records are aligned; no finding in this record.--checkclean on the record.git diff --check: clean.Follow-up: claims moved from
spec:AST-112FR13 moves here from
spec:AST-112FR21, with its verification row, as part of #13029:surfacestays one per-call-site choice in both renderings; a system-drawn Button, which FR4 limits to the surfaces the system button can show, shows its surface as the platform's matching button style; and the native theme'smaterialmember decides its look. OQ1, which asks about a glass Button undersystem, cites FR13.