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

The map's pillars section draws §5's row and badge, and .map-pillars leaves the markup while its id stays #4330

Merged opened this

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

Merged

scout/forge:scout/4314-the-map-s-pillars-section-draws-5-s-row → main 1 commit fork 1 thread · 1 unresolved

  • Merged. scout/4314-the-map-s-pillars-section-draws-5-s-row was merged into main as 09ce777.

Review

Sign in to review this change.
2 files changed +28 −18
src/web/pages/map.ts +19 −17
@@ -1038,32 +1038,30 @@ function pillarList(repo: Repo, rows: readonly PillarRow[]): Html {
10381038 r.open === 0
10391039 ? "nothing open"
10401040 : `${r.open} open · ${r.ready} ready · ${r.blocked} blocked`;
1041 return html`<section class="map-list map-pillars" id="map-pillars">
1041 return html`<section class="map-list" id="map-pillars">
10421042 <h2>By pillar</h2>
1043 <ul>
1043 <ul class="list">
10441044 ${rows.map((r) =>
10451045 r.name === null
1046 ? html`<li data-pillar="">
1047 <b>${NO_PILLAR}</b>
1048 <span class="muted small"
1049 >${counts(r)}:
1050 ${(r.issues ?? []).slice(0, 8).map(
1046 ? row({
1047 title: NO_PILLAR,
1048 meta: html`${(r.issues ?? []).slice(0, 8).map(
10511049 (i) =>
10521050 html`<a href="${base}/issues/${i.number}" title="${i.title}"
10531051 >#${i.number}</a
10541052 >${" "}`,
1055 )}${(r.issues ?? []).length > 8 ? "…" : ""}</span
1056 >
1057 </li>`
1058 : html`<li data-pillar="${r.name}">
1059 <a
1053 )}${(r.issues ?? []).length > 8 ? "…" : ""}`,
1054 trail: badge(counts(r)),
1055 data: { pillar: "" },
1056 })
1057 : row({
1058 title: html`<a
10601059 href="${r.umbrella === undefined
10611060 ? pillarHref(base, r.name)
10621061 : milestoneHref(base, r.umbrella)}"
10631062 >${r.name}</a
1064 >
1065 <span class="muted small">${counts(r)}</span>
1066 <span class="muted small map-ask" title="Median and slowest hours from an issue opening to its change live in production, over ${PILLAR_DAYS} days"
1063 >`,
1064 meta: html`<span title="Median and slowest hours from an issue opening to its change live in production, over ${PILLAR_DAYS} days"
10671065 >${r.merged ?? 0} merged · ask to live
10681066 ${r.askToLive === undefined
10691067 ? "—"
@@ -1072,8 +1070,10 @@ function pillarList(repo: Repo, rows: readonly PillarRow[]): Html {
10721070 >#${r.askToLive.slowest.number}</a
10731071 >
10741072 ${hours(r.askToLive.slowest.hours)}`}</span
1075 >
1076 </li>`,
1073 >`,
1074 trail: badge(counts(r)),
1075 data: { pillar: r.name },
1076 }),
10771077 )}
10781078 </ul>
10791079 </section>`;
@@ -1160,6 +1160,8 @@ export const mapCss = /* css */ `
11601160 .map-list li span { display: block; }
11611161 .map-list + .map-list { margin-top: 18px; }
11621162 .map-ask { display: block; }
1163 .map-list .list span { display: inline; }

Dead rule: nothing carries .map-pillars any more. Remove it, and .map-ask on the line above, with the follow-up.

1164 .map-list .list .row-main, .map-list .list .row-trail { display: flex; }
11631165 .map-pillars ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
11641166 .map-empty { display: grid; justify-items: center; gap: 8px; padding: 40px 16px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted-fg); text-align: center; }
11651167
test/pillars.test.ts +9 −1
@@ -400,7 +400,15 @@ describe("pillars", () => {
400400 ),
401401 );
402402 expect(page).toContain("3 open · 2 ready · 1 blocked");
403 expect(page).toContain("<b>no pillar</b>");
403 // §5's row and badge draw it; the page-local class is gone, the id stays.
404 expect(page).not.toMatch(/class="[^"]*map-pillars/);
405 expect(page).toMatch(
406 /class="row-title"\s*>no pillar<\/span/,
407 );
408 expect(page).toMatch(
409 /class="badge"\s*>3 open · 2 ready · 1 blocked<\/span/,
410 );
411 expect(page).toMatch(/data-pillar="P0 Trust"/);
404412 expect(page).toContain(`href="/alice/engine/issues/${loose.number}"`);
405413 // The pillar's label narrows the one list.
406414 const list = await get("/alice/engine/issues?label=P0%20Trust");

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs