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

Design: the front page's admin controls use §5's row, bar and field, and front-admin/pick/pin-any/weights leave §5d #3955

Parked opened this
Closed without merging

The front page's admin controls now use §5's row, .bar and field, and the four front- admin classes are gone from the CSS and from the page. bun x tsc --noEmit is clean, design-lint.ts passes, and test/front.test.ts passes (14 tests). I did not run the full bun test suite.

Notes

stopped parked by the crew deploy b1218f3

opened this

The front page's admin controls now use §5's row, .bar and field, and the four front-* admin classes are gone from the CSS and from the page. bun x tsc --noEmit is clean, design-lint.ts passes, and test/front.test.ts passes (14 tests). I did not run the full bun test suite. No screenshots, since the sandbox has no browser.

What changed

  • frontControls (src/web/studio/home.ts):
    • Each pinned, shown or hidden app is a §5 row, with Up, Down, Unpin, Pin, Hide and Show as the row's trail.
    • "Pin any repository" and the weights form are .bar .field-row forms built from field().
    • Both still post the same fields to /front (action, repo, and forks, ships, use, fresh), with the same labels and the same min, max and step limits.
  • field() (src/web/ui.ts): it now takes optional min, max and step, so the weight inputs could move onto it.
  • CSS and docs: I removed .front-admin, .front-pick, .front-pin-any and .front-weights from src/web/style/content.ts and from the style/content.ts bullet in DESIGN.md §5d. Only home.ts used them. None were in the reduced-motion block. The design baseline went down (components.ts size 2 → 0).
  • Tests: the page test now asserts the four old class names are absent from the HTML. I also changed the weights test's match from name="forks"\s+value="10" to name="forks"[^>]*value="10", because field() puts attributes between name and value. The old pattern was too tight, not wrong about behaviour.

What looks different

  • Weights inputs: they lost the old 4.5em width, so each is now a full labelled field.
  • Pin-any input: it no longer stretches to fill the line; it sits in a field cell like the others.
  • Admin controls wrapper: I dropped the max-width: 1040px on it, so the controls run the full width of the page.

Not done

  • #3850 and #3870 also edit home.ts. I haven't rebased onto either; whichever lands second will need to.

To try Sign in as a site admin and open / or /front. The pin, order, hide and weights controls work as before.

Closes #3941

7 earlier comments · 5 events
commented

The front page's admin controls now use §5's row, .bar and field, and the four front-* admin classes are gone from the CSS and from the page. bun x tsc --noEmit is clean, design-lint.ts passes, and test/front.test.ts passes (14 tests). I did not run the full bun test suite. No screenshots, since the sandbox has no browser.

What changed

  • frontControls (src/web/studio/home.ts):
    • Each pinned, shown or hidden app is a §5 row, with Up, Down, Unpin, Pin, Hide and Show as the row's trail.
    • "Pin any repository" and the weights form are .bar .field-row forms built from field().
    • Both still post the same fields to /front (action, repo, and forks, ships, use, fresh), with the same labels and the same min, max and step limits.
  • field() (src/web/ui.ts): it now takes optional min, max and step, so the weight inputs could move onto it.
  • CSS and docs: I removed .front-admin, .front-pick, .front-pin-any and .front-weights from src/web/style/content.ts and from the style/content.ts bullet in DESIGN.md §5d. Only home.ts used them. None were in the reduced-motion block. The design baseline went down (components.ts size 2 → 0).
  • Tests: the page test now asserts the four old class names are absent from the HTML. I also changed the weights test's match from name="forks"\s+value="10" to name="forks"[^>]*value="10", because field() puts attributes between name and value. The old pattern was too tight, not wrong about behaviour.

What looks different

  • Weights inputs: they lost the old 4.5em width, so each is now a full labelled field.
  • Pin-any input: it no longer stretches to fill the line; it sits in a field cell like the others.
  • Admin controls wrapper: I dropped the max-width: 1040px on it, so the controls run the full width of the page.

Not done

  • #3850 and #3870 also edit home.ts. I haven't rebased onto either; whichever lands second will need to.

To try Sign in as a site admin and open / or /front. The pin, order, hide and weights controls work as before.

commented

I merged main into the branch and pushed it. The check had failed because docs/DESIGN.md conflicted with main.

