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

Design: a commit's head and body use the design system, and commit-head/commit-body leave §5d #4445

Parked opened this
Closed without merging

scout/forge:scout/3835-design-a-commit-s-head-and-body-use-the → main 15 commits fork

  • Closed without merging. Nothing was applied to main.

Review

Sign in to review this change.
6 files changed +8 −11
docs/DESIGN.md +2 −2
@@ -391,11 +391,11 @@ onto a §5 component, or into the table when a page-local thing turns out to
391391 be a component — and the check fails a name kept here after its last rule is
392392 gone, so this list only shrinks.
393393
394 - **`style/base.ts`** — the page shell (topbar, main, footer) and the layout and text utilities every page leans on: `.bar` `.bare` `.foot` `.grow` `.hide-lg` `.hide-sm` `.js-only` `.live-pill` `.mark` `.mb` `.mt` `.muted` `.narrow` `.narrow-wide` `.num` `.reduced` `.shell` `.shell-wide` `.skip` `.small` `.spacer` `.sr-only` `.stack` `.stack-tight` `.topbar` `.topbar-tools` `.truncate` `.wordmark`
394 - **`style/base.ts`** — the page shell (topbar, main, footer) and the layout and text utilities every page leans on: `.bar` `.bare` `.foot` `.grow` `.hide-lg` `.hide-sm` `.js-only` `.live-pill` `.mark` `.mb` `.mt` `.muted` `.narrow` `.narrow-wide` `.num` `.pre-wrap` `.reduced` `.shell` `.shell-wide` `.skip` `.small` `.spacer` `.sr-only` `.stack` `.stack-tight` `.topbar` `.topbar-tools` `.truncate` `.wordmark`
395395 A `.field` directly inside a `.bar` drops its bottom margin and the bar aligns to the end, so a labelled input and its button share a baseline
396396 - **`style/components.ts`** — parts of the §5 components that the table does not spell out — the palette's list, the menu's items, a dialog's head and foot, comments, the theme picker — and a few small helpers beside them: `.cat` `.clone` `.clone-text` `.comment` `.comment-body` `.comment-form` `.dash` `.dialog-body` `.dialog-foot` `.dialog-head` `.empty-title` `.error-note` `.field-row` `.form-actions` `.hex` `.ico` `.ico-loader` `.list` `.live-status` `.menu-item` `.menu-panel` `.menu-sep` `.menu-title` `.palette-empty` `.palette-foot` `.palette-group` `.palette-heading` `.palette-input` `.palette-item` `.palette-list` `.passkey` `.passkey-lead` `.passkey-note` `.passkey-off` `.passkey-on` `.preview` `.sep` `.split` `.sprite` `.swatch` `.table-scroll` `.tell-here` `.theme-apply` `.theme-option` `.tick` `.timeline` `.tl-dot` `.toast-body` `.topbar-search`
397397 - **`style/components.ts`, settings rows** — a list whose rows are settings (limits, capacity): the `<ul class="list setting-list">` lets title and meta wrap instead of ellipsizing, and a row's controls take their own line under 640px. `.row-fields` is the form in that row's trail (input, Save, Default): always visible, never hover-gated, wrapping under the text before it would clip. Use both for any page whose rows show a name, a current value, and a control to change it; use `.row-actions` only for secondary actions (delete, wake, pin, revoke). Flags, telemetry, cloud, people, crew roles and subscription headroom/budget use `.row-fields`. Classes: `.row-fields` `.setting-list`
398 - **`style/content.ts`, page furniture** — what frames a page's content: page and repo heads, the merge box, the front page and its tiles, explore, backups, boards, the fleet chart's series colours, lineage: `.app-shelf` `.backups-drill` `.backups-error` `.backups-now` `.backups-restore` `.bform` `.bgrid` `.bmanage` `.boards-result` `.bp-h2` `.bp-h3` `.bp-w2` `.bp-w3` `.break` `.bt-bar` `.bt-grid` `.bt-group` `.bt-hist` `.bt-name` `.bt-procs` `.bt-row` `.bt-val` `.commit-body` `.commit-head` `.domain-records` `.explore-filters` `.explore-line` `.explore-main` `.explore-name` `.explore-row` `.fg-s0` `.fg-s1` `.fg-s2` `.fg-s3` `.fg-s4` `.fg-s5` `.fg-s6` `.fg-s7` `.filters` `.flag-form` `.front-admin` `.front-controls` `.front-crew` `.front-featured` `.front-featured-body` `.front-featured-look` `.front-issues` `.front-live` `.front-more` `.front-pick` `.front-pin-any` `.front-weights` `.frozen` `.frozen-form` `.frozen-sentence` `.headroom` `.issue-head` `.issue-meta` `.merge-box` `.merge-form` `.merge-headline` `.merge-sub` `.mirror-form` `.number` `.origin-link` `.origin-mark` `.origin-name` `.origin-row` `.owner` `.page-head` `.path-head` `.policy-line` `.qf` `.repo-actions` `.repo-audience` `.repo-desc` `.repo-layout` `.repo-lineage` `.repo-title` `.search` `.slash` `.stage-detail` `.stage-dot` `.steps` `.sub` `.sys-pair` `.table-wrap` `.terminal-line` `.tok` `.tree-row` `.tree-total` `.wall-cells` `.where-sep`
398 - **`style/content.ts`, page furniture** — what frames a page's content: page and repo heads, the merge box, the front page and its tiles, explore, backups, boards, the fleet chart's series colours, lineage: `.app-shelf` `.backups-drill` `.backups-error` `.backups-now` `.backups-restore` `.bform` `.bgrid` `.bmanage` `.boards-result` `.bp-h2` `.bp-h3` `.bp-w2` `.bp-w3` `.break` `.bt-bar` `.bt-grid` `.bt-group` `.bt-hist` `.bt-name` `.bt-procs` `.bt-row` `.bt-val` `.domain-records` `.explore-filters` `.explore-line` `.explore-main` `.explore-name` `.explore-row` `.fg-s0` `.fg-s1` `.fg-s2` `.fg-s3` `.fg-s4` `.fg-s5` `.fg-s6` `.fg-s7` `.filters` `.flag-form` `.front-admin` `.front-controls` `.front-crew` `.front-featured` `.front-featured-body` `.front-featured-look` `.front-issues` `.front-live` `.front-more` `.front-pick` `.front-pin-any` `.front-weights` `.frozen` `.frozen-form` `.frozen-sentence` `.headroom` `.issue-head` `.issue-meta` `.merge-box` `.merge-form` `.merge-headline` `.merge-sub` `.mirror-form` `.number` `.origin-link` `.origin-mark` `.origin-name` `.origin-row` `.owner` `.page-head` `.path-head` `.policy-line` `.qf` `.repo-actions` `.repo-audience` `.repo-desc` `.repo-layout` `.repo-lineage` `.repo-title` `.search` `.slash` `.stage-detail` `.stage-dot` `.steps` `.sub` `.sys-pair` `.table-wrap` `.terminal-line` `.tok` `.tree-row` `.tree-total` `.wall-cells` `.where-sep`
399399 - **`style/content.ts`, code view** — the source view and the syntax-highlight token classes `highlight-html.ts` builds as `tok-${kind}`: `.blob-view` `.ln` `.tok-attribute` `.tok-comment` `.tok-constant` `.tok-decorator` `.tok-deleted` `.tok-emphasis` `.tok-function` `.tok-heading` `.tok-inserted` `.tok-keyword` `.tok-link` `.tok-meta` `.tok-number` `.tok-operator` `.tok-plain` `.tok-property` `.tok-punctuation` `.tok-regex` `.tok-string` `.tok-tag` `.tok-type` `.tok-variable`
400400 - **`style/content.ts`, prose (markdown)** — table cell alignment, built by `markdown.ts` as `ta-${align}`: `.ta-c` `.ta-r`
401401 - **`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`
src/web/pages/commits.ts +1 −2
@@ -108,7 +108,7 @@ export function renderCommit(
108108 html`<h2>${commit.subject}</h2>
109109 ${when(
110110 commit.body.trim() !== "",
111 () => html`<pre class="commit-body">${commit.body}</pre>`,
111 () => html`<pre class="mono muted pre-wrap">${commit.body}</pre>`,
112112 )}
113113 <div class="bar small muted">
114114 ${commit.login
@@ -132,7 +132,6 @@ export function renderCommit(
132132 >${icon("repo")}Browse files</a
133133 >
134134 </div>`,
135 { extra: "commit-head" },
136135 );
137136 return html`<div class="mt">${head}</div>
138137 <div class="mt">
src/web/pages/reports.ts +1 −1
@@ -208,7 +208,7 @@ function reportCard(base: string, report: Report): Html {
208208 html`<p><strong>${report.title}</strong></p>
209209 ${when(
210210 report.body !== "",
211 () => html`<pre class="commit-body">${report.body}</pre>`,
211 () => html`<pre class="mono muted pre-wrap">${report.body}</pre>`,
212212 )}
213213 ${when(report.page, (p) => html`<p class="hint">Sent from ${p}</p>`)}
214214 <form
src/web/style/base.ts +1
@@ -165,6 +165,7 @@ export const utilities = /* css */ `
165165 .num { font-variant-numeric: tabular-nums; }
166166 .grow { flex: 1; min-width: 0; }
167167 .spacer { flex: 1; }
168 .pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
168169 .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
169170 .stack { display: flex; flex-direction: column; gap: 12px; }
170171 .stack-tight { gap: 4px; }
src/web/style/content.ts −6
@@ -254,12 +254,6 @@ a.origin-chip:hover { border-color: var(--border-strong); color: var(--fg); }
254254 .merge-box .merge-form .btn { flex: 1 1 180px; }
255255 }
256256
257 .commit-head .card-body { padding: 14px 16px; }
258 .commit-body {
259 white-space: pre-wrap; font-family: var(--mono); font-size: 12.5px;
260 color: var(--muted-fg); margin: 8px 0 4px;
261 }
262
263257
264258 /* A mirror whose origin went: what froze, and the one way back. */
265259 .frozen { margin-top: 12px; }
test/web-browse.test.ts +3
@@ -439,6 +439,9 @@ describe("browsing an origin repository on the web", () => {
439439 expect(oid).not.toBe("");
440440 const one = await bodyOf(alice, `${browse}/commit/${oid}`);
441441 expect(one).toContain("the body of it");
442 expect(one).toContain('class="mono muted pre-wrap"');
443 expect(one).not.toContain("commit-body");
444 expect(one).not.toContain("commit-head");
442445 expect(one).toContain("README.md");
443446 expect(one).toContain("mona");
444447 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs