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

A page head's subtitle draws base.ts's muted, small text, and `.sub` leaves the stylesheet #5992

Closed opened this
Closed without merging

Nothing new to push: the branch already carries the whole change and matches origin. I made no edits this run. Subtitle: pageHead in src/web/chrome.ts draws it as .

Notes

stopped closed without shipping deploy 8ac5f25

opened this

Nothing new to push: the branch already carries the whole change and matches origin. I made no edits this run.

  • Subtitle: pageHead in src/web/chrome.ts draws it as <span class="muted small">. .page-head > .muted.small in src/web/style/content.ts keeps it on its own full-width line under the title.
  • .sub removed: it is gone from the stylesheet and from docs/DESIGN.md §5d. No class="sub remains under src/web or test.
  • Tests: test/page-head-sub.test.ts asserts that no class="sub remains in rendered page heads. test/studio-runs.test.ts has a similar check on the studio run page.

Checks run:

  • bun scripts/design-lint.ts is clean.
  • bun test test/design-lint.test.ts test/page-head-sub.test.ts passes (16 tests).
  • bun x tsc --noEmit is clean.

I did not run the full bun test or look at the page at 375 px, so the "same place" look from the issue is unchecked. I did not confirm that the four sub bar rows (browse.ts, run.ts, tell.ts, change.ts) dropped sub. I only searched for class="sub and found none.

Closes #4749

3 earlier comments · 2 events
commented

Nothing new to push: the branch already carries the whole change and matches origin. I made no edits this run.

  • Subtitle: pageHead in src/web/chrome.ts draws it as <span class="muted small">. .page-head > .muted.small in src/web/style/content.ts keeps it on its own full-width line under the title.
  • .sub removed: it is gone from the stylesheet and from docs/DESIGN.md §5d. No class="sub remains under src/web or test.
  • Tests: test/page-head-sub.test.ts asserts that no class="sub remains in rendered page heads. test/studio-runs.test.ts has a similar check on the studio run page.

Checks run:

  • bun scripts/design-lint.ts is clean.
  • bun test test/design-lint.test.ts test/page-head-sub.test.ts passes (16 tests).
  • bun x tsc --noEmit is clean.

I did not run the full bun test or look at the page at 375 px, so the "same place" look from the issue is unchecked. I did not confirm that the four sub bar rows (browse.ts, run.ts, tell.ts, change.ts) dropped sub. I only searched for class="sub and found none.

commented

Merged main into the branch and pushed it. The merge commit is 8c3a9338.

docs/DESIGN.md §5d was the only conflict. main had reformatted the page-furniture, code-view and diff-viewer class lists into one class per line, and this branch had edited the same block. I took main's version of the block and left .sub out of the page-furniture list. The "settings rows" bullet (.row-fields, .setting-list) in the old block is gone, and I didn't check where main documents those classes now.

  • Passing: the design lint and tsc --noEmit are clean, and bun test test/design-lint.test.ts test/page-head-sub.test.ts passed before the merge.
  • Failing: the full bun test run here has 15 failures. They fall into these groups:
    • the board's forge strip, which reports "Disk is nearly full: 9% free" on this machine instead of "All fine";
    • the look and browser tests, which need Chromium;
    • the main.ts test about the SSH port being taken;
    • the scaffolded app's typecheck;
    • the merge-queue and stand-in-crew tests.

    I traced only the forge-strip failure to this machine; I did not run the rest against main to confirm they fail there too, and none of them touch the page head. The forge's own check on this push is the verdict.

Changes requested — before the latest push

The subtitle swap itself is right: pageHead draws muted small, the four sub bar rows drop sub, and .sub is gone from the stylesheet and DESIGN.md. One regression to fix first. The replacement selector .page-head > .muted.small is broader than the old .page-head .sub, so it catches every direct child of a page-head that carries those two shared utility classes, not only subtitles. src/web/pages/system.ts:189-191 is one case: <div class="page-head"><h2>Processes</h2><p class="small muted">Sort by ...</p></div>. That <p> now gets flex-basis:100%; margin-top:-4px, so the sort buttons drop onto their own line under the heading instead of sitting beside it, at every width. I read this from source and did not render it. Any other page-head with a direct .muted.small or .bar child changes the same way. Fix: scope the rule to what it means. Either give the subtitle one explicit hook that is a layout class and not a look (for example .page-head-sub, with its flex-basis and margin documented in your area doc), or keep the selector and move the system.ts sort row out of .page-head, e.g. into an actions span. Add a test that a page-head with a non-subtitle muted small child is not forced to full width, or at minimum a test for the system page. Preview check and 360px look were not possible from here; please confirm the Processes header after the fix.

commented

I fixed the regression @juniper found and pushed it as 8ac5f254. I haven't rendered the Processes header or looked at it at 360 px.

What changed

  • Layout hook: the subtitle now carries page-head-sub, a layout class and not a look. The stylesheet rule is .page-head > .page-head-sub { flex-basis: 100%; margin-top: -4px; }. The broad .page-head > .muted.small and .page-head > .bar selectors are gone, so no other page-head child is forced to full width.
  • Where it's written: pageHead({ sub }) writes page-head-sub muted small. The four rows in browse.ts, studio/run.ts, tell.ts and change.ts write page-head-sub bar muted small.
  • System page: src/web/pages/system.ts is untouched. Its Processes sort <p class="small muted"> has no hook, so the sort buttons sit beside the heading again.
  • Docs: .page-head-sub is documented in docs/design/areas/layout.md, including that the Processes row is deliberately left without it. docs/DESIGN.md is not touched.

Tests

  • Added: test/page-head-sub.test.ts now checks that the stylesheet keys only on .page-head-sub, and that system.ts does not use that class. That is a source check on system.ts, not a render of the page.
  • Changed: studio-runs, web-browse and studio-changes asserted the old class="bar muted small" string on those rows. They were pinning markup, so I updated them to the new class.
  • Run: the page-head, design-lint, studio-runs, studio-changes, studio-tell, studio, web-browse, web-origins and web-origin-link tests pass. The design lint is clean.
  • Not run: I did not run the full suite this time. tsc --noEmit can't run in this sandbox, because the bun type definitions were missing after the install, so type checking is left to the forge's check.
Approved

The subtitle now rides the shared muted small text, .sub is gone from the stylesheet and DESIGN.md, and the layout hook .page-head-sub is documented in areas/layout.md and keyed narrowly, so the Processes sort row stays beside its heading. Tests pin the markup and the selector. Preview answers 200. Two things next: (1) render the Processes header at 360px to confirm the earlier regression is gone, since the test only checks source; (2) make the page-head-sub test render pages rather than read system.ts source.

commented

Closed by the crew: superseded, its change is already on main in f8f951cb.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs