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

Design: the spend tables are plain §5 `.table`s, and `.spend-table` leaves §5d #5678

Closed opened this
Closed without merging

mason/forge:mason/3972-design-the-spend-tables-are-plain-5-tabl → main 1 commit fork

  • Closed without merging. Nothing was applied to main.

Review

Sign in to review this change.
5 files changed +10 −8
docs/DESIGN.md +1 −1
@@ -391,7 +391,7 @@ gone, so this list only shrinks.
391391 - **`style/content.ts`, diff viewer** — the diff table: its gutters, line kinds, file head and inline review comments: `.add` `.del` `.dh` `.diff` `.diff-body` `.diff-head` `.diff-note` `.diff-path` `.diff-stat` `.diff-stub` `.diff-summary` `.diff-table` `.dl` `.dl-review` `.dn` `.dn-comment` `.nonl` `.rc-hidden` `.rc-resolve` `.rc-resolved` `.wd`
392392 - **`style/content.ts`, apps, runs, and the crew** — run pages, their logs and checks (a pull's look is §5's **look**): `.app-url` `.check-progress` `.check-steps` `.ln-forge` `.ln-pulse` `.ln-say` `.ln-tool` `.ln-you` `.log-tail-row` `.pinned-failures` `.pinned-slot` `.run-actions` `.run-jump` `.run-live` `.run-steer` `.run-summary` `.step-state` `.tests-bar` `.tests-words` `.txt` `.who`
393393 - **`style/content.ts`, search results** — search results, the inbox's ask cards, the client list and the claim link: `.ask-acts` `.ask-card` `.ask-group` `.ask-kind` `.ask-meta` `.ask-more-acts` `.ask-pick` `.ask-pick-hit` `.ask-short` `.ask-waiting` `.claim-link-box` `.forges-sent` `.live-toggle` `.needs-you` `.no-hits`
394 - **`pages/board.ts`** — the spend tables `spend.ts` draws, first on the board (the board itself is §5's **board**): `.spend-table` `.spend-totals`
394 - **`pages/board.ts`** — the spend tables `spend.ts` draws, first on the board (the board itself is §5's **board**): `.spend-totals`
395395 - **`pages/map.ts`** — the map of what waits for what: `.map-ask` `.map-breath` `.map-canvas` `.map-card` `.map-counts` `.map-dot` `.map-edge` `.map-edge-crit` `.map-edge-done` `.map-empty` `.map-list` `.map-main` `.map-meta` `.map-node` `.map-pillars` `.map-rule` `.map-svg` `.map-title` `.map-tool` `.map-tools` `.map-who` `.map-who-i` `.map-who-n` `.map-word` `.map-wrap`
396396 - **`studio/feed_style.ts`** — the home feed's cards, its composer and the apps rail: `.composer` `.composer-bar` `.fcard-form` `.fcard-reason` `.fcard-reply` `.fcard-text` `.fcard-unblock` `.fcard-who` `.fcard-why` `.feed` `.feed-head` `.kpi` `.kpi-note` `.kpi-spark` `.kpi-value` `.kpis` `.home-app` `.home-apps` `.home-apps-verbs` `.home-pick` `.home-rail` `.home-tabs`
397397
src/web/pages/board.ts +2 −4
@@ -998,8 +998,8 @@ function today(ctx: Ctx, scope: BoardScope): Html {
998998 * four live regions that fill a second monitor, each scrolling on its own,
999999 * one key to show one. Everything inside them is §5's: rows in a list card,
10001000 * badges, meters, kbd. Assembled into the served stylesheet by
1001 * `web/style.ts`, last in the `components` layer. The spend tables
1002 * (`spend.ts`) are drawn on the board first and keep their two rules here.
1001 * `web/style.ts`, last in the `components` layer. The spend panel
1002 * (`spend.ts`) is drawn on the board first and keeps its totals rule here.
10031003 */
10041004 export const boardCss = /* css */ `
10051005 @layer components {
@@ -1019,8 +1019,6 @@ export const boardCss = /* css */ `
10191019 .board-region .row-lead img { display: block; border: 1px solid var(--border); border-radius: 4px; object-fit: cover; object-position: top; }
10201020 .board-region .row-main > meter { margin-top: 4px; }
10211021 .board [data-window] > meter { width: 56px; }
1022 .spend-table { margin-top: 8px; }
1023 .spend-table caption { text-align: left; color: var(--muted-fg); }
10241022 .spend-totals { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; }
10251023
10261024 /* Wide: four regions fill the window, each list scrolling on its own. */
src/web/pages/spend.ts +3 −3
@@ -48,7 +48,7 @@ function table(spend: Spend, dim: Dimension, title: string): Html {
4848 // The week's order: most spent first.
4949 const week = (n: string): number => at.get(n)!.get("week")?.costUsd ?? 0;
5050 names.sort((a, b) => week(b) - week(a));
51 return html`<table class="table spend-table" data-by="${dim}">
51 return html`<table class="table mt" data-by="${dim}">
5252 <thead>
5353 <tr>
5454 <th scope="col">${title}</th>
@@ -99,8 +99,8 @@ export function spendView(spend: Spend): Html {
9999 )}
100100 </p>
101101 ${DIMENSIONS.map(([dim, title]) => table(spend, dim, title))}
102 <table class="table spend-table" data-by="top">
103 <caption>
102 <table class="table mt" data-by="top">
103 <caption class="muted">
104104 The 10 costliest runs, 7 days
105105 </caption>
106106 <thead>
src/web/style/components.ts +1
@@ -451,6 +451,7 @@ details[open] > summary.row > .row-lead { transform: rotate(90deg); }
451451 .table tbody tr:first-child td { border-top: none; }
452452 .table[data-dense] td, .table[data-dense] th { padding: 5px 10px; }
453453 .table .num { text-align: right; }
454 .table caption { text-align: left; }
454455 .table-scroll { overflow-x: auto; scrollbar-width: thin; }
455456 /* The row's name stays in view while a narrow screen scrolls the figures. */
456457 .table[data-sticky-lead] th:first-child,
test/credentials.test.ts +3
@@ -327,6 +327,9 @@ describe("the board", () => {
327327 expect(page).toContain('data-live="run.queued,run.started,run.finished,usage.*"');
328328 expect(page).toContain('data-by="byKind"');
329329 expect(page).toContain("The 10 costliest runs");
330 // The spend tables are plain §5 tables; the page-local class is gone.
331 expect(page).toContain('<table class="table mt" data-by="top">');
332 expect(page).not.toContain("spend-table");
330333
331334 const subs = await (
332335 await fetch(`${servers.url}/settings/subscriptions`, { headers: { cookie } })

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs