-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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/26946: Reset amount when edit waypoint #33397
Conversation
@cubuspl42 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] |
There are some errors with android and Safari, I will update the screenshot for android and safari later |
Let's focus on fixing them! Let me know if I can help. |
@cubuspl42 Sure, But it also happened on the main branch, I am resetting the repository and trying again. |
@cubuspl42 Updated all videos. Please help to review PR |
I'm on it |
Did fixing the problems you mentioned involve any fixes in the PR, or was it a problem on |
It is a problem on main branch but it is resolved after merging latest main |
@@ -178,6 +178,13 @@ function setMoneyRequestAmount_temporaryForRefactor(transactionID, amount, curre | |||
Onyx.merge(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}`, {amount, currency}); | |||
} | |||
|
|||
/** | |||
* @param {String} transactionID |
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.
Description:
Reset the money request amount, discarding the user-provided value. In the case of distance requests, this will effectively re-enable the default behavior of automatic amount calculation.
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.
updated
Reviewer Checklist
Screenshots/VideosWebupdate-distance-iou-amount-web.mp4Mobile Web - Chromeupdate-distance-iou-amount-android-web-compressed.mp4Mobile Web - Safariupdate-distance-iou-amount-ios-web.mp4DesktopiOSupdate-distance-iou-amount-ios.mp4Androidupdate-distance-iou-amount-android-compressed.mp4 |
✋ 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/francoisl in version: 1.4.21-0 🚀
|
* @param {String} transactionID | ||
*/ | ||
function resetMoneyRequestAmount_temporaryForRefactor(transactionID) { | ||
Onyx.merge(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}`, {amount: CONST.IOU.DEFAULT_AMOUNT}); |
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.
I believe this lead to a regression because it doesn't not take isDraft
into account like this:
`${isDraft ? ONYXKEYS.COLLECTION.TRANSACTION : ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}`
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.
@tgolen I will raise a quick PR to fix it
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.
I believe that this may be another regression w/ the same cause
Phis PR got reverted here |
🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.21-4 🚀
|
1 similar comment
🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.21-4 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.21-4 🚀
|
Details
Reset amount when editing waypoint
Fixed Issues
$ #26946
PROPOSAL: #26946 (comment)
Tests
Offline tests
Same above
QA Steps
Same above
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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label 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
2345.mov
Android: mWeb Chrome
c.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
s.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
d.mp4