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
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/4314-the-map-s-pillars-section-draws-5-s-row → main 1 commit fork 1 thread · 1 unresolved
2 files
changed +28
−18
src/web/pages/map.ts +19 −17
| @@ -1038,32 +1038,30 @@ function pillarList(repo: Repo, rows: readonly PillarRow[]): Html { | ||
| 1038 | 1038 | r.open === 0 |
| 1039 | 1039 | ? "nothing open" |
| 1040 | 1040 | : `${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"> | |
| 1042 | 1042 | <h2>By pillar</h2> |
| 1043 | <ul> | |
| 1043 | <ul class="list"> | |
| 1044 | 1044 | ${rows.map((r) => |
| 1045 | 1045 | 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( | |
| 1051 | 1049 | (i) => |
| 1052 | 1050 | html`<a href="${base}/issues/${i.number}" title="${i.title}" |
| 1053 | 1051 | >#${i.number}</a |
| 1054 | 1052 | >${" "}`, |
| 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 | |
| 1060 | 1059 | href="${r.umbrella === undefined |
| 1061 | 1060 | ? pillarHref(base, r.name) |
| 1062 | 1061 | : milestoneHref(base, r.umbrella)}" |
| 1063 | 1062 | >${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" | |
| 1067 | 1065 | >${r.merged ?? 0} merged · ask to live |
| 1068 | 1066 | ${r.askToLive === undefined |
| 1069 | 1067 | ? "—" |
| @@ -1072,8 +1070,10 @@ function pillarList(repo: Repo, rows: readonly PillarRow[]): Html { | ||
| 1072 | 1070 | >#${r.askToLive.slowest.number}</a |
| 1073 | 1071 | > |
| 1074 | 1072 | ${hours(r.askToLive.slowest.hours)}`}</span |
| 1075 | > | |
| 1076 | </li>`, | |
| 1073 | >`, | |
| 1074 | trail: badge(counts(r)), | |
| 1075 | data: { pillar: r.name }, | |
| 1076 | }), | |
| 1077 | 1077 | )} |
| 1078 | 1078 | </ul> |
| 1079 | 1079 | </section>`; |
| @@ -1160,6 +1160,8 @@ export const mapCss = /* css */ ` | ||
| 1160 | 1160 | .map-list li span { display: block; } |
| 1161 | 1161 | .map-list + .map-list { margin-top: 18px; } |
| 1162 | 1162 | .map-ask { display: block; } |
| 1163 | .map-list .list span { display: inline; } | |
| 1164 | .map-list .list .row-main, .map-list .list .row-trail { display: flex; } | |
| 1163 | 1165 | .map-pillars ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; } |
| 1164 | 1166 | .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; } |
| 1165 | 1167 |
test/pillars.test.ts +9 −1
| @@ -400,7 +400,15 @@ describe("pillars", () => { | ||
| 400 | 400 | ), |
| 401 | 401 | ); |
| 402 | 402 | 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"/); | |
| 404 | 412 | expect(page).toContain(`href="/alice/engine/issues/${loose.number}"`); |
| 405 | 413 | // The pillar's label narrows the one list. |
| 406 | 414 | const list = await get("/alice/engine/issues?label=P0%20Trust"); |
new above
offline
Dead rule: nothing carries .map-pillars any more. Remove it, and .map-ask on the line above, with the follow-up.