Skip to content

feat(committees): add votes and surveys tab components#343

Closed
manishdixitlfx wants to merge 1 commit intofeat/LFXV2-committees-bff-endpointsfrom
feat/LFXV2-committees-votes-surveys-tabs
Closed

feat(committees): add votes and surveys tab components#343
manishdixitlfx wants to merge 1 commit intofeat/LFXV2-committees-bff-endpointsfrom
feat/LFXV2-committees-votes-surveys-tabs

Conversation

@manishdixitlfx
Copy link
Copy Markdown
Contributor

@manishdixitlfx manishdixitlfx commented Mar 19, 2026

Summary

  • Add committee-votes-list component using existing VoteService with committee_name filter (no BFF endpoint needed)
  • Add committee-surveys-list component using SurveyService.getSurveysByCommittee
  • Add loadError signal + error state UI with retry button to votes-list
  • 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

Key Design Decision

The votes-list uses VoteService.getVotesByProjectPaginated directly instead of a BFF endpoint. This avoids the type mapping complexity that the original implementation had (mapping vote resources to CommitteeVote with misleading zero values).

Split Context

This is PR 2 of 4 splitting #335 into focused PRs:

  1. feat(committees): add BFF endpoints for meetings and surveys #341 — Backend BFF endpoints + meetings plumbing (~310 lines) — base branch for this PR
  2. This PR (feat(committees): add votes and surveys tab components #343) — Votes & surveys tab components (~430 lines)
  3. feat(committees): refactor members tab with governance fields and enhanced form #342 — Members tab & member form enhancements (~700 lines) — independent
  4. fix(committees): committee view polish and settings cleanup #344 — Leadership dialog & committee view polish (~380 lines) — depends on PRs 1 & 3

Merge order: Merge #341 first, then retarget this PR to main.

Test Plan

  • Votes tab renders vote data filtered by committee name
  • Surveys tab renders surveys for the committee
  • Empty states display correctly when no data exists
  • Error state with retry button works in votes-list
  • Loading skeletons appear during data fetch
  • yarn lint && yarn build passes ✅

LFXV2-1190

🤖 Generated with Claude Code

@manishdixitlfx manishdixitlfx requested a review from a team as a code owner March 19, 2026 16:52
Copilot AI review requested due to automatic review settings March 19, 2026 16:52
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 19, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9f0fc658-9838-4636-9711-0f383c113cfa

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/LFXV2-committees-votes-surveys-tabs
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-list to fetch/paginate votes filtered by committee_name, with error state + retry.
  • Added lfx-committee-surveys-list to fetch surveys by committee and display results in the existing drawer/table UI.
  • Enhanced shared lfx-votes-table with an optional hideGroupFilter input; added query-param committee preselection to survey-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.

Comment on lines +143 to +152

if (pageIndex > 0 && !pageToken) {
this.currentFirst.set(0);
this.loading.set(false);
return of([]);
}

const searchName = this.filters().search;
const queryFilters = this.buildFilters();

Comment on lines +392 to +399
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>
@manishdixitlfx
Copy link
Copy Markdown
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants