Commit 264a5b6
authored
merge: feat: Enhance Contributor Risk Table with Live Search and Sorting Features (#8262)
## Description
Resolves #8217.
This PR adds dynamic search filtering, multi-column interactive header
sorting, a "High Risk Only" quick filter toggle, and an empty search
state to the **Contributor Burnout Risk Table** (`/burnout-analyzer`).
### Key Enhancements & Features:
1. **Live Search Input**: Filters contributors dynamically by username
in real-time with a quick clear (`X`) button.
2. **"High Risk Only" Quick Filter**: Toggle switch to instantly filter
the table down to high-risk contributors (`riskLevel === 'High'`), with
a badge showing the high-risk count.
3. **Interactive Column Header Sorting**: Clickable headers with
directional sort arrows (`ArrowUpDown`, `ArrowUp`, `ArrowDown`)
supporting ascending/descending sorting for:
- Contributor username (A-Z / Z-A)
- Workload Share (%)
- Intensity Weeks
- Rest Weeks
- Burnout Risk Score
4. **Empty State & Filter Reset**: Friendly empty state banner when zero
contributors match search/filters, complete with a "Reset Filters"
action button.
5. **Contributor Counter Badge**: Shows live count (`Showing X of Y
contributors`).
---
## Target Files Modified:
- `components/burnout/BurnoutRiskTable.tsx`
- `components/burnout/BurnoutRiskTable.test.tsx`
---
## Verification & Testing
- ✅ **Unit Tests**: Ran `npx vitest run
components/burnout/BurnoutRiskTable.test.tsx` — **5 / 5 tests passed**.
- ✅ **TypeScript Check**: Ran `npx tsc --noEmit` — **0 errors**.
- ✅ **Linting**: Passed `eslint --fix` and `prettier` pre-commit checks
cleanly.
---
*GSSoC 2026 Contribution*2 files changed
Lines changed: 341 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
0 commit comments