You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$250] Blank RHP opens for a moment when validating a new contact method #53772
Version Number: 53762 Reproducible in staging?: Yes Reproducible in production?: No If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A If this was caught during regression testing, add the test name, ID and link from TestRail:https://expensify.testrail.io/index.php?/tests/view/5315884 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team
Action Performed:
Sing in to staging.new.expensify.com
Navigate to settings > Profile
Add a new contact method
Enter magic code sent for the primary contact method
Click on the newly added contact method to validate
Expected Result:
RHP opens prompting to enter a magic code sent to the secondary contact email address.
Actual Result:
A blank RHP is displayed for a moment when clicking on validating secondary contact method.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
What changes do you think we should make in order to solve the problem?
We can apply the same fix in other less general modal components instead of on BaseModal which would affect several places like the one here.
For instance to solve the original problem we can apply the delay in AttachmentModal
the blank screen we see in the video at OP, it is rendering ContactMethodDetailsPage. When isValidateCodeActionModalVisible is set to true then navigate to ValidateCodeActionModal
What changes do you think we should make in order to solve the problem?
We should move ValidateCodeActionModal in the ContactMethodDetailsPage component to a component ContactMethodDetailsValidateModal like we did with others validate modal
Create a new ROUTE for ContactMethodDetailsValidateModal component
We should update onPress function in ContactMethodsPage, will navigate to ContactMethodDetailsValidateModal when this contact method is not validated yet.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
This PR includes a temporary fix for the slide in animations of modal screens like the ProfileAvatar screen. The reason the animation was not visible is because the screens with NativeStack only get mounted once we navigate there and the screen has not finished rendering/mounting when the modal animates in.
Similarly, when we animate the modal out, we'll have to delay the back navigation by the modal animation duration.
Ultimately, we should think about migrating react-native-modal/RN Modal screens to @react-navigation modal screens.
Since this was pushed as a temporary fix, I wouldn't revert the PR for seeing blank RHP "for a moment", but if that's the recommended course here and there is a stronger argument for not wanting this blank RHP "for a moment" vs the modals not animating in/out then feel free to proceed.
cc @chrispader@mountiny@ishpaul777 for more context on the discussion where the PR revert was suggested and your take on whether we should actually revert or not given the issue is not a blocker for users in any way
Activity
melvin-bot commentedon Dec 9, 2024
Triggered auto assignment to @amyevans (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Dec 9, 2024
Triggered auto assignment to @lschurr (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.melvin-bot commentedon Dec 9, 2024
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Dec 9, 2024
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
amyevans commentedon Dec 9, 2024
Demoting it to not block deploy and opening up for external proposals.
5 remaining items
melvin-bot commentedon Dec 9, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rayane-djouah (
External)FitseTLT commentedon Dec 9, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Blank RHP opens for a moment when validating a new contact method
What is the root cause of that problem?
This is a regression from #53475 The PR intended to solve animation bug by delaying the appearance of the modal via runAfterInteraction
App/src/components/Modal/BaseModal.tsx
Lines 72 to 81 in 219dabf
What changes do you think we should make in order to solve the problem?
We can apply the same fix in other less general modal components instead of on
BaseModalwhich would affect several places like the one here.For instance to solve the original problem we can apply the delay in
AttachmentModalApp/src/components/AttachmentModal.tsx
Line 493 in 219dabf
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore? (Optional)
luacmartins commentedon Dec 9, 2024
cc @chrispader can you work on a fix since it's coming from your PR? cc @ikevin127 @mountiny
daledah commentedon Dec 9, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
A blank RHP is displayed for a moment when clicking on validating secondary contact method.
What is the root cause of that problem?
We are navigating to
ContactMethodDetailsPagewhen user clicks contact method item hereApp/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx
Line 81 in 4f4720e
And in component
ContactMethodDetailsPagewe check the condition to showValidateCodeActionModalApp/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx
Lines 261 to 276 in 4f4720e
the blank screen we see in the video at OP, it is rendering
ContactMethodDetailsPage. WhenisValidateCodeActionModalVisibleis set totruethen navigate toValidateCodeActionModalWhat changes do you think we should make in order to solve the problem?
We should move
ValidateCodeActionModalin theContactMethodDetailsPagecomponent to a componentContactMethodDetailsValidateModallike we did with others validate modalCreate a new ROUTE for
ContactMethodDetailsValidateModalcomponentWe should update
onPressfunction inContactMethodsPage, will navigate toContactMethodDetailsValidateModalwhen this contact method is not validated yet.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
amyevans commentedon Dec 9, 2024
Looks like the original PR is being reverted. Assigning @chrispader to handle during reintroduction of the code!
Edit: @chrispader please comment so I can assign you 😄
ikevin127 commentedon Dec 9, 2024
This is what the PRs #53475 description says:
Since this was pushed as a temporary fix, I wouldn't revert the PR for seeing blank RHP "for a moment", but if that's the recommended course here and there is a stronger argument for not wanting this blank RHP "for a moment" vs the modals not animating in/out then feel free to proceed.
cc @chrispader @mountiny @ishpaul777 for more context on the discussion where the PR revert was suggested and your take on whether we should actually revert or not given the issue is not a blocker for users in any way
Edit: Looks like there's a 2nd regression here:
luacmartins commentedon Dec 9, 2024
Fixed in staging after the revert
Screen.Recording.2024-12-09.at.3.44.44.PM.mov