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

The map's side lists (ready now, blocked on, by pillar) speak the home page's language #9851

Merged opened this

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

Merged

mason/forge:mason/9848-the-map-s-side-lists-ready-now-blocked-o → main 2 commits fork

  • Merged. mason/9848-the-map-s-side-lists-ready-now-blocked-o was merged into main as f11beb9.

Review

Sign in to review this change.
3 files changed +11 −12
docs/design/areas/map.md +1 −1
@@ -30,7 +30,7 @@ The Ready now list's **First** button (a writer's `method="post"` form in the ro
3030
3131 ## Rows and space, not boxes (#9760)
3232
33 The side column is two headed lists, Ready now first, then By pillar and Blocked on: each a `.card.bare` list, one row an
33 The side column is two headed lists, Ready now first, then By pillar and Blocked on: each a bare `ul.list.setting-list` under its heading (no card box), one row an
3434 issue on the page's one background, no frame and no badge. A row says its word (ready, blocked, waiting, held, parked), what
3535 stands in front of it (`waits for N`) and what it holds up; a pillar row says its counts as muted text. `.map-canvas` has
3636 no border: the drawing sits on the page. The First button, its same-origin POST form and the 390px single column are
src/web/pages/map.ts +5 −11
@@ -51,7 +51,7 @@ import {
5151 import { liveRegionsJs } from "../client.ts";
5252 import { html, type Html } from "../html.ts";
5353 import { page } from "../layout.ts";
54 import { btn, card, empty, row } from "../ui.ts";
54 import { btn, empty, row } from "../ui.ts";
5555 import {
5656 parkedTwice,
5757 struckOut,
@@ -965,8 +965,7 @@ function rankedList(
965965 <h2>${title}</h2>
966966 ${items.length === 0
967967 ? html`<p class="muted small">${empty}</p>`
968 : card(
969 html`<ul class="list setting-list">
968 : html`<ul class="list setting-list">
970969 ${items.slice(0, 6).map((r) =>
971970 row({
972971 href: issueHref(base, r.issue.number),
@@ -988,9 +987,7 @@ function rankedList(
988987 : {}),
989988 }),
990989 )}
991 </ul>`,
992 { pad: false, extra: "bare" },
993 )}
990 </ul>`}
994991 </section>`;
995992 }
996993
@@ -1081,8 +1078,7 @@ function pillarList(repo: Repo, rows: readonly PillarRow[]): Html {
10811078 : `${r.open} open · ${r.ready} ready · ${r.blocked} blocked`;
10821079 return html`<section class="stack-tight" id="map-pillars">
10831080 <h2>By pillar</h2>
1084 ${card(
1085 html`<ul class="list setting-list">
1081 ${html`<ul class="list setting-list">
10861082 ${rows.map((r) =>
10871083 r.name === null
10881084 ? row({
@@ -1118,9 +1114,7 @@ function pillarList(repo: Repo, rows: readonly PillarRow[]): Html {
11181114 data: { pillar: r.name },
11191115 }),
11201116 )}
1121 </ul>`,
1122 { pad: false, extra: "bare" },
1123 )}
1117 </ul>`}
11241118 </section>`;
11251119 }
11261120
test/pillars.test.ts +5
@@ -404,9 +404,14 @@ describe("pillars", () => {
404404 expect(page).toMatch(/class="muted small"\s*>3 open · 2 ready · 1 blocked<\/span/);
405405 const pillarsBlock = page.slice(page.indexOf('id="map-pillars"'), page.indexOf("</section>", page.indexOf('id="map-pillars"')));
406406 expect(pillarsBlock).not.toContain('class="badge"');
407 // The side lists sit straight under their headings, in no card box (#9848).
408 expect(pillarsBlock).not.toContain('class="card');
409 expect(pillarsBlock).toContain(`href="/alice/engine/issues/${loose.number}"`);
407410 // A Ready now row leads with its pillar's name.
408411 const readyBlock = page.slice(page.indexOf("<h2>Ready now</h2>"), page.indexOf("</section>", page.indexOf("<h2>Ready now</h2>")));
409412 expect(readyBlock).toMatch(/#\d+ · ready · P[01] [A-Za-z]+ · /);
413 expect(readyBlock).not.toContain('class="card');
414 expect(readyBlock).toContain('href="/alice/engine/issues/');
410415 // §5's rows draw the section; the old names are gone (#4292).
411416 expect(page).not.toMatch(/class="[^"]*\bmap-list\b/);
412417 expect(page).not.toMatch(/class="[^"]*\bmap-empty\b/);

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs