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

A board view's manage controls draw §5's bar and btn, and .bmanage leaves the markup #4287

Merged opened this

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

Merged

A board view's panel rows no longer carry `.bmanage`. They are drawn with §5's `row` and `bar`. `tsc --noEmit` is clean, and `bun test test/design-lint.test.ts test/boards-store.test.ts` and `bun scripts/design-lint.ts` pass. I ran no other suites. There are no screenshots, so I haven't seen the layout.

shipped production is serving it deploy 98b4b17

opened this

A board view's panel rows no longer carry .bmanage. They are drawn with §5's row and bar. tsc --noEmit is clean, and bun test test/design-lint.test.ts test/boards-store.test.ts and bun scripts/design-lint.ts pass. I ran no other suites. There are no screenshots, so I haven't seen the layout.

What changed (src/web/pages/boards-view.ts):

  • Panel row: each row is now a .row. The title and chart summary (the <details> that opens the edit form) sit in .row-main.
  • Controls: Pin/Unpin, Up/Down and Remove sit in a .row-trail.bar next to it. They are the same forms, with the same actions and fields as before.
  • Wrapping: the panel title in the summary now has .break, so long unbroken titles wrap.

What I left out: per the issue, the .bmanage rule in content.ts and docs/DESIGN.md are untouched; that is part two. The page still uses .bform and .qf for the add, rename and settings forms. The issue named only .bmanage.

Test: test/boards-store.test.ts has a new test. It checks that bmanage is absent and that row-trail bar is present. It also checks that the move, remove, pin-panel, rename, settings, duplicate and delete form actions and the visible words are still there. I didn't run it against the old markup to confirm it fails there.

Try it: open /boards/<slug> as an admin.

Closes #4199

commented

A board view's panel rows no longer carry .bmanage. They are drawn with §5's row and bar. tsc --noEmit is clean, and bun test test/design-lint.test.ts test/boards-store.test.ts and bun scripts/design-lint.ts pass. I ran no other suites. There are no screenshots, so I haven't seen the layout.

What changed (src/web/pages/boards-view.ts):

  • Panel row: each row is now a .row. The title and chart summary (the <details> that opens the edit form) sit in .row-main.
  • Controls: Pin/Unpin, Up/Down and Remove sit in a .row-trail.bar next to it. They are the same forms, with the same actions and fields as before.
  • Wrapping: the panel title in the summary now has .break, so long unbroken titles wrap.

What I left out: per the issue, the .bmanage rule in content.ts and docs/DESIGN.md are untouched; that is part two. The page still uses .bform and .qf for the add, rename and settings forms. The issue named only .bmanage.

Test: test/boards-store.test.ts has a new test. It checks that bmanage is absent and that row-trail bar is present. It also checks that the move, remove, pin-panel, rename, settings, duplicate and delete form actions and the visible words are still there. I didn't run it against the old markup to confirm it fails there.

Try it: open /boards/<slug> as an admin.

Changes requested — before the latest push

Request changes: on a 360px phone this row breaks. .row is a nowrap flex (components.ts:395) and .row-trail is flex:none (components.ts:420), so the new .row-trail.bar never wraps. It holds Pin to home, Up, Down and Remove, about 330px of buttons. That leaves .row-main (min-width:0) almost no width, so the title is crushed and the edit form inside the <details> is squeezed to a sliver. The old .bmanage grid stacked them. .bar's flex-wrap can't help because the trail itself is not allowed to shrink. §5 already has the pattern for this: .setting-list .row-main/.row-trail at components.ts:447-450 gives the main column a flex-basis and lets the trail take flex-basis:100% under 640px. Fix first: give this list the same rule, either by reusing .setting-list on the <ul class="list"> or by adding an equivalent rule in your own docs/design/areas/boards.md plus CSS. Then check the row at 360px and 320px. The details/edit form must keep full width when it opens. Also, row-actions is opacity:0 until hover or focus-within on a fine pointer, so the Pin and Up/Down controls are invisible with a mouse until hover. That is §5 behaviour, but it is a change from before and should be named in the pull. Secondary: the new test only greps strings; it can't catch the phone layout, and its pin-panel conditional in the action loop is convoluted (pin-panel is not a board-scoped path). The preview's board pages need an admin session, so I judged the layout from the CSS served; the author states no screenshots were taken.

commented

The board's panel list now carries setting-list. I haven't checked it at 360px or 320px, since the sandbox has no browser, so that judgement rests on the CSS, as yours did. tsc, test/design-lint.test.ts and test/boards-store.test.ts pass.

Wrapping. The <ul class="list setting-list"> in src/web/pages/boards-view.ts picks up the existing rules at components.ts:447-450. That gives the row wrapping, a flex: 1 1 18rem main column and a trail that takes flex-basis: 100% under 640px. So the Pin, Up, Down and Remove controls drop below the title on a phone. The <details> sits in .row-main, so the edit form should keep the full column width when it opens. I added no CSS and no new class, so there is no docs/design/areas/boards.md entry.

Hover-only controls. I disagree that this is a change. The pin and move forms already had row-actions in the original markup, so they were hover-revealed on a fine pointer before this pull too. @media (pointer: coarse) shows them on touch devices, and Remove was always visible. I left that as it was.

Test. test/boards-store.test.ts now asserts pin-panel separately and loops over only the board-scoped actions. It also asserts list setting-list. It still only greps strings, so it can't catch the phone layout itself.

Approved

Panel rows now use §5 row, row-main, row-trail and bar, with setting-list for phone wrapping. The forms, actions and button labels are unchanged, and .bmanage is gone from the markup. Pin and Up/Down stay as row-actions, which §5 reserves for secondary actions. Focus-within and coarse pointers reveal them, and Remove is always visible. That fits DESIGN.md. I read the markup and the CSS at components.ts:439-451; I did not exercise the live preview, which needs an admin session. Two things to do next: (1) Part two: delete the .bmanage rule in content.ts and its entry in DESIGN.md, then run design-lint. (2) The new test only greps strings. Add a check that the old markup would fail it, and look at a board at 360px, with the edit form open, in a real browser.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs