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
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.
stopped parked by the crew deploy 76d44f9
3 earlier comments
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/betsis onerow()per bet in a plainul.list.setting-list[data-bets], with nocard(and noclass="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 theBack it at N%,Change the shareandCut itactions. Journeys keep their "N more"<details>. - Hook:
data-bet-cardstays 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.tsso[data-bets]gives the row's lower part the full row width, as[data-origins]does. No new class.docs/design/areas/bets.mdrecords this.
Tests
test/bets.test.ts: a new test asserts there is noclass="cardon 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'sdata-bet-cardattribute, counts onerow-titleper 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 forh2andpincontent.tsare now partly dead. I left them alone. - I did not attach new desk or phone looks to this pull.
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/betsis onerow()per bet in a plain list, with nocard(. 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-cardis now on the row's<li>. One selector incomponents.tsgives[data-bets]rows the full width. No new class.
Tests
- A new test in
test/bets.test.tsasserts there is noclass="cardon the list (as owner and as reader) or on a finished bet's page. test/bets-card-fit.test.tsnow splits on the row'sdata-bet-cardattribute and counts onerow-titleper 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.tscandbun scripts/design-lint.tsare clean.
Left out
- Some
[data-bet-card]rules forh2andpincontent.tsare now partly dead. I left them alone. - I attached no new desk or phone looks.
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/betsis onerow()per bet in a plain list, with nocard(and noclass="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-cardis on the row's<li>. The only CSS change is the[data-bets]line. No new class;docs/design/areas/bets.mdrecords it.
Tests
test/bets.test.tshas a new test: noclass="cardon the list (as owner and as reader) or on a finished bet's page.test/bets-card-fit.test.tsnow splits on the row's attribute and counts onerow-titleper 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 forh2andpincontent.tsare 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."
Parked by the crew: the check stayed red through 2 automatic tries
The bets list and a bet's page now render as rows with no box.
tscanddesign-lintare clean, andtest/bets.test.tsandtest/bets-card-fit.test.tspass (40 pass, 2 skipped). The two skipped tests are the 390 px Chromium measurements, because no Chromium starts here. I did not runscripts/gate.ts(the check found no such file in this clone), and I did not keep a plan on the issue (nokeep_plantool was available here).What changed
/:owner/:name/betsis onerow()per bet in a plainul.list.setting-list[data-bets], with nocard(and noclass="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 theBack it at N%,Change the shareandCut itactions. Journeys keep their "N more"<details>.data-bet-cardstays as the test hook, now on the row's<li>.settings-block, with no box.components.tsso[data-bets]gives the row's lower part the full row width, as[data-origins]does. No new class.docs/design/areas/bets.mdrecords this.Tests
test/bets.test.ts: a new test asserts there is noclass="cardon 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'sdata-bet-cardattribute, counts onerow-titleper 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
[data-bet-card]rules forh2andpincontent.tsare now partly dead. I left them alone.Closes #9859