Skip to content

Conversation

@agatha197
Copy link
Contributor

@agatha197 agatha197 commented Oct 31, 2025

Resolves #4578 (FR-1645)

Improve folder selection handling and deletion callback

This PR enhances two key aspects of folder management:

  1. Adds a preserveOtherPageSelections parameter to handleRowSelectionChange function, allowing selections to persist across different pages
  2. Updates the deletion callback in VFolderNodes to pass the deleted folder ID to the parent component

Changes:

  • Enhanced handleRowSelectionChange to properly maintain selections when navigating between pages
  • Implemented the improved selection handling in VFolderNodeListPage with cross-page selection preservation
  • Modified the deletion success callback to pass the deleted folder ID to the parent component

Checklist:

  • Documentation
  • Minium required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

Copilot AI review requested due to automatic review settings October 31, 2025 09:39
@github-actions github-actions bot added the size:M 30~100 LoC label Oct 31, 2025
Copy link
Contributor Author

agatha197 commented Oct 31, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@agatha197 agatha197 requested review from nowgnuesLee and yomybaby and removed request for Copilot October 31, 2025 09:40
@github-actions
Copy link

github-actions bot commented Oct 31, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
4.64% (-0% 🔻)
531/11434
🔴 Branches
3.77% (-0% 🔻)
302/8011
🔴 Functions
2.89% (-0% 🔻)
102/3535
🔴 Lines
4.59% (-0% 🔻)
513/11176
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴 helper/index.tsx
41.26% (-1.67% 🔻)
39.41% (-0.71% 🔻)
24.53% (-2% 🔻)
41.85% (-1.65% 🔻)

Test suite run success

121 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from fa489f7

Copilot AI review requested due to automatic review settings November 5, 2025 07:25
@agatha197 agatha197 force-pushed the fix_FR-1645_/mismatch-selected-count branch from 1dc3db2 to fa489f7 Compare November 5, 2025 07:25
@agatha197 agatha197 requested a review from nowgnuesLee November 5, 2025 07:26
Copy link
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

This PR enhances the row selection behavior in the VFolder nodes table by introducing a new preserveOtherPageSelections parameter to the handleRowSelectionChange helper function. This allows cross-page selections to be properly maintained when pagination is used.

  • Refactored handleRowSelectionChange to support two selection modes via a new optional parameter
  • Updated VFolderNodeListPage to enable the new cross-page selection preservation mode
  • Modified the onRequestChange callback in VFolderNodes to pass the deleted folder ID for proper cleanup

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
react/src/helper/index.tsx Added preserveOtherPageSelections parameter to handleRowSelectionChange with conditional logic for handling cross-page vs. current-page-only selection behavior
react/src/pages/VFolderNodeListPage.tsx Enabled cross-page selection preservation by passing 'id' and true as additional arguments to handleRowSelectionChange
react/src/components/VFolderNodes.tsx Updated mutation success callback to pass folder ID to onRequestChange instead of calling it without arguments

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@nowgnuesLee nowgnuesLee left a comment

Choose a reason for hiding this comment

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

LGTM

@yomybaby yomybaby force-pushed the fix_FR-1645_/mismatch-selected-count branch from fa489f7 to 7715693 Compare November 11, 2025 05:51
@yomybaby
Copy link
Member

I closed this PR without merging. This FR-1645 is resolved by #4613 . Please review it. Thank you. @agatha197 @nowgnuesLee

@yomybaby yomybaby closed this Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30~100 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mismatch in Selected Count After Partial Folder Deletion

4 participants