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.
- GovernanceDelegation Container: A new layout section added to
DistributionDashboard.tsxbefore 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 includesjest-axefor accessibility validation.
- Navigate to the Distribution Dashboard.
- Search for a delegate in the newly added section (e.g., "Alice Voter").
- Review their profile and click "Delegate Power".
- Confirm delegation in the dialog. The profile should now show a "Revoke Delegation" button.
- Click "Revoke Delegation" and confirm to test the un-delegate flow.
- Check responsiveness across mobile, tablet, and desktop views.
- 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 lintand all unit tests pass smoothly once node constraints are resolved.