-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix last row sometimes being missing in List #4911
Fix last row sometimes being missing in List #4911
Conversation
A bunch of list tests are failing as they seem to depend on the old incorrect behavior. I'd appreciate if someone can check my assumptions before I update them all though. |
It does seem as though you've found an off-by-one. |
List doesn't have header rows builtin like table |
Haha you got me :) I should sleep more! |
Also just that I'm quite familiar with the List API as something like 40% of my app UI is different kind of lists (with another 40% being gridwraps maybe) 😄 |
973be22
to
b6498b0
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.
Hmm. Is it possible to get some kind of code to reproduce this or a test that clearly shows it? I notice no difference in lists on my computer.
It was a rounding error so it only reproduced at certain list widget sizes relative to the row size. Larger rows (ie taller than just a label) seemed to reproduce the problem more often too. Drag the window size around while being scrolled right near the bottom of the list and eventually you should get the original problem to repro |
I was able to replicate the issue with one of my apps and this does indeed fix it. |
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.
Thanks so much for solving this
Description:
Fixes #4909
The
calculateVisibleRowHeights
calculation derivedmaxRow
as the max row that could possibly be visible, but the rest of the function treated it as the first row that couldn't be visible (i.e. inclusive vs exclusive bound issue).Checklist: