Repository navigation
fix(MobileNav): the painted drawer panel carries its own theme target - #12382
Conversation
MobileNav's drawer panel, the surface people see, had no theme target:
the only target was the full-screen dialog overlay behind it, so a theme
that set a background on mobile-nav painted the overlay, and the panel
stayed on the default surface. The panel now carries mobile-nav-drawer
with the resolved side. The default look does not change.
- MobileNav.tsx: themeProps('mobile-nav-drawer', {side}) on the panel.
- MobileNav.doc.mjs: the target, in both languages.
- MobileNav spec: FR1, the ownership lines, the anatomy note and the
theming anatomy record the Drawer's target.
- Test: the panel carries the target and the side; the overlay keeps its own.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| AppShell | 98.8 kB (+8 B) · 14.4 kB CSS (0) | — | — · — · — |
| TopNav | 79.3 kB (+8 B) · 11.8 kB CSS (0) | — | — · — · — |
| SideNav | 122.5 kB (+6 B) · 12.2 kB CSS (0) | — | — · — · — |
2 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| MobileNav | 77.5 kB (+5 B) · 11.4 kB CSS (0) | — | — · — · — |
| MobileNavToggle | 66.6 kB (0) · 10.8 kB CSS (0) | — | — · — · — |
Package size: @astryxdesign/core 7.65 MB packed (+47 B); no new dependencies.
API changes: core +1 · ~1 · −0
2 API changes (advisory)
| Package | Where | Signature | Usage | |
|---|---|---|---|---|
| + | core |
Theme targets · target mobile-nav-drawer (MobileNav) |
target mobile-nav-drawer (MobileNav) props [side] |
defineTheme({components: {'mobile-nav-drawer': {…}}}) |
| ~ | core |
Public attributes · attr data-side |
attr data-side (theme reflection on 3 targets) → attr data-side (theme reflection on 4 targets) |
[data-side] { … } |
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.
Generated by PR Enrichment workflow | View full report
|
Owner decision (engineering owner, covering this pull request): MobileNav's drawer panel gets its own theme target, |
|
/approve-spec da4086c |
|
/approve-spec 890bb4b |
There was a problem hiding this comment.
Changes requested. The new mobile-nav-drawer target works: once the probe theme is regenerated, a theme's background and text colour reach the open panel, the overlay keeps its own, and the default look is unchanged. Five small fixes remain before this can land:
- Run
pnpm visual:probe-themeand commit the updatedpackages/themes/probe/src/probeTheme.ts, because without amobile-nav-drawerentry the Lint job's probe-theme check and.github/scripts/ci-probe-theme-check.test.mjsfail and the visual gate cannot verify the new target. - Update the MobileNav record's compatibility lines (
MobileNav.spec.md:58and:74-75), which still say there is no public change and that the DOM, targets and public API are unchanged. - Remove OQ1 (
MobileNav.spec.md:322-324), which still asks whether the Drawer should gain a target and says the current target reaches only the overlay, and record the decision in the decision log if it needs one. - Retag the changeset
[feat], sincespec:AST-017FR7 tags a new compatible capability such as an optional theme target[feat], not[fix]. - Add a
## Writing rubric resultssection (R1–R7) to the description, whicharchitecture:knowledge-contractsrequires for a pull request that changes a record.
Two optional cleanups: cite the new test on the record's FR1 verification row, and point the RTL audit's MobileNav entry at .astryx-mobile-nav-drawer directly.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim, the panel had no theme target before: verified; on the base only the overlay calls the theme helper.
- Claim, a background on the overlay target painted the overlay, not the panel: verified; under the probe theme on the base the overlay is magenta and the panel white.
- Claim, themed top-bar text landed on the panel's default white: not verified; no theme or story is named.
- Claim, the panel now carries the new target with the resolved side: verified by the new unit test and by a browser query on the head.
- Claim, the default look does not change: verified; default-theme captures of the open drawer are pixel-identical on base and head.
- Claim, a theme can give the panel a surface and text colours without painting the overlay: verified with the probe theme regenerated.
- Claim, the change is a fix: false; a new optional target is a feature under the release-tag rules.
- Claim, source, both doc languages, the record and a test were updated: verified, apart from the record's compatibility lines and open question.
- Claim, the two named test files pass with 482 tests: verified; the knowledge check passes in CI; formatting was not rerun.
- File
.changeset/core-mobile-nav-drawer-target.md: finding (release tag). - File
docs/specs/components/MobileNav/MobileNav.spec.md: findings (compatibility lines, open question, missing rubric results). - File
packages/core/src/MobileNav/MobileNav.doc.mjs: finding (the probe theme must be regenerated with this target). - File
packages/core/src/MobileNav/MobileNav.test.tsx: clear. - File
packages/core/src/MobileNav/MobileNav.tsx: clear.
…2 in place of OQ1, [feat] changeset, verification and RTL audit point at the panel
|
/approve-spec 0d6dc3a |
There was a problem hiding this comment.
Changes requested. The mobile-nav-drawer target is ready: every fix from the last review is in, the panel takes a theme's colours while the overlay keeps its own, and the default look is unchanged. One item remains:
- The
## Writing rubric resultssection grades the description against items that are not the record rubric indocs/contributing/spec-writing.md, so rerun its R1–R7 overMobileNav.spec.mdand report one line per item (R1 will catch DEC-2's past-tense opening atMobileNav.spec.md:327-331).
Optional: DEC-2 cites spec:AST-017 FR7 for additivity, where FR5 is the clause that makes a new optional capability nonbreaking.
Claims and files checked
Review mode: full; reason: spec-record
- Claim, the panel had no theme target before: verified; on the base only the overlay calls the theme helper.
- Claim, a background on the overlay target painted the overlay while the panel kept the default surface: verified; under the probe theme on the base the overlay is magenta and the panel white.
- Claim, a theme's top-bar text colour landed on the panel's default surface: verified in code; TopNav's drawer passes its heading into the panel, and the heading's target has no mode state.
- Claim, the panel now carries the new target with the resolved side: verified by the new unit test and a browser query.
- Claim, the default look does not change: verified; default-theme captures of the open drawer are pixel-identical.
- Claim (changeset), a theme can colour the panel without painting the overlay: verified under the probe theme.
- Claim, source, both doc languages, the record, DEC-2 in place of the open question, the probe theme (277 targets), the RTL audit entry and a test were updated: verified.
- Claim, the two named test files pass with 482 tests, and the probe-theme, knowledge and formatting checks pass: verified.
- Claim, the writing rubric results: false as record rubric results; they grade the description against a different list.
- File
.changeset/core-mobile-nav-drawer-target.md: clear. - File
apps/storybook/rtl-audit/targets.json: clear. - File
docs/specs/components/MobileNav/MobileNav.spec.md: finding (DEC-2 narration the rubric surfaces; FR7 citation note). - File
packages/core/src/MobileNav/MobileNav.doc.mjs: clear. - File
packages/core/src/MobileNav/MobileNav.test.tsx: clear. - File
packages/core/src/MobileNav/MobileNav.tsx: clear. - File
packages/themes/probe/src/probeTheme.ts: clear.
…s the nonbreaking clause; no status word in the verification list
|
/approve-spec c9dad3b |
There was a problem hiding this comment.
Approved pending CI. CI's admission refused this head's run because CI was full, so its build and test jobs need a re-run; Lint and the CLI smoke test passed. The mobile-nav-drawer target paints the open panel while mobile-nav keeps the overlay, the default look is pixel-identical, and the rubric results now match MobileNav.spec.md. Every point from the earlier reviews is addressed.
Claims and files checked
Review mode: full; reason: spec-record
- Claim, the panel had no theme target and a background on the overlay target left the panel on the default surface: verified; on the base only the dialog calls the theme helper, and under the probe theme the overlay paints magenta while the panel stays white.
- Claim, a theme's top-bar text colour landed on the panel's default surface: verified in code; TopNav's drawer mode renders its heading in the panel header, and the heading's target reflects no mode.
- Claim, the panel now carries the new target with the resolved side: verified by the new unit test and a browser query of the open drawer (one element, side
end). - Claim, the default look does not change: verified; default-theme captures of the open drawer are pixel-identical in light and dark.
- Claim (changeset), a patch
[feat]that lets a theme colour the panel's surface and text without painting the overlay: verified under the probe theme; the changeset check passes. - Claim, source, both doc languages, the record (FR1, ownership, compatibility, anatomy, a decision in place of the open question), the probe theme (277 targets), the RTL audit entry and a test were updated: verified.
- Claim, the two named test files pass with 482 tests, and the probe-theme, knowledge and formatting checks pass: verified.
- Claim, rubric R1: the new decision is rewritten in the present tense: verified.
- Claim, rubric R2, R3 and R5: no research, evidence cells name facts, and no pull request or issue numbers remain: verified.
- Claim, rubric R4: no rejected alternative runs past one line or sits outside its decision: verified; the record has two such lines (one per decision), not one.
- Claim, rubric R6: the open question is answered by the new decision and removed: verified.
- Claim, rubric R7: the status word is gone from the verification list: verified.
- File
.changeset/core-mobile-nav-drawer-target.md: clear. - File
apps/storybook/rtl-audit/targets.json: clear. - File
docs/specs/components/MobileNav/MobileNav.spec.md: clear. - File
packages/core/src/MobileNav/MobileNav.doc.mjs: clear. - File
packages/core/src/MobileNav/MobileNav.test.tsx: clear. - File
packages/core/src/MobileNav/MobileNav.tsx: clear. - File
packages/themes/probe/src/probeTheme.ts: clear.
MobileNav's drawer panel, the surface people see, had no theme target. The only target was the full-screen dialog overlay behind it, so a theme that set a background on
mobile-navpainted the overlay while the panel stayed on the default surface; a theme that colored the top bar's text saw that text land on the panel's default surface.The panel now carries
mobile-nav-drawerwith the resolvedside. The default look does not change.MobileNav.tsx:themeProps('mobile-nav-drawer', {side})on the panel.MobileNav.doc.mjs: the target, in both languages.Test plan:
vitest --project ui MobileNav.test.tsx themingTargets.test.ts(482 pass),pnpm visual:probe-theme:check, knowledge check, prettier.Writing rubric results
Record rubric (
docs/contributing/spec-writing.md) overMobileNav.spec.md:#numbers,/pull/or/issues/).