Repository navigation
spec(Icon): React Native platform record - #12822
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'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-082FR17 (Material icons on Android) and DEC-10, so follow FR17 and record the Android behaviour as anFR3 gap, or have FR17 amended first. - FR5 and ORD2 let an owner's fixed frame override an explicit
size, which contradictscomponent:IconFR5 and the record's own review check, so keep the explicit size winning or amendcomponent:IconFR5. - FR3 adds a theme-drawn-glyph step that
spec:AST-127FR4 does not have, and AR3 relies on aLargeContentGlyphwrapper that no record defines, although the record leaves resolution and drawing tospec:AST-127. - The gap list leaves out a difference
spec:AST-127records 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-082FR4 (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 (addspec:AST-127tosystem_specsonce it lands; say whether core'snamefallback is offered).
| architecture:public-component-api, | ||
| ] | ||
| contributing: [] | ||
| system_specs: [spec:AST-082, spec:AST-093, spec:AST-112] |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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-082FR11 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.
| | 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) | |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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-127draws Android's Material icon, and FR3 names onlysystemNamefor a theme's symbol entry, while@astryxdesign/nativetypes an Android entry asmaterialSymbol. - 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:IconFR1 reads anameprop wheniconis 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.
There was a problem hiding this comment.
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-127draws Android's Material icon, and FR3 names onlysystemNamefor a theme's symbol entry, while@astryxdesign/nativetypes an Android entry asmaterialSymbol. - FR1 and the Governing rules row now cite
spec:AST-112FR10 for web parity, but onmainthat 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.
|
|
||
| | 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 | |
There was a problem hiding this comment.
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.
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
Iconimplementscomponent:Icon: which props it offers, how it draws the image its name resolves to, its box and its growth with the text size, whatinherittakes, 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 whatIcondoes 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).Decision
docs/specs/components/Icon/Icon.react-native.spec.md(component:react-native/Icon,platform_of: component:Icon):Icontakes core'sicon,color,sizeandlabeland the shared base props, and adds onlyscalesWithText, 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).platformicon source, or Astryx's drawn glyph under thethemeicon source (spec:AST-082FR17,spec:AST-127FR4). An unknown name stops a development build and draws nothing in a release build (FR3).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 ownsize; an explicitsizealways wins (FR5).inherittakes 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).spec:AST-127FR9's terms (AR1–AR4).Rejected alternatives
None recorded in the record.
Claim scope and non-goals
The record covers only what React Native adds to
component:Iconor does differently. Name resolution, the icon source, glyph shapes, the native views and the list of names that mirror stay withspec:AST-127; owner sizes and frames stay with the owning components andarchitecture: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
Rejected:lines.FRn gaplines; "not yet released" appears only in the template's lifecycle field and readiness cell.Scope
Components: Icon (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-112Cites
spec:AST-112FR10 for web parity, where #13029 folds FR16.