This PR implements an accessible, responsive, and discoverable Filter and Segmentation Toolbar (DistributionFilterToolbar) for the Distribution Dashboard (src/pages/DistributionDashboard.tsx). Operations staff can now slice distribution history by Date Range, Issuer, Region, and Status, segment metrics by category, toggle side-by-side comparison mode, save custom filter presets to localStorage, and share deep-linked filter states via URL parameters.
-
Toolbar Row Anatomy & Popovers:
- Primary search bar filtering payout ID, offering name, or recipient address.
- Filter Popovers for:
- Date Range: All Time, Last 30 Days, Last 90 Days, Year-to-Date, or Custom Range.
- Issuer / Offering: All Issuers, Nexus Cloud, AeroDynamics AI, BioHealth Tech, etc.
- Region: Global, North America, Europe, Asia Pacific, LATAM.
- Status: All Statuses, Completed, Processing, Failed, Scheduled.
- Active Filter Pill Badges with individual
✕dismissal buttons and "Clear All" action.
-
Segmentation & Compare Mode:
- Segment By Selector: Group metrics by Region, Issuer, Status, or Tier.
- Compare Mode Toggle: Renders segmented comparison cards side-by-side (e.g. North America vs Europe vs Asia Pacific).
-
Filter Presets & Local Storage Persistence:
- "Save Current Filter Preset" modal popover saving preset configurations to
localStorageunderrevora_distribution_saved_filters. - Pre-loaded operational presets: "Q3 Failed Batches", "North America Institutional".
- "Save Current Filter Preset" modal popover saving preset configurations to
-
URL Parameter Synchronization:
- Two-way sync with browser URL search parameters (
?search=...&date=...&issuer=...®ion=...&status=...&segment=...&compare=...). - Supports shareable deep links and browser history navigation.
- Two-way sync with browser URL search parameters (
-
Mobile Collapsible Filter Sheet (< 768px):
- On screens under 768px, the toolbar collapses into a single
"Filters (n)"button with active filter counter badge(n). - Clicking opens an accessible full-height mobile filter drawer with touch-friendly targets and focus management.
- On screens under 768px, the toolbar collapses into a single
-
Accessibility & WCAG 2.1 AA Compliance:
- Dialog & Toolbar semantics (
role="toolbar",aria-expanded,aria-controls,aria-haspopup="dialog"). - Keyboard navigation (popovers close on
Escape, focus trap in mobile sheet, focus return). - High contrast dark mode theme meeting 4.5:1 text contrast.
- Reduced motion overrides (
prefers-reduced-motion: reduce). - Passed
jest-axeaudit with 0 violations.
- Dialog & Toolbar semantics (
| File Path | Description |
|---|---|
src/components/DistributionFilterToolbar/DistributionFilterToolbar.tsx |
Main toolbar component with popovers, active pills, preset management, segmentation selector, compare mode toggle, and mobile sheet |
src/components/DistributionFilterToolbar/DistributionFilterToolbar.css |
Toolbar CSS styles, glassmorphism, responsive sheet drawer under 768px, and accessibility outlines |
src/components/DistributionFilterToolbar/DistributionFilterToolbar.types.ts |
TypeScript interfaces for FilterState, Preset, and Props |
src/components/DistributionFilterToolbar/DistributionFilterToolbar.test.tsx |
Vitest & jest-axe unit test suite (>95% coverage) |
src/components/DistributionFilterToolbar/index.ts |
Barrel export file |
src/pages/DistributionDashboard.tsx |
Updated dashboard integrating toolbar, segmented comparison view, and URL search param sync |
src/pages/DistributionDashboard.test.tsx |
Updated test suite verifying toolbar integration and compare mode |
docs/uiux/ux214-distribution-filter-toolbar.md |
Design system documentation covering toolbar anatomy, URL sync, mobile sheet, and accessibility guidelines |
- Accessibility: 0
jest-axeviolations. - Lint:
npm run lintclean. - Unit Tests: All tests passing with >95% code coverage on new component and updated page.