Skip to content
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

[BUG] Align to bottom flickering #423

Closed
pranas opened this issue Aug 3, 2021 · 8 comments
Closed

[BUG] Align to bottom flickering #423

pranas opened this issue Aug 3, 2021 · 8 comments
Labels
bug Something isn't working released

Comments

@pranas
Copy link

pranas commented Aug 3, 2021

Describe the bug
The items in the list start to flicker when using alignToBottom option and browser zoom feature. When you use browser zoom feature it creates items with floating point height which likely triggers this issue. The item size keeps recalculating and changing which triggers different padding at the top which results in flickering effect.

Reproduction
You can reproduce in "align-to-bottom" e2e example with the following patch: https://github.com/EddyTravels/react-virtuoso/commit/90ee4ea73c3b54779912c9058e9002cbefd93e99

To Reproduce
Steps to reproduce the behavior:

  1. Open "align-to-bottom"
  2. Adjust browser zoom level down to 75%
  3. The flickering should start

Screenshots

align_bottom_flicker.mov

(I recorded with item height at 30.8 but I was later able to reproduce with 30px height items as well at different zoom level)

Desktop (please complete the following information):

  • OS: Mac OS 11.5.1
  • Browser Chrome 92

Additional context

I believe this was also the issue in #317 and #268 but was closed due to lack of reproduction example.

@pranas pranas added the bug Something isn't working label Aug 3, 2021
@petyosi
Copy link
Owner

petyosi commented Aug 3, 2021

Thanks, this seems like a clear repro. Hopefully fixable.

@PerlMonker303
Copy link

Encountered the same issue on a closed-source project, but not only when scrolling to the bottom of the list. Noticed one thing though: the more you scrolled (i.e. the further you are in the list), the more aggressive the flickering is. Hope this helps a bit.

@pranas
Copy link
Author

pranas commented Aug 5, 2021

@petyosi This is an important issue for us so we've made a contribution to help you prioritize it. Hope you can crack it soon!

@petyosi
Copy link
Owner

petyosi commented Aug 5, 2021

@pranas Thank you very much, I appreciate that - the test case is helpful as well. I will look into it as soon as my schedule allows.

@petyosi petyosi closed this as completed in 392b9c8 Aug 6, 2021
@petyosi
Copy link
Owner

petyosi commented Aug 6, 2021

@pranas The fix I discovered seems correct to me and addresses the simplistic case you presented. Please let me know how the new version behaves in your real project.

@github-actions
Copy link

github-actions bot commented Aug 6, 2021

🎉 This issue has been resolved in version 1.10.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@pranas
Copy link
Author

pranas commented Aug 6, 2021

It seems the flickering is gone, great find! Thanks for a quick fix and keep up the good work with react-virtuoso.

@tsnevillecom
Copy link

How do you align these to the bottom?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

4 participants