fix: 85431 Improve animations for flows using useSubPage#85531
Conversation
…1-improve-animations-for-use-sub-page
|
@dukenv0307 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c0b915b8c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| cancelAnimationFrame(requestID); | ||
| }; | ||
| }, [isRedirecting, startPageName, buildRoute]); | ||
| navigation.setParams({subPage: startPageName} as Record<string, unknown>); |
There was a problem hiding this comment.
Wait for startFrom to settle before setting the initial subPage
When a useSubPage screen opens without :subPage, this now calls setParams() on the first effect tick and permanently makes urlPageName truthy. In MissingPersonalDetailsContent, startFrom depends on shouldCollectPIN, which is still derived from ONYXKEYS.CARD_LIST after mount (src/pages/MissingPersonalDetails/MissingPersonalDetailsContent.tsx:66-90), and getInitialSubPage() only routes to PIN once that flag is true (src/pages/MissingPersonalDetails/utils.ts:26-48). If the card list arrives after the first render, the hook has already locked the route to the earlier page and will never redirect again, so UK/EU card users can reopen the flow on confirm instead of the required PIN step.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I think it's very unlikely as ONYXKEYS.CARD_LIST is fetched before we show this screen. @dukenv0307 wdyt?
There was a problem hiding this comment.
We've discussed in slack and in result Ive added a simple check that should prevent this
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-03-19.at.18.35.31.movAndroid: mWeb ChromeScreen.Recording.2026-03-19.at.18.23.08.moviOS: HybridAppScreen.Recording.2026-03-19.at.18.39.49.moviOS: mWeb SafariScreen.Recording.2026-03-19.at.18.20.23.movMacOS: Chrome / SafariScreen.Recording.2026-03-19.at.18.14.55.mov |
|
@MrMuzyk @arosiclair I found 1 issue that's not related to our PR, we still can reproduce in staging
Current behavior: Expected behavior: Screen.Recording.2026-03-19.at.18.37.47.mov |
I think this is okay for now since the value can be fixed on the confirmation screen and the API should reject anything invalid. |
|
🚧 @arosiclair has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/arosiclair in version: 9.3.41-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.3.41-4 🚀
|
Explanation of Change
Fixed Issues
$ #85431
PROPOSAL:
Tests
Same as QA steps
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android.mp4
Android: mWeb Chrome
android.web.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.web.mp4
MacOS: Chrome / Safari
web.mp4