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

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

Merged opened this

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

Merged

The front page's admin controls are now drawn from §5's row, .bar and field (plus btn), and the old names are gone from the stylesheet and the design doc. bun test test/front.test.ts test/design-lint.test.ts, bun x tsc --noEmit, bun scripts/gate.ts --fix and bun scripts/design-lint.ts all pass.

Notes

opened this

The front page's admin controls are now drawn from §5's row, .bar and field (plus btn), and the old names are gone from the stylesheet and the design doc. bun test test/front.test.ts test/design-lint.test.ts, bun x tsc --noEmit, bun scripts/gate.ts --fix and bun scripts/design-lint.ts all pass. I did not run scripts/similar.ts. I added no new function, so there was nothing to reuse.

What changed

  • Row: each entry in frontControls (src/web/studio/home.ts) is a plain <li class="row">.
  • Action forms: the Up, Down, Unpin, Pin, Hide and Show forms are .bar.
  • Weights: the four weight inputs are .field blocks with a <label for> and an id. They sit in the existing .bar and still post forks, ships, use and fresh.
  • Forms: every form still posts the same fields to /front.
  • .front-admin and .front-pick: both are removed from src/web/style/content.ts and from docs/design/areas/front.md. That file is where they were listed, because docs/DESIGN.md §5d never named them. I also changed .card[data-front-settings] label .input to .field .input so the number inputs keep their width.
  • Test: in test/front.test.ts, the admin /front page must not contain front-admin, front-pick, front-pin-any or front-weights. Its forms must still post action,repo and action,forks,ships,use,fresh.

Left out or different

  • .front-pin-any and .front-weights were never in the code or the docs, so the test only guards against them coming back.
  • Visual change on the front page: without .front-admin, the controls under the shelf lose their 1040px cap and centring. They now fill .door-section's width. I did not add a replacement rule.
  • Visual change on the front page: the Up, Down and Unpin buttons in each row now sit in .bar forms rather than form.inline, so their spacing may differ slightly.
  • I did not look at it in a running preview.
  • Dependencies: I did not check whether #4063 or the featured-app change had landed. The branch rebased cleanly onto main.

Try it: sign in as a site admin, open /front, then pin, hide and re-rank an app.

[
  {"go": "/front", "look": "the front page controls under the shelf, signed in as a site admin", "expect": "pinned and shown apps are rows with Up/Down/Unpin or Pin/Hide buttons at the end; a Pin-by-name bar; a bar of four labelled weight fields and Rank"},
  {"go": "/front", "look": "press Up on the second pin", "expect": "the page reloads with that pin moved first"}
]

Closes #4085

Show 1 earlier items

7 earlier comments
commented

<!-- look-pages 17ccef972765 --> Look pages for 17ccef9, from the gate:

  • look pages (inferred): this pull changes src/web/studio/home.ts, src/web/style/content.ts; the forge pictures / (src/web/studio/home.ts), /docs (src/web/studio/home.ts), /explore (src/web/studio/home.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

No code change this round. The comment from the gate says which pages it will picture: /, /docs, /explore and 28 more, the routes that import home.ts. It asks for nothing, so I pushed nothing.

I could narrow the sweep to /front with a Looks: line in a commit message. I left it alone because the gate's own picture is signed out, and the controls only show to a site admin, so a /front look would not show them either. The other pages would still show whether home.ts and the stylesheet render as before.

The review block in my last message still stands:

[
  {"go": "/front", "look": "the front page controls under the shelf, signed in as a site admin", "expect": "pinned and shown apps are rows with Up/Down/Unpin or Pin/Hide buttons at the end; a Pin-by-name bar; a bar of four labelled weight fields and Rank"},
  {"go": "/front", "look": "press Up on the second pin", "expect": "the page reloads with that pin moved first"}
]
commented

I fixed the padding problem and pushed it. I did not look at /front as an admin at 360px or at desktop width. The sandbox can only reach the forge's apps, and none of them gives me an admin session, so the row-height check below is by reading the CSS only.

The fix: the three .card[data-front-settings] .bar rules in src/web/style/content.ts now start .card[data-front-settings] .list ~ .bar. That matches only the Pin-by-name and weights bars, which sit after the list. The Up, Down, Unpin, Pin, Hide and Show forms sit inside each row's li, so they are no longer matched. That means no 12px/16px padding on them, and the nowrap and flex: 1 rules don't reach their hidden repo input. Each row should stay one line high, but that is the part I couldn't confirm in a preview.

The test: test/front.test.ts now reads content.ts and fails if any unscoped front-settings] .bar rule comes back. I put the check on the source file because I wasn't sure the stylesheet is served inline on the page. bun test test/front.test.ts test/design-lint.test.ts, bun x tsc --noEmit, the gate and the design lint all pass.

Width: the controls still have no 1040px cap or centring. I haven't seen how the desktop width reads, so please check it in the preview. If it reads wrong, I'll add the cap back as a rule scoped to [data-front-settings].

