Repository navigation
spec(IconButton): React Native platform record - #12820
imdreamrunner wants to merge 4 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.
Approval waits on an engineering owner deciding the draft direction in this record, and three record defects need fixing whatever that decision is.
What an engineering owner has to settle (record it by commenting /approve-spec <full head SHA>; the author may do so as an engineering owner): IconButton taking ToggleButton's pressed state on React Native although family:buttons AV1 says IconButton does not retain pressed state; the count beside the glyph, which no current record covers; the xl size beyond the sm | md | lg axis that architecture:component-size-cascade INV1 fixes; and surface, which needs spec:AST-082 DEC-2 and spec:AST-093 FR4 amended first (#12801).
Blocking findings:
- FR2 and DEC-1 add
onPress,accessibilityLabel,accessibilityHintandhintbeside core'sonClick,labelandtooltip, whichspec:AST-082FR7 rules out because a core prop owns its concept, and which leavesonClickaccepted but ignored when both press callbacks are set, against AST-082 FR3. - FR6 and ORD1 run
onPressedChangebeforeonClick, the reverse ofcomponent:ToggleButtonFR3 andfamily:buttonsFR5, although FR6 promises ToggleButton's meaning, so a toggle vetoed inonClickon the web still flips on React Native. - FR9 gives a glass
lgIconButton the 32 pxxlglyph and a glassxlIconButton core Icon's 24 pxlgglyph, so the larger circle holds the smaller glyph.
The record also reads correctly only once the open drafts it builds on (#12592, #12801, #12817, #12557, #12555, #12553) land.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the repository's knowledge check finds nothing in this record: verified, it passes at this head.
- Claim: Prettier reports the record clean: verified.
- Claim: no other open pull request records IconButton on React Native: verified by a repository search.
- Claim: press, link, loading, disabled, tooltip, touch target and theme overrides follow the React Native Button record: verified in FR5; that record is still an open pull request.
- Claim: the record states its departure from the button family's pressed-state rule: verified in its family relationships.
- Claim:
surfacerests on the native-first spec's visual-props decision as amended: verified that the amendment exists only in an open pull request. - Claim: the record has no pull request references, rejected alternatives or open questions: verified.
- Claim: the toggle uses ToggleButton's names and meaning: false for the callback order (FR6, ORD1).
- File:
docs/specs/components/IconButton/IconButton.react-native.spec.md: the three findings above.
…llback order; glass glyph sizes
There was a problem hiding this comment.
Approval waits on an engineering owner deciding the draft direction in this record; the record defects raised earlier are fixed or explained at this head, and none blocks.
What an engineering owner has to settle (record it by commenting /approve-spec <full head SHA>; the author may do so as an engineering owner):
- IconButton takes ToggleButton's pressed state on React Native although
family:buttonsAV1 says IconButton does not retain pressed state, and itsonClickcannot cancel the toggle the way ToggleButton'spreventDefault()can. - The count beside the glyph, which no current record covers.
- The
xlsize beyond thesm | md | lgaxis thatarchitecture:component-size-cascadeINV1 fixes. surfaceand the glass circle, which needspec:AST-082DEC-2 andspec:AST-093FR4 amended first (#12801).- Leaving
clickActionout of the React Native contract, a reading ofspec:AST-082FR4 that no clause states.
An approval settles direction only: the family, size-cascade and native-surfaces records it departs from still need amending, or the record narrowing, before this can be approved. Non-blocking: FR9 gives glass xl "48 pt" with no Android unit, and the frontmatter families list leaves out family:navigation-destinations, which FR5 relies on.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: stacked on the React Native platform-records pull request and merges after it: verified, the base is that pull request's branch.
- Claim: the record also rests on the open native-surfaces amendment, the surfaces and glass, icons, and system-modules drafts, and the React Native Button record: verified, all are open drafts.
- Claim: the glass circle, the toggle and the count are stated in the record itself: verified in FR6, FR7 and FR9.
- Claim: the record states its departure from the button family's pressed-state rule: verified in its family relationships.
- Claim: no other open pull request records IconButton on React Native: verified by a repository search.
- Claim: the toggle uses ToggleButton's names and callback order,
onClickthenonPressedChange: verified in FR6 and ORD1. - Claim: no second input for a concept a core prop owns: verified in FR2, AR1, ORD2 and DEC-1.
- Claim: the gap lines state where the package differs today: present for FR2, FR6 and FR8; the package itself is outside this repository.
- Claim: no pull request references, rejected alternatives or open questions in the record: verified.
- Claim: the knowledge check finds nothing in this record, Prettier is clean, and the diff has no whitespace errors: verified at this head.
- File:
docs/specs/components/IconButton/IconButton.react-native.spec.md: owner decisions above; two non-blocking notes.
|
|
||
| | ID | Candidate invariant | Basis | Draft review state | | ||
| | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------ | | ||
| | FR1 | React Native MUST export the component as `IconButton`, the name it has on every platform (`spec:AST-082` FR3), and take core IconButton's props with core's names, meaning and defaults: `label`, `icon`, `variant`, `size`, `elevation`, `isLoading`, `isInterruptible`, `isDisabled`, `tooltip`, `onClick`, `width` and `href`, with the base props `id` and `isHidden` (`spec:AST-082` FR7). `width` takes `content` and `fill`, the web's `auto` and `100%`. The web contract's props (`clickAction`, `type`, `name`, `value`, `form`, `as`, `target`, `rel`) are not offered, and using one is a type error. `style` and `testID` are not props; `id` sets the view's test id and native id. | `component:IconButton` FR1; `spec:AST-082` FR3, FR5, FR7; DEC-1 | verify | |
There was a problem hiding this comment.
clickAction is in the list of web-contract props here, but component:IconButton FR4 lists it among IconButton's props, and spec:AST-082 FR3 says a platform contract never removes a core prop and that a prop leaves the core only when a platform cannot match core's behavior. DEC-1's reason, that a press callback returning a value has no portable form, is not in AST-082 FR4, which lists "callbacks whose arguments are portable". This is part of the engineering owner's decision on this record; if it stays, AST-082 is where that reading belongs.
| | FR6 | With `isPressed` set, IconButton MUST be a toggle with core ToggleButton's names and pressed-state meaning (`component:ToggleButton`). A press runs `onClick`, then calls `onPressedChange` with the next state, in ToggleButton's order (`component:ToggleButton` FR3, `family:buttons` FR5), and plays the library's toggle haptic moment (`spec:AST-130` FR6); React Native's callbacks take no event, so `onClick` does not cancel the toggle. It exposes the pressed state: on iOS a toggle button with its checked value, on Android a button with the selected state and "not selected" in its value when unpressed. It draws ToggleButton's pressed fill on `secondary` and `ghost`, keeps the fill of `primary` and `destructive`, and shows `pressedIcon` while pressed; a `ghost` toggle with a `pressedIcon` keeps no fill, so the glyph alone carries the state. A toggle is an action: with `isPressed` set, `href` opens nothing and the role stays a toggle (`family:buttons` AV4). A touch that travels past the press slop does not toggle. | `component:ToggleButton` FR3; `family:buttons` FR5, FR6, AV4; DEC-2 | verify | | ||
| | FR7 | A non-zero `count` MUST draw beside the glyph, in the label type with tabular figures and the button's ink, inside the same press target, formatted for the locale; `countLabel` replaces the drawn and spoken words (a compact "1.2K"). The square becomes a pill as tall as the square and at least as wide, with `space.s1` before the glyph, between the glyph and the count, and after the count (`space.s2` at the ends for `lg` and `xl`); no row shrinks it. The count is read after the name as one element ("Like, 12"). `isCountVisible={false}` keeps the count in the spoken name without drawing it, and the square stays. A counted toggle keeps FR6. | DEC-2 | verify | | ||
| | FR8 | `surface` MUST take `plain` or `glass` and have no default (`spec:AST-082` DEC-2 as amended; `spec:AST-123` FR1). `plain` draws the variant's own fill (FR3, FR5). `glass` draws FR9's circle on chrome glass, painted as `spec:AST-123` FR7's chrome row chooses. An unset `surface` follows the chrome row in a bar, the tab accessory or the search field, and draws `plain` elsewhere (`spec:AST-123` FR7). `surface` is IconButton's only visual prop; every other look comes from the theme (`spec:AST-093` FR4). | `spec:AST-082` DEC-2; `spec:AST-123` FR1, FR7, DEC-7 | verify | | ||
| | FR9 | A glass IconButton MUST be a circle at least the touch target: for `sm`, `md` and `lg`, 44 pt on iOS and 48 dp on Android, or the element size when that is larger; for `xl`, 48 pt or the `xl` square when that is larger. At `sm` and `md` it holds a `md` glyph. A glass `lg` is a close control on a sheet or a bar: its glyph frame is the `xl` glyph's, so the drawn mark matches the size of the system's close button. A glass `xl` is a media control over a photo or a video: it holds core Icon's `lg` glyph, so the circle keeps the system's media controls' margin around the mark. On iOS the circle and its glyph keep one size at every text size, as the system's glass buttons do, and the Large Content Viewer shows its name and glyph (`spec:AST-127` FR9); on Android both grow with the text size. The ink keeps the variant's meaning: `primary` draws `color.onAccent` on glass tinted `color.accent`, `destructive` draws the error colour at text contrast, and the other variants draw `color.textPrimary`. Where the glass view paints, the glyph sits inside the glass, which is the press response (`spec:AST-123` FR3, DEC-1). Elsewhere the circle has a `color.neutral` fill (`primary`: `color.accent`) and a rim at the theme's border width, over the material or as the whole look, so it never disappears into a surface of its own colour. Under Reduce Transparency or Increase Contrast the circle is opaque: `color.backgroundSurface` under the `color.neutral` tint, with `spec:AST-123` FR7's outline for that setting. In a dark appearance with Reduce Bright Effects on, a press dims the circle instead of brightening it. Label, role, toggle, count, loading and disabled behave as FR5–FR7 in glass. | `spec:AST-123` FR3, FR7, FR10; `spec:AST-082` FR11; `spec:AST-093` FR3; DEC-4 | verify | |
There was a problem hiding this comment.
Non-blocking: "for xl, 48 pt or the xl square" gives no Android unit, where the same sentence gives sm to lg "44 pt on iOS and 48 dp on Android". Read with Android's pt (1/72 inch), 48 pt is about 107 dp. Suggest "48 pt on iOS and 48 dp on Android", or the intended value.
There was a problem hiding this comment.
Approval waits on an engineering owner deciding the draft direction in this record, and one record defect added at this head needs fixing whatever that decision is.
Blocking:
- ORD4 ranks
surfaceabove the theme'smaterial, while the sentence this head adds to FR8 says the theme'smaterialdecides how the chosen surface looks, so undermaterial: 'opaque'asurface="glass"IconButton is glass by ORD4 and opaque by FR8; make the two state one order.
What an engineering owner has to settle (record it by commenting /approve-spec <full head SHA>; the author may do so as an engineering owner):
- IconButton takes ToggleButton's pressed state on React Native although
family:buttonsAV1 says IconButton does not retain pressed state, and itsonClickcannot cancel the toggle the way ToggleButton'spreventDefault()can. - The count beside the glyph, which no current record covers.
- The
xlsize beyond thesm | md | lgaxis thatarchitecture:component-size-cascadeINV1 fixes. surfaceand the glass circle, including the per-call-site rule this head adds, which needspec:AST-082DEC-2 andspec:AST-093FR4 amended first (#12801).- Leaving
clickActionout of the React Native contract, a reading ofspec:AST-082FR4 that no clause states.
An approval settles direction only: the family, size-cascade and native-surfaces records the record departs from still need amending, or the record narrowing, before this can be approved. Non-blocking: FR9 still gives glass xl "48 pt" with no Android unit.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: stacked on the React Native platform-records pull request and merges after it: verified, the base is that pull request's branch.
- Claim: the record also rests on the open native-surfaces amendment, the surfaces and glass, icons, and system-modules drafts, and the React Native Button record: verified, all are open drafts.
- Claim: the glass circle, the toggle and the count are stated in the record itself: verified in FR6, FR7 and FR9.
- Claim: the record states its departure from the button family's pressed-state rule: verified in its family relationships.
- Claim: no other open pull request records IconButton on React Native: verified by a repository search.
- Claim: the toggle uses ToggleButton's names and callback order,
onClickthenonPressedChange: verified in FR6 and ORD1. - Claim: no second input for a concept a core prop owns: verified in FR2, AR1, ORD2 and DEC-1.
- Claim:
surfacetakesplainorglasswith no default, and unset follows the chrome paint in a bar, the tab accessory or the search field, elseplain: verified in FR8. - Claim: the gap lines state where the package differs today: present for FR2, FR6 and FR8; the package itself is outside this repository.
- Claim: no pull request references, rejected alternatives or open questions in the record: verified.
- Claim: the knowledge check finds nothing in this record, Prettier is clean, and the diff has no whitespace errors: verified at this head.
- Claim: FR8's per-call-site sentence moved here from the React Native foundation record as part of its slimming pull request: verified, that pull request deletes the sentence there and FR8 carries it.
- File:
docs/specs/components/IconButton/IconButton.react-native.spec.md: owner decisions above; one blocking defect (ORD4 against FR8) and one non-blocking note (FR9 unit).
There was a problem hiding this comment.
Approval waits on an engineering owner deciding the draft direction in this record; the ORD4 and FR8 conflict raised on the previous head is fixed, and one record defect needs fixing whatever the owner decides.
Blocking:
- Miss: AR1 says
labelis the only spoken name while FR7 and ORD2 put the count inside the name, so a counted IconButton gets two possible accessible names ("Like" with the count as its value, or "Like, 12" renamed with every count); state one in FR7, ORD2 and AR1, and say what an unpressed counted toggle reads on Android, where FR6 already puts "not selected" in the value.
What an engineering owner has to settle (record it by commenting /approve-spec <full head SHA>; the author may do so as an engineering owner):
- IconButton takes ToggleButton's pressed state on React Native although
family:buttonsAV1 says IconButton does not retain pressed state, and itsonClickcannot cancel the toggle the way ToggleButton'spreventDefault()can. - The count beside the glyph, which turns the square into a pill against
family:buttonsFR7 andcomponent:IconButtonFR3, and joins what is spoken againstcomponent:IconButtonAR1. - The
xlsize beyond thesm | md | lgaxis thatarchitecture:component-size-cascadeINV1 fixes. surfaceand the glass circle, which needspec:AST-082DEC-2 andspec:AST-093FR4 amended first (#12801), including the order this head settles on: an explicitglassoutranks the theme'smaterial, as #12801 says, while the surfaces-and-glass draft (#12557) and the React Native Button record (#12817) let the theme decide.- Leaving
clickActionout of the React Native contract, a reading ofspec:AST-082FR4 that no clause states.
An approval settles direction only: the family, size-cascade and native-surfaces records the draft departs from still need amending, or the record narrowing. Non-blocking: FR9's glass xl "48 pt" still has no Android unit, FR5's "presses wait" reads as queued where ORD1 says the button does nothing, ORD4 cites the glass draft's FR7 for an order that FR7 reverses, and the review-checks row leaves out the placement as a source of the glass look.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: stacked on the React Native platform-records pull request and merges after it: verified, the base is that pull request's branch.
- Claim: the record also rests on the open native-surfaces amendment, the surfaces-and-glass, icons and system-modules drafts, and the React Native Button record: verified, all are open drafts.
- Claim: the glass circle, the toggle and the count are stated in the record itself: verified in FR6, FR7 and FR9.
- Claim: the record states its departure from the button family's pressed-state rule as deliberate: verified in its family relationships.
- Claim: no other open pull request records IconButton on React Native: verified by a repository search.
- Claim: core's props under core's name, without the web contract's props, and
widthascontentorfill: verified in FR1; theclickActionexclusion waits on the owner. - Claim:
iconandpressedIcontake an icon name or a React element, and no concept a core prop owns gets a second input: verified in FR2. - Claim: the engagement row is a controlled toggle with ToggleButton's names and callback order,
onClickthenonPressedChange, and a count read as one element: verified in FR6, FR7 and ORD1; where the count sits in the name is the blocking finding. - Claim:
xlis a square and glyph a third larger thanlg, set only by an explicitsize: verified in FR4 and ORD3. - Claim:
surfacetakesplainorglasswith no default, unset follows the chrome paint in a bar, the tab accessory or the search field, elseplain, and the glass circle's size, ink and accessibility settings are as described: verified in FR8 and FR9. - Claim: press, link, loading, disabled, tooltip, touch target and theme overrides follow the React Native Button record: verified in FR5.
- Claim: the gap lines state where the package differs today: present for FR2, FR6 and FR8; the package itself is outside this repository.
- Claim: no rejected alternatives, no pull request references and no open questions in the record, and the writing-rubric results hold: verified.
- Claim: the knowledge check finds nothing in this record, Prettier is clean, and the diff has no whitespace errors: verified at this head.
- Claim: FR8's per-call-site sentence moved here from the React Native foundation record as part of its slimming pull request, and ORD4 keeps its order: verified, that pull request deletes the sentence there, FR8 carries it, and ORD4 is unchanged.
- File:
docs/specs/components/IconButton/IconButton.react-native.spec.md: owner decisions above; one blocking defect (the count's place in the name) and four non-blocking notes.
|
|
||
| ## Accessibility contract | ||
|
|
||
| - **AR1 — Name.** `label` is the only spoken name; |
There was a problem hiding this comment.
Miss: this says label is the only spoken name, but FR7 (line 122) says isCountVisible={false} "keeps the count in the spoken name" and ORD2 (line 156) gives the name as "label, with the count after it". As the element's value, the count leaves label the only name, as component:IconButton AR1 requires; in the name, "Like, 12" becomes "Like, 13" after a like, and VoiceOver reads both the same. Suggest stating one in FR7, ORD2 and here, and saying what an unpressed counted toggle reads on Android, where FR6 already puts "not selected" in the value.
| only from an explicit `size`. | ||
| - **ORD4 — Surface paint.** Reduce Transparency or Increase Contrast (opaque), | ||
| then `surface`, then the placement of an unset `surface`, then the theme's | ||
| `material` (`spec:AST-123` FR7). |
There was a problem hiding this comment.
Non-blocking: the surfaces-and-glass draft's FR7 (#12557) says the theme's resolved material "comes first" and lists glass buttons in its chrome row, the reverse of this order, and FR8 tells a glass IconButton to follow that row. The clause that states this order is #12801's amended DEC-2 ("plain or glass overrides them"); suggest citing it here, and settling the two drafts in the owner's surface decision.
| | FR2 | IconButton's React Native contract MUST add, on iOS and Android alike, the toggle (FR6), the count (FR7), the size `xl` (FR4) and `surface` (FR8), and no second input for a concept a core prop owns: `label` owns the spoken name, `onClick` the press, and `tooltip` the description (`spec:AST-082` FR7). `icon` and `pressedIcon` take a shared icon name, which resolves through `Icon` (`spec:AST-082` FR17, `spec:AST-127` FR4), or a React element, which draws as given inside the icon slot's size and the button's ink. | `spec:AST-082` FR3, FR5, FR7, DEC-6; DEC-1, DEC-2 | verify | | ||
| | FR3 | IconButton MUST render one press target in icon-only mode with the caller's icon and no visible text, named by `label` (`component:IconButton` FR1, FR2). Without `width` or a drawn count it is a fixed square whose side is the theme's element size for its size (`size.elementSm`, `size.elementMd`, `size.elementLg`), grown with the system text size, with no padding; no row (a wrapping stack, a Toolbar) shrinks it. An icon name draws at `sm` in `sm` and `md` buttons and at `md` in `lg` ones (`component:IconButton` FR3). Without `size` it takes its slot's size, else `md` (`architecture:component-size-cascade`). `width="fill"` takes the row's width. | `component:IconButton` FR1–FR3; `family:buttons` FR7; `architecture:component-size-cascade` | verify | | ||
| | FR4 | `size="xl"` MUST draw a square a third larger than `lg` (`size.elementLg` × 4/3) holding a glyph a third larger than core Icon's `lg`, both grown with the text size, with `lg`'s ink, spinner and theme overrides. A slot's size never resolves to `xl`: a caller sets it. | DEC-3 | verify | | ||
| | FR5 | Press, link, loading, disabled, tooltip, focus, width, elevation, press feedback, touch target and theme overrides MUST follow `component:react-native/Button`, with the square in place of a label. A press runs `onClick`, then opens an accepted `href` through the app's opener (`spec:AST-130`); an enabled IconButton with an accepted `href` has the link role, and a script `href` is inert and leaves a button (`family:navigation-destinations`). While loading, the spinner takes the icon's place, the size holds, the button is busy, presses wait unless it is interruptible, and the loading message is announced once. A disabled IconButton never runs `onClick`. The press target reaches the platform's touch target (44 pt on iOS, 48 dp on Android) by hit slop around the visible square. The tooltip is the accessibility hint unless it repeats the name, and a long press shows it while the button cannot act. The theme's Button overrides apply without their padding, so the glyph keeps its square. | `component:IconButton` FR4; `component:Button` FR7–FR13, FR15; `family:buttons` FR3, FR4; `spec:AST-082` FR3, FR11 | verify | |
There was a problem hiding this comment.
Non-blocking: "presses wait unless it is interruptible" reads as presses queued until loading ends, while ORD1 says a loading, non-interruptible button "does nothing". Suggest "presses do nothing unless it is interruptible".
| | End-user impact | A person gets a compact action with the platform's touch target and press feedback. VoiceOver and TalkBack read its name, its pressed state and its count as one element. A glass control over a photo or a video stays readable, and turns solid under Reduce Transparency or Increase Contrast. | | ||
| | Builder impact | An app writes core's IconButton props. An engagement row (Like, Save) uses `isPressed`, `pressedIcon` and `count`; a media transport row uses `xl`; a control floating over content or media sets `surface="glass"`. | | ||
| | Compatibility/readiness | Not yet released; additive. Draft. Gaps are listed under Current-state impact. | | ||
| | Review checks | Reject a web contract prop offered on React Native, visible label text, a square that a row can shrink, a slot size that resolves to `xl`, a toggle that opens a link, a count read apart from the name, a glass circle smaller than the touch target, glass drawn under Reduce Transparency or Increase Contrast, a glass look taken from anywhere but `surface`, the theme and the accessibility settings, or a visual prop other than `surface`. | |
There was a problem hiding this comment.
Non-blocking: "a glass look taken from anywhere but surface, the theme and the accessibility settings" leaves out the placement, while FR8 paints an unset IconButton in a bar, the tab accessory or the search field from the chrome row, and the FR8 verification row lists the placement. Suggest adding "the placement".
Stacked on #12592; merges after it.
Merge order: this record also cites
spec:AST-082DEC-2 as amended (#12801),spec:AST-123(#12557),spec:AST-127(#12555),spec:AST-130(#12553), and the React Native Button record, which owns the press engine both buttons share. It merges after those. The rules it uses most (the glass circle, the toggle, the count) are stated in the record itself.Exact decision needed
How React Native draws IconButton: which core props it offers, the React Native platform props it adds (a toggle with ToggleButton's names, a count, the size
xl,surface), and how a glass IconButton looks and sizes.One point needs the
family:buttonsowner: AV1 gives retained pressed state to ToggleButton, and on React Native an IconButton withisPressedis a controlled toggle under ToggleButton's names (DEC-2). The record states this as a deliberate difference in its family relationships.An engineering owner also settles the count beside the glyph,
xlbeyond thesm | md | lgaxis thatarchitecture:component-size-cascadeINV1 fixes (DEC-3), andsurface, which rests on thespec:AST-082DEC-2 andspec:AST-093FR4 amendment (#12801).Existing authority searched
component:IconButton(docs/specs/components/IconButton/IconButton.spec.md): props, icon-only mode, name rule, square and icon size; no React Native rendering.component:Buttonandcomponent:ToggleButton: press, link, loading, disabled, tooltip; pressed-state names and meaning.family:buttons: FR1, FR3, FR4, FR6, FR7, AV1 and AV4.spec:AST-082DEC-2 as amended (open draft):surface(plainorglass) on Button and IconButton, no default; every other native look stays theme intent.spec:AST-123(open draft): FR1 and FR7 own the paint eachsurfacevalue and placement gets; FR3 the glass view.spec:AST-127(open draft): icon resolution and the Large Content Viewer glyph;spec:AST-130(open draft): haptic moments, link opening, the accessibility settings snapshot.architecture:component-size-cascade: slot sizes.IconButton,surface,glass,isPressed,count,xl. No open pull request records IconButton on React Native.Decision
docs/specs/components/IconButton/IconButton.react-native.spec.md(component:react-native/IconButton,platform_of: component:IconButton):IconButtonunder core's name with core's props and meaning; the web contract's props are not offered, andwidthiscontentorfill(DEC-1).iconandpressedIcontake an icon name or a React element. No second input is offered for a concept a core prop owns:labelowns the spoken name,onClickthe press,tooltipthe description (spec:AST-082FR7).onClick, thenonPressedChange) and a count beside the glyph, read as one element ("Like, 12") (DEC-2).xlis a square and glyph a third larger thanlg, for media transport rows; only an explicitsizesets it (DEC-3).surfacetakesplainorglass, with no default; unset follows the chrome paint in a bar, the tab accessory or the search field, elseplain. A glass IconButton is a circle at least the touch target, one size at every text size on iOS with the Large Content Viewer, grown with the text on Android; the variant keeps its meaning as ink; Reduce Transparency and Increase Contrast make it opaque (DEC-4).onPress,accessibilityLabel,accessibilityHintandhint(FR2); a toggle callsonPressedChangebeforeonClick(FR6); it spellsplainasdefaultand defaults to it, and it also takes amutedsurface value (FR8).Rejected alternatives
None recorded in the record.
Claim scope and non-goals
The record covers only what React Native adds to
component:IconButtonor does differently. The shared press engine, the paints, the glass views, icons and haptics stay with their owners, which the record's ownership lines name.Evidence and implementation relationship
The record is a specification only and has no implementation in this pull request. Its gap lines state where the current package differs from the requirements.
Writing rubric results
Rejected:lines.FR2,FR6andFR8gap lines; "not yet released" appears only in the template's lifecycle field and readiness cell.Scope
Components: IconButton (React Native)
Validation
node scripts/check-knowledge.mjs: 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-112FR8 states that
surfaceis a per-call-site choice, moved here fromspec:AST-112FR21 as part of #13029. ORD4 keeps its order of paint.