feat(committees): add votes and surveys tab components#343
feat(committees): add votes and surveys tab components#343manishdixitlfx wants to merge 1 commit intofeat/LFXV2-committees-bff-endpointsfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
975d5a9 to
a438738
Compare
cf79493 to
8b7d13f
Compare
There was a problem hiding this comment.
Pull request overview
Adds committee-context “Votes” and “Surveys” tab list components that reuse existing votes/surveys table/drawer UI, including loading/empty/error states and a small reusability improvement to the shared votes table.
Changes:
- Added
lfx-committee-votes-listto fetch/paginate votes filtered bycommittee_name, with error state + retry. - Added
lfx-committee-surveys-listto fetch surveys by committee and display results in the existing drawer/table UI. - Enhanced shared
lfx-votes-tablewith an optionalhideGroupFilterinput; added query-param committee preselection tosurvey-manage.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/lfx-one/src/app/modules/votes/components/votes-table/votes-table.component.ts | Adds hideGroupFilter input for committee reuse. |
| apps/lfx-one/src/app/modules/votes/components/votes-table/votes-table.component.html | Conditionally hides the group filter UI. |
| apps/lfx-one/src/app/modules/surveys/survey-manage/survey-manage.component.ts | Adds query-param-based committee preselection. |
| apps/lfx-one/src/app/modules/committees/components/committee-votes-list/committee-votes-list.component.ts | New committee-scoped votes list with pagination/count/error handling. |
| apps/lfx-one/src/app/modules/committees/components/committee-votes-list/committee-votes-list.component.html | New votes list UI wiring + empty/error states + drawer. |
| apps/lfx-one/src/app/modules/committees/components/committee-surveys-list/committee-surveys-list.component.ts | New committee-scoped surveys list with refresh/error handling. |
| apps/lfx-one/src/app/modules/committees/components/committee-surveys-list/committee-surveys-list.component.html | New surveys list UI wiring + empty/error states + drawer. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| if (pageIndex > 0 && !pageToken) { | ||
| this.currentFirst.set(0); | ||
| this.loading.set(false); | ||
| return of([]); | ||
| } | ||
|
|
||
| const searchName = this.filters().search; | ||
| const queryFilters = this.buildFilters(); | ||
|
|
| const params = this.route.snapshot.queryParams; | ||
| const uid = params['committee_uid']; | ||
| const name = params['committee_name']; | ||
| if (uid && name) { | ||
| this.form() | ||
| .get('committees') | ||
| ?.setValue([{ uid, name, allowed_voting_statuses: [] }]); | ||
| } |
- Add committee-votes-list component using existing VoteService with committee_name filter - Add committee-surveys-list component using SurveyService.getSurveysByCommittee - Add loadError signal + error state UI to committee-votes-list for resilient UX - Add hideGroupFilter input to votes-table for reuse in committee context - Add preselectCommitteeFromQueryParams to survey-manage for committee preselection - Include empty state and loading skeleton for both tab components LFXV2-1190 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Manish Dixit <mdixit@linuxfoundation.org>
8b7d13f to
6c3e963
Compare
|
Deferring this PR — votes and surveys tab content will come in a follow-up once the BFF endpoints (#341) are ready. Current effort focuses on the members tab and committee view polish. |
Summary
committee-votes-listcomponent using existingVoteServicewithcommittee_namefilter (no BFF endpoint needed)committee-surveys-listcomponent usingSurveyService.getSurveysByCommitteeloadErrorsignal + error state UI with retry button to votes-listhideGroupFilterinput tovotes-tablefor reuse in committee contextpreselectCommitteeFromQueryParamstosurvey-managefor committee preselectionKey Design Decision
The votes-list uses
VoteService.getVotesByProjectPaginateddirectly instead of a BFF endpoint. This avoids the type mapping complexity that the original implementation had (mapping vote resources toCommitteeVotewith misleading zero values).Split Context
This is PR 2 of 4 splitting #335 into focused PRs:
Merge order: Merge #341 first, then retarget this PR to
main.Test Plan
yarn lint && yarn buildpasses ✅LFXV2-1190
🤖 Generated with Claude Code