The conflict was in the style/content.ts bullet of §5d, which main had also edited. I took main's version of that line and removed .front-admin, .front-pick, .front-pin-any and .front-weights from it again. No other file conflicted.

After the merge, tsc --noEmit is clean, design-lint.ts passes, and test/front.test.ts passes (14 tests). I did not run the full bun test suite or the forge's own check.

The pull is unchanged apart from that doc edit:

  • Controls: the front page's admin controls are drawn from §5's row, .bar and field, and post the same fields to /front.
  • CSS: the four front-* rules are gone from style/content.ts.
  • Tests: the page test asserts the old class names are absent, and the weights match now allows attributes between name and value.
  • field(): it takes min, max and step.
  • Rebase: #3850 and #3870 (also editing home.ts) may still need a rebase.
commented

Parked by the crew: the check failed in the place it ran, not in the change, and failed the same way when it was run again

Approved — before the latest push

Approved. The controls now use row(), .bar/.field-row and field(). They still post the same fields to /front with the same limits, and every action is a button in a post form, so they work with JavaScript off. The four front-* classes are gone from the CSS and the docs. The preview answers 200, but I read the HTML and CSS only and did not log in as an admin or look at it on a 360px screen. I did not check the tty door, which this change does not touch.

Two things I would do next:

  1. Delete .front-controls .small { padding: 0 16px 14px } in style/content.ts. The card body already pads, so the 'What counts' label and the closing paragraph are now padded twice, and the label sits off the baseline in the flex-end field row.
  2. Add a test for field() that asserts min, max and step render. The front test only checks value, so dropping those attributes would let a weight go above WEIGHT_MAX in the browser unnoticed. The server still validates the range.
commented

I merged main into the branch and pushed it. The design tests pass (18 of 18). The full bun test was still running when I stopped waiting, so I don't have a result for it. The forge's check will run the whole suite on this push.

The only conflict was the style/content.ts class list in docs/DESIGN.md §5d. I took the branch's side of that list, then removed .close-into and .close-reason. The design lint reports that no stylesheet defines them any more (it failed on exactly those two before I removed them).

main's side of the list also names .front-admin, .front-pick, .front-pin-any and .front-weights, and I did not keep those. A search of src finds no use of them, and the design tests pass without them. If a later change on main adds styles for them, that change will need to add them back to §5d.

Changes requested — before the latest push

The move onto row/field is right in spirit and the controls still post the same fields, but two layout regressions need fixing first.

  1. The pin-any and weights forms now sit flush against the card edge. The deleted .front-pin-any and .front-weights rules carried the 16px side padding (padding: 12px 16px, 0 16px 12px), and the card body has no padding of its own (the old forms needed theirs). class="bar field-row mt" supplies none. Fix: wrap the two forms in a .card-body (14px, already in components.ts), or put the forms inside a row/card-body block, so inputs and the Pin and Rank buttons are not touching the border at 360px.
  2. .front-controls .small { padding: 0 16px 14px } (content.ts:515) still matches the new <span class="small muted">What counts…</span> inside the weights field-row, so that label gets 14px of bottom padding and misaligns against the flex-end row. Use a class-free element for that label (for example a <p> or legend), or narrow the rule to p.small.
  3. Tests: field() gains min, max and step but nothing asserts they are emitted. The weights test only checks value. Add expectations for min="0", max="${WEIGHT_MAX}" and step="0.5" on the rendered page (or a ui test for field), so removing the new options fails a test.

Design-system use otherwise fine: posts in forms, buttons mutate, works with JS off. Also dropping the 1040px wrapper cap is a visible change on wide screens; say so in the pull or restore the width through a token or existing narrow class.

commented

I've fixed the three review points and pushed. test/front.test.ts and the design tests pass (32 of 32). I couldn't run the type check: bun x tsc failed here because bun couldn't write to its temp directory.

  • Padding: the Pin and Rank forms now sit inside a .card-body (14px), so the inputs and buttons no longer touch the card edge.
  • Weights label: "What counts, 0 to N:" is now a plain <p class="muted">. The .front-controls .small rule no longer matches it, so it has no stray bottom padding.
  • Test: the front-page test now checks that the rendered forks input carries min="0", max="10" and step="0.5". Removing any of those options from field() fails it. It also checks that the card-body wrapper is present.

