Reanimated modal for validate code action modal#66046
Conversation
|
Found this bug while retesting, but it's not connected to the modal inplementation change. Already posted on slack
Expected Result: Second modal code request appears (to confirm new contact email.) Platforms: any web Screen.Recording.2025-07-22.at.11.52.19.movIt's here |
|
@ZhenjaHorbach 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp2025-07-23.12.57.22.movAndroid: mWeb Chrome2025-07-23.12.55.15.moviOS: HybridAppios.moviOS: mWeb Safariios-web.movMacOS: Chrome / Safariweb.movMacOS: Desktopweb.mov |
|
@jmusial |
| @@ -72,6 +72,7 @@ function ValidateCodeActionModal({ | |||
| useNativeDriver | |||
There was a problem hiding this comment.
As I remenber ReanimatedModal doesn't use this prop
|
And Is it just me or is the animation too fast? 2025-07-23.13.43.59.mov |
I think this is the same as here. We have |
Did some testing and I think this is just because default The timings for our transition is 300 in 200 . Default for navigator is 500 in out for IOS and 350 in out for Android. I think that's why it looks a bit out of place on IOS. @Expensify/design should we tweak transition times for RHP mimicing modals to be more in line with navigator ? Below 500ms transition for that modal Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-07-25.at.11.31.25.mp4 |
Oh yeah |
|
Hmm I don't think I am exactly following what you are saying, mind rephrasing? Otherwise I think the video you are showing looks okay to me? Curious what others think though. |
@shawnborton 2025-07-23.13.43.59.mov |
|
Ah okay yeah, totally agree that feels way too fast. |
…-for-validate-code-action-modal
@ZhenjaHorbach this validate screen comes from Sorry, now I see that I should have chosen less confusing flow for testing this one :( EDIT: Ok, it's kinda connected there is the same issue when using the old modal but it's more visible on the new one. It's due to how old.modal.issue.movI'm gonna check how many places have similar issue and probably rewrite it. |
Yeah 😅 |
|
Hey @ZhenjaHorbach, sorry have been sidetracked by other issues. Coming back to this one: This recording is from current main (on IOS). (So old modal) You can see there 2 different modals, and all the bugs you mentioned :( Screen.Recording.2025-07-30.at.14.40.43.movWeb has the same issues (slightly less visible). It's a bit tricky this one because it's a modal over RHP, but it is used as an auth screen so its the first thing user sees and RHP and modal open at the same time. I think keeping current implementation (ValidateCodeAction) as a modal it's going to be hard to get rid of those. The best solution that comes to mind would be to do them all as RHP with navigation path (ie not a modal). Similar to how it's done for @Expensify/design are issues shown one the video above passable (it usually happens over 200ms so without slo mo barely noticable)? |
|
Hmm I suppose if it's not perceivable by the user it's okay, but let's get an opinion from our engineers too. |
@mountiny what's your opinion on this ? |
I think it's a good idea ! But yes |
|
Yea I do think that making them its own route and page in the stack makes the most sense. What are downsides to doing that? @jmusial Otherwise it seems like no new issues are introduced here so we can move this ahead |
mountiny
left a comment
There was a problem hiding this comment.
Changes look fine to me, though I would imagine it makes sense to update some of those flows to be its own pages instead of modals, I am not sure why they are modals in a first place. Maybe as we tried to reuse the same verification component in bunch of flows that was easier
|
@ZhenjaHorbach do you approve of the PR? |
Yeah |
|
@ZhenjaHorbach, Can you please write down which modals suffered from the bug you listed above? We could then see if we should migrate them to their own screens. |
In this PR we worked only with ValidateCodeActionModal And I can't remember similar issues in other modals 😅 |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
If you want I can go manually through the flows and make recommendations. |
You can directly open https://staging.new.expensify.com/missing-personal-details |
|
@ZhenjaHorbach yeah I mean on web it's ez 😄. But dunno how to get to this flow other than direct link |
|
@getusha @hungvu193 I remember you worked on the validate modal, right? I was also involved, but I cannot recall what was the reason for not creating these as separate pages? |
|
I remember I decided to create modal instead of separate page to reuse it every where. Most of the flows at the time only use magic code to verify the user. They shared the same flow (2Fa, contact method, connect bank account..etc). Creating a page also requires several steps and might need extra effort to handle routing, go back cases... |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.1.89-1 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.1.89-21 🚀
|



Explanation of Change
This PR uses react-native-reanimated based modal for Validate Code Action Modal.
Fixed Issues
$ #64778
PROPOSAL:
https://expensify.slack.com/archives/C05LX9D6E07/p1750147058498549
Tests
Note: Some of the tests have full flow, in some just showing the modal and going back - there seems to be a limit on number of codes that 1 user can generate in given time.
Tests for 2 out of many places that the modal exists in:
Add new contact method
Issue new Expensify card
Offline tests
N / A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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
0032.android.native.mov
Android: mWeb Chrome
0032.android.chrome.mov
iOS: Native
0032.ios.native.mp4
iOS: mWeb Safari
0032.ios.safari.mp4
MacOS: Chrome / Safari
0032.mac.chrome.mov
MacOS: Desktop
0032.mac.native.mov