-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$250] DEV : When clicking to send the magic code to verify the secondary email, a blank page appears briefly before the page to enter the code. #53884
Comments
Triggered auto assignment to @MitchExpensify ( |
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989 |
ProposalPlease re-state the problem that we are trying to solve in this issue.When entering one of contacts, RHP modal opens twice. What is the root cause of that problem?App/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx Lines 239 to 276 in f8f12c2
Here at details page, though modal is opened other modal is placed by <ValidateCodeActionModal> .
What changes do you think we should make in order to solve the problem?Instead of using Then the fix code would look like: App/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx Lines 239 to 259 in f8f12c2
<View style={[themeStyles.ph5, themeStyles.mt3, themeStyles.mb7, themeStyles.flex1]}>
<Text style={[themeStyles.mb3]}>{translate('contacts.enterMagicCode', {contactMethod})}</Text>
<ValidateCodeForm
validateCodeAction={validateCodeAction}
validatePendingAction={loginData.pendingFields?.validateCodeSent}
validateError={!isEmptyObject(validateLoginError) ? validateLoginError : ErrorUtils.getLatestErrorField(loginData, 'validateCodeSent')}
handleSubmitForm={(validateCode) => User.validateSecondaryLogin(loginList, contactMethod, validateCode)}
sendValidateCode={() => User.requestContactMethodValidateCode(contactMethod)}
clearError={() => User.clearContactMethodErrors(contactMethod, !isEmptyObject(validateLoginError) ? 'validateLogin' : 'validateCodeSent')}
buttonStyles={[themeStyles.justifyContentEnd, themeStyles.flex1]}
ref={validateCodeFormRef}
hasMagicCodeBeenSent={hasMagicCodeBeenSent}
/>
</View> What alternative solutions did you explore? (Optional)N/A |
I can reproduce it. Actually, it's hard to see the blank page on my end because the blank page will be hidden almost immediately when navigating to the secondary email. However, it's easy to reproduce if we record it and then watch it closely. Click here to view recordingsScreen.Recording.2024-12-11.at.17.22.21.mov |
Job added to Upwork: https://www.upwork.com/jobs/~021867385191571001621 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ZhenjaHorbach ( |
@hoangzinh |
yes, I do @ZhenjaHorbach ❤️. @MitchExpensify can you assign this issue to me as a C as I was able to reproduce it? Thank you. |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
{shouldShowModal ? (
<FullScreenLoadingIndicator />
) : (
<HeaderWithBackButton
title={formattedContactMethod}
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.getRoute(backTo))}
/>
)} instead of: App/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx Lines 243 to 246 in f8f12c2
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?What alternative solutions did you explore? (Optional) |
@MitchExpensify Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Done, what do you think of the proposal above, @hoangzinh ? |
Ah I'm reviewing proposals. Btw, @MitchExpensify could you help to remove |
@jacobkim9881 Thanks for posting a proposal. Can you share your recording result? It seems we lost the screen transition with that approach. Btw, we used to use |
@daledah Thanks for posting a proposal. Can you also share your recording result? I think your solution would cause a regression bug after validating a contact, it would show a loading indicator forever. Btw, can you also elaborate the condition here is delayed to be true? (
|
I tried applying my solution and it works properly. After validating a contact, there is no loading indicator is shown since we will call:
onClose. And refer to my solution, we only display the loading indicator if the modal is showing: {shouldShowModal ? (
<FullScreenLoadingIndicator />
) : (
<HeaderWithBackButton
title={formattedContactMethod}
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.getRoute(backTo))}
/>
)} Here is the video: Screen.Recording.2024-12-17.at.10.16.24.mov |
What do you mean by "delayed to be true" here? |
I mean it should be true when we render |
It seems the issue isn't reproducible from my side. |
I believe this occurs because, in React, state updates are asynchronous, and the rendering process doesn't happen immediately after the state or props change. React batches updates for performance optimization, which can sometimes cause a slight delay in reflecting the updated data in the UI. |
@daledah can you share a recording with console.log of Besides that, I think your solution isn't looking good. For example, after verifying the account, there is a redundant page behind when App goBack to the contacts page |
Screen.Recording.2024-12-18.at.18.14.24.mov
|
@hoangzinh This cause the transition issue hasMagicCodeBeenSent={hasMagicCodeBeenSent} of App/src/pages/settings/Profile/Contacts/ValidateCodeForm/BaseValidateCodeForm.tsx Line 145 in 1466c02
of App/src/components/MagicCodeInput.tsx Lines 160 to 164 in 1466c02
But the code form's
So I have deleted expensify-test3-2024-12-18_20.30.00.mp4 |
|
@daledah based on your recording, it seems |
@jacobkim9881 sorry, what would you like to revert? |
@hoangzinh I meant reverting this: src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx |
@jacobkim9881 I'm unsure of that way. The reason why we changed to use
As described in the issues' description #49270 |
@hoangzinh I understood we can't revert. It seems there are 2 |
Issue not reproducible during KI retests. (First week) |
@hoangzinh, @MitchExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Not overdue, trying to reproduce |
@hoangzinh @MitchExpensify this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number:
Reproducible in staging?: dev
Reproducible in production?: dev
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @brunovjk
Slack conversation (hyperlinked to channel name): ts_external_expensify_bugs
Action Performed:
Expected Result:
The user is taken directly to the page to enter the code.
Actual Result:
A blank page appears briefly before navigating to the page to enter the code.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
393837072-0b45c58f-ce4e-4e94-bad7-f7f0057d5916.mov
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @ZhenjaHorbachThe text was updated successfully, but these errors were encountered: