-
Notifications
You must be signed in to change notification settings - Fork 5.4k
fix: stop reloading of animation & browser back option cp-13.9.0 #37581
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
Conversation
|
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. |
✨ Files requiring CODEOWNER review ✨🔐 @MetaMask/web3auth (5 files, +37 -15)
|
Builds ready [9ed7994]
UI Startup Metrics (1217 ± 89 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
LeVinhGithub
left a comment
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.
lgtm QA
|
|
||
| useEffect(() => { | ||
| setShowLoginOptions(Boolean(loginParam)); | ||
| }, [loginParam]); |
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: State mismatch on browser back navigation restoring login options
When the user navigates back using the browser back button, the useEffect sets showLoginOptions based on the URL parameter but does not restore the loginOption state. This causes a state inconsistency where showLoginOptions is true but loginOption is null, which breaks the rendering condition at line 119 (showLoginOptions && loginOption). The component will show the wrong UI (the initial buttons instead of the login options) when the user navigates back, even though the URL parameter indicates login options should be shown. The useEffect should also set setLoginOption(loginParam as LoginOptionType) to properly restore the component state from the URL.
Builds ready [709317b]
UI Startup Metrics (1221 ± 96 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
LeVinhGithub
left a comment
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.
re-approve
Description
In this PR, we have added the logic to stop the animation once completed. Also added a browser back logic for login options.
Jira Link: https://consensyssoftware.atlassian.net/browse/SL-278
Changelog
CHANGELOG entry: stopped reloading of animation once completed
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Screen.Recording.2025-11-06.at.8.16.37.PM.mov
Screen.Recording.2025-11-06.at.11.00.34.PM.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Persists Rive animation completion to skip replays, switches welcome flow to context-based skipping, and syncs login option visibility via the
?loginquery param; updates navigation and tests.animationCompletedmap andsetIsAnimationCompletedtoRiveWasmContext(ui/contexts/rive-wasm/index.tsx).MetamaskWordMarkAnimationsets completion on unmount and consumes the new setter; updates effect deps (ui/pages/onboarding-flow/welcome/metamask-wordmark-animation.tsx).welcomeusesanimationCompleted.MetamaskWordMarkAnimationto decideshouldSkipAnimation(replaces URL-based check) (ui/pages/onboarding-flow/welcome/welcome.js).WelcomeLoginreads?login=to control option view and writes it on selection vianavigate(ui/pages/onboarding-flow/welcome/welcome-login.tsx).AccountExistreturns toONBOARDING_WELCOME_ROUTEwithout?from=...; tests updated accordingly (ui/pages/onboarding-flow/account-exist/*).Written by Cursor Bugbot for commit 709317b. This will update automatically on new commits. Configure here.