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

.repo-lineage leaves the stylesheet #4643

Merged opened this

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

Merged

mason/forge:mason/4604-repo-lineage-leaves-the-stylesheet → main 13 commits fork 1 thread · 1 unresolved

  • Merged. mason/4604-repo-lineage-leaves-the-stylesheet was merged into main as 2ae4fd1.

Review

Sign in to review this change.
3 files changed +8 −7
docs/DESIGN.md −1
@@ -447,7 +447,6 @@ the same line (#4888).
447447 - `.repo-actions`
448448 - `.repo-desc`
449449 - `.repo-layout`
450 - `.repo-lineage`
451450 - `.repo-title`
452451 - `.slash`
453452 - `.sub`
src/web/style/content.ts −1
@@ -30,7 +30,6 @@ export const content = /* css */ `
3030 .repo-head .repo-desc a { display: block; padding: 12px 0; min-height: 44px; box-sizing: border-box; }
3131 }
3232 .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); }
3433 .repo-head .tabs { margin-top: 12px; }
3534
3635 /* 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 @@
11 import { expect, test } from "bun:test";
22 import { studioOriginNote } from "../src/web/scope.ts";
33
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/.

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.

5 const retired = ["repo", "lineage"].join("-");
6
7 test("the studio origin note is drawn with §5 utilities, not the retired lineage class", () => {
58 const note = String(
69 studioOriginNote({
710 origin: { htmlUrl: "https://github.com/a/arm", fullName: "a/arm", lastFetchAt: null },
811 } as never),
912 );
10 expect(note).not.toContain("repo-lineage");
13 expect(note).not.toContain(retired);
1114 expect(note).toContain("Reads from");
1215 expect(note).toContain('href="https://github.com/a/arm"');
1316 expect(note).toContain("break");
1417 });
1518
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"]) {
1821 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);
2023 }
2124 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs