-
Notifications
You must be signed in to change notification settings - Fork 5
Implement virtual scroll for large dataframes #369
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
base: master
Are you sure you want to change the base?
Conversation
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 WIP pull request implements virtual scrolling for the HighTable component to handle large datasets efficiently. The implementation introduces coordinate transformation between physical canvas height and virtual canvas height, along with custom scroll handling logic. The PR is currently broken due to an update loop issue as noted in the title.
Key changes:
- Implements virtual scroll provider with coordinate transformation between canvas and virtual canvas spaces
- Adds IntersectionObserver-based focus management for cells in virtual scroll mode
- Updates scroll behavior to support options parameter for smooth/instant scrolling
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| src/providers/ScrollModeVirtualProvider.tsx | Main implementation of virtual scrolling logic with state management, coordinate transformations, and scroll-to-row functionality |
| src/providers/ScrollModeProvider.tsx | Passes required props (numRows, headerHeight) to ScrollModeVirtualProvider |
| src/hooks/useCellFocus.ts | Adds IntersectionObserver-based focus logic for virtual scroll mode with horizontal scroll handling |
| src/contexts/ScrollModeContext.ts | Extends context interface with shouldScrollHorizontally flag and behavior options for scrollToTop |
| src/components/HighTable/Scroller.tsx | Updates scrollTo implementation to accept behavior options (instant/smooth) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Copilot reviewed 14 out of 14 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Copilot reviewed 14 out of 14 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Finally, I have a valid PR for virtual scrolling of huge dataframes. Would you like to have a look @platypii? |
|
The bottom border is not visible when scrolling past the end of the table (it only happens in "virtual scroll mode") Screencast.From.2026-01-07.14-44-18.mp4 |
|
Still getting weird behavior: if I scroll down even one "notch" on my scroll wheel, I jump to row 4000+. Worse: when I try to scroll back up, there's no way to get back to row 1 simplescreenrecorder-2026-01-07_12.06.49.mp4 |
|
Hmmm, I don't know how to change this while letting the browser natively handle the scroll. The current logic is:
I understand the UX is maybe not what we expected, but I don't think we would be able to do more with the current concepts/logic. Alternatives:
For 3., an option might be to use the scrollbar for local scrolling, eg from row 0 to row 8.000.000, then:
|
f7e95fe to
f3baeb6
Compare
aad7611 to
bce4625
Compare
e067934 to
8abfa1c
Compare
8abfa1c to
4d66f9b
Compare
4d66f9b to
e40e212
Compare
It replaces #347 (the remaining parts). The current commit will be recreated later, but I wanted to save my work.
remaining:
Later?
Screencast.From.2026-01-03.01-35-13.mp4