Skip to content

spec(Icon): React Native platform record - #12822

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

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

Conversation

@imdreamrunner

@imdreamrunner imdreamrunner commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #12592 (react-native records in the knowledge checks); merges after it.

Merge order: the record also cites spec:AST-127 (#12555), which owns icon resolution and the native views it names, and the AST-112 amendment (#12563) for FR16 and FR19. It merges after those too.

Exact decision needed

How React Native's Icon implements component:Icon: which props it offers, how it draws the image its name resolves to, its box and its growth with the text size, what inherit takes, what it draws when a native piece is absent, and how screen readers see it.

Existing authority searched

  • component:Icon (docs/specs/components/Icon/Icon.spec.md, current): props, built-in names, size scale, colour map and accessibility; no React Native rendering.
  • component:swift/Icon (draft): the SwiftUI record of the same component; this record follows its shape.
  • spec:AST-082 (current): FR3, FR4 (an icon slot's unknown name stops a development build on a native platform), FR5, FR7, FR11, FR17 and DEC-10 (shared names; each platform's own symbols by default, SF Symbols on iOS and Material icons on Android) and DEC-2 (native-only visuals are theme configuration).
  • spec:AST-127 (open draft): icon resolution, the icon source, the drawn glyphs, the vector, symbol and icon views, mirroring and the Large Content Viewer image. This record points to it for each of those and states only what Icon does with them.
  • spec:AST-112 (draft, with its open amendment): FR5 (the public surface), FR16 (web parity; a component's gaps are lines in its own record) and FR19 (accessibility).
  • The open React Native records for TopNav (spec(TopNav): React Native platform record #12685) and TabBar (spec(TabBar): React Native platform record #12686), whose shape this record follows. No open pull request adds an Icon React Native record.

Decision

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

  • React Native's Icon takes core's icon, color, size and label and the shared base props, and adds only scalesWithText, for a glyph in a control that keeps its size (FR1, FR2, DEC-2). An SVG component, variant, the palette colours and the web styling props stay on the web. Icon takes no visual prop: its look, the drawn glyph's stroke included, comes from the theme (DEC-1).
  • Icon draws an icon the theme or the app defines, else, for a built-in name, the platform's own symbol (an SF Symbol on iOS, a Material icon on Android) under the platform icon source, or Astryx's drawn glyph under the theme icon source (spec:AST-082 FR17, spec:AST-127 FR4). An unknown name stops a development build and draws nothing in a release build (FR3).
  • Drawn glyphs and local masks appear in the view's first frame, sharp at every size, with no icon font, SVG or image library; directional names mirror in right-to-left layouts (FR4).
  • The box is core's size grown with the system text size; scalesWithText={false} keeps the nominal side, and an owner's fixed frame (a tab bar's tab) sets the side of an icon without its own size; an explicit size always wins (FR5).
  • inherit takes the foreground of the Astryx component around the icon, because React Native views do not inherit a text colour; outside one, the primary icon token (FR6, DEC-3).
  • With the vector view absent, a drawn glyph draws nothing and warns once in development; with the platform turned off, glyphs still draw (FR7).
  • Decorative unless labeled, no focus stop of its own, and on iOS the Large Content Viewer image for a drawn glyph the library marks, in spec:AST-127 FR9's terms (AR1–AR4).
  • Each place where the library differs is a gap line under Current-state impact. OQ1 asks where the everyday icon names that core does not define live.

Rejected alternatives

None recorded in the record.

Claim scope and non-goals

The record covers only what React Native adds to component:Icon or does differently. Name resolution, the icon source, glyph shapes, the native views and the list of names that mirror stay with spec:AST-127; owner sizes and frames stay with the owning components and architecture:component-size-cascade.

Evidence and implementation relationship

The record is a specification only and has no implementation in this pull request. Each requirement was read against the current React Native implementation, and every place where that implementation differs is one of the record's gap lines.

Writing rubric results

  • R1 narration: none; the record is in the present tense and states what the component does.
  • R2 research in the record: none; each decision keeps a short reason.
  • 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 keeps its two options.
  • R7 project status (build status or work order): differences from the implementation are stated as FRn gap lines; "not yet released" appears only in the template's lifecycle field and readiness cell.

Scope

Components: Icon (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.

Follow-up: claims moved from spec:AST-112

Cites spec:AST-112 FR10 for web parity, where #13029 folds FR16.

@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 11:47pm 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, 11:59 PM 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 an engineering owner's decision about the new record, and five fixes are needed either way.

The record adds draft requirements that no current record states: the props React Native's Icon keeps and drops (FR1, DEC-1), the new scalesWithText prop (FR2, DEC-2), inherit taking the surrounding component's foreground (FR6, DEC-3), and the drawing and fallback rules (FR3 to FR7, AR3, AR4). 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.

Blocking findings:

  • FR3 and ORD1 make every built-in name without a defined icon draw the drawn glyph on Android, which contradicts spec:AST-082 FR17 (Material icons on Android) and DEC-10, so follow FR17 and record the Android behaviour as an FR3 gap, or have FR17 amended first.
  • FR5 and ORD2 let an owner's fixed frame override an explicit size, which contradicts component:Icon FR5 and the record's own review check, so keep the explicit size winning or amend component:Icon FR5.
  • FR3 adds a theme-drawn-glyph step that spec:AST-127 FR4 does not have, and AR3 relies on a LargeContentGlyph wrapper that no record defines, although the record leaves resolution and drawing to spec:AST-127.
  • The gap list leaves out a difference spec:AST-127 records for the same library: its SF Symbol table has no minimum iOS per symbol, while FR3 draws a symbol only where the running iOS has it.
  • The unknown-name rule is spec:AST-082 FR4 (with FR17), not FR3 as the description and FR3's basis cite.
Claims and files checked

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

  • Claim: stacked on the change that lets the knowledge checks accept React Native records, merging after it: verified (this pull request's base is that change's head).
  • Claim: the record cites the open icons-and-drawing draft and the foundation amendment and merges after them: verified (both are open drafts; the amendment adds FR16 and FR19).
  • Claim: the core Icon record is current and has no React Native rendering: verified.
  • Claim: the record follows the Swift Icon record's shape: verified for its sections.
  • Claim: AST-082 FR3 holds the unknown-name rule: false (it is FR4, with FR17).
  • Claim: the record points to the icons draft for resolution and drawing and states only what Icon does with them: false for the theme-glyph step and LargeContentGlyph.
  • Claim: no open pull request adds an Icon React Native record: verified by repository search.
  • Claim: the decision bullets describe the record: verified against FR1 to FR7, AR1 to AR4 and DEC-1 to DEC-3.
  • Claim: no rejected alternatives are recorded: verified.
  • Claim: every place the implementation differs is a gap line: not verifiable here (the library is not in this repository), and contradicted for the SF Symbol minimum by the icons draft.
  • Claim: the writing rubric finds no narration, research, pull-request references or project status: verified; the only "not yet released" text is the template's lifecycle field and readiness cell.
  • Claim: the knowledge check, Prettier and the whitespace check pass: verified.
  • File docs/specs/components/Icon/Icon.react-native.spec.md: the five blocking findings above, plus two non-blocking notes (add spec:AST-127 to system_specs once it lands; say whether core's name fallback is offered).

Automated review (maintainer link)

architecture:public-component-api,
]
contributing: []
system_specs: [spec:AST-082, spec:AST-093, spec:AST-112]

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.

Non-blocking: spec:AST-127 is the record this one cites most; add it here once it lands so pnpm specs:for routes this record to it.

…ns in a frame; FR4 holds the unknown-name rule

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about the new record, and one fix is needed either way; the earlier review's requested fixes are in.

The record adds draft requirements that no current record states: the props React Native's Icon keeps and drops (FR1, DEC-1), the new scalesWithText prop (FR2, DEC-2), inherit taking the surrounding Astryx component's foreground (FR6, DEC-3), and the icon sources with Material icons on Android (FR3). 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.

Blocking

  • FR3 and ORD1 (lines 134 and 165) give a built-in name whose SF Symbol the running iOS lacks no image, which spec:AST-082 FR11 rules out ("never to a broken or blank state"), so draw the closest earlier symbol or the drawn glyph there and give the FR3 verification row that expected result.

Non-blocking: nothing here or in spec:AST-127 draws Android's Material icon and FR3 names only systemName for a theme's symbol entry, the FR3 gap about the library's SF Symbol table disagrees with spec:AST-127's, and the name fallback in component:Icon FR1 is neither offered nor excluded.

Claims and files checked

Review mode: full; reason: spec-record

  • Claim: stacked on the knowledge-check change and merging after it and the two record drafts it cites. Verified: the base is that pull request's head, and both drafts are open.
  • Claim: the authority searched (core Icon current with no React Native rendering, Swift Icon draft, the native-first record's FR3, FR4, FR5, FR7, FR11, FR17, DEC-2 and DEC-10, the React Native foundation draft's FR5, FR16 and FR19). Verified; FR16 and FR19 exist only in the open amendment.
  • Claim: no open pull request adds an Icon React Native record. Verified by a repository search.
  • Claim: the record points to the icons-and-drawing draft for resolution and native views and states only what Icon does with them. Partly false: FR3 gives Android a Material icon and drops the older-iOS fallback that the draft's FR4 keeps.
  • Claim: the decision bullets (props and scalesWithText, resolution order and unknown names, first-frame drawing and mirroring, the box and explicit size, inherit, an absent vector view and the platform off, accessibility, gap lines, OQ1). Each matches the record.
  • Claim: no rejected alternatives are recorded. Verified.
  • Claim: every place the implementation differs is a gap line. Not verifiable here, since the library is outside this repository, and the SF Symbol table line disagrees with the icons-and-drawing draft.
  • Claim: writing rubric results R1 to R7. Verified: no pull-request references, and "not yet released" only in the lifecycle field and readiness cell.
  • Claim: the knowledge check, Prettier and the whitespace check pass. Verified at this head.
  • Claim: no internal context in public text. Verified.
  • File docs/specs/components/Icon/Icon.react-native.spec.md: one blocking finding (FR3 and ORD1) and the non-blocking notes above.

Automated review (maintainer link)

| Native piece | Record | What this record uses it for |
| ------------------ | ---------------------------- | ------------------------------------------------------------------ |
| `AstryxVectorView` | `spec:AST-127` FR6, FR7, FR9 | the drawn glyph and its Large Content Viewer image (FR4, FR7, AR3) |
| `AstryxSymbolView` | `spec:AST-127` FR3 | the SF Symbol on iOS under the `platform` icon source (FR4) |

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.

Non-blocking: FR3 now gives Android a Material icon, but this table, FR4 and the platform-controls paragraph name a symbol view for iOS only, and spec:AST-127 still draws Android's built-in names as drawn glyphs. Name what draws a Material icon (for example a vector scene on AstryxVectorView), and have FR3 read an Android theme entry, which @astryxdesign/native types as materialSymbol, not systemName.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about the new record; no fix is required, and the earlier review's requested fix for an SF Symbol the running iOS lacks is in.

The record adds draft requirements that no current record states: the props React Native's Icon keeps and drops (FR1, DEC-1), the new scalesWithText prop (FR2, DEC-2), inherit taking the surrounding Astryx component's foreground (FR6, DEC-3), and Material icons on Android under the platform icon source (FR3). 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.

Non-blocking:

  • Nothing here or in spec:AST-127 draws Android's Material icon, and FR3 names only systemName for a theme's symbol entry, while @astryxdesign/native types an Android entry as materialSymbol.
  • The FR3 gap about the library's SF Symbol table (line 76) disagrees with spec:AST-127's gap about the same table.
  • Current component:Icon FR1 reads a name prop when icon is absent; FR1 here neither offers nor excludes it.
Claims and files checked

Review mode: full; reason: spec-record

  • Claim: stacked on the knowledge-check change and merging after it and the two record drafts it cites. Verified: the base is that pull request's head, and both drafts are open.
  • Claim: the authority searched (core Icon current with no React Native rendering; the Swift Icon draft; the native-first record's portability, base-prop, OS-fallback and icon clauses and its two decisions; the React Native foundation draft's public-surface, parity and accessibility clauses). Verified; the parity and accessibility clauses exist only in the open amendment.
  • Claim: no open pull request adds an Icon React Native record. Verified by a repository search.
  • Claim: the record points to the icons-and-drawing draft for resolution and native views and states only what Icon does with them. Verified, with one difference: on Android the record follows the native-first record's platform-symbol default, where the draft still draws Astryx's glyph.
  • Claim: the decision bullets (props and scalesWithText, resolution order and unknown names, first-frame drawing and mirroring, the box and explicit size, inherit, an absent vector view and the platform off, accessibility, gap lines, the open question on everyday names). Each matches the record at this head.
  • Claim: no rejected alternatives are recorded. Verified.
  • Claim: every place the implementation differs is a gap line. Not verifiable here, since the library is outside this repository, and the SF Symbol table line disagrees with the icons-and-drawing draft.
  • Claim: writing rubric results R1 to R7. Verified: no pull-request references, and "not yet released" only in the lifecycle field and readiness cell.
  • Claim: the knowledge check, Prettier and the whitespace check pass. Verified at this head.
  • Claim: no internal context in public text. Verified.
  • File docs/specs/components/Icon/Icon.react-native.spec.md: no blocking finding; the three non-blocking notes above.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about the new record; no fix is required.

The record adds draft requirements that no current record states: the props React Native's Icon keeps and drops, including whether core's name fallback is offered (FR1, DEC-1), the new scalesWithText prop (FR2, DEC-2), inherit taking the surrounding Astryx component's foreground (FR6, DEC-3), and Material icons on Android under the platform icon source (FR3). 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.

Non-blocking:

  • Nothing here or in spec:AST-127 draws Android's Material icon, and FR3 names only systemName for a theme's symbol entry, while @astryxdesign/native types an Android entry as materialSymbol.
  • FR1 and the Governing rules row now cite spec:AST-112 FR10 for web parity, but on main that wording and the gap-line rule are still FR16 until #13029 lands; name #13029 in the merge order or keep FR16 beside FR10 until then.
  • The FR3 gap about the library's SF Symbol table (line 76) disagrees with spec:AST-127's gap about the same table.
Claims and files checked

Review mode: full; reason: spec-record

  • Claim: stacked on the knowledge-check change and merging after it. Verified: the base is that pull request's branch, and it is open.
  • Claim: merging after the icons-and-drawing draft and the foundation amendment. Partly outdated: the icons-and-drawing draft is open, the amendment has merged, and the record now cites foundation FR10 in the form the open draft #13029 gives it, which the description names only under its follow-up heading.
  • Claim: the authority searched (core Icon current with no React Native rendering; the Swift Icon draft; the native-first record's portability, base-prop, OS-fallback and icon clauses and its two decisions; the React Native foundation draft's public-surface, parity and accessibility clauses). Verified on main; the foundation amendment is merged, not open.
  • Claim: no open pull request adds an Icon React Native record. Verified by a repository search of open pull request titles.
  • Claim: the record points to the icons-and-drawing draft for resolution and native views and states only what Icon does with them. Verified, with one difference: on Android the record follows the native-first record's platform-symbol default, where the draft still draws Astryx's glyph.
  • Claim: the decision bullets (props and scalesWithText, resolution order and unknown names, first-frame drawing and mirroring, the box and explicit size, inherit, an absent vector view and the platform off, accessibility, gap lines, the open question on everyday names). Each matches the record at this head.
  • Claim: no rejected alternatives are recorded. Verified.
  • Claim: every place the implementation differs is a gap line. Not verifiable here, since the library is outside this repository, and the SF Symbol table line disagrees with the icons-and-drawing draft.
  • Claim: writing rubric results R1 to R7. Verified: no pull-request references, and "not yet released" only in the lifecycle field and readiness cell.
  • Claim: the knowledge check, Prettier and the whitespace check pass. Verified at this head.
  • Claim: the record cites foundation FR10 for web parity, where #13029 folds FR16. Verified that it cites FR10 (lines 40 and 132) and that #13029, still open, moves FR16 into FR10.
  • Claim: no internal context in public text. Verified.
  • File docs/specs/components/Icon/Icon.react-native.spec.md: no blocking finding; the three non-blocking notes above.

Automated review (maintainer link)


| ID | Candidate invariant | Basis | Draft review state |
| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------- | ------------------ |
| FR1 | The React Native `Icon` MUST take core's `icon`, `color`, `size` and `label` with core's names, types, defaults and meaning, and the shared base props: `id` becomes the view's test and native identifier, and `isHidden` removes the icon from layout and from screen readers while it stays mounted. `icon` takes a built-in name or a namespaced `<library>:<name>`, not an SVG component; `color` takes the semantic values and `inherit`, not the palette values. `variant`, `xstyle`, `className`, `style` and `ref` are not offered. Icon MUST NOT offer a prop it does not fully honor, and takes no visual prop (DEC-1). | `spec:AST-082` FR3, FR4, FR5, FR7, DEC-2; `spec:AST-112` FR5, FR10; DEC-1 | settled |

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.

Non-blocking: on main, spec:AST-112 FR10 says components keep core's names and contracts, which supports this row, but web parity and the rule that a component's gaps are lines in its own record are still FR16 until #13029 lands. Name #13029 in the merge order, or keep FR16 beside FR10 until it lands.

This branch was successfully deployed

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