Commit e997afd
feat(committees): add quick-filter chips on Members tab (#684)
* feat(committees): add quick-filter chips on Members tab
Add a row of clickable filter chips above the existing search/filter row
on the committee Members tab. Four chips ship in this PR:
- All (n) — default, shows all members
- Voting Reps (n) — filters to members with voting_status = "Voting Rep"
- Observers (n) — filters to members with voting_status = "Observer"
- Chairs (n) — filters to members with role.name in {Chair, Vice Chair}
Selecting a chip resets the dropdown filters (role / votingStatus /
organization) so the user starts from a known state; search and dropdowns
still compose on top of the chip selection.
The "At Risk" chip is intentionally deferred — it depends on attendance
data from LFXV2-1705. The All Voting Status dropdown is kept so users can
still reach the long-tail statuses (Alternate Voting Rep, Emeritus, None)
that don't have dedicated chips.
LFXV2-1717
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Manish Dixit <mdixit@linuxfoundation.org>
* fix(review): address PR #684 review feedback
Address review comments from @coderabbitai and @copilot-pull-request-reviewer:
- committee-members.component.html: add type="button" and
[attr.aria-pressed] to each chip button so assistive tech can announce
which filter is active and to defend against accidental form submit.
Addresses both reviewers' a11y comment (toggle group needs aria-pressed).
- committee-members.component.ts: replace hardcoded 'Voting Rep',
'Observer', 'Chair', 'Vice Chair' string literals in the chip counts
and chipFilteredMembers computed with CommitteeMemberVotingStatus and
CommitteeMemberRole enum references from @lfx-one/shared/enums. No
runtime change — the enum values are these same strings — but the
component will now break-build if the canonical enums drift, instead
of silently mis-filtering. Per @copilot-pull-request-reviewer.
Resolves 3 review threads.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Manish Dixit <mdixit@linuxfoundation.org>
* fix(review): address PR #684 review feedback from @dealako
Address two observations from @dealako:
- packages/shared/src/interfaces/committee.interface.ts: introduce a
CommitteeMemberFilterChip type alias ('all' | 'voting' | 'observers' |
'chairs') and re-use it in three places where it was previously
duplicated inline (memberFilterChip signal, chipFilteredMembers switch
parameter, selectChip method parameter). Adding a new chip is now a
one-line change. Per .claude/rules/component-organization.md §5 and
@dealako's first observation.
- committee-members.component.{ts,html}: replace the four near-identical
chip button blocks with an @for loop over a chipConfig() computed that
carries { key, label, count } for each chip. Cuts the template roughly
in half and eliminates copy-paste drift risk if a future styling
change forgets one button. Per @dealako's second observation.
The "Chairs" label is intentionally kept short (covers both Chair and
Vice Chair) — chip labels favor brevity and the leadership intent is
clear from context. Responded to @dealako's design-question observation
on the PR.
Resolves @dealako's review.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Manish Dixit <mdixit@linuxfoundation.org>
* fix(review): address PR #684 CodeRabbit nitpick — wrap chip row
committee-members.component.html: add `flex-wrap` to the chip row
container so the chips wrap onto a second line on narrow viewports
instead of horizontally clipping. Pure presentational change; no
behavior difference at desktop widths.
Per @coderabbitai's quick-win nitpick.
Signed-off-by: Manish Dixit <mdixit@linuxfoundation.org>
* fix(review): address PR #684 review feedback from @MRashad26
Address three convention-compliance comments from @MRashad26 citing
.claude/rules/component-organization.md §3 and §5:
- packages/shared/src/interfaces/committee.interface.ts: collapse the
3-line JSDoc on CommitteeMemberFilterChip into a single line so it
matches the project's "no comments unless WHY is non-obvious"
convention.
- packages/shared/src/interfaces/committee.interface.ts: extract the
previously-inline `{ key, label, count }` chip shape into a named
CommitteeMemberFilterChipConfig interface, per §5 (interfaces belong
in @lfx-one/shared/interfaces, never inline in component files).
- committee-members.component.ts: move the five computed signals
(votingRepCount, observerCount, chairCount, chipConfig,
chipFilteredMembers) out of the "Simple writable signals" block.
The three simple counts now live inline under "Computed signals"
next to canManageMembers/isMembersVisible; chipConfig and
chipFilteredMembers — both non-trivial (array literal / switch) —
now use the private init function pattern (initChipConfig,
initChipFilteredMembers) per §3, mirroring the existing
initializeFilteredMembers() pattern in the same file.
No runtime behavior change — purely structural and typing cleanup so
the class layout matches the project's organization rules.
Resolves 3 review threads.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Manish Dixit <mdixit@linuxfoundation.org>
---------
Signed-off-by: Manish Dixit <mdixit@linuxfoundation.org>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a1a0724 commit e997afd
3 files changed
Lines changed: 81 additions & 2 deletions
File tree
- apps/lfx-one/src/app/modules/committees/components/committee-members
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
10 | 25 | | |
11 | 26 | | |
12 | 27 | | |
| |||
Lines changed: 56 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
19 | 28 | | |
20 | 29 | | |
21 | 30 | | |
| |||
65 | 74 | | |
66 | 75 | | |
67 | 76 | | |
| 77 | + | |
68 | 78 | | |
69 | 79 | | |
70 | 80 | | |
| |||
77 | 87 | | |
78 | 88 | | |
79 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
80 | 103 | | |
81 | 104 | | |
82 | 105 | | |
| |||
136 | 159 | | |
137 | 160 | | |
138 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
139 | 167 | | |
140 | 168 | | |
141 | 169 | | |
| |||
420 | 448 | | |
421 | 449 | | |
422 | 450 | | |
423 | | - | |
| 451 | + | |
424 | 452 | | |
425 | 453 | | |
426 | 454 | | |
| |||
456 | 484 | | |
457 | 485 | | |
458 | 486 | | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
459 | 513 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
313 | 323 | | |
314 | 324 | | |
315 | 325 | | |
| |||
0 commit comments