Skip to content

feat: orient each gauge like the gesture that drives it - #103

Merged
schmug merged 1 commit into
mainfrom
feat/gauges-match-the-gesture
Aug 29, 2026
Merged

schmug merged 1 commit into
mainfrom
feat/gauges-match-the-gesture

Conversation

@schmug

@schmug schmug commented Aug 29, 2026

Copy link
Copy Markdown
Owner

The y-axis was driven by an up/down swipe and drawn as a horizontal row — no spatial relationship to the thing that moved it, so you had to decode which row belonged to which direction.

It now stands as a column beside the deck; the x-axis stays a row above it. The compass reads at a glance rather than being read.

   NATURAL ————●———— SYNTHETIC        ← x-axis: left/right swipe

   C  ┌──────────────────┐
   A  │                  │
   L ●│   cast iron      │            ← y-axis: up/down swipe
   M  │      skillet     │
   ⋮  │                  │
   F  └──────────────────┘

Labels use writing-mode: vertical-rl — a column of horizontal words needs more width than a 390px screen can spare next to the card. Top is the negative pole, because swiping down moves toward the positive one: the label order follows the gesture, not the convention that up means more.

One gauge builder still, not two. Only the orientation differs, so they can't drift apart.

Two things this exposed

  • paintGauges queried els.gauges only. With the y gauge moved out of that container it would have silently stopped painting — the vertical mark frozen at its start while its axis moved, a gauge lying about position. It queries both now, and a guard pins it.
  • The mark only transitioned left, so the vertical mark would have jumped rather than slid.

The controller fixture was a hand-copy

Every controller test failed the moment the DOM changed, for reasons unrelated to the controller. They now read public/drift/index.html off disk, so they exercise the page that ships and a markup change that breaks the controller fails in the suite rather than in production.

npm run typecheck    clean
npm test             770 passed (770)

🤖 Generated with Claude Code

The y-axis was driven by an up/down swipe and drawn as a horizontal row, so it
had no spatial relationship to the thing that moved it — you had to decode which
row belonged to which direction. It now stands as a column beside the deck, and
the x-axis stays a row above it. The compass reads at a glance rather than being
read.

Labels on the vertical gauge use writing-mode: vertical-rl. A column of
horizontal words would need more width than a 390px screen can spare next to the
card. Top is the NEGATIVE pole, because swiping DOWN moves toward the positive
one — the label order follows the gesture rather than the convention that up
means more.

One gauge builder still, not two. Only the orientation differs, so the two
cannot drift apart.

Two things this exposed:

- paintGauges queried els.gauges only. With the y gauge moved out of that
  container it would have silently stopped painting, leaving the vertical mark
  frozen at its starting point while its axis moved — a gauge lying about
  position. It queries both now, and a guard pins that.
- The mark only transitioned `left`, so the vertical mark would have jumped
  rather than slid. Now both.

The controller tests hand-copied the page markup into a fixture, and every one
of them failed the moment the DOM changed — for reasons that had nothing to do
with the controller. They now read public/drift/index.html off disk, so they
exercise the page that actually ships and a markup change that breaks the
controller fails in the suite rather than in production.

typecheck clean; 770 tests passing, 0 failing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 29, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
dewpt 14db490 Aug 29 2026, 02:28 AM

@schmug
schmug merged commit 7caabfd into main Aug 29, 2026
5 of 6 checks passed
@schmug
schmug deleted the feat/gauges-match-the-gesture branch August 29, 2026 02:28
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.

1 participant