-
Notifications
You must be signed in to change notification settings - Fork 17
fix: virtualization problems #3100
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
|
@greptile-review |
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 fixes virtualization problems in the YDB Embedded UI by introducing a new useResizeObserverTrigger hook that dispatches window resize events to force virtualized components to recalculate their visible items after layout changes such as panel expansions/collapses or fullscreen state changes.
Key changes:
- Created a new utility hook
useResizeObserverTriggerthat uses doublerequestAnimationFrameand optional timeout to ensure resize events are dispatched after layout recalculation - Integrated the hook in three locations: Fullscreen component, ClusterOverview component, and PaneVisibilityToggleButtons component
- Replaced inline resize event dispatching logic in Fullscreen.tsx with the new hook
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/utils/hooks/useResizeObserverTrigger.ts | New hook that triggers window resize events when dependencies change, with configurable timeout for animation completion |
| src/components/Fullscreen/Fullscreen.tsx | Refactored to use the new hook instead of inline resize event dispatching |
| src/containers/Cluster/ClusterOverview/ClusterOverview.tsx | Added hook usage with 110ms timeout to handle Disclosure component animations |
| src/containers/Tenant/utils/paneVisibilityToggleHelpers.tsx | Added hook usage to trigger resize when pane collapse state changes |
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.
4 files reviewed, 2 comments
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
|
@greptile-review |
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.
4 files reviewed, no comments
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
closes #2541
Stand
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ⏭️2
⏭️ Skipped Tests (2)
Bundle Size: ✅
Current: 66.13 MB | Main: 66.12 MB
Diff: +2.94 KB (0.00%)
✅ Bundle size unchanged.
ℹ️ CI Information