Looks: the commit carries a Looks: /front line, so the gate pictures /front and not the 31 inferred pages. That picture is signed out and won't show the controls either.

[
  {"go": "/front", "look": "signed in as a site admin, at 360px wide", "expect": "each pin row is one line high: the name, then Up/Down/Unpin with no extra padding; the Pin-by-name bar and the weights bar keep their padding"},
  {"go": "/front", "look": "the same page at desktop width", "expect": "the controls fill the section's width; say if that reads wrong against the shelf above"}
]
commented

<!-- look-pages df40f2e56e45 --> Look pages for df40f2e, from the gate:

  • look pages (inferred): "Looks: /front" is not a page of app.looks in forge.json; this pull changes src/web/studio/home.ts, src/web/style/content.ts; the forge pictures / (src/web/studio/home.ts), /docs (src/web/studio/home.ts), /explore (src/web/studio/home.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

The padding-scope test now reads the stylesheet the page links to instead of the CSS source file, so renaming the selector can't slip past it. That was juniper's second suggestion. tsc and test/front.test.ts pass. I pushed that single change as f93f56376.

I didn't act on juniper's first suggestion, the 360px phone and wide-desktop check as an admin, because I can't sign in as an admin from this sandbox. Nobody has looked at the controls at either width. If they read wider than the shelf above on a big screen, the fix is one rule scoped to [data-front-settings].

The latest commit's message includes Looks: /front. That line overrides the gate's inferred look pages, so the forge pictures /front rather than the 31 pages that import the changed files.

Review

[
  {"go": "/front (signed in as a site admin, 360px wide)", "look": "the Pin-by-name and weights bars, and the Up/Down/Unpin/Pin/Hide/Show buttons in each row", "expect": "the two bars are padded and the Pin-by-name input fills its bar; the row buttons are unpadded and stay on one line"},
  {"go": "/front (signed in as a site admin, wide desktop)", "look": "the controls' width against the shelf above them", "expect": "no wider than the shelf; if wider, add one rule scoped to [data-front-settings]"}
]
commented

<!-- look-pages f93f56376695 --> Look pages for f93f563, from the gate:

  • look pages (inferred): "Looks: /front" is not a page of app.looks in forge.json; this pull changes src/web/studio/home.ts, src/web/style/content.ts; the forge pictures / (src/web/studio/home.ts), /docs (src/web/studio/home.ts), /explore (src/web/studio/home.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

The gate's look-pages note was telling me my Looks: /front line had no effect. /front wasn't in app.looks in forge.json, so the forge ignored the line and fell back to inferring 31 pages.

I added /front to app.looks and app.looksAsOwner in forge.json, pushed as 2b5662d93. The gate now reports "look pages (named)" for this push. The forge will take its look at /front signed in as the owner, so the admin controls are drawn. tsc is clean. I ran only the gate and tsc, since the change is configuration. The /front test passed in the last push.

I haven't seen the page at 360px or on a wide desktop. That is the open item from juniper's review.

Review

[
  {"go": "/front (signed in as a site admin, 360px wide)", "look": "the Pin-by-name and weights bars, and the Up/Down/Unpin/Pin/Hide/Show buttons in each row", "expect": "the two bars are padded and the Pin-by-name input fills its bar; the row buttons are unpadded and stay on one line"},
  {"go": "/front (signed in as a site admin, wide desktop)", "look": "the controls' width against the shelf above them", "expect": "no wider than the shelf; if wider, add one rule scoped to [data-front-settings]"}
]
commented

The preview deploy failed because my two earlier look-page commits pushed app.looks in forge.json to 33 paths, and the limit is 32. I reverted those edits, so forge.json is back to the version before them.

Adding /front to the looks was the wrong fix. /front is already listed in test/forge-looks.test.ts as deliberately not pictured, because all 32 look slots are taken. I first tried swapping /front in for /looks/missing. That fixed the count but failed two tests in test/forge-looks.test.ts, one of which requires /looks/missing. I dropped that swap too.

/front stays out of the looks. The change is covered by test/front.test.ts, and the latest commit's message carries a No look: line saying so. I pushed this as 1a1fc3590. The gate, tsc, test/forge-looks.test.ts and test/front.test.ts pass (26 tests). The forge runs the full check on the push.

Nobody has looked at /front as an admin at 360px or on a wide desktop. juniper raised that earlier, and I can't sign in as an admin from here.

Review

[
  {"go": "/front (signed in as a site admin, 360px wide)", "look": "the Pin-by-name and weights bars, and the Up/Down/Unpin/Pin/Hide/Show buttons in each row", "expect": "the two bars are padded and the Pin-by-name input fills its bar; the row buttons are unpadded and stay on one line"},
  {"go": "/front (signed in as a site admin, wide desktop)", "look": "the controls' width against the shelf above them", "expect": "no wider than the shelf; if wider, add one rule scoped to [data-front-settings]"}
]
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs