fix(onboarding): fox animation not resizing dynamically on welcome page#41499
fix(onboarding): fox animation not resizing dynamically on welcome page#41499
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 (3 files, +177 -6)
|
Builds ready [5846f92]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 12 warn · 🔴 0 fail)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 611a20a. Configure here.
Builds ready [611a20a]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 12 warn · 🔴 0 fail)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
|
Hi @smgv When resizing the window, there is a point that the size of the fox is changed dramatically. It's minor issue but it would be nice if we can make it smoother Screenshare.-.2026-04-07.10_55_47.PM.mp4 |
|
Builds ready [ec39851]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 12 warn · 🔴 0 fail)
Bundle size diffs
|




Description
The fox (Rive) animation on the welcome/onboarding page did not resize correctly during real-time browser window resizing. The animation appeared cropped or cut off when the window was resized without a page reload.
containerRefto the outerBoxwrapper to accurately measure container dimensions.syncCanvasSizefunction that readsclientWidth/clientHeightfrom the container, accounts fordevicePixelRatio, updates the<canvas>backing buffer dimensions and CSS size, then callsrive.resizeToCanvas()to re-render the animation into the new bounds.window.addEventListener('resize')for real-time updates. An early bail-out prevents redundant DOM writes when dimensions haven't changed.screen-md-max): replaced fixed300px × 400pxwithclamp(200px, 35vh, 350px)height andwidth: 100%, removed themargin-bottom: -70pxoffset that was causing bottom clipping, and addedoverflow: hiddento prevent content bleed.Alignment.Center→Alignment.BottomCenterso the fox stays anchored to the bottom as the container shrinks.Jira Link: https://consensyssoftware.atlassian.net/browse/TO-673
Changelog
CHANGELOG entry: Fixed the fox animation on the welcome screen being cut off or distorted when resizing the browser window without reloading.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Screen.Recording.2026-04-07.at.12.37.32.PM.mov
Screen.Recording.2026-04-07.at.12.38.04.PM.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
UI-only behavior and styling changes plus a resize event listener; low blast radius but could affect onboarding animation rendering across viewport sizes.
Overview
Fixes the welcome/onboarding fox (Rive) animation being cropped during live window resizes by attaching a container
ref, recalculating the canvas backing buffer using containerclientWidth/clientHeight(incl.devicePixelRatio), and callingrive.resizeToCanvas()on mount and onwindow.resize(with cleanup).Updates the Rive layout alignment to
Alignment.BottomCenterand tweaks.riv-animation__fox-containerresponsive CSS (small-screenclamp()height, full-width/max-width,overflow: hidden) to reduce clipping. Adds a newFoxAppearAnimationtest suite covering rendering, trigger firing, loader placeholder, and resize listener behavior.Reviewed by Cursor Bugbot for commit ec39851. Bugbot is set up for automated code reviews on this repo. Configure here.