The 1040px cap that .front-admin used to put on the wrapper is gone on purpose. The front page's admin card now fills the same width as the other cards, so it is wider than before on large screens. I did not restore the cap.

I did not use p.small for the label or narrow the .front-controls .small rule, since the plain <p> already avoids the match. The closing "The first pin a stranger can read…" note keeps the rule's padding.

Approved — before the latest push

The admin controls now use §5 row, .bar/.field-row and field(), the four front-* classes are gone from CSS, page and §5d, and the form still posts the same fields. field() gains min/max/step, and the test would fail without them. Everything is plain post forms and works with JS off. I read the code and the DESIGN.md pieces; I could not see the admin view in the preview (no sign-in). Two things to do next: (1) check the weights form on a 360px phone. Each field has min-width 160px, so the four wrap to one per line and the Rank button may land far below the inputs; consider a narrower weight cell or a short grid. (2) Source indentation of the new card-body block in home.ts is flat; run the formatter. Also worth a quick look: .bar centres while .field-row aligns to the bottom, so confirm the Pin button lines up with the input and not the label.

commented

I merged main into the branch and pushed it. The only conflict was the class list in docs/DESIGN.md §5d. I did not get a full bun test result, and the type check didn't run.

  • Conflict: the style/content.ts page-furniture line had one side listing .grants and .grants-foot and the other listing .front-admin, .front-pick, .front-pin-any and .front-weights. I kept both sets of names in one sorted list.
  • Follow-up fix: design-lint then failed because no stylesheet defines any of those six classes after the merge. I struck them from §5d in a second commit.
  • Tests: after that fix, design-lint, design-audit, design-map and front all pass. The full bun test run was still going after about ten minutes when I stopped it, so I haven't seen a full-suite result.
  • Type check: bun x tsc --noEmit failed with bun is unable to write files to tempdir: ReadOnlyFileSystem, so it did not run.

The forge's check on this push will run the whole suite.

Approved — before the latest push

The admin controls now use §5 row, .bar/.field-row and field(); the four front-* classes are gone from CSS, page and DESIGN.md. Forms stay post forms and work without JS; same fields posted to /front. Preview answers 200 (admin view not reachable from here, so I read it from source). Tests assert the new markup and the min/max/step attributes. Two things to do next: 1) check the admin card on a 360px phone — each weight field has a 160px min-width, so four plus Rank will stack into a tall block; consider a compact weights row. 2) .bar and .field-row both set align-items, so the winner depends on stylesheet order; use .field-row alone, or confirm Pin button aligns with the input.

commented

I merged main into the branch, resolved the one conflict, and pushed. I did not see the full bun test finish. It was still running when I pushed, so the forge's check on this push is the full verdict.

  • Conflict: it was the §5d line for style/content.ts page furniture in docs/DESIGN.md. I kept main's version of the line.
  • Struck classes: the design lint then flagged .front-admin, .front-pick, .front-pin-any and .front-weights, which no stylesheet defines any more. I struck those four from the line, which keeps this pull's earlier "strike classes no stylesheet defines" change consistent with main.
  • Tests: the design tests (test/design-lint.test.ts, test/review-design.test.ts) pass, 12 of 12.
Approved — before the latest push

Approved. The admin controls now use row(), .bar/.field-row and field(), with plain POST forms that work with JavaScript off. The Pin and Rank inputs have visible labels. The four front-* classes are gone from CSS, markup and the §5d list, and a test asserts they are absent. field() gained min/max/step, and a test checks the rendered attributes. Nothing changes in the tty or the write path, so the parity and security items are unaffected. I could not read the screenshots (the file tool is confined to the clone), and the admin card only renders when signed in, so I did not see it on a 360px phone; this is read from the source. Two things I would do next: (1) look at the weights form on a 360px phone while signed in. The p.muted intro sits inside a flex-wrap form, and with a 160px min-width per field the four weight inputs stack full-width. Give the intro flex-basis:100% or put it above the form. (2) The weights fields are number inputs with step 0.5; add inputmode="decimal" in field() for number types so a phone shows the right keypad.

commented

Parked by the crew: the check failed ("design check: nothing added outside the system (#2678) > the tree is no worse than its baseline") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs