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

The map's counts line draws §5's badge, .map-counts leaves the markup, and the limbs test reads the count, not the old markup #4327

Merged opened this

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

Merged

The map's counts line (`countsLine` in `src/web/pages/map.ts`) now draws one `.badge` per state, and `.map-counts` is gone from the page's HTML. Type check, design-lint and the map, limbs, pillars and design-lint tests are green. I did not run the whole suite.

shipped production is serving it deploy 1018b7a

opened this

The map's counts line (countsLine in src/web/pages/map.ts) now draws one .badge per state, and .map-counts is gone from the page's HTML. Type check, design-lint and the map, limbs, pillars and design-lint tests are green. I did not run the whole suite.

  • Badges: each badge keeps its data-state and its word and count, for example <span class="badge" data-variant="success" data-state="ready">ready <b>2</b></span>. Tones are ready=success, working/parked/held=attn, waiting=merged, done=outline, and the rest (blocked, deferred) use the default secondary variant. ui.ts's badge() can't carry data-state, so I wrote the span out directly rather than extend it.
  • Layout: the badges sit in a plain <span data-counts>, so spacing between them is now the badge's own rather than the old flex gap.
  • Left alone: the .map-counts rules in the map's stylesheet and docs/DESIGN.md, as the issue says (#4239 removes them).
  • Test changed, test/limbs.test.ts:455: the assertion pinned the old <i> markup. It now matches the deferred badge with count 5. Nothing else in that test changed.
  • Test changed, test/map.test.ts: six assertions near lines 362–367 and one at 427 pinned the same old <i data-state=…> markup, so I moved them to the badge markup. They check the same words and counts.
  • Test added, test/map.test.ts: the map page has no map-counts anywhere, ready, working, blocked and done each show their word and count in a badge, and the map's cards are still present.

To try it, open any repository's /map page (or /map across the forge) and look under the drawing and on each lane row.

Closes #4313

commented

The map's counts line (countsLine in src/web/pages/map.ts) now draws one .badge per state, and .map-counts is gone from the page's HTML. Type check, design-lint and the map, limbs, pillars and design-lint tests are green. I did not run the whole suite.

  • Badges: each badge keeps its data-state and its word and count, for example <span class="badge" data-variant="success" data-state="ready">ready <b>2</b></span>. Tones are ready=success, working/parked/held=attn, waiting=merged, done=outline, and the rest (blocked, deferred) use the default secondary variant. ui.ts's badge() can't carry data-state, so I wrote the span out directly rather than extend it.
  • Layout: the badges sit in a plain <span data-counts>, so spacing between them is now the badge's own rather than the old flex gap.
  • Left alone: the .map-counts rules in the map's stylesheet and docs/DESIGN.md, as the issue says (#4239 removes them).
  • Test changed, test/limbs.test.ts:455: the assertion pinned the old <i> markup. It now matches the deferred badge with count 5. Nothing else in that test changed.
  • Test changed, test/map.test.ts: six assertions near lines 362–367 and one at 427 pinned the same old <i data-state=…> markup, so I moved them to the badge markup. They check the same words and counts.
  • Test added, test/map.test.ts: the map page has no map-counts anywhere, ready, working, blocked and done each show their word and count in a badge, and the map's cards are still present.

To try it, open any repository's /map page (or /map across the forge) and look under the drawing and on each lane row.

Approved

Counts line now draws §5 badges with tone variants, data-state kept, .map-counts gone from the markup; tests moved to the new markup and a new one fails without the change. Preview answers 200. Next two: (1) land #4239 to delete the now-dead .map-counts CSS (map.ts ~1146-1168); (2) check a lane row at 360px: #lanes .row-meta is nowrap/ellipsis, so a lane with many states will clip its badges, so consider capping or hiding zero-adjacent words there.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs