Skip to content

feat: expand/collapse all functionality for proposals and reviewers a… - #1575

Merged
ChongJiaChua merged 4 commits into
developfrom
1599_Expand_And_Collapse_All_Functionality
Jun 24, 2026
Merged

feat: expand/collapse all functionality for proposals and reviewers a…#1575
ChongJiaChua merged 4 commits into
developfrom
1599_Expand_And_Collapse_All_Functionality

Conversation

@ChongJiaChua

@ChongJiaChua ChongJiaChua commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Closes UserOfficeProject/issue-tracker/issues/1599

Description

This PR adds an expand/collapse all button to the FAP proposals, reviews, and reviewers tables. The button renders inside the table header and toggles all detail panel rows open or closed with a single click.

Motivation and Context

Reviewing large FAP proposal lists required expanding each row individually to see reviewer assignments. This change allows users to expand or collapse all rows at once.

How Has This Been Tested

Fixes

Changes

  1. Added a shared expand/collapse all button that appears in the header of tables with expandable rows.
  2. Applied the button to the FAP proposals table, the FAP reviews table, and the reviewers and assignments table.
  3. Clicking the button expands or collapses all rows at once, with the icon updating to reflect the current state.

Depends on

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

@ChongJiaChua
ChongJiaChua marked this pull request as ready for review June 15, 2026 11:38
@ChongJiaChua
ChongJiaChua requested a review from a team as a code owner June 15, 2026 11:38
@ChongJiaChua
ChongJiaChua requested review from ellen-wright and removed request for a team June 15, 2026 11:38

//index each row and expand/collapse them
const toggleExpandAll = useCallback(() => {
setIsAllExpanded((prev) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion: Not a big issue but onToggleDetailPanel loop runs inside the setIsAllExpanded updater, but updaters must be pure functions, see caveats https://react.dev/reference/react/useState#caveats . can we somehow address this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

thanks for bringing that up. I've moved the side effects outside of the updater so it is pure now.

@ellen-wright ellen-wright left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

@ChongJiaChua
ChongJiaChua enabled auto-merge June 24, 2026 09:30
@ChongJiaChua
ChongJiaChua merged commit f85d05a into develop Jun 24, 2026
21 checks passed
@ChongJiaChua
ChongJiaChua deleted the 1599_Expand_And_Collapse_All_Functionality branch June 24, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expand all option on FAP proposals reviews page

3 participants