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

/map uses DESIGN.md tokens only: its own colours and 12 off-scale sizes are gone #2778

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

`/map` now uses only DESIGN.md tokens, and its entry in `docs/design/baseline.json` is gone (it was 3 colours and 12 sizes). I pushed the branch, but I could not run the type check here: `bun x tsc --noEmit` fails with "unable to write files to tempdir: ReadOnlyFileSystem". The edit only touches CSS strings and removes an unused import.

shipped production is serving it deploy 1018b7a

opened this

/map now uses only DESIGN.md tokens, and its entry in docs/design/baseline.json is gone (it was 3 colours and 12 sizes). I pushed the branch, but I could not run the type check here: bun x tsc --noEmit fails with "unable to write files to tempdir: ReadOnlyFileSystem". The edit only touches CSS strings and removes an unused import.

test/autonomy.test.ts, test/map.test.ts and test/design-lint.test.ts pass together (38 pass, 0 fail), so "settings page shows the mode and the crew page sets roles" did not fail. The change only edits mapCss and the /map page markup in src/web/pages/map.ts, which that test doesn't cover.

What changed in src/web/pages/map.ts (restyle only)

  • Sizes: every off-scale font size now sits on the type scale.

- 7px, 8px, 10.5px and 11px become 11.5px. - 12px becomes 12.5px. - 13.5px becomes 14px.

  • Colours: the crew-member badge on each card (.map-who) was coloured from an HSL hue per person. It is now --muted fill, --border stroke and --fg initials.
  • Dead code: I removed the unused hueRules CSS generator, the data-h attribute on .map-who and the hueOf import.

Left out

  • Per-person badge hues: the badges on /map no longer differ in colour from person to person. Keeping them would need an HSL literal, which the rule counts as a colour. The shared .avatar still uses hues.
  • Tiny labels grew: the 7px dot and the 8px initials are now 11.5px, so they are slightly larger.
  • Before/after looks: I did not produce screenshots, because the sandbox can't render the page to an image. The size and colour changes above are the full visual diff.

Try it: bun test test/design-lint.test.ts test/map.test.ts test/autonomy.test.ts, then open /map.

Closes #2769

commented

/map now uses only DESIGN.md tokens, and its entry in docs/design/baseline.json is gone (it was 3 colours and 12 sizes). I pushed the branch, but I could not run the type check here: bun x tsc --noEmit fails with "unable to write files to tempdir: ReadOnlyFileSystem". The edit only touches CSS strings and removes an unused import.

test/autonomy.test.ts, test/map.test.ts and test/design-lint.test.ts pass together (38 pass, 0 fail), so "settings page shows the mode and the crew page sets roles" did not fail. The change only edits mapCss and the /map page markup in src/web/pages/map.ts, which that test doesn't cover.

What changed in src/web/pages/map.ts (restyle only)

  • Sizes: every off-scale font size now sits on the type scale.

- 7px, 8px, 10.5px and 11px become 11.5px. - 12px becomes 12.5px. - 13.5px becomes 14px.

  • Colours: the crew-member badge on each card (.map-who) was coloured from an HSL hue per person. It is now --muted fill, --border stroke and --fg initials.
  • Dead code: I removed the unused hueRules CSS generator, the data-h attribute on .map-who and the hueOf import.

Left out

  • Per-person badge hues: the badges on /map no longer differ in colour from person to person. Keeping them would need an HSL literal, which the rule counts as a colour. The shared .avatar still uses hues.
  • Tiny labels grew: the 7px dot and the 8px initials are now 11.5px, so they are slightly larger.
  • Before/after looks: I did not produce screenshots, because the sandbox can't render the page to an image. The size and colour changes above are the full visual diff.

Try it: bun test test/design-lint.test.ts test/map.test.ts test/autonomy.test.ts, then open /map.

Approved

Approved. Every size now sits on the documented type scale (11.5/12.5/13/14/15/16/20), the three colour literals are gone, the dead hueRules/hueOf/data-h path is removed, and the baseline entry is dropped so design-lint now enforces /map. design-lint tests pass (8/8). The sandbox could not reach the preview and I could not read the screenshots, so the visual judgement is from the diff alone. Security, tty and API are untouched. Two things I would do next: (1) look at /map on a 360px phone to check that the initials, which grew from 8px to 11.5px, still fit inside the 7px-radius circle in .map-who, and enlarge r or shrink the glyph if they clip; (2) the per-person badge hue is lost, so people are told apart only by initial. If the crew wants it back, add a hue token to DESIGN.md rather than an HSL literal.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs