-
Notifications
You must be signed in to change notification settings - Fork 38
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
two_billion_rows example scrolls no less than ~2000 rows at a time #15
Comments
If your dataset has 2 billion rows, then on a single down press you're scrolling through 0.0001% of the data. Too much more granular and you'll never be able to scroll to the end. |
I suppose scroll could remain unchanged, but down/up and space/shift space could change to +/- 1 and +/- 100 respectively |
I agree that there's an inherent contradiction here someplace. At the same time, whether I'm working with 1e3 rows or 1e9 rows, my interaction with individual rows will be more or less the same. If regular-table jumps around thousands of rows for every minimal input, that's going to make some basic interactions difficult.
I like your idea about the keys and the shift modifier. I'm not crazy about the current scroll wheel behavior. My specific issue is that if the screen scrolls by more than the number of rows currently shown ( My own preference would be to default to 1-3 rows for both scroll wheel and arrow keys. If someone wants to navigate faster, they can always use a modifier key, or just scrub the scroll bar thumb. |
This is due to a bug in Chrome that we compensate for by limiting the vertical scroll virtual size to 10,000,000px. Beyond this limit, rows in the virtual space are 10,000,000 / N shorter, with a default row height of 20px to a theoretical 1-pixel-per-row of 200,000,000 rows.
regularTable.addEventListener("scroll", event => {
regularTable.scrollBy(translateMouseWheelToVirtualRows(event.wheelX));
} |
the issue is closed? |
@shubhamcodez The issue is not-fixable, as noted. If you have a real, usable example of a grid with enough rows to trigger this issue however, I'd be very interested to see it - you need over 500k rows in a dataset before even a single pixel will drift on Chrome. |
Not sure if this is a bug, or intended behavior (or if I'm just missing something obvious).
Steps to Reproduce:
Clone this repo, then:
then navigate to the two_billion_rows example.
Expected Result:
For the example to only scroll 1 row at a time (I guess? That might not be the best behavior either) for every press of the up/down keys or tic of the scroll wheel.
Actual Result:
I was playing around with the two_billion_rows example, and I noticed that the least you can scroll (ie on a single press of up/down or on a single click of the mousewheel) is 2364 rows at a time. This appears to be the behavior of any sufficiently long regular-table. This creates a UX problem, as there doesn't seem to be a way to scroll, eg, the 1000th row into view, much less a way to position the 1000th row in a specific location on my screen.
The implementation of this behavior is in the
_calculate_row_range
function. I think there's three questions here:The text was updated successfully, but these errors were encountered: