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

A repository's description wears §5's muted small text, and `.repo-desc` leaves the stylesheet #6774

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/6747-a-repository-s-description-wears-5-s-mut → main 1 commit fork

  • Merged. scout/6747-a-repository-s-description-wears-5-s-mut was merged into main as 727b08d.

Review

Sign in to review this change.
4 files changed +4 −5
docs/design/sections/5d-page-local-classes.md −1
@@ -24,7 +24,6 @@ the same line (#4888).
2424 - `.menu-item`
2525 - **`style/content.ts`, page furniture** — what frames a page's content: repo heads, the front page and its tiles, explore, backups, boards, the fleet chart's series colours, lineage:
2626 - `.repo-actions`
27 - `.repo-desc`
2827 - **`style/content.ts`, apps, runs, and the crew** — run pages, their logs and checks (a pull's look is §5's **look**).
2928 - **`pages/board.ts`** — the board itself is §5's **board**; the spend tables `spend.ts` draws wear §5's `.table` and `.stack`, no class of their own
3029 - **`studio/feed_style.ts`** — the home feed's cards and its composer (the apps rail is §5's card, row and btn; an admin's tick boxes and Archive are always shown, deliberately, with no Select toggle):
src/web/chrome.ts +1 −1
@@ -401,7 +401,7 @@ export function lineageLine(
401401 function audienceLine(ctx: Ctx, repo: Repo, admin: boolean, base: string): Html {
402402 const { level, sentence } = audienceOf(audienceFacts(ctx.app.db, repo, ctx.auth.user));
403403 const split = level === "split" ? html`${badge("Split", { tone: "attn" })} ` : null;
404 return html`<p class="repo-desc">
404 return html`<p class="muted small">
405405 ${split}${admin ? html`<a href="${base}/settings">${sentence}</a>` : sentence}
406406 </p>`;
407407 }
src/web/style/content.ts +1 −2
@@ -19,10 +19,9 @@ export const content = /* css */ `
1919 .repo-title .muted, .repo-title .sep { font-weight: 400; }
2020 /* A phone has no hover: the settings link is a full 44px line. */
2121 @media (max-width: 640px) {
22 .repo-head .repo-desc a { display: block; padding: 12px 0; min-height: 44px; box-sizing: border-box; }
22 .repo-head p.muted.small a { display: block; padding: 12px 0; min-height: 44px; box-sizing: border-box; }
2323 }
2424 .repo-head p.muted.small { margin-top: 4px; text-wrap: pretty; }
25 .repo-desc { margin-top: 4px; color: var(--muted-fg); font-size: 13px; text-wrap: pretty; }
2625 .repo-head .tabs { margin-top: 12px; }
2726
2827 /* Provenance and pinning: one line under the title, so a <form> never has to
test/audience-surfaces.test.ts +2 −1
@@ -20,7 +20,7 @@ const esc = (s: string): string =>
2020
2121 /** The audience line of a page: the settings link if any, the Split badge if any, and the sentence. */
2222 function audienceOn(page: string) {
23 const m = /<p class="repo-desc"\s*>\s*(?:<span\s+class="badge"\s+data-variant="attn"\s*>(Split)<\/span\s*>)?\s*(?:<a href="([^"]*)"\s*>)?([^<]*Public: anyone[^<]*|The code is public[^<]*)(?:<\/a\s*>)?\s*<\/p\s*>/.exec(page);
23 const m = /<p class="muted small"\s*>\s*(?:<span\s+class="badge"\s+data-variant="attn"\s*>(Split)<\/span\s*>)?\s*(?:<a href="([^"]*)"\s*>)?([^<]*Public: anyone[^<]*|The code is public[^<]*)(?:<\/a\s*>)?\s*<\/p\s*>/.exec(page);
2424 if (m === null) throw new Error("no audience line on the page");
2525 return { badge: m[1], href: m[2], text: m[3]!.trim() };
2626 }
@@ -98,6 +98,7 @@ describe("one sentence on every surface", () => {
9898 const said = esc(api.audience.sentence);
9999 const out = await (await fetch(`${servers.url}/olive/meadow`)).text();
100100 expect(audienceOn(out)).toEqual({ badge: undefined, href: undefined, text: said });
101 expect(out).not.toContain("repo-desc");
101102
102103 const wren = await createUser(app.db, {
103104 origin: "seed",

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs