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

A repository's bets list and a bet's page speak the home page's language #9917

Merged opened this

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

Merged

The bets list and a bet's page now render as plain rows with no box. I changed no code this round. The previous pull's check failed on a test I couldn't tie to this change, so I merged the five newer `main` commits into the branch and pushed to get a fresh check run.

shipped production is serving it deploy 9e8c29c

opened this

The bets list and a bet's page now render as plain rows with no box. I changed no code this round. The previous pull's check failed on a test I couldn't tie to this change, so I merged the five newer main commits into the branch and pushed to get a fresh check run.

What changed

  • /:owner/:name/bets is one row() per bet in ul.list.setting-list[data-bets], with no card( and no class="card. The share and next action are in the row's meta.
  • For the owner, a proposed bet shows its journeys and issue count under the row. Journeys keep their "N more" <details>, and the Back it at N%, Change the share and Cut it actions are there too.
  • A finished bet's "This is done. Try it." is a heading and a line in a settings-block, with no box.
  • data-bet-card stays as the test hook, now on the row's <li>.
  • Every POST keeps its action and its flash, and the pages stay script-free.
  • One CSS selector in components.ts gives [data-bets] rows the full-width lower part, as [data-origins] does. It adds no new class, and docs/design/areas/bets.md records it.

Tests

  • test/bets.test.ts now asserts there is no class="card on the list (as owner and as reader) or on a finished bet's page.
  • test/bets-card-fit.test.ts changed only where it asserted the old box. The 390 px fit measurements are kept, but no Chromium starts in my sandbox, so those 2 tests were skipped here and not run.

Why the last check failed

  • The forge reported 1 of 12446 tests red: "a guest never meets a dead redirect chain, a doubled title or a non-HTML 404" in test/guest-crawl.test.ts.
  • That crawl never visits a bets page, and it passes here, before and after the merge.
  • I suspect a flake under load, but I couldn't confirm it. If it fails again, treat it as a separate problem.

Checks before the push

  • scripts/gate.ts, tsc --noEmit and design-lint are clean.
  • bets, bets-card-fit and guest-crawl give 43 pass and 0 fail.
  • A wider run of 94 related test files had 3 failures, all in the "the look" capture tests. They need a working Chromium, which this sandbox doesn't allow. I didn't run them on main to compare.
  • I did not run the full suite. scripts/fast.ts said the diff reaches 1343 test files, so I left that to the forge.

Left out

  • The [data-bet-card] rules for h2 and p in content.ts are now partly dead. I left them alone.
  • I attached no new desk or phone looks.

To try it Open /preview-admin/sample/bets on the preview.

Closes #9859

commented

The bets list and a bet's page now render as plain rows with no box. I changed no code this round. The previous pull's check failed on a test I couldn't tie to this change, so I merged the five newer main commits into the branch and pushed to get a fresh check run.

What changed

  • /:owner/:name/bets is one row() per bet in ul.list.setting-list[data-bets], with no card( and no class="card. The share and next action are in the row's meta.
  • For the owner, a proposed bet shows its journeys and issue count under the row. Journeys keep their "N more" <details>, and the Back it at N%, Change the share and Cut it actions are there too.
  • A finished bet's "This is done. Try it." is a heading and a line in a settings-block, with no box.
  • data-bet-card stays as the test hook, now on the row's <li>.
  • Every POST keeps its action and its flash, and the pages stay script-free.
  • One CSS selector in components.ts gives [data-bets] rows the full-width lower part, as [data-origins] does. It adds no new class, and docs/design/areas/bets.md records it.

Tests

  • test/bets.test.ts now asserts there is no class="card on the list (as owner and as reader) or on a finished bet's page.
  • test/bets-card-fit.test.ts changed only where it asserted the old box. The 390 px fit measurements are kept, but no Chromium starts in my sandbox, so those 2 tests were skipped here and not run.

Why the last check failed

  • The forge reported 1 of 12446 tests red: "a guest never meets a dead redirect chain, a doubled title or a non-HTML 404" in test/guest-crawl.test.ts.
  • That crawl never visits a bets page, and it passes here, before and after the merge.
  • I suspect a flake under load, but I couldn't confirm it. If it fails again, treat it as a separate problem.

Checks before the push

  • scripts/gate.ts, tsc --noEmit and design-lint are clean.
  • bets, bets-card-fit and guest-crawl give 43 pass and 0 fail.
  • A wider run of 94 related test files had 3 failures, all in the "the look" capture tests. They need a working Chromium, which this sandbox doesn't allow. I didn't run them on main to compare.
  • I did not run the full suite. scripts/fast.ts said the diff reaches 1343 test files, so I left that to the forge.

Left out

  • The [data-bet-card] rules for h2 and p in content.ts are now partly dead. I left them alone.
  • I attached no new desk or phone looks.

To try it Open /preview-admin/sample/bets on the preview.

Changes requested — before the latest push

The rows render without card() and every POST is unchanged, but three things need fixing in one round. (1) Dead CSS: src/web/style/content.ts lines 183-185 still target [data-bet-card] h2 and p (no h2 or p is rendered there now), and line 185 puts max-height:80vh with overflow-y:auto on the row's <li>, so a bet row scrolls inside the list instead of the page. Remove the dead h2/p selectors and decide the height bound deliberately; the fit test must still check 390 px. (2) The new CSS rule duplicates the [data-origins] rule; extend that selector instead of copying the declaration. (3) test/bets.test.ts ends with a filler assertion, expect(p.id).toBeTruthy(), and an unused p; drop it. The two 390 px fit tests were skipped in the builder's sandbox, so nothing has measured the row at phone width; attach fresh phone and desktop looks of /preview-admin/sample/bets.

commented

I fixed the three review points and pushed; I did not attach phone or desktop looks of /preview-admin/sample/bets. I can't run a browser here, so the two 390 px fit tests are still skipped in this sandbox. Nothing has measured the row at phone width yet; the preview deployed from this push is the place to look.

What changed

  • Row height bound: the max-height: 80vh / overflow-y: auto rule on [data-bet-card] is gone, so the row no longer scrolls inside the list. The bound now sits on what a disclosure opens: [data-bet-card] details ul { max-height: 40vh; overflow-y: auto }. A long issue list scrolls inside its own <details>, and the page scrolls for everything else.
  • Dead CSS: I removed the [data-bet-card] h2 selector from content.ts.
  • Duplicated rule: I deleted the copied [data-bets] rule and added , .setting-list[data-bets] > li.has-after > .row-after to the existing [data-origins] selector in components.ts.
  • Filler assertion: fresh2("Boxless") is now called without binding it, and the expect(p.id).toBeTruthy() line is gone.
  • Tests and docs: the #9321 bound test in test/bets-card-fit.test.ts now asserts that the row has no max-height and that the disclosure list is bounded under 844 px. The 390 px measurement tests are unchanged. docs/design/areas/bets.md describes the new bound.

One disagreement I kept [data-bet-card] p in content.ts. The row's lower part still renders <p class="muted"> for "No issues yet." and for the back-it note, so that rule is live.

Checks tsc, scripts/gate.ts and design-lint are clean, and bets, bets-card-fit, design-lint and origins-page-shape give 72 pass and 0 fail.

Approved

Earlier asks are met. The row-level max-height now sits on the disclosure lists. The dead h2 rule is gone. The [data-bets] rule is folded into the [data-origins] selector. The filler assertion is removed. The preview serves /preview-admin/sample/bets with no class="card and the list is ul.setting-list[data-bets]. Non-blocking: 1) The 390 px fit tests are skipped without Chromium, so no one has measured the row at phone width. Check the phone look once. 2) Attach looks of the bets page to the next pull in this area.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs