Skip to content

feat(web): show the coins as a pile beside the gear - #357

Merged
khiet merged 3 commits into
mainfrom
feat/351-coin-pile
Nov 10, 2026
Merged

khiet merged 3 commits into
mainfrom
feat/351-coin-pile

Conversation

@khiet

@khiet khiet commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

The speed cluster draws the coins as ADR 0105's pile, the coins take 3 from docs/mockups/coin-and-tyre-gauge-variations.html. The pile goes down the cluster's left and the gear plate moves right.

 [data-cluster] grid
-  "coins  coins"
-  "lights lights"
-  "gear   speed"
-  "gear   tyre"
+  "coins lights lights"
+  "coins gear   speed"
+  "coins gear   tyre"
 <span data-instrument="coins">
-  <svg> coin octagon </svg>
-  <span data-coin-count>x07 / 10</span>
+  role="img" aria-label="7 of 10 coins"
+  <span data-coin-count>7</span>
+  <span data-coin-slots>
+    <i data-coin-slot data-held>  x tuning.coinCap, held from the bottom
  • Slots come from tuning.coinCap, not a hard-coded 10.
  • coinCount, coinIcon and COIN_OCTAGON are retired along with their tests.
  • palette.ts writes --coin and --coin-rim for the slots' gradient.
  • This differs from the mockup on purpose: an empty slot keeps a held coin's height and draws its faint line inside, so the cluster holds still as the pile rises and falls.
  • The style guide's Speed cluster entry now shows 0, 7 and 10 coins.
  • Not included: a coin dropping onto the pile on pickup, as the issue says.

Evidence

  • Before: the readout's text was x07 / 10, beside an octagon icon.
    After: instrument-panel.test.ts:
    drive(coins 7)  -> text "7", aria-label "7 of 10 coins"
    drive(coins 10) -> text "10"
    spin-out to 7   -> text "7"
    coinCap 6, 2 coins -> slots held [f f f f t t]
    
    Vitest passes 930 tests. race.spec.ts (5) and coins-of-eight.spec.ts (eight tabs) pass when run alone.
  • Smoke test: the Instrument panel staged at 0, 7 and 10 coins. Its bounds stay at 22,543 to 353,698 at every count. With BOX, STOP and RAIN forced visible, all three plates sit at x 364 or more, clear of the cluster, without overlapping each other.

Screenshots:

0 coins 7 coins
10 coins 10 coins, BOX, STOP and RAIN forced visible
Style guide: Speed cluster

Merge Danger

Door: two-way

A revert restores the old readout. Nothing is persisted and nothing goes on the wire.

Blast Radius: HUD

The cluster grows a column wider and about 15 HUD units tall at the bottom-left. It could crowd the View in small windows during the eight-window feel check.

The speed cluster draws the coins as ADR 0105's pile: coins on edge
stacked from the bottom at the cluster's left, the empty slots up to
tuning.coinCap as faint lines, and the count above. The readout's text
is the count alone, named "7 of 10 coins" for assistive technology.
Retires coinCount, the coin icon and its octagon.

Closes #351
@khiet khiet linked an issue Nov 10, 2026 that may be closed by this pull request
@khiet
khiet marked this pull request as ready for review November 10, 2026 10:17
@khiet
khiet merged commit a90eadc into main Nov 10, 2026
4 checks passed
@khiet
khiet deleted the feat/351-coin-pile branch November 10, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show the coins as a pile beside the gear

1 participant