mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
feat(nav): selected sheet appearance options carry the theme accent
.mobile-menu-icon-option.active gains color: var(--accent), so the sheet's Language and Mode glyphs follow data-theme/data-palette the way the bar's .nav-control.open already does. Palette dots paint their own --preview-*-accent and are unchanged; :hover keeps its fill-only behaviour. Recorded as Q19 in spec-v3-mobile-navigation.md.
This commit is contained in:
1 parent
be9dec8579
commit
924a50cade
2 files changed
+7
No files matched your search
@@ -795,6 +795,7 @@ Nothing deprecated or aliased: `SocialLinks` keeps its name and barrel export; i
|
||||
| Q16 | Order, a fourth time: which control leads | **Language first** — Language → Mode → Theme in the bar *and* in the sheet; the hamburger stays last in the bar | Supersedes Q15. Bar `.nav-actions`: language toggle → mode toggle → `ThemePaletteMenu` → hamburger (`Navigation.tsx:84-111`). Sheet Appearance group: Language row (`:71-91`) → Mode row (`:93-113`) → Theme color row (`:115-132`) in `MobileMenu.tsx`. §3.1 anatomy, §3.4, §9's smoke row, §11, `spec-ui-layout.md`, `AGENTS.md` and `spec-v3-theme-palette-switch.md` updated. Markup-only again — no CSS rule keys off child order (`.nav-actions` is a flex row with a gap, the segments are block rows), so the 320px arithmetic and the 647px sheet height are unchanged |
|
||||
| Q17 | Post-build, a fifth time — raised in `spec-v3-nav-swatch-and-hamburger.md` §1, 2026-10-17 | **The hamburger moves to the LEFT of the bar.** The owner is left-handed and reaches the left end of a handheld bar more easily | Supersedes only the "the hamburger stays last in the bar" half of Q16; the language → mode → theme color order survives unchanged. `Navigation.tsx:59-102` now opens `.nav-container` with a `.nav-brand` group — hamburger then logo — and `.nav-actions` (`:122-151`) holds exactly the three appearance controls. `src/App.css:32-39` adds `.nav-brand` (flex, 12px gap; 8px at ≤420px). DOM order == visual order == Tab order, which is why a `display: contents` + `order: -1` CSS-only variant was rejected. Row arithmetic re-measured: 40 + 12 + 70 + 44×3 + 12×2 = 278px inside 288px at 320px (14px slack with the 8px brand gap); the "262px / 26px slack" comment in `src/App.css` was arithmetically wrong and is corrected. The sheet, its group order and its 647px height are untouched |
|
||||
| Q18 | 2026-10-20: the Mode row is the only Appearance row still drawing words ("Dark" / "Light") | **The Mode row becomes icon-only too — the bar's own sun/moon line art** | `SunIcon`/`MoonIcon` extracted from the bar's theme control into `src/components/ui/icons.tsx` (geometry and attributes unchanged — square caps, so the bar renders identically) and shared: the sheet's Dark option draws `MoonIcon`, Light draws `SunIcon`, in the `.mobile-menu-icon-option` square the Language and Theme color rows use, with `aria-pressed` and the translated mode name in `aria-label`/`title` (`strings.nav.themeDark`/`themeLight` unchanged — the bar's labels still use them). `.mobile-menu-segment-option` (base, `.active`, `:focus-visible`) deleted from `src/App.css` — the Mode row was its last user. Row heights unchanged (44px either way), so the sheet's totals and device table still hold. `AGENTS.md`'s picker paragraph and `spec-v3-i18n.md`'s cross-reference corrected |
|
||||
| Q19 | 2026-10-20: option đã chọn trong sheet chỉ đổi border + nền; icon của nó vẫn mang màu text mặc định, khác hành xử của control trên bar | **Icon của option đang chọn lấy đúng accent của theme hiện hành** | `.mobile-menu-icon-option.active` thêm `color: var(--accent)` (`src/App.css:302-306`). Mọi glyph trong sheet — globe/flag của `LanguageIcon.tsx`, moon/sun của `icons.tsx` — là line art `currentColor`, nên đúng một khai báo màu phủ cả row Language lẫn row Mode; dot Theme color paint bằng `background: var(--preview-*-accent)` nên không bị ảnh hưởng. `:hover` giữ nguyên (chỉ fill nền): yêu cầu chỉ là state đã chọn. Không đổi markup, không thêm class |
|
||||
|
||||
---
|
||||
|
||||
@@ -863,6 +864,7 @@ Eleven criteria are proven by the automated checks in §12 and three more (the 2
|
||||
| Owner follow-up Q17 — hamburger to the left of the bar | DONE 2026-10-17 — `Navigation.tsx:59-102` (`.nav-brand` group: trigger then logo), `src/App.css:32-39` (`.nav-brand` rule) and `:319-334` (≤420px guard gains `.nav-brand { gap: 8px }` plus the corrected arithmetic comment); `AGENTS.md:61` and `spec-ui-layout.md:103,106,114` corrected. Full record in `specs/v3/spec-v3-nav-swatch-and-hamburger.md` §11 |
|
||||
| Owner follow-up — the brand becomes a home icon | DONE 2026-10-17 — `Navigation.tsx:97-106`, `src/App.css:25-36`, `:47-55`, `:319-330`. The `{CV}` in the §3.1 ASCII anatomy above now reads as a house glyph; the wordmark's two spans and their CSS are deleted. Full record in `spec-v3-nav-swatch-and-hamburger.md` §11 |
|
||||
| Owner follow-up Q18 — Mode row as icon-only options (2026-10-20) | DONE — `src/components/ui/icons.tsx` gains `SunIcon`/`MoonIcon` (the bar theme control's exact geometry, extracted); `Navigation.tsx` theme button now renders `<SunIcon />` / `<MoonIcon />` (identical rendering); `MobileMenu.tsx` Mode row renders `.mobile-menu-icon-option` squares with `MoonIcon` (dark) / `SunIcon` (light), `aria-pressed` + translated `aria-label`/`title`; `.mobile-menu-segment-option` (3 rule groups) deleted from `src/App.css`; `AGENTS.md` picker paragraph and `spec-v3-i18n.md` cross-reference corrected. `tsc -b` exit 0, oxlint unchanged (4 pre-existing warnings). Sheet height and row arithmetic unchanged — 44px options either way; visual check in the owner's browser |
|
||||
| Owner follow-up Q19 — selected sheet option carries the theme accent (2026-10-20) | DONE — `src/App.css:302-306` `.mobile-menu-icon-option.active { … color: var(--accent) }`; `MobileMenu.tsx` unchanged. Re-verified: `tsc -b` exit 0; `vite build` green (temp `dist-verify`, deleted); built CSS emits `.mobile-menu-icon-option.active{border-color:var(--accent);background:var(--bg-elevated);color:var(--accent)}`. oxlint exit 0 / 4 warning finding lines, all pre-existing in files this change never touched. Owner's browser pass (sheet at ≤1024px × {dark, light} × {red, blue}): TODO |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user