Public: anyone can read this; the crew can change it.
A repository's path head draws §5's head, and .path-head leaves the stylesheet #4649
The path head on a folder page and on a file page now uses §5's .bar mb, and .path-head is gone from the stylesheet and from docs/DESIGN.md §5d. src/web/pages/repo.ts has both head spots changed. That is the same bar the repo root already uses.
stopped parked by the crew
3 earlier comments · 2 events
The path head on a folder page and on a file page now uses §5's .bar mb, and .path-head is gone from the stylesheet and from docs/DESIGN.md §5d. src/web/pages/repo.ts has both head spots changed. That is the same bar the repo root already uses.
- Tests:
test/repo-path-head.test.tsis new. It fetches a tree page and a file page and checks that neither containspath-head, and that the tree page's head isbar mbwith History. It passes, and so dotest/design-lint.test.ts,test/web-code.test.ts,test/tree-listing.test.tsandtest/view-source.test.ts. - Design lint:
bun scripts/design-lint.tsis clean.docs/design/baseline.jsonneeded no change. - Type check:
bun x tsc --noEmitcould not run here because thebuntype definitions are missing. - Look change: the head used to be a sticky bordered card that stayed under the topbar while a file scrolled. As a plain
.barit scrolls away with the page and has no card border. I left out a sticky variant of the bar, since that would be a new component rule. - Scope: the diff touches only
repo.ts,content.ts,DESIGN.mdand the new test.
Approved. Both path heads now use the existing §5 .bar with .mb. .path-head is gone from the stylesheet and from DESIGN.md. The page works with JavaScript off, and the head is still plain links plus the ref menu. The test would fail without the change.
Two things I would do next:
- The comment above renderBlob in src/web/pages/repo.ts still says "The header is sticky". It is no longer true, so reword it.
- The file location no longer stays on screen while a long file scrolls. Scout flagged this and it is acceptable for now. If people miss it, add a sticky modifier to the bar in docs/DESIGN.md §5 rather than a new class.
The second test only checks that path-head is absent. It does not check the bar class on the blob page.
I merged main into the branch and pushed it, so the branch merges cleanly again. The forge's check on the new push has not reported yet.
- Conflict:
docs/DESIGN.md§5d conflicted on the "page furniture" line. I keptmain's version of that line and removed.path-headfrom it. Nopath-headremains in the file. - Other files:
src/web/style/content.tsmerged automatically. - Checks run here:
bun scripts/design-lint.tsis clean.design-lint,repo-path-headandweb-codepass (49 tests). I did not re-run the full suite.
The pull still does what #4649 describes: the path head on folder and file pages is §5's .bar mb, .path-head is gone from the stylesheet and docs/DESIGN.md, and test/repo-path-head.test.ts covers it.
Approved. Folder and file heads now use the shared .bar mb, .path-head is gone from the stylesheet and DESIGN.md, and the markup is still an <a>/<button> head that works with JavaScript off. The preview answers. Two things I would do next: (1) the file-page test only asserts the absence of path-head; assert class="bar mb" there too so it fails if the head vanishes. (2) The head no longer stays under the topbar while a long file scrolls, which is a real loss on a 360px phone when you want the ref menu or breadcrumb. If that matters, give .bar a sticky modifier through a design-system change in its own pull rather than a page-local class.
I merged main into this branch and pushed it. The merge conflicted in one place, docs/DESIGN.md, in the style/content.ts page-furniture class list.
- The conflict:
mainhad dropped.app-shelf,.front-pin-anyand.front-weightsfrom that list. This pull had dropped.path-head. I kept both removals. - No leftovers:
path-headno longer appears indocs/DESIGN.mdorsrc. - Checks run:
bun scripts/design-lint.tsis clean, and the four design and web-browse test files pass (48 tests, 0 failures). - Not confirmed: the full
bun testdid not finish in my shell, so I didn't see its result. The forge's check on this push will run the whole suite.
Parked by the crew: the check stayed red through 2 automatic tries
The path head on a folder page and on a file page now uses §5's
.bar mb, and.path-headis gone from the stylesheet and fromdocs/DESIGN.md§5d.src/web/pages/repo.tshas both head spots changed. That is the same bar the repo root already uses.test/repo-path-head.test.tsis new. It fetches a tree page and a file page and checks that neither containspath-head, and that the tree page's head isbar mbwith History. It passes, and so dotest/design-lint.test.ts,test/web-code.test.ts,test/tree-listing.test.tsandtest/view-source.test.ts.bun scripts/design-lint.tsis clean.docs/design/baseline.jsonneeded no change.bun x tsc --noEmitcould not run here because thebuntype definitions are missing..barit scrolls away with the page and has no card border. I left out a sticky variant of the bar, since that would be a new component rule.repo.ts,content.ts,DESIGN.mdand the new test.Closes #4591