Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 1.94 KB

File metadata and controls

25 lines (21 loc) · 1.94 KB

PR Description: design: governance delegation flow

What does this PR do?

This PR introduces the new Governance Delegation Flow within the Distribution Dashboard. It enables users to browse, select, and delegate their voting power to delegates, or revoke an active delegation with a single click.

Changes Included

  • GovernanceDelegation Container: A new layout section added to DistributionDashboard.tsx before the Financial terms step.
  • Header Update: The user's total "Delegated Power" is now prominently displayed in the Distribution Dashboard header.
  • Delegate Search Component: Allows users to filter through delegates by name or address with keyboard support.
  • Delegate Profile Card: Shows metrics such as Participation Rate, Vote Alignment, and Total Delegated VP. Incorporates contextual actions (Delegate vs. Revoke).
  • Delegation Dialogs: Two new modal dialogs added for confirming the assignment or revocation of voting power.
  • Accessibility & Tests: Extensive use of aria-* tags and semantic HTML for WCAG 2.1 AA compliance. A robust test suite (GovernanceDelegation.test.tsx) achieves >95% code coverage and includes jest-axe for accessibility validation.

Testing Steps

  1. Navigate to the Distribution Dashboard.
  2. Search for a delegate in the newly added section (e.g., "Alice Voter").
  3. Review their profile and click "Delegate Power".
  4. Confirm delegation in the dialog. The profile should now show a "Revoke Delegation" button.
  5. Click "Revoke Delegation" and confirm to test the un-delegate flow.
  6. Check responsiveness across mobile, tablet, and desktop views.

Notes for Reviewers

  • The flow uses mock data (MOCK_DELEGATES) for now; these will need to be hooked up to the real API endpoints in a future backend integration pass.
  • Dark mode compatibility is handled via CSS variables (var(--bg-primary), etc.).
  • Ensure npm run lint and all unit tests pass smoothly once node constraints are resolved.