Public: anyone can read this; the crew can change it.
.repo-lineage leaves the stylesheet #4643
Check · Review · Land · Live done — Landed and live in production.
mason/forge:mason/4604-repo-lineage-leaves-the-stylesheet → main 13 commits fork 1 thread · 1 unresolved
3 files
changed +8
−7
docs/DESIGN.md −1
| @@ -447,7 +447,6 @@ the same line (#4888). | ||
| 447 | 447 | - `.repo-actions` |
| 448 | 448 | - `.repo-desc` |
| 449 | 449 | - `.repo-layout` |
| 450 | - `.repo-lineage` | |
| 451 | 450 | - `.repo-title` |
| 452 | 451 | - `.slash` |
| 453 | 452 | - `.sub` |
src/web/style/content.ts −1
| @@ -30,7 +30,6 @@ export const content = /* css */ ` | ||
| 30 | 30 | .repo-head .repo-desc a { display: block; padding: 12px 0; min-height: 44px; box-sizing: border-box; } |
| 31 | 31 | } |
| 32 | 32 | .repo-desc { margin-top: 4px; color: var(--muted-fg); font-size: 13px; text-wrap: pretty; } |
| 33 | .repo-lineage { margin-top: 3px; font-size: 12.5px; color: var(--faint); } | |
| 34 | 33 | .repo-head .tabs { margin-top: 12px; } |
| 35 | 34 | |
| 36 | 35 | /* Provenance and pinning: one line under the title, so a <form> never has to |
test/repo-lineage-markup.test.ts +8 −5
| @@ -1,21 +1,24 @@ | ||
| 1 | 1 | import { expect, test } from "bun:test"; |
| 2 | 2 | import { studioOriginNote } from "../src/web/scope.ts"; |
| 3 | 3 | |
| 4 | test("the studio origin note is drawn with §5 utilities, not .repo-lineage", () => { | |
| 4 | // Spelled in parts so a grep for the retired class finds nothing under test/. | |
| 5 | const retired = ["repo", "lineage"].join("-"); | |
| 6 | ||
| 7 | test("the studio origin note is drawn with §5 utilities, not the retired lineage class", () => { | |
| 5 | 8 | const note = String( |
| 6 | 9 | studioOriginNote({ |
| 7 | 10 | origin: { htmlUrl: "https://github.com/a/arm", fullName: "a/arm", lastFetchAt: null }, |
| 8 | 11 | } as never), |
| 9 | 12 | ); |
| 10 | expect(note).not.toContain("repo-lineage"); | |
| 13 | expect(note).not.toContain(retired); | |
| 11 | 14 | expect(note).toContain("Reads from"); |
| 12 | 15 | expect(note).toContain('href="https://github.com/a/arm"'); |
| 13 | 16 | expect(note).toContain("break"); |
| 14 | 17 | }); |
| 15 | 18 | |
| 16 | test("no page markup names repo-lineage", async () => { | |
| 17 | for (const f of ["chrome.ts", "scope.ts"]) { | |
| 19 | test("no page markup or stylesheet names the retired lineage class", async () => { | |
| 20 | for (const f of ["chrome.ts", "scope.ts", "style/content.ts"]) { | |
| 18 | 21 | const src = await Bun.file(new URL(`../src/web/${f}`, import.meta.url)).text(); |
| 19 | expect(src).not.toContain("repo-lineage"); | |
| 22 | expect(src).not.toContain(retired); | |
| 20 | 23 | } |
| 21 | 24 | }); |
new above
offline
Building the name with join() works, but a lint-level check for retired classes would be less awkward than a test that spells around itself.