Repository navigation
fix(menu): scale the menu in on every open, not only the first - #5232
Merged
Merged
Conversation
After a hide, scaleX and scaleY kept the measured size. A reopen with the same anchor and size then started withTiming at its target, so Reanimated skipped it and the menu only faded in. Reset both to 0 when the hide animation finishes, so each open starts from zero like the first one.
This comment has been minimized.
This comment has been minimized.
Remove comments related to scale animation handling.
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
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.
Motivation
A
Menuscales in only on its first open. Close it and open it again with the same anchor, and it just fades in at full size. The hide left the scale values at the measured size, so the next open'swithTimingstarted at its target and Reanimated skipped it. They now go back to 0 when the hide finishes.Related issue
None filed. Found while sampling the Menu's animated styles in Jest.
Screenshots / Videos
Before and after on iOS (open, close, open again):
Before:
menu-ios-before-main.mp4
After:
menu-ios-after-fix-v2.mp4
Test plan
In the example's Menu screen, checked on iOS 27.2, Android 13 and web: