-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Quick win: Cancel tracker animations on click #7380
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
.../duckduckgo/app/browser/omnibar/animations/addressbar/BrowserLottieTrackersAnimatorHelper.kt
Show resolved
Hide resolved
|
I think this will need more work, and might be more than a QWD attempt 😬
cookie-reappear.mp4 |
| } | ||
| } | ||
|
|
||
| private fun cancelCustomTabAnimations() { |
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.
Bug: Cancel methods omit shieldViews, potentially leaving icons faded
The cancelAddressBarAnimations() and cancelCustomTabAnimations() methods call cancelAnimations() without passing shieldViews() or customTabShieldViews(). The fallback mechanism in stopCookiesAnimation() that resets currentShieldViews has an early return if cookie views aren't initialized yet. If the user cancels during the trackers animation (before cookies animation starts), shield views may remain with modified alpha since neither the explicit shieldViews parameter nor the currentShieldViews fallback will reset them.
Task/Issue URL: https://app.asana.com/1/137249556945/project/1207418217763355/task/1212330168162873
Description
Adds animation canceling when clicked to allow users to start using the browser more quickly.
Steps to test this PR
Regular tab
Custom tab
Note
Enable tapping the trackers animation or custom tab toolbar to cancel animations, with improved animator lifecycle and shield view handling for clean, immediate stops.
newCustomTabToolbarContainer.customTabInnerContainer->cancelCustomTabAnimations().trackersAnimation->cancelAddressBarAnimations().cancelCustomTabAnimations()delegating toanimatorHelper.cancelAnimations(customTabViews()).sceneRoot.setOnClickListener { cancelAnimations(omnibarViews, shieldViews) }.currentShieldViewsand reset alpha on cancel; includeshieldViewsincancelAnimations(...).runningCookieAnimators: cancel/clear before starting; add all createdAnimatorSets; robuststopCookiesAnimation()(cancel animators, end transitions, clear listeners, hide views, reset alphas).enqueueCookiesAnimationreset), avoid null filtering, skip cookies in custom tabs.BrowserTrackersAnimatorHelper.cancelAnimationsnow acceptsshieldViews(default empty) and KDoc updated.Written by Cursor Bugbot for commit f7ee029. This will update automatically on new commits. Configure here.