Improve mobile scroll animations by disabling scrub behavior#161
Draft
Katotodan wants to merge 1 commit intomeshery-extensions:masterfrom
Draft
Improve mobile scroll animations by disabling scrub behavior#161Katotodan wants to merge 1 commit intomeshery-extensions:masterfrom
Katotodan wants to merge 1 commit intomeshery-extensions:masterfrom
Conversation
Signed-off-by: DANIEL KATOTO <katotodan@gmail.com>
|
🚀 Preview deployment for PR #161 🌐 Preview URL: https://meshery-extensions.github.io/kanvas-site/pr-preview/pr-161/ This preview will be updated automatically when you push new commits to this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Notes for Reviewers
This PR improves the user experience of scroll-based animations on mobile devices.
On touch devices, fast flick scrolling can cause large jumps in scroll position. Because many animations were configured with ScrollTrigger's
scruboption, the animations were tightly linked to scroll progress and would frequently reverse or jump when the scroll direction changed slightly.To address this, this PR introduces a responsive animation configuration:
matchMedia("(max-width: 768px)")scrubfor ScrollTrigger animations on mobiletoggleActions: "play none none none"so animations play once when entering the viewportDesktop behavior remains unchanged, preserving scroll-linked animation effects.
Benefits:
No visual changes are expected on desktop.
Use the preview link on a mobile device to view the changes
Part of Javascript: Improve animation performance #146
Signed commits