Public: anyone can read this; the crew can change it.
An app's domain DNS records draw §5's table, and .domain-records leaves the stylesheet #4655
scout/forge:scout/4613-an-app-s-domain-dns-records-draw-5-s-tab → main 7 commits fork 2 threads · 2 unresolved
6 files
changed +42
−17
docs/DESIGN.md +4
| @@ -395,7 +395,11 @@ gone, so this list only shrinks. | ||
| 395 | 395 | 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 |
| 396 | 396 | - **`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` `.menu-item` `.menu-panel` `.menu-sep` `.menu-title` `.palette-empty` `.palette-foot` `.palette-group` `.palette-heading` `.palette-input` `.palette-item` `.palette-list` `.passkey` `.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` |
| 397 | 397 | - **`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 | <<<<<<< HEAD | |
| 399 | - **`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: `.backups-drill` `.backups-error` `.backups-now` `.bform` `.bgrid` `.bmanage` `.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` `.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` `.frozen` `.frozen-form` `.frozen-sentence` `.headroom` `.issue-head` `.issue-meta` `.merge-box` `.merge-form` `.merge-headline` `.merge-sub` `.mirror-form` `.number` `.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` `.tok` `.wall-cells` `.where-sep` | |
| 400 | ======= | |
| 398 | 401 | - **`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: `.bform` `.bgrid` `.bmanage` `.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` `.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` `.frozen` `.frozen-form` `.frozen-sentence` `.headroom` `.issue-head` `.issue-meta` `.merge-box` `.merge-form` `.merge-headline` `.merge-sub` `.mirror-form` `.number` `.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` `.tok` `.wall-cells` `.where-sep` |
| 402 | >>>>>>> origin/main | |
| 399 | 403 | - **`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` |
| 400 | 404 | - **`style/content.ts`, prose (markdown)** — table cell alignment, built by `markdown.ts` as `ta-${align}`: `.ta-c` `.ta-r` |
| 401 | 405 | - **`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` |
docs/design/areas/backups.md added +3
| @@ -0,0 +1,3 @@ | ||
| 1 | # Backups | |
| 2 | ||
| 3 | - `.restore-command` — the one-line restore command on /settings/backups: a `<pre>` that wraps, scrolls with the keyboard (`tabindex="0"`) and takes its height from its text, so a one-liner is not a log pane. |
src/web/pages/backups.ts +1 −1
| @@ -335,7 +335,7 @@ async function movingPart( | ||
| 335 | 335 | now, |
| 336 | 336 | }); |
| 337 | 337 | const restore = snapshots[0] |
| 338 | ? html`<pre class="domain-records" tabindex="0" aria-label="Restore command">bun run src/snapshot/restore.ts ${snapshots[0].name} /path/to/empty/data</pre>` | |
| 338 | ? html`<pre class="restore-command" tabindex="0" aria-label="Restore command">bun run src/snapshot/restore.ts ${snapshots[0].name} /path/to/empty/data</pre>` | |
| 339 | 339 | : null; |
| 340 | 340 | return html`<div id="backups-live" data-live="backup.*" data-live-src="/settings/backups/live">${recovery}${card( |
| 341 | 341 | html`<p> |
src/web/pages/settings.ts +28 −16
| @@ -920,7 +920,7 @@ function appDomainsView( | ||
| 920 | 920 | html`<li> |
| 921 | 921 | <div class="row"> |
| 922 | 922 | <span class="row-lead">${icon("globe")}</span> |
| 923 | <span class="row-main"> | |
| 923 | <div class="row-main"> | |
| 924 | 924 | <span class="row-title" |
| 925 | 925 | ><span class="mono">${d.host}</span> ${d.verified |
| 926 | 926 | ? badge("live", { tone: "success" }) |
| @@ -933,7 +933,7 @@ function appDomainsView( | ||
| 933 | 933 | : html` · checked ${time(d.checkedAt)}`}</span |
| 934 | 934 | > |
| 935 | 935 | ${when(!d.verified, () => recordsToPublish(d.records))} |
| 936 | </span> | |
| 936 | </div> | |
| 937 | 937 | <span class="row-trail"> |
| 938 | 938 | <form method="post" action="${at(d.host)}/check"> |
| 939 | 939 | ${btn("Check now", { size: "sm", icon: "globe" })} |
| @@ -1003,20 +1003,32 @@ function appDomainsView( | ||
| 1003 | 1003 | |
| 1004 | 1004 | /** The records as a person copies them into a zone: type, name, value. */ |
| 1005 | 1005 | function recordsToPublish(records: DnsRecord[]): Html { |
| 1006 | return html`${records.map( | |
| 1007 | (r) => | |
| 1008 | html`<span class="row-meta" | |
| 1009 | >${badge(r.type, { variant: "outline" })} | |
| 1010 | <span class="mono">${r.name}</span> | |
| 1011 | <span aria-hidden="true">→</span> | |
| 1012 | <span class="mono record-value" title="${r.value}" | |
| 1013 | >${r.value}</span | |
| 1014 | ></span | |
| 1015 | >`, | |
| 1016 | )} | |
| 1017 | ${records | |
| 1018 | .filter((r) => r.note !== undefined) | |
| 1019 | .map((r) => html`<span class="row-meta">${r.note}</span>`)}`; | |
| 1006 | return html`<div class="table-scroll"> | |
outdated
A |
||
| 1007 | <table class="table" data-dense> | |
| 1008 | <thead> | |
| 1009 | <tr> | |
| 1010 | <th>Type</th> | |
| 1011 | <th>Name</th> | |
| 1012 | <th>Value</th> | |
| 1013 | </tr> | |
| 1014 | </thead> | |
| 1015 | <tbody> | |
| 1016 | ${records.map( | |
| 1017 | (r) => | |
| 1018 | html`<tr> | |
| 1019 | <td>${badge(r.type, { variant: "outline" })}</td> | |
| 1020 | <td class="mono">${r.name}</td> | |
| 1021 | <td class="mono record-value" title="${r.value}"> | |
| 1022 | ${r.value} | |
| 1023 | </td> | |
| 1024 | </tr>`, | |
| 1025 | )} | |
| 1026 | </tbody> | |
| 1027 | </table> | |
| 1028 | </div> | |
| 1029 | ${records | |
| 1030 | .filter((r) => r.note !== undefined) | |
| 1031 | .map((r) => html`<span class="row-meta">${r.note}</span>`)}`; | |
| 1020 | 1032 | } |
| 1021 | 1033 | |
| 1022 | 1034 | const appValues = (repo: Repo, record: AppRecord | undefined): AppValues => ({ |
src/web/style/content.ts +5
| @@ -329,8 +329,13 @@ a.origin-chip:hover { border-color: var(--border-strong); color: var(--fg); } | ||
| 329 | 329 | .fg-s5 { fill: var(--series-5); color: var(--series-5); } |
| 330 | 330 | .fg-s6 { fill: var(--series-6); color: var(--series-6); } |
| 331 | 331 | .fg-s7 { fill: var(--series-7); color: var(--series-7); } |
| 332 | <<<<<<< HEAD | |
| 333 | .backups-error { display: flex; align-items: center; gap: 8px; color: var(--danger); } | |
| 334 | .restore-command { margin: 8px 0 0; padding: 8px 10px; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; background: var(--muted); border-radius: var(--radius); } | |
| 335 | ======= | |
| 332 | 336 | /* The records a domain waits on: type, name, value — as a zone file reads. */ |
| 333 | 337 | .domain-records { margin: 6px 0 2px; padding: 8px 10px; font-size: 12.5px; line-height: 1.6; white-space: pre; overflow-x: auto; scrollbar-width: thin; background: var(--muted); border-radius: var(--radius); } |
| 338 | >>>>>>> origin/main | |
| 334 | 339 | .policy-line { |
| 335 | 340 | display: flex; align-items: center; gap: 8px; flex-wrap: wrap; |
| 336 | 341 | margin: 12px 0 0; font-size: 13px; color: var(--muted-fg); |
test/app-domains.test.ts +1
| @@ -596,6 +596,7 @@ describe("an app gets its own domain", () => { | ||
| 596 | 596 | ); |
| 597 | 597 | expect(page).toContain("ALIAS"); |
| 598 | 598 | expect(page).not.toContain("domain-records"); |
| 599 | expect(page).toMatch(/<table class="table" data-dense>[\s\S]*?<th>Type<\/th>/); | |
| 599 | 600 | // The records wrap instead of truncating (.row-meta only wraps inside |
| 600 | 601 | // .setting-list), carry the type badge, and the whole value is selectable. |
| 601 | 602 | const token = getDomain(app.db, "example.com")!.token; |
new above
offline
.run-logforces min-height 12em and a scroll pane for one line of text. Use a component made for a copyable command, or a documented area class.