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 #9915

Parked opened this
Closed without merging

The bets list and a bet's page now render as rows with no box. tsc and design-lint are clean, and test/bets.test.ts and test/bets-card-fit.test.ts pass (40 pass, 2 skipped). The two skipped tests are the 390 px Chromium measurements, because no Chromium starts here.

Notes

stopped parked by the crew deploy 76d44f9

opened this

The bets list and a bet's page now render as rows with no box. tsc and design-lint are clean, and test/bets.test.ts and test/bets-card-fit.test.ts pass (40 pass, 2 skipped). The two skipped tests are the 390 px Chromium measurements, because no Chromium starts here. I did not run scripts/gate.ts (the check found no such file in this clone), and I did not keep a plan on the issue (no keep_plan tool was available here).

What changed

  • List: /:owner/:name/bets is one row() per bet in a plain ul.list.setting-list[data-bets], with no card( and no class="card. The share and next action are in the row's meta. The owner's proposed bets show their journeys and issue count under the row, with the Back it at N%, Change the share and Cut it actions. Journeys keep their "N more" <details>.
  • Hook: data-bet-card stays as the test hook, now on the row's <li>.
  • Bet page: the scopes use the same plain row list. A finished bet's "This is done. Try it." is a heading and a line inside a settings-block, with no box.
  • Behaviour: the POST actions and their flashes are unchanged, and the pages stay script-free.
  • CSS: one selector added in components.ts so [data-bets] gives the row's lower part the full row width, as [data-origins] does. No new class. docs/design/areas/bets.md records this.

Tests

  • test/bets.test.ts: a new test 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: it now splits on the row's data-bet-card attribute, counts one row-title per bet instead of one <h2>, and has its own no-card assertion. The measured 390 px checks are untouched except that they measure the row rather than its parent.

Left out

  • The [data-bet-card] rules for h2 and p in content.ts are now partly dead. I left them alone.
  • I did not attach new desk or phone looks to this pull.

Closes #9859

3 earlier comments
commented

The bets list and a bet's page now render as rows with no box. tsc and design-lint are clean, and test/bets.test.ts and test/bets-card-fit.test.ts pass (40 pass, 2 skipped). The two skipped tests are the 390 px Chromium measurements, because no Chromium starts here. I did not run scripts/gate.ts (the check found no such file in this clone), and I did not keep a plan on the issue (no keep_plan tool was available here).

What changed

  • List: /:owner/:name/bets is one row() per bet in a plain ul.list.setting-list[data-bets], with no card( and no class="card. The share and next action are in the row's meta. The owner's proposed bets show their journeys and issue count under the row, with the Back it at N%, Change the share and Cut it actions. Journeys keep their "N more" <details>.
  • Hook: data-bet-card stays as the test hook, now on the row's <li>.
  • Bet page: the scopes use the same plain row list. A finished bet's "This is done. Try it." is a heading and a line inside a settings-block, with no box.
  • Behaviour: the POST actions and their flashes are unchanged, and the pages stay script-free.
  • CSS: one selector added in components.ts so [data-bets] gives the row's lower part the full row width, as [data-origins] does. No new class. docs/design/areas/bets.md records this.

Tests

  • test/bets.test.ts: a new test 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: it now splits on the row's data-bet-card attribute, counts one row-title per bet instead of one <h2>, and has its own no-card assertion. The measured 390 px checks are untouched except that they measure the row rather than its parent.

Left out

  • The [data-bet-card] rules for h2 and p in content.ts are now partly dead. I left them alone.
  • I did not attach new desk or phone looks to this pull.
commented

The gate failed because no commit message on the pull had a Try: line. I pushed an empty commit that has one. No code changed, so I didn't re-run the tests; they passed before this push. I haven't seen the forge's re-check yet.

The Try: line says to open /preview-admin/sample/bets on the preview as the owner. Each proposed bet shows as a row with its share and next action, and no box. A finished bet's page shows "This is done. Try it." as a heading and a line.

What changed

  • List: /:owner/:name/bets is one row() per bet in a plain list, with no card(. A proposed bet's row shows its share and next action. Its journeys, issue count and the back, change-the-share and cut buttons sit under the row. Journeys keep their "N more" <details>.
  • Bet page: the scopes use the same plain row list. A finished bet's "This is done. Try it." is a heading and a line, no box.
  • Behaviour: every POST keeps its action and lands back with a flash, and the pages stay script-free.
  • Hook and CSS: data-bet-card is now on the row's <li>. One selector in components.ts gives [data-bets] rows the full width. No new class.

Tests

  • A new test in test/bets.test.ts 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 now splits on the row's data-bet-card attribute and counts one row-title per bet. It also asserts no card on the page. Its 390 px Chromium measurements are updated to measure the row, but they were skipped here because no Chromium starts.
  • tsc and bun scripts/design-lint.ts are clean.

Left out

  • Some [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.
commented

The failure was my doing. I had added [data-bets] to the same CSS line as [data-origins], and test/origins-page-shape.test.ts looks for a line starting with the origins selector. I gave [data-bets] its own line with identical declarations and left the origins line as it was.

I ran the origins, bets and bets-card-fit tests locally: 45 pass, 0 fail, and tsc is clean. The pull is pushed and I haven't seen the forge's re-check yet. The log also said shard 37 was killed after 19 s while running test/wave-page-timing.test.ts. I didn't touch or run that test, so I can't say whether this change affects it.

What changed

  • List: /:owner/:name/bets is one row() per bet in a plain list, with no card( and no class="card. The share and next action are in the row. A proposed bet's journeys, issue count and back, change-the-share and cut buttons sit in a full-width block under it. Journeys keep their "N more" <details>.
  • Bet page: the scopes use the same plain row list, and "This is done. Try it." is a heading and a line, no box.
  • Behaviour: every POST keeps its action and lands back with a flash. The pages stay script-free.
  • Hook and CSS: data-bet-card is on the row's <li>. The only CSS change is the [data-bets] line. No new class; docs/design/areas/bets.md records it.

Tests

  • test/bets.test.ts has a new test: no class="card on the list (as owner and as reader) or on a finished bet's page.
  • test/bets-card-fit.test.ts now splits on the row's attribute and counts one row-title per bet. It also asserts no card on the page. Its 390 px Chromium measurements are updated to measure the row, but they were skipped here because no Chromium starts.

Left out

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

Try: open /preview-admin/sample/bets on the preview as the owner. Each proposed bet is a row with its share and next action. Open a finished bet to see "This is done. Try it."

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs