-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
chore(runway): cherry-pick fix: start animate when rive onPlay ( ready ) cp-7.60.0 #23084
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
chore(runway): cherry-pick fix: start animate when rive onPlay ( ready ) cp-7.60.0 #23084
Conversation
…y ) cp-7.60.0 (#22982) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> * fix: race condition in rive animations when animation fail to start. * Jira: https://consensyssoftware.atlassian.net/browse/SL-332 * Issue: #23048 In some device on edge cases, sometime the MetaMask riv logo does not appear during the onboarding screen animation. This is due to race conditions between state triggers and the rive onPlay state. This PR wait for onPlay state before fire the inputState ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: null ## **Related issues** Fixes: #23048 * race condition in rive animations when animation fail to start. ## **Manual testing steps** ```gherkin Feature: onboarding Scenario: user open the app after install Given user open the app after install Then user should see the Metamask riv logo ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/834c82d8-9fbf-4c96-943d-1ea067115401 ### **After** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/c4bca6d3-3bec-4be8-a68a-882770676ac4 ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Delay animation triggers until Rive reports onPlay, fixing race conditions that caused onboarding/fox animations to not start. > > - **UI** > - `FoxAnimation`: add `isPlaying` state and `onPlay` handler; trigger `fireState('FoxRaiseUp', ...)` only after play starts; remove `autoplay` usage. > - `OnboardingAnimation`: gate `startRiveAnimation` on `isPlaying`; add `onPlay` to set ready state; remove `autoplay` usage. > - **Testing/Mocks** > - Update `app/__mocks__/rive-react-native.tsx` to accept `onPlay` and invoke it on mount for tests. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit b36851c. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Gaurav Goel <grvgoel19@gmail.com>
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsAfter thorough investigation, these changes are limited to animation-related UI components and test infrastructure: Changed Files Analysis:
Impact Assessment:
Why No Tests Required:
Risk Level: Low - Pure UI/visual changes with no impact on wallet functionality, account management, transactions, or user flows that E2E tests verify. |
|
|
No release label on PR. Adding release label release-7.60.0 on PR, as PR was cherry-picked in branch 7.60.0. |



Description
In some device on edge cases, sometime the MetaMask riv logo does not
appear during the onboarding screen animation.
This is due to race conditions between state triggers and the rive
onPlay state.
This PR wait for onPlay state before fire the inputState
Changelog
CHANGELOG entry: null
Related issues
Fixes:
#23048
Manual testing steps
Screenshots/Recordings
Before
IMG_0012.MOV
After
IMG_0014.MOV
Pre-merge author checklist
Docs and MetaMask Mobile
Coding
Standards.
if applicable
guidelines).
Not required for external contributors.
Pre-merge reviewer checklist
app, test code being changed).
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
Note
Waits for Rive
onPlaybefore firing state/inputs, preventing missed onboarding and fox animations.OnboardingAnimation: GatestartRiveAnimationbehindisPlayingset viaonPlay; removeautoplayusage; maintain timing for logo move and fox start.FoxAnimation: FireFoxRaiseUponly afteronPlaysetsisPlaying; removeautoplayusage.__mocks__/rive-react-native: AddonPlayprop and invoke it on mount viauseEffectto simulate readiness; minor hook import updates.Written by Cursor Bugbot for commit 2e21954. This will update automatically on new commits. Configure here.
Co-authored-by: Gaurav Goel grvgoel19@gmail.com 2ab978e