card-layout: identity → status → visual → action - #12
Merged
Conversation
The old card put the vote readout in a row with the +/− buttons at
the bottom, forcing the eye to drop down and across after registering
the funnel — text arriving late, competing with the controls for the
same horizontal band.
Reorganize each card into a top-to-bottom column with one element per
position:
1. Candidate name + party (top, with reset)
2. Vote readout ("+5 votes 25 credits") (NEW: above the funnel)
3. Funnel SVG with ruler (unchanged)
4. ±buttons centered (NEW: below the funnel)
Pure layout change — no math, no state, no new components, no color
or rendering changes. The readout keeps its full type weight; it now
heads the card's text column rather than sharing space with the
controls.
Reset link stays visually pinned to the top-right corner via absolute
positioning, but is sourced last so the focusable tab order ends on
it: funnel slider → − → + → reset (matches reading order).
Verified: 37/37 tests pass; lint, typecheck, and all 3 build targets
clean. Visual states checked in dev preview at desktop (3-col grid)
and mobile (375 px stacked) — empty, mid-pour with active stream,
positive vote, negative vote, mixed-sign grid, and cross-zero hold.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Per-state walkthrough (empty / positive / negative / mixed / mid-pour / cross-zero / mobile) with verified-DOM snapshots and tab-order listing for the Harris card. Same documentation pattern as round-13. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/components/LiquidQV.tsx), per-card JSX block. No math, no state, no new components, no color or rendering changes.What didn't change
Funnel.tsx,PourStream.tsx,PourControl.tsx,CreditPool.tsx— untouched.src/math/qv.ts), the reducer, the active-pour state machine.Test plan
npm test) — no behavioral change, no new tests required.npm run lintclean.npm run typecheckclean.npm run build:allsucceeds across SPA, library, and Web Component targets.npm run dev:0 votes 0 credits→ empty funnel → centered ±buttons; reset top-right.+3 votes 9 credits; green water at level 3; buttons stay centered.−3 votes 9 credits; red water at level 3.Votes for Kamala Harris(slider) →Move … vote down→Move … vote up→Reset votes on Kamala Harris.See
docs/round-14/README.mdfor verified-DOM walkthroughs of each state.Do not merge — for review only.
🤖 Generated with Claude Code