-
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/27383: Prevent request money if empty waypoint #27826
Conversation
@allroundexperts 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] |
@allroundexperts Bump, Could you help to review this PR? |
@@ -75,7 +78,7 @@ function MoneyRequestParticipantsPage({iou, selectedTab, route}) { | |||
// ID in Onyx could change by initiating a new request in a separate browser tab or completing a request | |||
if (prevMoneyRequestId.current !== iou.id) { | |||
// The ID is cleared on completing a request. In that case, we will do nothing | |||
if (iou.id && !isDistanceRequest && !isSplitRequest && !isNewReportIDSelectedLocally.current) { | |||
if (iou.id && (!isDistanceRequest || (isDistanceRequest && isEmptyWaypoint)) && !isSplitRequest && !isNewReportIDSelectedLocally.current) { |
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.
The same condition is being used below as well. Can you please DRY it up?
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-09-22.at.12.55.49.AM.movMobile Web - ChromeScreen.Recording.2023-09-22.at.1.14.23.AM.movMobile Web - SafariScreen.Recording.2023-09-22.at.1.11.59.AM.movDesktopScreen.Recording.2023-09-22.at.1.06.05.AM.moviOSScreen.Recording.2023-09-22.at.1.12.39.AM.movAndroidScreen.Recording.2023-09-22.at.1.16.09.AM.mov |
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.
Minor change needed.
src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js
Outdated
Show resolved
Hide resolved
src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js
Outdated
Show resolved
Hide resolved
src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js
Outdated
Show resolved
Hide resolved
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.
Looks good!
@allroundexperts It works well after updating Screen.Recording.2023-09-22.at.07.33.12.movThanks so much for your reminders, I noted that for the next PR. |
@roryabraham Could you help to check this PR when you are free? |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js
Show resolved
Hide resolved
Hi @roryabraham @allroundexperts @DylanDylann I think this causes a major regression and should be reverted. There is no way to create a distance request now because it will never transition to the confirmation page due to |
Created revert PR: #28208 |
@tgolen @roryabraham @allroundexperts Hi, after investigating I see this is not a regression from my PR. It seems this is a regression from #25786. In our PR, I am using iou from ONYX to get transactionID. But #25786 make iou field reset to empty. |
Thank you for making me aware of #25786 and I have commented there as well. |
🚀 Deployed to staging by https://github.com/roryabraham in version: 1.3.75-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.75-12 🚀
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 1.3.76-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.76-6 🚀
|
Details
In distance request, prevent request money if empty waypoint
Fixed Issues
$ #27383
PROPOSAL: #27383 (comment)
Tests
Offline tests
Same above
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 methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
Screen.Recording.2023-09-20.at.10.48.28.mp4
Mobile Web - Chrome
Screen.Recording.2023-09-20.at.10.59.04.mp4
Mobile Web - Safari
Screen.Recording.2023-09-20.at.10.50.46.mp4
Desktop
Screen.Recording.2023-09-20.at.11.08.00.mp4
iOS
Screen.Recording.2023-09-20.at.11.31.37.mp4
Android
Screen.Recording.2023-09-20.at.12.32.07.mp4