Skip to content

feat(governance): clearer ballot voting UX (segmented vote + one entry per action)#296

Merged
QSchlegel merged 3 commits into
preprodfrom
claude/ballot-vote-ux
Jun 13, 2026
Merged

feat(governance): clearer ballot voting UX (segmented vote + one entry per action)#296
QSchlegel merged 3 commits into
preprodfrom
claude/ballot-vote-ux

Conversation

@QSchlegel

Copy link
Copy Markdown
Collaborator

The per-proposal voting controls were confusing (screenshot): a raw OS <select> for Yes/No/Abstain, and two competing actions — a green "Add to Ballot" button and a mystery ballot-icon button.

Changes

  • Segmented vote control: native <select> → shadcn ToggleGroup Yes/No/Abstain, color-coded selected state + icons. Mandatory (v) => v && setVoteKind(v) guard (ToggleGroup emits "" on re-click — without it an empty vote could be read into the tx).
  • One primary action: the Vote button now states the choice — "Vote Yes" / "Vote Yes (Proxy)" — and uses the themed primary style (was an ad-hoc gray).
  • One ballot entry: the icon-only ballot button → a labeled "Add to ballot" / "In N ballots" secondary, with a tooltip that distinguishes the flows: "Vote casts your DRep vote on-chain now. Add to ballot collects this proposal so co-signers can vote together."
  • Removed the duplicate green "Add to Ballot" buttons (mobile + desktop) in proposals.tsx; kept the View links. Dropped the now-unused Plus import.

vote()/voteProxy() bodies, the proxy path, keepRelevant, metadata label 674, the closed-vote Lock state, and all toasts are unchanged.

⚠️ Needs live-wallet verification before main

The control swap is UI-only, but the one behavioral thing to confirm on a connected wallet (UTxOs + DRep registered, preprod) is that casting a vote builds the tx with the correct voteKind from the new segmented control, in both direct and proxy modes. The (Proxy) suffix and No UTxOs Available disabled path are preserved.

Verify (render-only, no wallet)

  • Chrome MCP desktop + 390px: segmented Yes/No/Abstain colors on select; one primary "Vote {kind}"; one "Add to ballot" secondary; no second green button.
  • tsc clean; jest 362 passed.

Part of the governance/assets UX pass. Sibling PR: gov-card colored type chips + ask-₳ badge.

🤖 Generated with Claude Code

…ry per action

The per-proposal voting controls were confusing: a raw OS <select> for the
Yes/No/Abstain choice, plus TWO competing actions (a green "Add to Ballot"
button in proposals.tsx AND a mystery ballot icon in VoteButton).

- Replace the native <select> with a shadcn segmented Yes/No/Abstain control
  (color-coded selected state, icons). Guard `(v) => v && setVoteKind(v)` so a
  re-click can't blank the vote read into the tx.
- One clear primary: the Vote button now states the choice ("Vote Yes",
  "Vote Yes (Proxy)") and uses the themed primary style.
- One ballot entry: the icon-only ballot button becomes a labeled "Add to
  ballot" / "In N ballots" secondary, with a tooltip distinguishing the two
  flows (vote on-chain now vs collect for co-signers).
- Remove the now-duplicate green "Add to Ballot" buttons (mobile + desktop) in
  proposals.tsx; keep the View links.

vote()/voteProxy() bodies, proxy path, keepRelevant, metadata label 674, the
closed-vote Lock state, and all toasts are unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
multisig Ready Ready Preview, Comment Jun 13, 2026 11:39am

Request Review

# Conflicts:
#	src/components/pages/wallet/governance/proposals.tsx
# Conflicts:
#	src/components/pages/wallet/governance/proposals.tsx
@QSchlegel QSchlegel merged commit f35a547 into preprod Jun 13, 2026
4 of 6 checks passed
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