Commit 7b0247b
feat(committees): behavioral class chips and table column [LFXV2-1715] (#690)
* feat(committees): add behavioral class filter chips and table column
Group categories now roll up into 6 behavioral classes (governing-board,
oversight-committee, working-group, special-interest-group,
ambassador-program, other). The Groups List page renders class chips above
the table for one-click filtering, and the table grows a Class column with
a colored badge per row. Chip counts are lens-aware (myCommittees on Me
lens, committees otherwise).
The chip row replaces the previous raw-category filter UI (tab strip plus
dropdown) since both exposed the same information at finer granularity and
cluttered the toolbar. The category form control, categories signal,
initializeCategories method, and matching filter blocks are removed since
the chips cover the user-facing filtering need.
Adds BEHAVIORAL_CLASS_CONFIG to the shared constants for reuse by other
components.
LFXV2-1715
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Manish Dixit <mdixit@linuxfoundation.org>
* fix(review): address PR #690 review feedback
Address review comments from @copilot-pull-request-reviewer and @coderabbitai:
- committee-dashboard.component.html: add aria-pressed to each behavioral
class chip + role="group" with aria-label on the chip container, so
assistive tech can read the active filter (per both bots).
- committee-dashboard.component.ts: derive behavioralClassKeys from
Object.keys(BEHAVIORAL_CLASS_CONFIG) instead of hardcoding, so the chip
list stays in sync if the taxonomy changes (per both bots).
- committee-table.component.ts + committee-dashboard.component.html: emit
a new resetRequested output from resetFilters() and clear
behavioralClassFilter in the parent, so the empty-state "Reset filters"
CTA actually clears all filters (including the parent-owned chip state)
rather than leaving chip filtering active (per both bots).
Resolves 5 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 #690 review feedback (round 3)
Address review comments from @MRashad26:
- committee.interface.ts: extract BehavioralClassDisplayConfig as a named
interface (Rule 5 — all interfaces live in @lfx-one/shared/interfaces);
add optional behavioralClass field on Committee so list views can be
decorated up-front.
- committees.constants.ts: collapse the multi-line JSDoc above
BEHAVIORAL_CLASS_CONFIG and reference the named display interface.
- committee-dashboard.component.ts: move the multi-line
behavioralClassCounts computed to a private initializeBehavioralClassCounts()
method (component-organization Rule 3 — complex computeds use private
init functions); drop the multi-line attribution comment on the
behavioralClass declarations.
- committee-dashboard.component.ts: decorate filtered list items with
behavioralClass once per source change inside initializeFilteredCommittees
/ initializeFilteredMyCommittees, so downstream consumers can read the
class as a property instead of recomputing it.
- committee-table.component.html: replace the per-row
getGroupBehavioralClass() call in the Class column with a typed
readBehavioralClass() accessor that reads the pre-decorated field,
eliminating substring matching on every change-detection pass.
- committee-dashboard.component.html: drop the WHAT-comment section header
above the chip block; the role/aria-label/data-testid are
self-describing.
Resolves 6 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 #690 review feedback (round 4)
Address review comments from @copilot-pull-request-reviewer:
- committee-dashboard.component.ts: extract decoratedCommittees /
decoratedMyCommittees as memoized computeds that depend only on the
raw source lists. Filter computeds (filteredCommittees,
filteredMyCommittees) now read the decorated signals instead of
re-mapping on every filter change, so search keystrokes and voting
toggles no longer trigger a full O(n) clone+decorate. Behavioral
class counts also switched to the decorated source for consistency.
- committee-dashboard.component.ts: clear behavioralClassFilter inside
resetScopeFilters() so changing lens/project/foundation doesn't leave
a stale chip filter active when its count drops to 0.
Resolves 2 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 #690 review feedback (round 5)
Address @MRashad26 follow-up on PR #690:
- committee.interface.ts: add optional classDisplay field on Committee
carrying the resolved BehavioralClassDisplayConfig for a row.
- committee-dashboard.component.ts: decorate rows with classDisplay
alongside behavioralClass in initializeDecoratedCommittees /
initializeDecoratedMyCommittees, so the lookup happens once per
source change.
- committee-table.component.{ts,html}: drop the readBehavioralClass()
accessor and the local BEHAVIORAL_CLASS_CONFIG/GroupBehavioralClass
imports. The Class column now reads committee.classDisplay.* directly
— pure property reads, no function calls per change-detection pass,
no typed-Record indexing on a PrimeNG let-row binding (which lfx-table
types as any).
Resolves 1 review follow-up.
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 7481c66 commit 7b0247b
6 files changed
Lines changed: 180 additions & 139 deletions
File tree
- apps/lfx-one/src/app/modules/committees
- committee-dashboard
- components/committee-table
Lines changed: 46 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 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 | + | |
47 | 80 | | |
48 | 81 | | |
49 | 82 | | |
| |||
69 | 102 | | |
70 | 103 | | |
71 | 104 | | |
72 | | - | |
73 | 105 | | |
74 | 106 | | |
75 | 107 | | |
76 | 108 | | |
77 | 109 | | |
78 | 110 | | |
79 | 111 | | |
| 112 | + | |
80 | 113 | | |
81 | 114 | | |
82 | 115 | | |
| |||
87 | 120 | | |
88 | 121 | | |
89 | 122 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
94 | 133 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 134 | + | |
113 | 135 | | |
114 | 136 | | |
115 | 137 | | |
| |||
130 | 152 | | |
131 | 153 | | |
132 | 154 | | |
133 | | - | |
134 | 155 | | |
| 156 | + | |
135 | 157 | | |
136 | 158 | | |
137 | 159 | | |
| |||
Lines changed: 69 additions & 56 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
57 | | - | |
58 | 61 | | |
59 | 62 | | |
60 | | - | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| |||
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| 87 | + | |
| 88 | + | |
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
91 | 99 | | |
92 | 100 | | |
93 | 101 | | |
| |||
96 | 104 | | |
97 | 105 | | |
98 | 106 | | |
| 107 | + | |
| 108 | + | |
99 | 109 | | |
100 | 110 | | |
101 | 111 | | |
102 | 112 | | |
103 | | - | |
104 | 113 | | |
105 | 114 | | |
106 | 115 | | |
107 | | - | |
108 | 116 | | |
109 | 117 | | |
110 | 118 | | |
| |||
136 | 144 | | |
137 | 145 | | |
138 | 146 | | |
| 147 | + | |
| 148 | + | |
139 | 149 | | |
140 | 150 | | |
141 | 151 | | |
| |||
163 | 173 | | |
164 | 174 | | |
165 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
166 | 180 | | |
167 | 181 | | |
168 | 182 | | |
| |||
176 | 190 | | |
177 | 191 | | |
178 | 192 | | |
| 193 | + | |
179 | 194 | | |
180 | 195 | | |
181 | 196 | | |
| |||
224 | 239 | | |
225 | 240 | | |
226 | 241 | | |
227 | | - | |
228 | 242 | | |
229 | 243 | | |
230 | 244 | | |
| |||
235 | 249 | | |
236 | 250 | | |
237 | 251 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | 252 | | |
243 | 253 | | |
244 | 254 | | |
| |||
270 | 280 | | |
271 | 281 | | |
272 | 282 | | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | 283 | | |
298 | 284 | | |
299 | 285 | | |
| |||
342 | 328 | | |
343 | 329 | | |
344 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
345 | 349 | | |
346 | 350 | | |
347 | | - | |
| 351 | + | |
348 | 352 | | |
349 | | - | |
350 | 353 | | |
351 | 354 | | |
352 | 355 | | |
| |||
357 | 360 | | |
358 | 361 | | |
359 | 362 | | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
364 | 366 | | |
365 | 367 | | |
366 | | - | |
367 | 368 | | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
374 | 373 | | |
375 | 374 | | |
376 | 375 | | |
| |||
379 | 378 | | |
380 | 379 | | |
381 | 380 | | |
382 | | - | |
| 381 | + | |
383 | 382 | | |
384 | | - | |
385 | 383 | | |
386 | 384 | | |
387 | 385 | | |
| |||
390 | 388 | | |
391 | 389 | | |
392 | 390 | | |
393 | | - | |
394 | 391 | | |
395 | 392 | | |
396 | 393 | | |
| |||
402 | 399 | | |
403 | 400 | | |
404 | 401 | | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
409 | 405 | | |
410 | 406 | | |
411 | | - | |
412 | 407 | | |
413 | 408 | | |
414 | 409 | | |
| |||
419 | 414 | | |
420 | 415 | | |
421 | 416 | | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
422 | 435 | | |
0 commit comments