-
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
fix: Error message only changes after clicking Split expense button for the second time #42450
Conversation
@rushatgabhane 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: NativeScreen.Recording.2024-05-27.at.04.25.45.movAndroid: mWeb Chromechrome isnt' working on my sim iOS: NativeScreen.Recording.2024-05-27.at.04.28.19.movMacOS: Chrome / SafariScreen.Recording.2024-05-27.at.04.21.05.mov |
Co-authored-by: Aldo Canepa Garay <[email protected]>
@aldo-expensify Your suggestion makes sense, I updated. |
Log.info(`[IOU] Sending money via: ${paymentMethod}`); | ||
onSendMoney?.(paymentMethod); | ||
} else { | ||
if (iouType !== CONST.IOU.TYPE.PAY) { |
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.
Just to confirm that we are not doing this by mistake. It is intentional that we don't check formErrors
when iouType !== CONST.IOU.TYPE.PAY
, right?
We don't need
if (formError) {
return;
}
inside this if
. Correct?
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.
Just to confirm that we are not doing this by mistake. It is intentional that we don't check formErrors when iouType !== CONST.IOU.TYPE.PAY, right?
@aldo-expensify The block after check formErrors
will do nothing if iouType !== CONST.IOU.TYPE.PAY
so we don't need to check this for the case iouType !== CONST.IOU.TYPE.PAY
.
if (formError) {
return;
}
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.
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.
Which block is that
@aldo-expensify That is here. With the change of this PR we only do this after the check formError
if (iouType === CONST.IOU.TYPE.PAY) {
if (!paymentMethod) {
return;
}
setDidConfirm(true);
Log.info(`[IOU] Sending money via: ${paymentMethod}`);
onSendMoney?.(paymentMethod);
}
I see that we do stuff in iouType !== CONST.IOU.TYPE.PAY even if there are formErrors, is that fine
That is the aim of this PR to fix the issue, we should move the logic to setting the error before the check formError
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.
oh, I see what you are saying now, thanks for explaining!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
this was reverted as it caused a deploy blocker, please raise this PR again making sure #43216 is tested for @nkdengineer |
I'll recreate PR and fix regression soon |
🚀 Deployed to production by https://github.com/luacmartins in version: 1.4.81-11 🚀
|
Details
Fixed Issues
$ #41336
PROPOSAL: #41336 (comment)
Tests
Offline tests
QA Steps
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.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov