Repository navigation
feat(TopNav): TopNavHeading carries mode=drawer as the phone menu's title - #12590
josephfarina wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
Owner decision (engineering owner, covering this pull request): when TopNavHeading is the title of the phone menu, it carries the existing |
|
/approve-spec 42665b3 |
There was a problem hiding this comment.
Approved pending CI: CI has not finished on this head yet.
TopNavHeading now carries the drawer mode where TopNav draws it as the phone menu's title, so a theme can key it with mode:drawer; the change is additive and the published themes build exactly as before. There are no blocking findings.
Optional:
- The comment at
TopNavHeading.tsx:379-380reads more easily as two sentences: "TopNav draws the heading as the phone menu's title. A theme keys that placement withmode:drawer." - In
TopNavHeading.spec.md, the FR12 verification row could follow FR11's row, and the at-a-glance public-contract row could name the newmodestate.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: in the phone menu the links already carry the drawer mode. Verified: TopNavItem reflects
mode: 'drawer'in the drawer. - Claim: the heading drawn as the menu's title carried no state. Verified: on the base the menu's heading renders without
data-mode. - Claim: TopNavHeading carries
data-mode="drawer"in the drawer and no mode in the bar. Verified:TopNavHeading.tsx:381-383, the new test, and a check through AppShell at phone width that fails on the base and passes here. - Claim: the change is additive and every theme renders as before. Verified: no Core style reads the attribute, and the seven published themes' built CSS is byte-identical.
- Claim: the
top-nav-headingtarget declares themodestate. Verified:TopNav.doc.mjs:25. - Claim: the probe theme was regenerated with 903 selectors. Verified: the probe-theme check passes.
- Claim: the record gains FR12, its verification row and the ownership line. Verified:
TopNavHeading.spec.md:107,:142,:206. - Claim: the TopNav and AppShell tests pass (178). Verified.
- Claim: the core type check is clean. Verified: the typecheck job passed on this head.
- Claim: the knowledge check is aligned. Verified.
- Changeset: the heading carries the drawer mode as TopNavItem does, a theme keys the menu's title with
mode:drawer, the bar carries no mode, and nothing else changes. Verified: the theme build accepts themodekey here and warns about it on the base. - File
.changeset/core-top-nav-heading-drawer-mode.md: clear. - File
docs/specs/components/TopNav/TopNavHeading.spec.md: clear (optional tidy-up above). - File
packages/core/src/TopNav/TopNav.doc.mjs: clear. - File
packages/core/src/TopNav/TopNav.test.tsx: clear. - File
packages/core/src/TopNav/TopNavHeading.tsx: clear (optional comment rewrite above). - File
packages/themes/probe/src/probeTheme.ts: clear (regenerates identically).
| // In the phone menu TopNav draws the heading as the menu's title: a theme | ||
| // keys that placement with `mode:drawer`, as it keys the menu's links. |
There was a problem hiding this comment.
Optional (non-blocking): this sentence carries two topics. Two short sentences read more easily:
// TopNav draws the heading as the phone menu's title. A theme keys that
// placement with `mode:drawer`.
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| TopNavHeading | 83.5 kB (+76 B) · 12.0 kB CSS (0) | — | — · — · — |
| TopNav | 79.4 kB (0) · 11.8 kB CSS (0) | — | — · — · — |
| TopNavItem | 14.6 kB (0) · 4.0 kB CSS (0) | — | — · — · — |
4 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| TopNavMegaMenu | 77.6 kB (0) · 12.7 kB CSS (0) | — | — · — · — |
| TopNavMegaMenuFeaturedCard | 8.4 kB (0) · 3.6 kB CSS (0) | — | — · — · — |
| TopNavMegaMenuItem | 15.3 kB (0) · 4.2 kB CSS (0) | — | — · — · — |
| TopNavMenu | 83.0 kB (0) · 12.0 kB CSS (0) | — | — · — · — |
Package size: @astryxdesign/core 7.68 MB packed (+156 B); no new dependencies.
API changes: core +0 · ~2 · −0
2 API changes (advisory)
| Package | Where | Signature | Usage | |
|---|---|---|---|---|
| ~ | core |
Theme targets · target top-nav-heading (TopNav) |
target top-nav-heading (TopNav) → target top-nav-heading (TopNav) states [mode] |
defineTheme({components: {'top-nav-heading': {…}}}) |
| ~ | core |
Public attributes · attr data-mode |
attr data-mode (theme reflection on 8 targets) → attr data-mode (theme reflection on 9 targets) |
[data-mode] { … } |
Wide change (shared styles: packages/themes/probe/src/probeTheme.ts): add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.
Current run: CI concluded cancelled; parts of this report may be missing.
Generated by PR Enrichment workflow | View full report
42665b3 to
810171f
Compare
|
/approve-spec 810171f |
There was a problem hiding this comment.
Changes requested: one line of the description is out of date after the rebase. The code, the record and the tests have no blocking findings.
- Regression: the description says the regenerated probe theme has "one more selector, 903", but the probe-theme check reports 931 selectors on this head (930 on
main), so update that line to "one more selector, 931" or drop the total.
Optional: the comment at TopNavHeading.tsx:379-380 reads more easily as two sentences (see the existing inline suggestion), and in TopNavHeading.spec.md the FR12 verification row could follow FR11's row and the at-a-glance row could name the new mode state.
Claims and files checked
Review mode: full; reason: rebase
- Claim: the heading carries the drawer mode as the phone menu's title, additively, with the default unchanged. Verified:
TopNavHeading.tsx:381-383and the record's new FR12. - Claim: in the phone menu the links already carry the drawer mode. Verified: TopNavItem reflects
mode: 'drawer'in the drawer. - Claim: the heading drawn as the menu's title carried no state. Verified: on the base the menu's heading renders without
data-mode. - Claim: nothing styles the attribute by default, so every theme renders as before. Verified: Core's CSS and the seven published themes' built CSS are byte-identical, and the default theme's menu renders pixel-identical.
- Claim: the
top-nav-headingtarget declares themodestate. Verified:TopNav.doc.mjs:25. - Claim: the probe theme was regenerated with one more selector, 903. False: one more selector holds (930 to 931), the total of 903 does not.
- Claim: the record gains FR12, its verification row and the ownership line. Verified:
TopNavHeading.spec.md:107,:142,:206. - Claim: the new test checks the drawer and bar renders. Verified:
TopNav.test.tsx:254-276passes. - Claim: the TopNav and AppShell tests pass (178). Verified: 178 passed.
- Claim: the core type check is clean. Verified.
- Claim: the probe-theme check is clean. Verified.
- Claim: the knowledge check is aligned. Verified.
- Changeset: the heading carries the drawer mode as TopNavItem does, a theme keys the menu's title with
mode:drawer, the bar carries no mode, and nothing else changes. Verified: a theme build accepts themodekey here and warns about it on the base. - File
.changeset/core-top-nav-heading-drawer-mode.md: clear. - File
docs/specs/components/TopNav/TopNavHeading.spec.md: clear (optional tidy-up above). - File
packages/core/src/TopNav/TopNav.doc.mjs: clear. - File
packages/core/src/TopNav/TopNav.test.tsx: clear. - File
packages/core/src/TopNav/TopNavHeading.tsx: clear (optional comment rewrite above). - File
packages/themes/probe/src/probeTheme.ts: clear (the generator check passes).
|
/approve-spec af83d8e |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because its commit message carries [skip ci], so it still needs to run and pass here before merge.
TopNavHeading now carries data-mode="drawer" where TopNav draws it as the phone menu's title, as the TopNavHeading record's new FR12 says, and the earlier description issue is fixed: the probe theme gains exactly one selector. No blocking findings remain. Two optional tidy-ups: the comment at TopNavHeading.tsx:379-380 reads better as two sentences (see the inline suggestion), and in the TopNavHeading record the FR12 verification row could follow FR11's, with the at-a-glance contract row naming the new mode state.
Claims and files checked
Review mode: incremental; reason: none
Claims:
- Changeset: the heading carries the drawer mode when it is the phone menu's title, as the nav items already do. Verified:
TopNavHeading.tsx:381-383,TopNavItem.tsx:303-305, testTopNav.test.tsx:254-276. - Changeset: a theme can key the menu's title with
mode:drawer. Verified:TopNav.doc.mjs:25declares themodestate. - Changeset: the bar heading carries no mode and nothing else changes. Verified: the test's bar case; the generated API delta lists only the two theming rows; Core's CSS and the published themes' CSS are unchanged.
- Description: AppShell draws TopNav inside the phone menu, where the links already carry the drawer mode. Verified:
AppShell.tsx:1392,TopNav.tsx:302,TopNavItem.tsx:303-305. - Description: before this change the menu's title carried no state a theme could key. Verified: the base heading passes no state and its theming target declares none.
- Description: the change is additive and every theme renders as before. Verified: Core's built CSS and all seven published themes' built CSS are byte-identical to the base.
- Description: the listed changes (render mode read, theming target state, record row with its verification row and ownership line, test, changeset). Verified in the changed files.
- Description: the regenerated probe theme gains one selector. Verified: 930 on the base, 931 on the head, and the probe check passes.
- Description: the TopNav and AppShell tests pass (178). Verified: 178 passed.
- Description: the core typecheck, the probe-theme check and the knowledge check are clean. Verified: all three pass.
- Description: with no theme keying
mode:drawer, before and after render the same. Verified: identical built CSS for Core and every published theme. - Description: writing rubric results for FR12. Verified: the row is present tense and cites no pull request, research or status.
Files:
.changeset/core-top-nav-heading-drawer-mode.md: cleardocs/specs/components/TopNav/TopNavHeading.spec.md: optional tidy-up (verification row order, at-a-glance row)packages/core/src/TopNav/TopNav.doc.mjs: clearpackages/core/src/TopNav/TopNav.test.tsx: clearpackages/core/src/TopNav/TopNavHeading.tsx: optional comment rewritepackages/themes/probe/src/probeTheme.ts: clear (regenerated; its check passes)
- #12590 feat(TopNav): TopNavHeading carries mode=drawer as the phone menu's title Author: @josephfarina - #12800 fix(cli): the corners dial gives the chat radius back to the container radius Author: @josephfarina
|
Landed in #12866. |
Record:
TopNavHeadingFR12 (new): the heading carriesdata-mode="drawer"as the phone menu's title, so a theme keys it withmode:drawer; additive, default unchanged.Summary
At phone width AppShell draws TopNav inside the phone menu: the links already carry
data-mode="drawer"there (TopNavItem FR5), so a theme keys the menu's links withmode:drawer. The heading, drawn as the menu's title, carried no state, so a heading colored for a dark top bar turned near-white on the menu's white surface with no way to key the menu's title.TopNavHeading now carries
data-mode="drawer"when TopNav renders in itsdrawermode, and nomodein the bar. It is additive: nothing styles the attribute by default, so every theme renders as before.Scope
TopNavHeading; thetop-nav-headingtheming target gains themodestate).Changes
TopNavHeading.tsx: reads the TopNav render mode and passesmode: 'drawer'tothemeProps('top-nav-heading', …)in the drawer.TopNav.doc.mjs:astryx-top-nav-headingdeclaresstates: ['mode'].pnpm visual:probe-theme): one more selector.TopNavHeadingFR12 and its verification row; ownership line names it.data-mode="drawer"in the drawer render context and nodata-modein the bar.Test plan
vitest --project ui packages/core/src/TopNav/TopNav.test.tsx packages/core/src/AppShell: 178 passed.tsc --noEmit -p packages/core/tsconfig.json: clean.pnpm visual:probe-theme:check: clean after regeneration.node scripts/check-knowledge.mjs: aligned.390px pictures (phone menu open)
A theme with a dark top bar sets the heading's text to white and keys the menu's title with
'mode:drawer': {'--color-text-primary': '#111111'}.Before, the title is white on the white menu (invisible); after, it reads. With no theme keying
mode:drawerthe two render the same (the attribute alone changes nothing).Writing rubric results
Record rubric over the FR12 row added to the TopNavHeading spec:
preflight: pass 810171f