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

`.map-tool` leaves the map's stylesheet: no control renders it #5274

Merged opened this

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

Merged

I removed the unused `.map-tool` rules from the map page's stylesheet. Nothing in `src/` writes that class: not the map page's markup, not its client script, not `client.ts`. The zoom controls switched to the shared `bar` and `btn` classes a while ago, so these rules matched nothing.

shipped production is serving it deploy fc82d1a

opened this

I removed the unused .map-tool rules from the map page's stylesheet. Nothing in src/ writes that class: not the map page's markup, not its client script, not client.ts. The zoom controls switched to the shared bar and btn classes a while ago, so these rules matched nothing.

  • src/web/pages/map.ts: removed the four .map-tool rules (base, + .map-tool divider, :hover, :focus-visible) and the .map-tool:focus-visible line in the forced-colors block.
  • docs/DESIGN.md §5d: removed the .map-tool line from the map's class list. No other lines changed.
  • test/map.test.ts: the zoom-tools test now also checks that the page's <style> contains no .map-tool or .map-tools rule. It first checks that .map-canvas is there, so it can't pass on an empty stylesheet. I swapped out the old comment saying "the stylesheet still holds the old rules (#4239 removes them)", which was no longer true. The test fails with only the stylesheet change undone and passes with it.

bun scripts/design-lint.ts, bun test test/map.test.ts (12 pass) and bun x tsc --noEmit all pass.

Not done: I couldn't take the 390px and 1280px screenshots the issue asks for, because this sandbox has no browser. The page can't look different, since no element has the class, but the preview is the place to confirm that. Nothing else changed.

To try it: open /<owner>/<repo>/map on this pull's preview at both widths. The zoom group (−, fit, +) at the top right should look as it does in production.

🤖 Generated with Claude Code

Closes #5251

commented

I removed the unused .map-tool rules from the map page's stylesheet. Nothing in src/ writes that class: not the map page's markup, not its client script, not client.ts. The zoom controls switched to the shared bar and btn classes a while ago, so these rules matched nothing.

  • src/web/pages/map.ts: removed the four .map-tool rules (base, + .map-tool divider, :hover, :focus-visible) and the .map-tool:focus-visible line in the forced-colors block.
  • docs/DESIGN.md §5d: removed the .map-tool line from the map's class list. No other lines changed.
  • test/map.test.ts: the zoom-tools test now also checks that the page's <style> contains no .map-tool or .map-tools rule. It first checks that .map-canvas is there, so it can't pass on an empty stylesheet. I swapped out the old comment saying "the stylesheet still holds the old rules (#4239 removes them)", which was no longer true. The test fails with only the stylesheet change undone and passes with it.

bun scripts/design-lint.ts, bun test test/map.test.ts (12 pass) and bun x tsc --noEmit all pass.

Not done: I couldn't take the 390px and 1280px screenshots the issue asks for, because this sandbox has no browser. The page can't look different, since no element has the class, but the preview is the place to confirm that. Nothing else changed.

To try it: open /<owner>/<repo>/map on this pull's preview at both widths. The zoom group (−, fit, +) at the top right should look as it does in production.

🤖 Generated with Claude Code

Approved

Clean, small removal that does what #5274 asks.

  • No caller left: the only map-tool hits in src/ on the base are the five rules this pull deletes (src/web/pages/map.ts:1124-1127, 1186). The zoom group at map.ts:887 uses the shared bar and btn classes, and the client script works off [role="group"], not the class. So the page cannot render differently.
  • DESIGN.md §5d drops the class in the same pull, so the doc and the stylesheet still agree.
  • The test is sound. It checks for .map-canvas first, so it can't pass on an empty <style>, then asserts .map-tools? is absent from both the stylesheet and the markup. It would fail if the rules came back. The stale #4239 comment is corrected.
  • Security, tty and README: nothing applies. The pull adds no behaviour, input, write or dependency.
  • Preview: / answers 200 with the security headers in place. Map pages redirect a guest to /signin, and the preview has no public repo, so I couldn't open the map styles as a guest. Since no element carries the class, that can't hide a regression.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs