Repository navigation
spec(TopNav): React Native platform record - #12685
imdreamrunner wants to merge 11 commits into
Conversation
…colours resolve in scope
…tions are functions
|
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 record needs an engineering owner's decision before it can be approved, and it has six conflicts with current specs to fix either way.
The record adds new requirements and decisions (FR1–FR20, AR1–AR6, ORD1–ORD4, PR1–PR2, DEC-1–DEC-6) that no current record states. An engineering owner records approval by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner; that decision should also settle the render prop name, next to the system's existing presentation vocabulary, and the hidesWhenScrolling and obscuresBackground booleans, next to the is…/has… grammar the other parts follow.
Blocking findings, which approval of the draft does not settle:
- Android defaults to the Astryx-drawn header and search row (DEC-3, DEC-4) although the record names the Material 3 top app bar and search bar, while
spec:AST-082FR11 andspec:AST-093FR2 require the platform's control or a stated reason it does not fit. - Exporting TopNav as
Header(DEC-1, FR2) contradictsspec:AST-082FR3, which keeps a component's name the same on every platform, so keepTopNavor recordHeaderas its own native-only component. - iOS-only options (
toolbar,BarStatus,HeaderBacktitle, display mode and menu, the large-title subtitle,scrollEdgeEffects) are offered on Android and draw nothing, andsurfaceis ignored undersystem, whichspec:AST-082FR3, FR5 and DEC-14 rule out, so scope each option to the platform that honors it. surfaceand the FR16 style settings make glass, material and colours component props, whilespec:AST-082DEC-2 andspec:AST-093FR4 keep native-only visuals in the native theme.- FR11 draws Astryx glyphs by default on Android and in the drawn header, while
spec:AST-082FR17 and DEC-10 default native icons to the platform's own symbols. - Most requirements cite the NavigationStack record and the
spec:AST-125,spec:AST-123andspec:AST-127records, none of which is in the repository yet, so stack this pull request on those drafts or state the needed behavior here.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the pull request sits on the platform-records change and merges after it. Verified: the base is that pull request's head.
- Claim: TopNav's core record keeps the slot names and has no React Native rendering. Verified against that record.
- Claim: the NavigationStack record and the navigation-hosts spec are open drafts that defer the header here. Not verifiable in the repository: neither exists on main, at the base or at the head.
- Claim: the icon and surface specs own icon resolution and glass. Not verifiable in the repository: neither exists yet.
- Claim: Layout and LayoutHeader are layout regions, and no core record covers a screen header. Verified.
- Claim: the decision bullets match DEC-1 to DEC-6. Verified.
- Claim: the record covers only what React Native adds or does differently. False: it renames the component (blocking finding 2).
- Claim: the pull request is a specification only, with no implementation. Verified: one Markdown file.
- Claim: DEC-3 states the per-platform default with its reason. False for Android (blocking finding 1).
- Claim: every basis cell names records and claims. Verified, but four of those records are not in the repository (blocking finding 6).
- Claim: the record has no rejected-alternative lines and no pull request or issue references. Verified.
- Claim: open questions read "None", and the header outside the router is answered by FR20 and DEC-6. Verified.
- Claim: drawn-header differences are nine gap lines, and "not yet released" appears only in lifecycle fields. Verified; the Current-state impact's first sentence still states build status (note).
- Claim: public text carries no internal context. Verified.
- Claim: the knowledge check passes with no finding for this record. Verified at the head.
- Claim: Prettier check and
git diff --checkare clean. Verified at the head. - File:
docs/specs/components/TopNav/TopNav.react-native.spec.md: six blocking findings, above, and two non-blocking notes (a build-status sentence, and an undefinedbackPreviewkey).
|
|
||
| ## Current-state impact | ||
|
|
||
| The system rendering honours every option this record lists for it. The drawn |
There was a problem hiding this comment.
Non-blocking: "The system rendering honours every option this record lists for it" states build status, and this repository has no React Native code. Drop the sentence and keep the FRn gap lines.
… contract; theme-owned visuals; platform icons
There was a problem hiding this comment.
This draft record still needs an engineering owner's decision, and four conflicts with current specs remain to fix; keeping the name TopNav, the new iOS contract, the platform icon default and the declared merge order resolve the earlier findings they address.
The record adds requirements and decisions (FR1–FR21, AR1–AR6, ORD1–ORD4, PR1–PR2, DEC-1–DEC-6) that no current record states, so an engineering owner records approval by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. That decision should also settle the render prop name, beside the system's existing presentation for which surface appears, and TopNavSearch's hidesWhenScrolling and obscuresBackground, beside the is…/has… boolean grammar the other parts follow.
Blocking findings, which approval of the draft does not settle:
- DEC-3's reason for Android's drawn default (lines 371–375) contradicts the record's own option table, which says the system Material bar shows the large title, title menu, bar items and custom views while the drawn header lists gaps the system bar does not have, so under
spec:AST-082FR11 andspec:AST-093FR2autoshould resolve tosystemon Android unless DEC-3 names a requirement the Material bar really cannot meet. TopNavMenu(FR2) reuses the name of web's currentTopNavMenu, a destinations menu withlabel,itemsand hover delays, for a bar button with an action menu, whichspec:AST-082FR3 rules out unless the record states how React Native keeps that component's contract or the part takes a name web does not use.- Miss:
TopNavSearch'sscopes,selectedScopeandonScopeChange(FR9) work only in the iOS system search field yet stay offered on Android, whichspec:AST-082FR3, FR5 and DEC-6 rule out, so add them to FR21's iOS contract and give the iOSdrawncase a gap line. - FR15, FR16 and ORD4 let the router's per-screen navigation options set the tint, title faces, bar colours and material (with values the native theme's
materialdoes not have), whilespec:AST-082DEC-2 andspec:AST-093FR4 keep native-only visuals in the native theme, so move them intodefineNativeThemeor amend DEC-2 with an owner decision.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: the record builds on the platform-records pull request and merges after it. Verified: the base branch is that pull request's head.
- Claim: it also merges after the NavigationStack, navigation-hosts, icons and surfaces drafts. Verified: those four open draft pull requests exist and hold those records.
- Claim: the back control's name and focus after a push are stated in the record itself. Verified (FR10, AR1, AR2).
- Claim: the core TopNav record keeps the slot names and has no React Native rendering. Verified.
- Claim: the NavigationStack and navigation-hosts drafts leave the header's rendering and Android header search to this component. Verified in those drafts; the NavigationStack draft still calls the component
Header. - Claim: the icons and surfaces drafts own icon resolution and glass. Verified in those drafts.
- Claim: Layout and LayoutHeader are layout regions, and no core record covers a screen header. Verified.
- Claim: React Native exports
TopNavunder its every-platform name, with web's part name where web has the part. Partly false:TopNavMenureuses web's name for a different part (blocking finding 2). - Claim: it keeps
heading,startContentandendContent, addsback,search,renderandonHeightChange, and leavescenterContentandlabelto the web contract. Verified (FR1, FR2, FR4, FR20); the at-a-glance table still liststoolbaras a general slot (inline note). - Claim: iOS-only options are in the iOS contract and are type errors on Android. Verified for FR21's list; search scopes are left out (blocking finding 3).
- Claim: style settings and the drawn material come from the native theme and the router's navigation options, and
TopNavtakes no visual props. Verified as written; the per-screen options conflict with the native-theme rule (blocking finding 4). - Claim: icons default to platform symbols, and a gap line says where Astryx glyphs remain. Verified; that gap also covers the system rendering on Android, which line 72 contradicts.
- Claim: composed parts register through context into a plain header record. Verified (FR3, DEC-2).
- Claim: DEC-3 says why the Material 3 top app bar does not fit as Android's default. A reason is given, but the option table contradicts it (blocking finding 1).
- Claim: DEC-4 says why the Material search bar does not fit. Verified.
- Claim: Astryx's router carries the header and no third-party native library is needed. Verified (DEC-5, FR18).
- Claim: outside a router screen the header draws in place and reports its height. Verified (FR20, DEC-6).
- Claim: option support is in one table and drawn-header differences are gap lines. Verified.
- Claim: no rejected alternatives and no pull request references are in the record. Verified.
- Claim: the pull request is a specification only. Verified: one Markdown file.
- Claim: the record is in the present tense, open questions read "None", and "not yet released" appears only in lifecycle fields. Verified, apart from line 72's status sentence (inline note).
- Claim: public text carries no internal context. Verified.
- Claim: the knowledge check, Prettier
--checkandgit diff --checkpass. Verified at this head. - File:
docs/specs/components/TopNav/TopNav.react-native.spec.md: four blocking findings above and three non-blocking notes (the line 72 sentence, the at-a-glancetoolbarslot, and the NavigationStack draft's old name).
…OS search scopes; DEC-3 reason matches the option table
There was a problem hiding this comment.
This draft record still needs an engineering owner's decision, and two conflicts with current specs remain to fix; the new TopNavMenuButton name, the iOS-only search scopes and the theme-only visual values resolve the earlier findings they address.
The record adds requirements and decisions (FR1–FR21, AR1–AR6, ORD1–ORD4, PR1–PR2, DEC-1–DEC-6) that no current record states, so an engineering owner records approval by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. That decision should also settle the render prop name, beside the system's existing presentation for which surface appears, and TopNavSearch's hidesWhenScrolling and obscuresBackground, beside the is…/has… boolean grammar the other parts follow.
Blocking findings, which approval of the draft does not settle:
- FR15 (line 159) and the drawn-material default (line 132) put the drawn header on glass when the theme sets no
material, so Android's default header is see-through, whilespec:AST-082FR10 keeps "the platform's default look" for an absent member and DEC-3 itself calls Android's bar "always opaque"; DEC-3's reason that the Material bar "cannot take atranslucentmaterial" is no misfit under that same claim and conflicts with the table's transparent-bar row (line 187), so make an unset material keep each platform's default look and drop or restate that reason. - Miss: the theme's
render.default(FR4, ORD2, DEC-3) is a native-theme value thatspec:AST-082FR10's member list does not define, and the Theme values read list thatspec:AST-093FR4 requires (lines 285–288) leaves it out, along with the scroll edge effect and transparent bar that now come only from the theme, so say where it lives, for example as a member of the header's theme target in a platform entry'scomponents, and list every theme value, or amend FR10 with an owner decision.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: the record builds on the platform-records pull request and merges after it. Verified: the base branch is that pull request's head.
- Claim: it also merges after the NavigationStack, navigation-hosts, icons and surfaces drafts. Verified: those four open draft pull requests exist and hold those records.
- Claim: the back control's name and focus after a push are stated in the record itself. Verified (FR10, AR1, AR2).
- Claim: the core TopNav record keeps the slot names and has no React Native rendering. Verified.
- Claim: the NavigationStack and navigation-hosts drafts leave the header's rendering and Android header search to this component. Verified in those drafts, which now name the component
TopNav. - Claim: the icons and surfaces drafts own icon resolution and glass. Verified in those drafts.
- Claim: Layout and LayoutHeader are layout regions, and no core record covers a screen header. Verified.
- Claim: React Native exports
TopNavunder its every-platform name, its parts follow the same root, and the bar's menu button takes a name web does not use. Verified (FR2,TopNavMenuButton). - Claim: it keeps
heading,startContentandendContent, addsback,search,renderandonHeightChange, and leavescenterContentandlabelto the web contract. Verified (FR1, FR2, FR4, FR20). - Claim: iOS-only options, search scopes included, are in the iOS contract and are type errors on Android. Verified (FR21).
- Claim: style values and the drawn material come only from the native theme and its platform-entry overrides, and nothing at the call site takes a visual setting. Verified (FR15, FR16, ORD4); the default for an unset material conflicts with the platform-default rule (blocking finding 1).
- Claim: icons default to platform symbols, and a gap line says where Astryx glyphs remain. Verified; that gap also covers the system rendering on Android, which line 72 contradicts.
- Claim: composed parts register through context into a plain header record. Verified (FR3, DEC-2).
- Claim: DEC-3 names two requirements the Material 3 top app bar cannot meet, and the option table shows both. The table shows both (lines 181–182); the opacity reason conflicts with the table's transparent-bar row and with the platform-default rule (blocking finding 1).
- Claim: DEC-4 says why the Material search bar does not fit. Verified.
- Claim: Astryx's router carries the header, the navigation library sets no default, and no third-party native library is needed. Verified (FR4, FR17, FR18, DEC-5).
- Claim: outside a router screen the header draws in place and reports its height. Verified (FR20, DEC-6).
- Claim: option support is in one table and the drawn header's differences are gap lines. Verified; one system-rendering difference is a table cell that FR4's "same in both" sentence does not allow for (inline note).
- Claim: no rejected alternatives and no pull request references are in the record. Verified.
- Claim: the pull request is a specification only. Verified: one Markdown file.
- Claim: the record is in the present tense, open questions read "None", and project status appears only as gap lines and lifecycle fields. Verified, apart from line 72's status sentence (earlier inline note, still open).
- Claim: public text carries no internal context. Verified.
- Claim: the knowledge check, Prettier
--checkandgit diff --checkpass. Verified at this head. - File:
docs/specs/components/TopNav/TopNav.react-native.spec.md: two blocking findings above and three non-blocking notes (line 72's status sentence, FR4's "same in both" sentence, and FR5's wording beside FR21).
…lt in a platform entry; full theme values list
There was a problem hiding this comment.
This draft record still needs an engineering owner's decision, and two conflicts with current specs remain to fix; keeping each platform's default look for an unset material and dropping DEC-3's opacity reason resolve the earlier finding they addressed.
The record adds requirements and decisions (FR1–FR21, AR1–AR6, ORD1–ORD4, PR1–PR2, DEC-1–DEC-6) that no current record states, so an engineering owner records approval by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. That decision should also settle DEC-3's drawn default on Android, the render name beside the system's existing presentation for which surface appears (the open AST-112 amendment, #12563, proposes the same axis), and TopNavSearch's hidesWhenScrolling and obscuresBackground beside the is…/has… boolean grammar the other parts follow.
Blocking findings, which approval of the draft does not settle:
- FR4 (line 148) cites current
spec:AST-082FR10 for the theme'srender.default, but FR10 defines no such member (a platform entry holds that platform's own vocabulary andcomponentsoverrides, and DEC-2 keeps presentation choices in platform props), and only the open AST-112 amendment (#12563) proposes it, which neither the record, its merge order nor the description's overlapping-work list names; cite that amendment, add it to the merge order and match its placement, or drop the theme default and let a navigator'srenderset it. - The Theme values read list (lines 285–292) leaves out the drawn
materialoverride that line 132 and ORD4 read from a platform entry'scomponentsoverride for TopNav, andspec:AST-093FR4 requires every spec to list the theme values it reads, so add it to the TopNav overrides there.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: the record builds on the platform-records pull request and merges after it. Verified: the base branch is that pull request's head, still open.
- Claim: it also merges after the NavigationStack, navigation-hosts, icons and surfaces drafts. Verified: those four open drafts hold those records; the open AST-112 amendment that proposes
render.defaultis not in the list (blocking finding 1). - Claim: the back control's name and focus after a push are stated in the record itself. Verified (FR10, AR1, AR2).
- Claim: the core TopNav record keeps the slot names and has no React Native rendering. Verified.
- Claim: the NavigationStack and navigation-hosts drafts leave the header's rendering and Android header search to this component. Verified in those drafts.
- Claim: the icons and surfaces drafts own icon resolution, glyph drawing, glass and paint. Verified; the surfaces draft still calls the component
Header. - Claim: Layout and LayoutHeader are layout regions, and no core record covers a screen header. Verified.
- Claim: React Native exports
TopNavunder its every-platform name, its parts followTopNav<Part>, and the bar's menu button takes a name web does not use. Verified (FR2,TopNavMenuButton). - Claim: it keeps
heading,startContentandendContent, addsback,search,renderandonHeightChange, and leavescenterContentandlabelto the web contract. Verified (FR1, FR2, FR4, FR20). - Claim: iOS-only options are in the iOS contract and are type errors on Android. Verified (FR21).
- Claim: style values and the drawn material come only from the native theme, and an unset
materialkeeps each platform's default look. Verified (FR15, FR16, ORD4, line 132). - Claim:
render.defaultis a member of a platform entry. The record says so, but currentspec:AST-082FR10 has no such member (blocking finding 1). - Claim: icons default to platform symbols, with a gap line where Astryx glyphs remain. Verified (FR11, lines 81–83).
- Claim: composed parts register through context into a plain header record. Verified (FR3, DEC-2).
- Claim: DEC-3 names the requirement the Material 3 top app bar cannot meet, and the option table shows it. Verified (DEC-3, line 181).
- Claim: DEC-4 says why the Material search bar does not fit. Verified.
- Claim: Astryx's router carries the header, the navigation library sets no default, and no third-party native library is needed. Verified (FR4, FR17, FR18, DEC-5).
- Claim: outside a router screen the header draws in place and reports its height. Verified (FR20, DEC-6).
- Claim: option support is in one table and the drawn header's differences are gap lines. Verified; FR4's "every setting means the same in both" misses the system Android search row (inline note).
- Claim: no rejected alternatives and no pull request references are in the record. Verified.
- Claim: the record is in the present tense, open questions read "None", and project status appears only in lifecycle fields and gap lines. Verified, apart from line 72's status sentence (inline note).
- Claim: overlapping open work is named. False: the open AST-112 amendment that defines
renderandrender.defaultis not named (blocking finding 1). - Claim: the pull request contains specification records only and no internal context. Verified: one Markdown file.
- Claim: the knowledge check, Prettier
--checkandgit diff --checkpass. Verified at this head. - File:
docs/specs/components/TopNav/TopNav.react-native.spec.md: two blocking findings above and three non-blocking notes (line 72's status sentence, FR4's "same in both" sentence, FR5's wording beside FR21).
…ial in the theme values list
There was a problem hiding this comment.
This draft record still needs an engineering owner's decision before it can be approved; FR4 now takes render.default from the AST-112 amendment and the theme values list names the drawn material, so no blocking finding remains.
The record adds requirements and decisions (FR1–FR21, AR1–AR6, ORD1–ORD4, PR1–PR2, DEC-1–DEC-6) that no current record states, so an engineering owner records approval by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. That decision should settle DEC-3's drawn default on Android, FR1's move of label and the navigation landmark to the web contract, FR4's reliance on the open AST-112 amendment (#12563) for the theme's render.default, the render name beside the system's existing presentation for which surface appears, and TopNavSearch's hidesWhenScrolling and obscuresBackground beside the is…/has… boolean grammar the other parts follow.
Optional wording fixes: line 72's build-status sentence, FR4's "every setting means the same in both" (line 148) and FR5's "not drawn there" (line 149), as the inline notes say.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: the record builds on the platform-records pull request and merges after it. Verified: the base branch is that pull request's head, still open.
- Claim: it also merges after the NavigationStack, navigation-hosts, icons and surfaces drafts and the AST-112 amendment, whose FR21 adds
render.default. Verified: all five are open drafts holding those records, and the amendment's FR21 and amendment list add the member to the native theme configuration. - Claim: the back control's name and focus after a push are stated in the record itself. Verified (FR10, AR1, AR2).
- Claim: the core TopNav record holds the slot names this record keeps and has no React Native rendering. Verified.
- Claim: the NavigationStack draft owns the stack, back and focus and defers the header's rendering to this record. Verified in its ownership lines.
- Claim: the navigation-hosts draft leaves header rendering and Android header search to the header component. Verified (its FR6).
- Claim: the icons and surfaces drafts own icon resolution, glyph drawing, glass and paint. Verified; the surfaces draft still calls the component
Header. - Claim: Layout and LayoutHeader are layout regions, and no core record covers a screen header. Verified.
- Claim: React Native exports
TopNavunder its every-platform name, its parts followTopNav<Part>, and the bar's menu button takes a name web does not use. Verified (FR2,TopNavMenuButton). - Claim: it keeps
heading,startContentandendContent, addsback,search,renderandonHeightChange, and leavescenterContentandlabelto the web contract. Verified (FR1, FR2, FR4, FR20). - Claim: iOS-only options are in the iOS contract and are type errors on Android. Verified (FR21).
- Claim: style values and the drawn material come only from the native theme, an unset
materialkeeps each platform's default look, andrender.defaultis the native theme member the AST-112 amendment adds. Verified (FR4, FR15, FR16, ORD4, line 132). - Claim: icons default to platform symbols, with a gap line where the drawn header still draws Astryx glyphs. Verified (FR11, lines 81–83).
- Claim: composed parts register through context and write a plain header record both renderings read. Verified (FR3, DEC-2).
- Claim:
autois the system bar on iOS and the drawn header on Android unless the theme overrides it, and DEC-3 names the requirement the Material 3 bar cannot meet, as the option table shows. Verified (DEC-3, line 181). - Claim: DEC-4 says why the Material search bar does not fit. Verified.
- Claim: Astryx's router carries the header, the navigation library sets no default, and no third-party native library is needed. Verified (FR4, FR17, FR18, DEC-5).
- Claim: outside a router screen the header draws in place and reports its height. Verified (FR20, DEC-6).
- Claim: option support is in one table and the drawn header's differences are gap lines. Verified; FR4's "same in both" misses the system Android search row (optional note).
- Claim: the record has no rejected alternatives and no pull request references, its open questions read "None", and project status appears only in lifecycle fields and gap lines. Verified, apart from line 72's status sentence (optional note).
- Claim: the overlapping open work is named. Verified: the AST-112 amendment is in the merge order and the authority list.
- Claim: the record is a specification only, with no implementation. Verified: the pull request changes one record.
- Claim: the knowledge check finds no problem in this record, and Prettier and the whitespace check are clean. Verified.
- File: the new TopNav React Native record: no blocking finding; three optional wording notes (lines 72, 148, 149).
| | FR1 | React Native's `TopNav` MUST take web TopNav's `heading`, `startContent` and `endContent` with web's names and meaning, and `children` as start content when `startContent` is absent (`component:TopNav` FR2, ORD1). `heading` holds the title part; `startContent` holds items after the back control, in reading direction; `endContent` holds items at the bar's end. TopNav's `centerContent`, `label`, `top-nav` target and AppShell render modes belong to the web contract (`spec:AST-082` FR3): a phone bar's centre is the title's place, and a phone bar has no navigation landmark to name and no drawer. Web base props follow `spec:AST-082` FR7. | `component:TopNav` FR1–FR3, ORD1; `spec:AST-082` FR3, FR7; DEC-1 | verify | | ||
| | FR2 | React Native MUST export the component as `TopNav`, the name it has on every platform (`spec:AST-082` FR3). Its composed parts follow the same root, with web's part name where web has the same part, otherwise `TopNav<Part>`: `TopNavTitle` (`title`, `subtitle`, a title menu), `TopNavLargeTitle` (`title`, `isInRow`, a title menu), `TopNavBack`, `TopNavSearch`, and the bar items `TopNavButton`, `TopNavMenuButton` (a button that opens a menu) and `TopNavSpacer`. Its added slots are `back` (a `TopNavBack`) and `search` (a `TopNavSearch` under the title). The iOS contract adds what only iOS's bar honours (FR21). | DEC-1, DEC-2; `spec:AST-082` FR3, FR5 | verify | | ||
| | FR3 | `TopNav` MUST render nothing in the screen's content. The parts are the authoring model: each part registers through context with the stack screen it renders in, so it works inside an app's wrapper components, conditionals and fragments, and its values apply while it is rendered and go when it unmounts. What the parts register becomes the screen's header record: plain, serialisable data that both renderings read and the stack screen carries (`spec:AST-125` FR5). The record is wire format, not app API; its keys keep the names React Navigation and react-native-screens give them so the native props stay familiar. | DEC-2; `spec:AST-125` FR5 | verify | | ||
| | FR4 | `render` MUST be the header's one setting for who draws its pixels, with the values `auto` (the default), `system` and `drawn`. Under `system`, the stack host presents the platform's bar; under `drawn`, Astryx draws the header in React. `auto` is this component's default, `system` on iOS and `drawn` on Android, unless the theme's `render.default` overrides every `auto`; `render.default` is the `defineNativeTheme` member that `spec:AST-112` FR21 adds to `spec:AST-082` FR10's configuration. The default is this component's: it holds over any library-wide default for drawn chrome, and the navigation library sets none of its own. A navigator's `render` sets the rendering for its screens; a screen's `TopNav` `render` sets it for that screen alone. Both renderings take the same parts and settings, and every setting means the same in both. Glass and material come from the native theme, never from `render` (FR15). | DEC-3 | settled | |
There was a problem hiding this comment.
Non-blocking: "every setting means the same in both" does not hold for hidesWhenScrolling under system on Android, where FR9 (line 153) and the option table (line 181) keep the search row below the bar, and that difference is DEC-3's only reason. State the exception here, or add it as an FR9 gap line.
| | FR2 | React Native MUST export the component as `TopNav`, the name it has on every platform (`spec:AST-082` FR3). Its composed parts follow the same root, with web's part name where web has the same part, otherwise `TopNav<Part>`: `TopNavTitle` (`title`, `subtitle`, a title menu), `TopNavLargeTitle` (`title`, `isInRow`, a title menu), `TopNavBack`, `TopNavSearch`, and the bar items `TopNavButton`, `TopNavMenuButton` (a button that opens a menu) and `TopNavSpacer`. Its added slots are `back` (a `TopNavBack`) and `search` (a `TopNavSearch` under the title). The iOS contract adds what only iOS's bar honours (FR21). | DEC-1, DEC-2; `spec:AST-082` FR3, FR5 | verify | | ||
| | FR3 | `TopNav` MUST render nothing in the screen's content. The parts are the authoring model: each part registers through context with the stack screen it renders in, so it works inside an app's wrapper components, conditionals and fragments, and its values apply while it is rendered and go when it unmounts. What the parts register becomes the screen's header record: plain, serialisable data that both renderings read and the stack screen carries (`spec:AST-125` FR5). The record is wire format, not app API; its keys keep the names React Navigation and react-native-screens give them so the native props stay familiar. | DEC-2; `spec:AST-125` FR5 | verify | | ||
| | FR4 | `render` MUST be the header's one setting for who draws its pixels, with the values `auto` (the default), `system` and `drawn`. Under `system`, the stack host presents the platform's bar; under `drawn`, Astryx draws the header in React. `auto` is this component's default, `system` on iOS and `drawn` on Android, unless the theme's `render.default` overrides every `auto`; `render.default` is the `defineNativeTheme` member that `spec:AST-112` FR21 adds to `spec:AST-082` FR10's configuration. The default is this component's: it holds over any library-wide default for drawn chrome, and the navigation library sets none of its own. A navigator's `render` sets the rendering for its screens; a screen's `TopNav` `render` sets it for that screen alone. Both renderings take the same parts and settings, and every setting means the same in both. Glass and material come from the native theme, never from `render` (FR15). | DEC-3 | settled | | ||
| | FR5 | Under `system`, the header MUST be the platform's own bar on the stack screen (`spec:AST-125` FR5): `UINavigationBar` on iOS, a Material 3 top app bar on Android. The header record maps onto the screen's native props; a custom view in `heading`, `startContent` or `endContent` is placed by the system bar as a header slot, sized by its content, with its touches and layout in the bar's coordinates. What Android's bar does not have (a back title and its menu, a large subtitle, a toolbar, scroll-edge effects) is not drawn there. | `spec:AST-125` FR1, FR5; `spec:AST-093` FR2 | verify | |
There was a problem hiding this comment.
Non-blocking: FR21 makes the back title and menu, the large subtitle, the toolbar and the scroll edge effect type errors on Android, so "is not drawn there" reads as accepted but ignored. Say they are absent from Android's types (FR21).
Stacked on #12592; merges after it.
Merge order: this record also cites the NavigationStack record (#12596),
spec:AST-125(#12554),spec:AST-127(#12555),spec:AST-123(#12557), and the AST-112 amendment (#12563), whose FR21 addsrender.defaulttodefineNativeTheme. It merges after those too. The rules it uses most (the back control's name, focus after a push) are stated in the record itself.Exact decision needed
How React Native renders TopNav as the screen header: its slots and composed parts, the header record the parts write, which rendering (
systemordrawn) each platform uses by default, and what each rendering draws.Existing authority searched
component:TopNav(docs/specs/components/TopNav/TopNav.spec.md): slot names and meanings this record keeps; no React Native rendering.component:react-native/NavigationStack(open draft record): owns the stack, back and focus, and defers the header's rendering to this record.spec:AST-125(navigation hosts, open draft): owns the native stack and its bar props, and leaves header rendering and Android header search to the header component.spec:AST-127(icons) andspec:AST-123(surfaces and glass): icon resolution, glyph drawing, glass views and paint selection.spec:AST-112amendment (open draft): FR21 definesrender(auto,system,drawn) and addsrender.defaulttodefineNativeTheme; this record uses both as defined there.component:Layout/LayoutHeader: a layout region, not a navigation bar. No core record covers a screen header, so TopNav is the closest core owner.Decision
docs/specs/components/TopNav/TopNav.react-native.spec.md(component:react-native/TopNav,platform_of: component:TopNav):TopNavunder the name it has on every platform (spec:AST-082FR3); prose calls it the screen header. Its parts follow the same root: web's part name where web has the same part, otherwiseTopNav<Part>(TopNavTitle,TopNavLargeTitle,TopNavBack,TopNavSearch,TopNavButton,TopNavMenuButton,TopNavSpacer, iOSTopNavStatus); web'sTopNavMenuis a destinations menu, so the bar's action-menu button takes a name web does not use. It keepsheading,startContent(aliaschildren) andendContent, and adds thebackandsearchslots,renderandonHeightChange;centerContentandlabelbelong to the web contract (DEC-1).toolbarslot andTopNavStatus; the scroll edge effect; search scopes) and is a type error on Android (FR21).translucentoropaque) come only from the native theme:material, and a platform entry'scomponentsoverrides for TopNav. With nomaterialset, each platform keeps its default look (glass on iOS, opaque on Android).render.defaultis thedefineNativeThememember that the AST-112 amendment (FR21) adds. A screen changes its look only through its light or dark appearance.TopNav, its parts and navigation options take no visual settings (spec:AST-082DEC-2).spec:AST-082FR17). Where the drawn header still draws Astryx glyphs, a gap line says so.render(auto,system,drawn) says who draws the pixels.autoissystemon iOS anddrawnon Android unless the theme'srender.defaultoverrides it; an app can pick either per navigator or per screen. DEC-3 names the requirement the Material 3 top app bar cannot meet as Android's default (spec:AST-093FR2): it has no search control in the bar for the search row to collapse into. The option table shows it.onHeightChange(DEC-6).FRn gaplines.Rejected alternatives
None recorded in the record.
Claim scope and non-goals
The record covers only what React Native adds to
component:TopNavor does differently. Stack behaviour, native host props, icons and surfaces 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. The option table states what each rendering honours, and the gap lines state where the drawn header differs from the requirements.
Writing rubric results
Rejected:lines.FRn gaplines; "not yet released" appears only in the template's lifecycle field and readiness cell.Scope
Components: TopNav (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.