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

A repository's tree and blob path head draws §5 components, and no class="path-head" remains in src/web/pages/repo.ts #4720

opened this

Merged 43d 8h ago, live in production

The tree's and the blob's path heads in src/web/pages/repo.ts are now , and no class="path-head" remains in that file. I did not check the one-line-wide / wrapping-at-420px layout in a browser.

Notes

opened this

The tree's and the blob's path heads in src/web/pages/repo.ts are now <div class="bar mb">, and no class="path-head" remains in that file. I did not check the one-line-wide / wrapping-at-420px layout in a browser. bar is the existing flex-wrap row (display: flex; flex-wrap: wrap; gap: 8px), so the breadcrumb and actions should sit on one line on a wide screen and wrap under each other on a narrow one.

  • Markup: The ref menu, the breadcrumb links, the spacer and the buttons (History, Raw, Edit, the lines-and-size note and the Source/Rendered switch) are unchanged.
  • Tests: test/path-head.test.ts is new. It fetches a tree page and a file page and asserts the breadcrumb and Raw links are present, class="bar mb" is used and path-head is absent. It passes. bun test test/design-lint.test.ts passes and bun scripts/design-lint.ts is clean, so I left baseline.json as it was.
  • Type check: bun x tsc --noEmit reported only Cannot find type definition file for 'bun', so it did not check anything here.
  • Left out: I did not touch the stylesheet or docs/DESIGN.md. The .path-head rule in style/content.ts and its docs/DESIGN.md entry are now dead and go in the follow-up, as the issue says.
  • Behaviour change: The old .path-head was sticky under the top bar and sat on a card background. A plain bar scrolls away with the page, and restoring the sticky head would need a rule in the stylesheet.

To try it, open any /<owner>/<repo>/tree/<ref>/<dir> or /blob/<ref>/<file> page.

Closes #4692

commented

The tree's and the blob's path heads in src/web/pages/repo.ts are now <div class="bar mb">, and no class="path-head" remains in that file. I did not check the one-line-wide / wrapping-at-420px layout in a browser. bar is the existing flex-wrap row (display: flex; flex-wrap: wrap; gap: 8px), so the breadcrumb and actions should sit on one line on a wide screen and wrap under each other on a narrow one.

  • Markup: The ref menu, the breadcrumb links, the spacer and the buttons (History, Raw, Edit, the lines-and-size note and the Source/Rendered switch) are unchanged.
  • Tests: test/path-head.test.ts is new. It fetches a tree page and a file page and asserts the breadcrumb and Raw links are present, class="bar mb" is used and path-head is absent. It passes. bun test test/design-lint.test.ts passes and bun scripts/design-lint.ts is clean, so I left baseline.json as it was.
  • Type check: bun x tsc --noEmit reported only Cannot find type definition file for 'bun', so it did not check anything here.
  • Left out: I did not touch the stylesheet or docs/DESIGN.md. The .path-head rule in style/content.ts and its docs/DESIGN.md entry are now dead and go in the follow-up, as the issue says.
  • Behaviour change: The old .path-head was sticky under the top bar and sat on a card background. A plain bar scrolls away with the page, and restoring the sticky head would need a rule in the stylesheet.

To try it, open any /<owner>/<repo>/tree/<ref>/<dir> or /blob/<ref>/<file> page.

commented

I deleted the unused names and once helpers from test/path-head.test.ts and pushed. A stray double blank line is left where they were. Both tests still pass.

The sticky path head is still lost on long files, as the pull says. The follow-up that removes .path-head from src/web/style/content.ts and docs/DESIGN.md is still to do.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs