layouts
All repositories: gitoria
5.0 KB
# Report 009 — menu marks the current page (worker D3)Branch w9-menu-current from 0573eed. Not merged, not deployed.## FoundPath matching already existed (exact or `href + '/'` prefix → `a.current` + `aria-current="page"`, others "false") and `current` already is the host's say. What was missing: the marker was accent text colour only (no non-colour marker) and the sidebar nav had only a background; no count; no per-item say.## Changed- `theme/shell/main-menu.hl`: marked link = accent text + surface background + a bar in the accent (`boxShadow inset`, left bar on the phone/sidebar, bottom bar in the header from 60rem; no border → check-theme stays 0). Items may carry `count` → `span.count` badge (accent bg, `--color-accent-text`), and `current = true` (overrides the path). Label stays plain text. Backwards compatible: label/href-only items behave as before (no badge, same match).- `theme/shell/app-sidebar.hl`: `nav a[aria-current="page"]` gets the same bar.- Showcase: tracker demo carries `count = 12` on Shows and flags Series `current = true` on the all-titles page (no path match). Docs `docs/layouts/main-menu.md`.- **Derive path: touched.** `build()` (the function behind `rows`, the hybriel#190 spot) now also computes `count`, `has` (a `View if` needs a row field, not an expression), and reads `it.current`. I added no null guard and did not work around #190; a patch that nulls `items` still hits `build` as before.- Contrast (computed in the gate from real computed styles): accent #569bd4 on surface rgb(35,40,45) ≈ 5.7:1 text and bar; badge text darker on accent ≥ 4.5. Other accents (palette light colours) are all lighter than blue-dark except red #f44747 (~4.6:1 on the surface) — not individually measured.## Gate (headless Chrome, ports 8760–8764)- New theme: tests/browser.mjs **300 passed, 0 failed** (285 + 15 new; display audit part of it, 0 issues; check-theme 0 problems).- Old theme (0573eed theme + the same new test file): 293/7. Failing on old: marker beyond colour (1280 header), sidebar nav marker, item.current override, count badge (2 checks), 390 sidebar marker, 390 badge. The "marker moves" click checks pass on old too (path matching already worked) — they only guard against regression.- New checks: real mouse clicks at 1280 (Components → click Shells → click Docs; page below a section; /read marks Docs; tracker: Series (host flag) → click Movies) and 390 (open sidebar, click Shells, reopen, marker moved; badge in the phone menu, tap ≥ 44).## NOT done- **E2E in lisbeth's real Chrome (9223) was NOT run** (quota stop). Only headless gate clicks. Do it before accepting.- Shots (headless, I cannot view PNGs): /media/STORAGE/claude-scratch/atlas/D3/shots/ — `gate-{1280,390}-menu-*.png` (new), `old-1280-menu-shells.png`, `old-390-menu-components.png` (old). Logs: D3/logs-new.txt, D3/logs-old.txt.- Other accents' contrast not measured one by one.## Apps that carry the theme (need a re-copy of theme/shell/main-menu.hl + app-sidebar.hl, Atlas does it)gitoria (theme dbe3de7), tickets (moved onto the theme in X2: can then drop "Inbox (n)" from the label → `count = n`, and pass `current`), notes (theme move still open per usage.md), calendar (soon). Tracker older theme. Old items keep working.## E2E in lisbeth's real Chrome (worker D4) — DONEtests/e2e-menu-current.mjs (CDP 9223 via tunnel, ONE existing tab picked from /json, real Input.dispatchMouseEvent clicks, run under the lisbeth.lock flock, tab left at about:blank, localStorage accent reset). App on a copy-free showcase (no data), port 8760 (new, 159b1d5) and 8761 (old, 0573eed).- **New code: 33 ok / 0 FAIL** at 1280 and 390 (phone: toggle opens the sidebar, taps in the main menu, reopen).- Marker moves with each click: 1280 Components → Shells → Docs → Components; /components/pagination marks Components (menu) and Pagination (sidebar); 390 Components → Shells → Docs; tracker Series → Movies at both widths. Always exactly one `aria-current="page"`.- Visible bar: box-shadow present; for all 8 accents (blue-dark 4.98, green-dark 7.29, yellow 10.52, orange 5.62, **red 4.13**, purple 5.34, blue-light 9.97, green-light 8.75) bar and text ≥ 3:1 on the surface, at 1280 and 390 (red is the lowest, passes ≥ 3). Accents set by real clicks on the swatches.- Tracker demo: `current = true` marks Series (no path match) at both widths; Shows carries badge 12 (label plain, text ≥ 4.5:1, tap height ≥ 44 at 390).- **Old code (0573eed)**: bar check FAILS (box-shadow none, bar 1.00:1), the run then stops at the missing badge/switcher path — the test can fail.- Nothing needed fixing; no theme source changed, so the gate stays 300/0 (not re-run; only the new tests/e2e file was added).- Correction to the earlier note: red is ~4.1:1 (not 4.6) on the surface, still ≥ 3.- Shots (I cannot view PNGs, so I did not look at them): /media/STORAGE/claude-scratch/atlas/D3/shots/e2e-new-{1280-1-components,1280-2-shells,1280-3-pagination,1280-4-tracker-badge,390-1-components,390-2-shells,390-3-docs-red-after-reset,390-4-tracker-badge,390-5-tracker-movies}.png and e2e-old-1280-1-components.png.
Branches
Latest commits
- 740e2abeRe-sync the components copy to c2834dd: media player fixes (state after a queue pick, cover-less audio, accessibility labels)mre
- 7fe103bbMerge mp-player: the media player showcase pagemre
- 7db43c4eMedia route: serve the showcase's media from committed files (storage/ is not in git)mre
- f77b7d12Media player: re-sync components from 1c41293 (replay / forward 10 icons, play button surface on audio and video)mre
- 40a9e69cMP: report, LOG linemre
- 5b5dbf0fMedia player: the component from components.hybriel dd003e5 (sync-components), the showcase page /components/media-player with a queue, its media files served with ranges (lib/media.hl), theme rules (the seek bar, the queue's current item, the radii), the page in the overview listsmre
- 9197159fTake components e54f83a: table lines and one-row desktop toolbar in the theme, Table button gates, a table in the md-editor demomre
- e6322a44UX: report and LOG linemre
- 58c2da6fUX: nav marker without bars; chat composer is one box (files-upload pick mode, showcase); comments state footer + closer reactions row; modal footer rule only for its own footer; gates for all of itmre
- 956f107async components.hybriel 4922f9c: 44 px targets in month-view, date-picker, range-picker, pagination, modal, comments; names follow <html lang> (English default), UTC weekday fix; gate: 390 px target checks, 'edited' hit-area padding; comments showcase 'You are' is a labelled group (SY)mre
- 49940371sessions last 99 years (creator 2026-10-23: logins never expire; only sign out ends them)mre
- 6f7bd392gate: the phone toolbar is two even rows (E2)mre
- 3049c082sync components.hybriel 214c318: MdEditor on a phone, two even toolbar rows of 44 px targets, label 15 px, table head 16 px (E2)mre
- b9a3f85fLOG: MLmre
- 7979397creport ML-mobilemre
- 85d2ed25gate: wordingmre
- 98a311c0gate: 390 px checks for list rows, table word, edited tap target, code in titlesmre
- 769b99d7theme: table cells keep a word whole, code in a title stays text-sized, 'edited' is a 44 px tap target on the phonemre
- c36b7595list rows (notes, mail) stack their parts full width: the date no longer a one-letter column beside the titlemre
- 02aa74aasync components.hybriel 134b4e3: MdEditor builds an editor put into the page at once, redraws a surface put in anew (F5, hybriel#211)mre