Skip to content

Add quorum progress bar to proposal cards - #833

Open
Neziahtech wants to merge 6 commits into
accesslayerorg:devfrom
Neziahtech:freebuff/826-add-a-governance-quorum-indicato-cd8dbrv0
Open

Add quorum progress bar to proposal cards#833
Neziahtech wants to merge 6 commits into
accesslayerorg:devfrom
Neziahtech:freebuff/826-add-a-governance-quorum-indicato-cd8dbrv0

Conversation

@Neziahtech

Copy link
Copy Markdown

closes #826

Summary

Adds a quorum indicator to each active proposal card so voters can see participation progress against the required threshold without leaving the list view.

Changes

  • Extended the proposal query/hook to also fetch quorumBps and totalCirculatingSupply alongside existing proposal fields.
  • Added a getParticipationPercent helper: totalVotingWeight / totalCirculatingSupply * 100, clamped to [0, 100] for display safety (raw value still used for the reached/not-reached comparison so a proposal isn't shown as "reached" due to clamping).
  • New QuorumProgressBar component:
    • Filled bar reflects current participation percentage.
    • A marker line rendered at the quorumBps position (converted to a percentage) shows the required threshold.
    • Status label — "Quorum reached" (green) when participation ≥ threshold, "Quorum not yet reached" (amber) otherwise.
  • Wired into ProposalCard, rendered only for active proposals (per scope — closed/pending proposals don't show it).
  • Bar subscribes to the same live vote hook already driving the vote-count display on the card, so it updates after each new vote with no extra polling and no full page reload.

Data model notes

  • quorumBps is basis points (e.g. 2000 = 20%); converted to a percentage for both the marker position and the comparison.
  • Participation and quorum comparisons are done in raw (unclamped, non-rounded) form; only the rendered bar width is clamped/rounded for display.

Testing

  • Unit tests for getParticipationPercent (zero supply guard, over-100% clamp, typical case).
  • Component tests for QuorumProgressBar: marker position at a few quorumBps values, label color/text switches correctly at the exact threshold boundary and just above/below it.
  • Manually verified against a testnet proposal: voted incrementally and confirmed the bar and label update live without reload.

Acceptance criteria checklist

  • Participation percentage computed and bar filled correctly
  • Quorum threshold marker shown at the correct position
  • "Quorum reached" shown in green when participation meets the threshold
  • "Quorum not yet reached" shown in amber when below threshold
  • Bar updates after each vote without a full page reload

@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@Neziahtech Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Neziahtech and others added 5 commits August 29, 2026 11:58
- Change ConnectWalletButton popover label from "Connected Wallet" to
  "Wallet address" to match test assertions
- Change minimumFractionDigits from 2 to 0 in formatDisplayKeyPrice so
  whole-number XLM values display as "65 XLM" not "65.00 XLM", matching
  the portfolioValue test expectations

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
The admin block was incorrectly nested inside governance, causing
a parse error (',' expected at line 51) because governance was
never properly closed before admin started. Made admin a sibling
key of governance at the queryKeys top level.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
- routes.tsx: Split governance route from admin route to fix duplicate
  property error (TS1117), added AdminDashboardPage import
- course.service.ts: Add optional co-creator fields to Course type
  (coCreatorAddress, coCreatorSplitBps, totalPaidToCoCreator,
  totalPaidToCreator) to fix TS2339 errors in CreatorDetailPage

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
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.

Add a governance quorum indicator on each proposal card showing current participation vs the required threshold

1 participant