fix(ScreenFooter): init animatedValue to 1 for opacity-based animations when visible - #4036
Closed
adids1221 wants to merge 3 commits into
Closed
fix(ScreenFooter): init animatedValue to 1 for opacity-based animations when visible#4036adids1221 wants to merge 3 commits into
adids1221 wants to merge 3 commits into
Conversation
Contributor
✅ PR Description Validation PassedAll required sections are properly filled out:
Your PR is good for review! 🚀 This validation ensures all sections from the PR template are properly filled. |
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.
Description
On Android, when
animationType='none'(oranimationDuration=0) andvisible=true, the footer'sanimatedValuewas initialized to0instead of1. This caused the footer to render withopacity: 0for at least one UI-thread frame, blocking touches in the footer area even though the footer appeared invisible.Root cause
Both
'fade'and'none'use theopacitypath inuseAnimatedStyle. Only'slide'usestranslateYand legitimately starts at0. So the initial value guard should be!== 'slide', not=== 'fade'.Fix
Why this doesn't regress hide-on-scroll for
animationType='none'PR #4009 broke hide-on-scroll by changing
else → else if (animationType === 'fade')inuseAnimatedStyle, which excluded'none'from receiving opacity. PR #4019 reverted that. This fix is orthogonal — it only touches the initial value, not the style callback. Theelsebranch (restored by #4019) still drives opacity to0whenvisiblebecomesfalse.Changelog
ScreenFooter - fix touch blocking on Android when animationType is 'none' and footer is visible on mount
Additional info
Related: #4009, #4019