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
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/6747-a-repository-s-description-wears-5-s-mut → main 1 commit fork
4 files
changed +4
−5
docs/design/sections/5d-page-local-classes.md −1
| @@ -24,7 +24,6 @@ the same line (#4888). | ||
| 24 | 24 | - `.menu-item` |
| 25 | 25 | - **`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: |
| 26 | 26 | - `.repo-actions` |
| 27 | - `.repo-desc` | |
| 28 | 27 | - **`style/content.ts`, apps, runs, and the crew** — run pages, their logs and checks (a pull's look is §5's **look**). |
| 29 | 28 | - **`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 |
| 30 | 29 | - **`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( | ||
| 401 | 401 | function audienceLine(ctx: Ctx, repo: Repo, admin: boolean, base: string): Html { |
| 402 | 402 | const { level, sentence } = audienceOf(audienceFacts(ctx.app.db, repo, ctx.auth.user)); |
| 403 | 403 | const split = level === "split" ? html`${badge("Split", { tone: "attn" })} ` : null; |
| 404 | return html`<p class="repo-desc"> | |
| 404 | return html`<p class="muted small"> | |
| 405 | 405 | ${split}${admin ? html`<a href="${base}/settings">${sentence}</a>` : sentence} |
| 406 | 406 | </p>`; |
| 407 | 407 | } |
src/web/style/content.ts +1 −2
| @@ -19,10 +19,9 @@ export const content = /* css */ ` | ||
| 19 | 19 | .repo-title .muted, .repo-title .sep { font-weight: 400; } |
| 20 | 20 | /* A phone has no hover: the settings link is a full 44px line. */ |
| 21 | 21 | @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; } | |
| 23 | 23 | } |
| 24 | 24 | .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; } | |
| 26 | 25 | .repo-head .tabs { margin-top: 12px; } |
| 27 | 26 | |
| 28 | 27 | /* 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 => | ||
| 20 | 20 | |
| 21 | 21 | /** The audience line of a page: the settings link if any, the Split badge if any, and the sentence. */ |
| 22 | 22 | 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); | |
| 24 | 24 | if (m === null) throw new Error("no audience line on the page"); |
| 25 | 25 | return { badge: m[1], href: m[2], text: m[3]!.trim() }; |
| 26 | 26 | } |
| @@ -98,6 +98,7 @@ describe("one sentence on every surface", () => { | ||
| 98 | 98 | const said = esc(api.audience.sentence); |
| 99 | 99 | const out = await (await fetch(`${servers.url}/olive/meadow`)).text(); |
| 100 | 100 | expect(audienceOn(out)).toEqual({ badge: undefined, href: undefined, text: said }); |
| 101 | expect(out).not.toContain("repo-desc"); | |
| 101 | 102 | |
| 102 | 103 | const wren = await createUser(app.db, { |
| 103 | 104 | origin: "seed", |
new above
offline