-
Notifications
You must be signed in to change notification settings - Fork 5
[refactor] Prepare native/virtual scroll mode - virtual mode is not implemented #364
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
e899bb8 to
a4127e4
Compare
49a8556 to
7cf262b
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 introduces alternate scroll mode calculations to support rendering very large dataframes. The key innovation is detecting when the table height would exceed browser DOM element height limits (approximately 8-33 million pixels depending on browser) and switching to a "virtual scroll" mode.
- Refactored scroll logic from the Scroller component into dedicated provider components (ScrollModeProvider, ScrollModeNativeProvider, ScrollModeVirtualProvider)
- Introduced a new ScrollModeContext to replace ScrollerContext, consolidating scroll-related functionality
- Optimized setVisibleRowsRange to avoid unnecessary re-renders by comparing field values instead of object references
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/providers/ScrollModeProvider.tsx | New provider that determines whether to use native or virtual scroll mode based on table height |
| src/providers/ScrollModeVirtualProvider.tsx | New provider implementing virtual scroll mode (currently shows error as not fully implemented) |
| src/providers/ScrollModeNativeProvider.tsx | New provider implementing native browser scroll mode, extracted from Scroller component |
| src/contexts/ScrollModeContext.ts | New context replacing ScrollerContext with expanded scroll mode functionality |
| src/contexts/ScrollerContext.ts | Removed and replaced by ScrollModeContext |
| src/providers/RowsAndColumnsProvider.tsx | Optimized setVisibleRowsRange callback to prevent unnecessary re-renders |
| src/components/HighTable/Scroller.tsx | Refactored to use ScrollModeContext instead of containing scroll logic |
| src/components/HighTable/Wrapper.tsx | Updated to integrate ScrollModeProvider and move constants imports |
| src/components/HighTable/Slice.tsx | Updated to use ScrollModeContext instead of ScrollerContext |
| src/hooks/useCellFocus.ts | Added conditional logic to handle virtual scroll mode differently |
| src/helpers/constants.ts | Added maxElementHeight constant and moved constants from HighTable directory |
| src/components/HighTable/HighTable.stories.tsx | Added LargeData and SmallData stories to test different scroll modes |
| README.md | Clarified padding parameter documentation |
Comments suppressed due to low confidence (1)
src/helpers/constants.ts:14
- The reference URL contains a future date (2025/08/07). As of January 2026, this date would be in the past, but it appears to be fictional since today is January 2, 2026 and the date is in August 2025. Please verify this URL actually exists or update to the correct reference URL.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.