-
Notifications
You must be signed in to change notification settings - Fork 35
WRR-29169: Changed scroll animation method #3350
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
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3350 +/- ##
===========================================
+ Coverage 82.13% 82.24% +0.10%
===========================================
Files 153 153
Lines 7127 7151 +24
Branches 1880 1885 +5
===========================================
+ Hits 5854 5881 +27
+ Misses 999 997 -2
+ Partials 274 273 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
closing in favour of #3353 |
daniel-stoian-lgp
left a comment
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.
Please add changelog
daniel-stoian-lgp
left a comment
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.
LGTM. Good job!
Checklist
Issue Resolved / Feature Added
Changed scroll animation method
Resolution
Additional Considerations
After analysis, I've found that Chromium-based browsers have difficulty processing consecutive scroll animations using
element.scrollTo({ behavior: 'smooth' }). This issue causes the scroll to become blocked. The issue is related to native scroll. In the sampler, the prop was never assigned and I fixed that.I tested this in Storybook, created a separate sampler, tried to reduce the speed of the Accelerator, and also used a simple HTML file with a basic script that performed scroll on
keyDown. The problem was consistently reproducible on Chromium, but worked without any issues on Firefox.The final solution was to use
requestAnimationFramewhich, in turn, callselement.scrollTo()withbehavior: 'auto'. With this solution, it works fine on PC, but on the TV board with sideload, I observed that the scroll animation does not have 60 FPS; it's around 40 FPS, which I think may be a hardware limitation, but the scroll is not blocked.Links
WRR-29169
Comments
Enact-DCO-1.0-Signed-off-by: Ion Andrusciac [email protected]