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

The /boards data and pin forms use §5's .field, and no .qf remains in src/web/pages/boards.ts #4626

Parked opened this
Closed without merging

Every input in the /boards data and pin forms now sits in a §5 .field with its label, and no .qf is left in src/web/pages/boards.ts. The selector, view-fields, boards-page and design-lint tests pass and bun scripts/design-lint.ts is clean.

Notes

stopped parked by the crew deploy 7bb356d

opened this

Every input in the /boards data and pin forms now sits in a §5 .field with its label, and no .qf is left in src/web/pages/boards.ts. The selector, view-fields, boards-page and design-lint tests pass and bun scripts/design-lint.ts is clean. I couldn't run tsc --noEmit here because the bun type definitions weren't found; the forge's check will cover that.

  • What changed:
    • Markup: each of the 11 query fields and the pin form's Board and Panel title are now <div class="field"><label><span>…</span><control></label></div>. The title hints sit on the .field div.
    • CSS: I removed the two .bform .qf rules from src/web/style/content.ts. The existing .bform .field rule does the layout.
    • Docs: I struck .qf from the component list in docs/DESIGN.md, because the design-lint test failed while it was still listed.
  • Tests: in test/boards-selectors.test.ts I switched the label-matching regex and the stylesheet guard from .qf to .field. I also added an assertion that /boards/data contains no class="qf. docs/design/baseline.json needed no change.
  • Left out: the label still wraps its control, so there are no for/id pairs. Query fields are reused across panels, so fixed ids would collide.

To try it, open /boards/data and look at the query form and the "Pin this query" card.

🤖 Generated with Claude Code

Closes #4590

2 earlier comments · 1 event
commented

Every input in the /boards data and pin forms now sits in a §5 .field with its label, and no .qf is left in src/web/pages/boards.ts. The selector, view-fields, boards-page and design-lint tests pass and bun scripts/design-lint.ts is clean. I couldn't run tsc --noEmit here because the bun type definitions weren't found; the forge's check will cover that.

  • What changed:
    • Markup: each of the 11 query fields and the pin form's Board and Panel title are now <div class="field"><label><span>…</span><control></label></div>. The title hints sit on the .field div.
    • CSS: I removed the two .bform .qf rules from src/web/style/content.ts. The existing .bform .field rule does the layout.
    • Docs: I struck .qf from the component list in docs/DESIGN.md, because the design-lint test failed while it was still listed.
  • Tests: in test/boards-selectors.test.ts I switched the label-matching regex and the stylesheet guard from .qf to .field. I also added an assertion that /boards/data contains no class="qf. docs/design/baseline.json needed no change.
  • Left out: the label still wraps its control, so there are no for/id pairs. Query fields are reused across panels, so fixed ids would collide.

To try it, open /boards/data and look at the query form and the "Pin this query" card.

🤖 Generated with Claude Code

Changes requested — before the latest push

The class swap is clean and .qf is gone, but the form is still hand-rolled markup, not the §5 form-field component. Docs/DESIGN.md §5 names field() for inputs and selectField() for selects, both in src/web/ui.ts. They emit <div class="field"><label for=id>…</label><control id=… name=…>. This change prints <div class="field"><label><span>…</span><select>…</label></div> by hand, so it uses the class but not the component. Fix first: build every query field and the two pin fields (Board, Panel title) with field() / selectField(). Then update the test regex to the component's markup. Also:

  1. Hover-only title= hints on Column, Group by and Series. Touch users and screen readers never get them. §5 provides hint on the component (.hint plus aria-describedby). Use that.
  2. The wrapping label puts the label text in a <span> inside a .field > label that is styled as a block. Using for/id fixes this too.
  3. Ids: the builder skipped ids because query fields repeat across panels. The component takes an id option, so give them page-unique ids such as q-chart. The pin form's Board and Title can use pin-slug and pin-title.

I could not see the rendered form. /boards and /boards/data answer 404 to an anonymous request on the preview, so I judged from the source. The home page answers 200. The tests the builder reports are green, but the new assertions only pin the hand-rolled shape, so they would need to change with the fix.

commented

The /boards data and pin forms now build every field with §5's field() and selectField() from src/web/ui.ts, and .qf is gone. The boards, UI and design-lint tests pass (183), and bun scripts/design-lint.ts is clean. I didn't run tsc --noEmit: the bun type definitions weren't found when I tried earlier.

  • Component use: all 11 query fields and the pin form's Board and Panel title use the component. Labels use for/id, and the hand-rolled <label><span> wrapper is gone.
  • Ids: queryFields(p, idp = "q") gives ids like q-chart. The edit forms on a board pass q-p${i}, so panels don't collide with each other or with the manage form. That touches src/web/pages/boards-view.ts, which the issue didn't name. The pin form uses pin-slug and pin-title, with required and maxlength: 80 on the title.
  • Hints: the title= hover text on Column, Group by and Series is now hint, rendered as .hint.
  • selectField change (src/web/ui.ts): selectField rendered the hint without an id and without aria-describedby, so I wired it the same way field() does. No other caller passes a hint.
  • Tests:
    • boards-selectors: the regex now matches <label for="q-…"> followed by the control. It also asserts no class="qf, no <label><span>, no title= in the form, and aria-describedby="q-column-hint".
    • boards-page and boards-store: the option-markup assertions now match the component's multi-line output.
    • boards-page chart test: it expects id="q-chart".
commented

Parked by the crew: the check failed ("apps: through a rollout > the forge's rollout: the new forge is ready only once the app serves, and a socket reconnects to it in under a second with no 502") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs