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

The /boards query result draws §5's card and table, and .boards-result leaves the markup #4234

Merged opened this

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

Merged

The `/boards` query result no longer carries `.boards-result` in its HTML. It is now a plain §5 card (`card()` from `src/web/ui.ts`) holding the chart and the §5 `table`. Part two will have to move the old `.boards-result .table { margin-top }` spacing onto this table.

shipped production is serving it deploy 5431a5f

opened this

The /boards query result no longer carries .boards-result in its HTML. It is now a plain §5 card (card() from src/web/ui.ts) holding the chart and the §5 table. Part two will have to move the old .boards-result .table { margin-top } spacing onto this table.

  • Markup change: in src/web/pages/boards.ts I dropped extra: "boards-result" from the card. I added .mt, a §5 spacing class, to the result <table class="table">, so the gap above the table survives without the old rule.
  • What stays the same: the words, links and the pin form's fields are unchanged. The table's cells and the chart's wrapping are untouched. I didn't need .break or any new component.
  • Left alone for part two: the rules in src/web/style/content.ts and docs/DESIGN.md, as the issue asks.
  • Test: a new case in test/boards-page.test.ts asserts that boards-result is absent. It also asserts that the table carries table mt, that its numeric header, the <h2>runs</h2> heading and a data cell are present.
  • Gap in the test: it doesn't assert the pin form's fields, because that form only renders when the user has boards and the test fixture has none.
  • Checks: bun test test/design-lint.test.ts test/boards-page.test.ts passes (42 tests). bun x tsc --noEmit can't run here: it fails with "Cannot find type definition file for 'bun'", even after bun install. The forge's check will cover it.
  • To try it: open /boards/data?source=runs&by=day and view source. There is no boards-result in it.

Closes #4197

commented

The /boards query result no longer carries .boards-result in its HTML. It is now a plain §5 card (card() from src/web/ui.ts) holding the chart and the §5 table. Part two will have to move the old .boards-result .table { margin-top } spacing onto this table.

  • Markup change: in src/web/pages/boards.ts I dropped extra: "boards-result" from the card. I added .mt, a §5 spacing class, to the result <table class="table">, so the gap above the table survives without the old rule.
  • What stays the same: the words, links and the pin form's fields are unchanged. The table's cells and the chart's wrapping are untouched. I didn't need .break or any new component.
  • Left alone for part two: the rules in src/web/style/content.ts and docs/DESIGN.md, as the issue asks.
  • Test: a new case in test/boards-page.test.ts asserts that boards-result is absent. It also asserts that the table carries table mt, that its numeric header, the <h2>runs</h2> heading and a data cell are present.
  • Gap in the test: it doesn't assert the pin form's fields, because that form only renders when the user has boards and the test fixture has none.
  • Checks: bun test test/design-lint.test.ts test/boards-page.test.ts passes (42 tests). bun x tsc --noEmit can't run here: it fails with "Cannot find type definition file for 'bun'", even after bun install. The forge's check will cover it.
  • To try it: open /boards/data?source=runs&by=day and view source. There is no boards-result in it.
Approved

Approved. The result card no longer carries boards-result. The table uses the base.ts .mt utility (12px), the same gap the old rule gave, so there is no visual change. The new test fails without the change. The edit is small and stays in the §5 pieces (card, table, mt). The preview HTML has no boards-result, though I could only fetch it signed out. Two things next: (1) in part two, delete .boards-result from style/content.ts:342 and from the DESIGN.md list at line 396 together, so the design lint stays green; (2) add a pin-form assertion once the fixture has a board, since the test does not cover that form.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs