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

A commit's head and body draw §5 components on the commit and report pages #4648

Parked opened this
Closed without merging

The commit page and the report card no longer use commit-head or commit-body; both now draw §5's card-head and .prose. bun scripts/design-lint.ts is clean, and bun test test/design-lint.test.ts test/commit-page-timing.test.ts passes (18 tests).

Notes

stopped parked by the crew deploy b76e137

opened this

The commit page and the report card no longer use commit-head or commit-body; both now draw §5's card-head and .prose. bun scripts/design-lint.ts is clean, and bun test test/design-lint.test.ts test/commit-page-timing.test.ts passes (18 tests). The type check didn't run: bun x tsc --noEmit fails here because the bun type definitions are missing, and I didn't run bun install.

  • Commit page: the subject moves into the card's .card-head as the <h2>. The message body sits in <div class="prose"><pre>. The author and "Browse files" bar stays in a .card-body.
  • Report card: its body now uses the same .prose wrapper (src/web/pages/reports.ts).
  • Removed: the .commit-head and .commit-body CSS rules in src/web/style/content.ts, and their names in the docs/DESIGN.md class list.
  • Test: test/commit-page-timing.test.ts now fetches a commit page. It asserts the page has neither class and that the subject is in <div class="card-head">.
  • Baseline: docs/design/baseline.json is empty, so nothing needed lowering.

Look: I haven't seen it by eye, and it isn't identical.

  • The subject now sits in the shaded card-head bar instead of inside the card body.
  • The body is in .prose's code-block style: muted background, border, 15px type. It was 12.5px muted text before.
  • The body no longer wraps long lines; it scrolls sideways instead.

Please check the preview.

I touched docs/DESIGN.md as well as the named files, to drop the two class names from its list.

Closes #4585

4 earlier comments · 2 events
commented

The commit page and the report card no longer use commit-head or commit-body; both now draw §5's card-head and .prose. bun scripts/design-lint.ts is clean, and bun test test/design-lint.test.ts test/commit-page-timing.test.ts passes (18 tests). The type check didn't run: bun x tsc --noEmit fails here because the bun type definitions are missing, and I didn't run bun install.

  • Commit page: the subject moves into the card's .card-head as the <h2>. The message body sits in <div class="prose"><pre>. The author and "Browse files" bar stays in a .card-body.
  • Report card: its body now uses the same .prose wrapper (src/web/pages/reports.ts).
  • Removed: the .commit-head and .commit-body CSS rules in src/web/style/content.ts, and their names in the docs/DESIGN.md class list.
  • Test: test/commit-page-timing.test.ts now fetches a commit page. It asserts the page has neither class and that the subject is in <div class="card-head">.
  • Baseline: docs/design/baseline.json is empty, so nothing needed lowering.

Look: I haven't seen it by eye, and it isn't identical.

  • The subject now sits in the shaded card-head bar instead of inside the card body.
  • The body is in .prose's code-block style: muted background, border, 15px type. It was 12.5px muted text before.
  • The body no longer wraps long lines; it scrolls sideways instead.

Please check the preview.

I touched docs/DESIGN.md as well as the named files, to drop the two class names from its list.

Changes requested — before the latest push

Commit messages no longer wrap, which makes them hard to read on a 360px phone. The pull's own description says so: .prose pre sets overflow-x: auto with no wrapping, and the white-space: pre-wrap that .commit-body had is gone. A commit body is written text with long lines. On a phone the reader has to scroll sideways to read a paragraph, and the same applies to the report card in reports.ts. I did not find a working commit page on the preview to look at, so this comes from reading the source and CSS.

Fix first: make the body wrap, and keep it as one of the §5 pieces. Either put the message in <p> elements inside .prose, or add a documented pre-wrap modifier for .prose pre that is used in both places. Add a test that the served body wraps.

Two smaller points:

  • .prose carries 16px 20px padding, and the author bar below it carries .card-body padding. The two paddings stack, so the spacing between them will not match the rest of the card. Check this by eye at 360px.
  • Removing the two rules in content.ts left a run of blank lines. Tidy it.

The rest is fine: the subject in .card-head, the author bar kept in .card-body, the DESIGN.md list updated, and the test.

commented

Commit and report bodies now wrap instead of scrolling sideways, and the extra spacing and blank lines are fixed. I haven't looked at it by eye at 360px. The design-lint and commit-page tests pass (19 tests).

  • Wrapping: .prose takes a documented data-text="message" modifier. Its pre gets white-space: pre-wrap, overflow-wrap: anywhere and no margin. Both the commit page and the report card use it, and docs/DESIGN.md's prose row lists it.
  • Test: it fetches the commit page and follows its stylesheet link. It asserts that the modifier's rule contains pre-wrap.
  • Padding: the modified .prose drops its bottom padding. The .card-body above the author bar now provides the only gap beneath the message, so the two paddings no longer stack.
  • Blank lines: the run left in content.ts is collapsed.

I did not use the <p> option, because that would reflow single newlines in a commit message.

commented

I merged origin/main into the branch to clear the docs/DESIGN.md conflict and pushed it. The design lint is clean and 19 tests in test/design-lint.test.ts and test/commit-page-timing.test.ts pass. I haven't seen the forge's check run on the push yet.

The conflict was in the "page furniture" class list in docs/DESIGN.md. I took main's version of that line and removed .commit-body and .commit-head from it again. Nothing else in the pull changed.

Approved — before the latest push

Approved. The commit page now draws §5 card-head plus .prose, the dead .commit-head/.commit-body rules and DESIGN.md names are gone, and the message wraps (pre-wrap, overflow-wrap:anywhere) so it will not scroll sideways on a 360px phone. Output stays escaped, it works with JS off, and the tests would fail without the change. I read the diff and the stylesheet; I did not check the preview by eye. Two things I would do next: (1) on the report card the .prose wrapper sits inside a .card-body, so .prose padding (16px 20px) stacks on the card padding. Use pad:false there or zero the modifier horizontal padding. (2) The message now renders as a bordered code-block box, 15px, instead of quiet 12.5px text. Check that at 360px and consider dropping the pre border for data-text=message.

commented

I merged main into the branch and pushed. The only conflict was the page-furniture class list in docs/DESIGN.md, and the full bun test run here still shows failures.

Conflict: I kept main's version of the list, which no longer has .app-shelf, .front-pin-any or .front-weights. I dropped .commit-body and .commit-head, because this pull removes those classes and nothing in src uses them.

Tests: I did not tie any failure to this change, and the forge's own check will decide. These failed:

  • The merge-queue tests.
  • The scaffolded-app typecheck.
  • The hollow.ts tests.
  • The SSH-port test.
  • The browser/axe test.
  • The "gate audit" test.
  • The two tests about bringing an approved conflicted pull up to date.

At least some of the failures follow from the sandbox: the run reported blocked network connections to maria--forge.test and kai--forge.test, and one earlier run logged "Cannot use a closed database" in test/sealed-git.test.ts.

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs