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

Design: the front page's app tiles use §5's card and look, and the app-tile* classes leave §5d #3854

Parked opened this
Closed without merging

scout/forge:scout/3850-design-the-front-page-s-app-tiles-use-5 → main 9 commits fork 2 threads · 2 unresolved

  • Closed without merging. Nothing was applied to main.

Review

Sign in to review this change.
5 files changed +40 −28
docs/DESIGN.md +4
@@ -393,7 +393,11 @@ gone, so this list only shrinks.
393393 - **`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`
394394 - **`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`
395395 - **`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`
396 <<<<<<< HEAD
397 - **`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, following, lineage: `.about` `.act` `.app-shelf` `.backups-drill` `.backups-error` `.backups-now` `.backups-restore` `.bform` `.bgrid` `.big` `.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` `.chart-box` `.chart` `.commit-body` `.commit-head` `.connect-more` `.connect-path` `.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` `.following-actions` `.following-eyebrow` `.following-foot` `.following-head` `.following-sentence` `.following` `.fork-bar` `.front-admin` `.front-controls` `.front-crew` `.front-featured-body` `.front-featured-look` `.front-featured` `.front-issues` `.front-live` `.front-more` `.front-pick` `.front-pin-any` `.front-weights` `.frozen-form` `.frozen-sentence` `.frozen` `.handoff-links` `.handoff` `.headroom` `.hero-terminal` `.hero` `.issue-head` `.issue-meta` `.kv` `.lineage-children` `.lineage-here` `.lineage` `.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` `.quiet-details` `.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 =======
396399 - **`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, following, lineage: `.about` `.act` `.app-shelf` `.app-tile` `.app-tile-body` `.app-tile-desc` `.app-tile-look` `.app-tile-name` `.backups-drill` `.backups-error` `.backups-now` `.backups-restore` `.bform` `.bgrid` `.big` `.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` `.chart` `.chart-box` `.commit-body` `.commit-head` `.connect-more` `.connect-path` `.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` `.following` `.following-actions` `.following-eyebrow` `.following-foot` `.following-head` `.following-sentence` `.fork-bar` `.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` `.handoff` `.handoff-links` `.headroom` `.hero` `.hero-terminal` `.issue-head` `.issue-meta` `.kv` `.lineage` `.lineage-children` `.lineage-here` `.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`
400 >>>>>>> origin/main
397401 - **`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`
398402 - **`style/content.ts`, prose (markdown)** — table cell alignment, built by `markdown.ts` as `ta-${align}`: `.ta-c` `.ta-r`
399403 - **`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/studio/home.ts +21 −17
@@ -312,23 +312,27 @@ export async function studioHome(
312312 function tile(entry: FrontEntry): Html {
313313 const { repo, state, picture } = entry;
314314 if (picture === undefined) return html``;
315 return html`<a class="app-tile" href="${repoBase(repo)}">
316 <img
317 class="app-tile-look"
318 src="${picture}"
319 width="${LOOK_SIZES.thumb.width}"
320 height="${LOOK_SIZES.thumb.height}"
321 alt=""
322 loading="lazy"
323 />
324 <span class="app-tile-body">
325 <span class="app-tile-name">${repo.name}</span>
326 <span class="app-tile-desc truncate" title="${repo.description}"
327 >${repo.description !== "" ? repo.description : repo.ownerName}</span
328 >
329 ${state !== undefined ? envStateBadge(state) : null}
330 </span>
331 </a>`;
315 return card(
316 html`<a class="stack stack-tight" href="${repoBase(repo)}">
317 <span class="look">
318 <img
319 src="${picture}"
320 width="${LOOK_SIZES.thumb.width}"
321 height="${LOOK_SIZES.thumb.height}"
322 alt=""
323 loading="lazy"
324 />
325 </span>
326 <span class="card-body stack stack-tight">
327 <strong>${repo.name}</strong>
328 <span class="muted small truncate" title="${repo.description}"
329 >${repo.description !== "" ? repo.description : repo.ownerName}</span
330 >
331 ${state !== undefined ? envStateBadge(state) : null}
332 </span>
333 </a>`,
334 { pad: false },
335 );
332336 }
333337
334338 /**
src/web/style/components.ts +1 −1
@@ -329,7 +329,7 @@ a.sha:hover { color: var(--accent); }
329329 /* Cards stacked in normal flow space themselves. Inside a container that
330330 already manages its own spacing with gap, that margin would double it. */
331331 .card + .card { margin-top: 12px; }
332 :is(.stack, .dash, .split, .timeline) > .card + .card { margin-top: 0; }
332 :is(.stack, .dash, .split, .timeline, .app-shelf) > .card + .card { margin-top: 0; }
333333 .card-head {
334334 display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
335335 padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--muted);
src/web/style/content.ts +3 −10
@@ -426,15 +426,9 @@ form.inline { display: inline; margin-left: auto; }
426426 display: grid; gap: 16px; max-width: 1040px; margin-inline: auto;
427427 grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
428428 }
429 .app-tile {
430 display: block; border: 1px solid var(--border); border-radius: var(--radius);
431 overflow: hidden; background: var(--card); color: inherit; text-decoration: none;
432 }
433 .app-tile:hover { border-color: var(--accent); }
434 .app-tile-look { display: block; width: 100%; height: auto; background: var(--muted); }
435 .app-tile-body { display: grid; gap: 6px; padding: 10px 12px; }
436 .app-tile-name { font-weight: 600; font-size: 14px; }
437 .app-tile-desc { color: var(--muted-fg); font-size: 12.5px; }
429 .app-shelf .card:hover, .app-shelf .card:focus-within { border-color: var(--accent); }
430 /* The card is the frame; the picture sits flush inside it, not framed twice. */
431 .app-shelf .look { border: 0; border-radius: 0; }
438432
439433 /* Explore (#607): a row is a name, a line, its numbers, and one verb. */
440434 .explore-row { gap: 12px; }
@@ -496,7 +490,6 @@ form.inline { display: inline; margin-left: auto; }
496490 @media (max-width: 520px) {
497491 /* Two to a row on a phone: a few live apps in one screen, not a scroll. */
498492 .app-shelf { gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
499 .app-tile-body { padding: 8px 10px; }
500493 }
501494 @media (max-width: 720px) {
502495 .front-featured { grid-template-columns: 1fr; }
test/front.test.ts +11
@@ -438,6 +438,17 @@ describe("the front page", () => {
438438 expect(body).not.toContain('href="/owner/gated"');
439439 expect(body).not.toContain('href="/owner/legacy"');
440440 expect(body).not.toContain('href="/owner/moved"');
441 // The shelf's tiles are §5 cards; the old tile classes are gone.
442 expect(body).toContain("app-shelf");
443 for (const old of ["app-tile", "app-tile-body", "app-tile-desc", "app-tile-look", "app-tile-name"])
444 expect(body).not.toContain(old);
445 // The grid owns the spacing: .card + .card must not stagger the tiles.
446 const { components } = await import("../src/web/style/components.ts");
447 expect(components).toMatch(/:is\([^)]*\.app-shelf[^)]*\) > \.card \+ \.card \{ margin-top: 0/);
448 // Keyboard focus gets the hover accent; the picture is not framed twice.
449 const { content } = await import("../src/web/style/content.ts");
450 expect(content).toContain(".app-shelf .card:focus-within");
451 expect(content).toMatch(/\.app-shelf \.look \{ border: 0;/);
441452 // The shelf's tiles are the stranger's picture, at the thumb's size.
442453 expect(body).toContain('width="640"');
443454 const json = (await (await fetch(`${base}/api/v1/front`)).json()) as any;

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs