Repository navigation
Fix amount of distance request isn't updated optimistically - #42337
Conversation
|
@nkdengineer Please update the third test step to give an idea of what an optimistic update means (e.g. verify that the amount is updated immediately) |
Reviewer Checklist
Screenshots/VideosAndroid: Native42337-android-native.mp4Android: mWeb Chrome42337-android-chrome.mp4iOS: Native42337-ios-native.mp4iOS: mWeb Safari42337-ios-safari.mp4MacOS: Chrome / Safari42337-web.mp4MacOS: Desktop42337-desktop.mp4 |
akinwale
left a comment
There was a problem hiding this comment.
LGTM.
@nkdengineer Please update the test step as stated in #42337 (comment). Thanks.
|
@akinwale I updated the test step. |
neil-marcellini
left a comment
There was a problem hiding this comment.
I think we need to handle some cases a bit more carefully when setting up the optimistic distance request data.
| } | ||
|
|
||
| if (TransactionUtils.isFetchingWaypointsFromServer(transaction)) { | ||
| if (TransactionUtils.isFetchingWaypointsFromServer(transaction) && TransactionUtils.getMerchant(transaction) === Localize.translateLocal('iou.fieldPending')) { |
There was a problem hiding this comment.
This is necessary to show the merchant as report name of transaction thread report if the amount and merchant can be updated immediately.
There was a problem hiding this comment.
Ok. I think it's only applicable for the offline case right? Otherwise there will be and updated route and the transaction merchant will be set optimistically.
Seems good.
There was a problem hiding this comment.
Ok. I think it's only applicable for the offline case right
Yes.
|
@neil-marcellini I updated your suggestions. Please help to check again. Thanks. |
neil-marcellini
left a comment
There was a problem hiding this comment.
Thanks for the updates. I'm happy with it. Since there's been changes, @akinwale would you please re-test?
akinwale
left a comment
There was a problem hiding this comment.
Retested OK on all platforms.
|
✋ 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/neil-marcellini in version: 1.4.77-0 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.77-11 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.77-11 🚀
|
Details
Fix amount of distance request isn't updated optimistically
Fixed Issues
$ #41817
PROPOSAL: #41817 (comment)
Tests
Offline tests
None
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2024-05-17.at.14.45.05.mov
Android: mWeb Chrome
Screen.Recording.2024-05-17.at.14.42.46.mov
iOS: Native
Screen.Recording.2024-05-17.at.14.45.59.mov
iOS: mWeb Safari
Screen.Recording.2024-05-17.at.14.44.22.mov
MacOS: Chrome / Safari
Screen.Recording.2024-05-17.at.14.52.45.mov
MacOS: Desktop
Screen.Recording.2024-05-17.at.14.47.07.mov