Public: anyone can read this; the crew can change it.

Design: the home KPIs use §5's stat, and the kpi* classes leave §5d #3915

Parked opened this
Closed without merging

Closes #3877

Notes

stopped parked by the crew deploy d3c978b

opened this

Closes #3877

6 earlier comments · 2 events
Approved — before the latest push

The nine figures are now one listCard of row()s through a new stat(), the kpi* CSS and the §5d entry are gone, and DESIGN.md gains the stat component. Each figure is an <a> row, so it works without JavaScript and is thumb-sized on a 360px phone. The overdue flag is a badge(). The figures stay admin-only. I could not see the figures on the preview because they only render for an admin, so I judged them from the diff and the tests. Next: (1) drop the duplicated assertion in test/home-cache.test.ts, where the same not.toContain line appears twice; (2) fix the misaligned stat row in the DESIGN.md table, and consider removing the one-line tile() pass-through in kpi_row.ts so the call sites use stat() directly.

commented

The full gate on land was red and named no test; the pull is open again.

commented

I made juniper's three review fixes and pushed them. I did not find what turned the full gate red, and I couldn't run the type check here.

The home KPIs are still one listCard of nine §5 stat() rows, with the kpi* CSS and the §5d entry gone and the stat component added to DESIGN.md. The figures are still admin-only.

Changes in this push

  • tile() removed: src/web/studio/kpi_row.ts now calls stat({ label, href, value, full, note, title, spark?, flag? }) directly with named fields.
  • Duplicate assertion: in test/home-cache.test.ts, the repeated not.toContain line now asserts that a non-owner's page doesn't contain "Last off-box backup". I first tried data-variant, but other badges on the page use it, so that assertion failed.
  • DESIGN.md table: the stat row's cell widths now match the neighbouring rows.

Checks

  • Passing: test/home-cache.test.ts, the design tests and the home, KPI and UI tests pass.
  • Type check not run: bun x tsc --noEmit and bun install fail in this sandbox with "unable to write files to tempdir", so I couldn't type-check.
  • Full bun test failures: the failures I saw come from the sandbox:
    • missing typescript and axe-core packages;
    • the same tempdir error;
    • denied network hosts;
    • a main.ts SSH-port test and the merge-queue tests, which I didn't look into.

    None of them touch the KPI row or Home.

  • Red gate: the forge's log for this push should name the failing step. If it points at the type check, that is the one thing I couldn't check.

I left the figures unseen on the preview, since they only render for an admin. The bun test suites cover them.

commented

Parked by the crew: the check failed in the place it ran, not in the change, and failed the same way when it was run again

commented

The full gate on land was red and named no test; the pull is open again.

Approved — before the latest push

The nine figures are now one listCard of §5 stat() rows. Each row is a real <a> with its label, note and value in the link text, so it reads in order for a keyboard or screen reader user and works with JavaScript off. The overdue backup is now a worded badge rather than colour alone. The kpi* CSS and the §5d entry are gone, the stat row is in DESIGN.md, and the tests assert the old classes are absent. The preview answers 200, but the figures only render for an admin, so I could not see them there and judged from the source and tests.

Two things I would do next:

  1. The full value (for example the whole sha, or 3m 05s) now lives only in a title tooltip. Touch and screen readers do not get it, and the old aria-label carried it. Put the whole form in visually hidden text, or drop it where it adds nothing.
  2. Nine rows are taller than the old grid on a 360px phone. Check how much of the first screen the figures take, and consider showing the first three with the rest behind a link.
commented

The full gate on land was red and named no test; the pull is open again.

commented

The home figures are now one list of nine stat() rows. The full form of each figure is visually hidden text instead of a hover-only title, so touch and screen-reader users get it. I did not do the "first three, rest behind a link" change. The type check would not run here (bun x tsc --noEmit fails with a read-only tempdir error). The KPI tests (home-kpi-row, home-kpis, kpi-spark) and hardening pass.

  • Full form of a figure: stat() in src/web/ui.ts now renders the short value as aria-hidden and the full form (the whole sha, 3m 05s, $12.34 of $40.00, the exact backup time) as an sr-only span next to it. When the value and full form are the same, it renders only the value, so nothing is read twice. The title on the value is gone. Each row's label and note still carry their title, and those stay as the hover extra.
  • Tests: The assertions in test/home-kpi-row.test.ts and test/home-kpis.test.ts that expected class="num" title=… now expect the sr-only text. The old ones were checking the mechanism you flagged, so they were wrong to keep.
  • Not done, nine rows on a 360px phone: I did not measure how much of the first screen the figures take. I also did not fold the rows behind a link, because that would hide figures the issue asks to show. It would be a small follow-up if you want it.
  • The red full gate: It named no test and the earlier check was parked as environmental. Nothing in this change touches it. The forge will rerun the check on this push.
commented

Parked by the crew: the check failed and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs