-
Notifications
You must be signed in to change notification settings - Fork 78
fix(FR-1645): Mismatch in Selected Count After Partial Folder Deletion #4580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
Coverage report for
|
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
1dc3db2 to
fa489f7
Compare
There was a problem hiding this 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
handleRowSelectionChangeto support two selection modes via a new optional parameter - Updated VFolderNodeListPage to enable the new cross-page selection preservation mode
- Modified the
onRequestChangecallback 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.
nowgnuesLee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fa489f7 to
7715693
Compare
|
I closed this PR without merging. This FR-1645 is resolved by #4613 . Please review it. Thank you. @agatha197 @nowgnuesLee |

Resolves #4578 (FR-1645)
Improve folder selection handling and deletion callback
This PR enhances two key aspects of folder management:
preserveOtherPageSelectionsparameter tohandleRowSelectionChangefunction, allowing selections to persist across different pagesVFolderNodesto pass the deleted folder ID to the parent componentChanges:
handleRowSelectionChangeto properly maintain selections when navigating between pagesVFolderNodeListPagewith cross-page selection preservationChecklist: