-
Notifications
You must be signed in to change notification settings - Fork 35
WRR-29169: Improved scroll animation method #3353
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: develop
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3353 +/- ##
===========================================
+ Coverage 82.54% 82.61% +0.07%
===========================================
Files 153 153
Lines 7154 7179 +25
Branches 1892 1903 +11
===========================================
+ Hits 5905 5931 +26
+ Misses 980 979 -1
Partials 269 269 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…re/WRR-29169-1
…re/WRR-29169-1
…into feature/WRR-29169-1
|
can you put in the PR description what were the issues that led to developing the new scrolling logic? And a short description of the adopted solution |
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
alexandrumorariu
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
Checklist
Issue Resolved / Feature Added
Changed scroll animation method
Resolution
A new scrolling animation logic was developed to address a limitation in Google Chrome, which struggles to handle repeated calls to the native 'animated' scroll function. To overcome this, the solution implements the
requestAnimationFrameAPI to programmatically control the scroll animation while maintaining the use of native scrolling.It computes the scroll direction on each axis, then repeatedly calls
scrollByin small 18px steps (instant behavior) until the target is reached or a scroll bound is hit.By leveraging
requestAnimationFrame, the animation frames are synchronized with the browser’s refresh rate, resulting in smoother performance and improved visual consistency. This approach optimizes rendering efficiency and ensures a seamless scrolling experience.Additional Considerations
Compared to previous solution, here I used
scrollByinstead ofscrollTo. Also, reduced position calculations.Links
WRR-29169
Comments
Enact-DCO-1.0-Signed-off-by: Ion Andrusciac [email protected]