-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fix: Add a step validate to the Issue New Card form #50864
Conversation
I am a little stuck on the iOS builds, will add later |
@hungvu193 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] |
Code wise LGTM, but let's hold for #50667 (comment) a little bit 😄 |
Let's merge main 😄 This one can be off hold. |
Hey @nkdengineer, can you also handle the case when the user enter wrong validate code? |
@hungvu193 i'll update soon |
@hungvu193 as the solution mention here, we will send the |
Yes. If the API still return successful response with invalid code, then we will need BE changes |
It looks like we still need to merge the FE's PR first. Let's add the generic error message to failure data for now and handle it from there 😄 |
@hungvu193 i don't know what I should really do here. Can i do like in App/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx Lines 165 to 177 in 2db49d4
|
@hungvu193 friendly bump here |
I think it will be slightly different. Btw, optimistic failure data was added in this PR 😄 , so we don't need to do it anymore. I think the suggestion changes here will be correct the |
You can also improve the loading logic of App/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx Line 236 in 2463bf7
|
@nkdengineer do you have any questions? |
@hungvu193 how can I improve this logic in this case? Please give me some suggestions |
You can add a new props into Here's the example: In this PR, we can use the |
@hungvu193 Thanks for the suggestion, I updated |
src/pages/workspace/expensifyCard/issueNew/ConfirmationStep.tsx
Outdated
Show resolved
Hide resolved
src/pages/workspace/expensifyCard/issueNew/ConfirmationStep.tsx
Outdated
Show resolved
Hide resolved
src/pages/workspace/expensifyCard/issueNew/ConfirmationStep.tsx
Outdated
Show resolved
Hide resolved
src/pages/workspace/expensifyCard/issueNew/ConfirmationStep.tsx
Outdated
Show resolved
Hide resolved
I encountered this issue while testing this PR, when ValidateCodeActionModal shows up, if I press any number, the modal dismissed. Screen.Recording.2024-11-09.at.11.04.13.movAlso, you can test the failed case by enabling |
I'm investigating |
thanks @hungvu193, i fixed |
I'll review again today |
src/pages/workspace/expensifyCard/issueNew/ConfirmationStep.tsx
Outdated
Show resolved
Hide resolved
Found 2 issues:
Screen.Recording.2024-11-10.at.16.37.30.mov
Screen.Recording.2024-11-10.at.16.37.48.mov |
Co-authored-by: Hans <[email protected]>
This problem also occurs in the login form when we call the API and get the status 429 too many requests bug-login.mov |
I tried many times and couldn't reproduce it |
tbh, I don't see any 429 error. Screen.Recording.2024-11-11.at.13.58.47.mov |
I just realized that you need to reproduce the first bug (infinite loading) to reproduce this one, after dismissing the infinite validate code action modal, next time when you issue a new card, this bug will happen. Screen.Recording.2024-11-11.at.14.02.50.mov |
I'm investigating |
@hungvu193 after merging main i can't reproduce bug anymore, please help me check again |
Yeah I can't reproduce it anymore 🤔. It seems it was fixed on another PR. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-11-13.at.14.43.38.movAndroid: mWeb ChromeScreen.Recording.2024-11-13.at.15.09.27.moviOS: NativeScreen.Recording.2024-11-13.at.14.34.30.moviOS: mWeb SafariScreen.Recording.2024-11-13.at.14.09.15.movMacOS: Chrome / SafariScreen.Recording.2024-11-13.at.14.07.43.movMacOS: DesktopScreen.Recording.2024-11-13.at.14.11.13.mov |
<ValidateCodeActionModal | ||
handleSubmitForm={submit} | ||
isLoading={issueNewCard?.isLoading} | ||
sendValidateCode={() => User.requestValidateCodeAction()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add hasMagicCodeBeenSent
props here to make it consistent with other places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hungvu193 i updated
✋ 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/tgolen in version: 9.0.62-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.62-4 🚀
|
Details
Fixed Issues
$ #50667
PROPOSAL: #50667 (comment)
Tests
Offline tests
same as above
QA Steps
same as above
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android.mov
Android: mWeb Chrome
android-mweb.mov
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov