Repository navigation
fix: Track expense shortcut doesn't update to the correct one in offline mode - #40267
Conversation
| const isScanRequest = TransactionUtils.isScanRequest(transaction); | ||
| const clearedPendingFields = Object.fromEntries(Object.keys(transaction.pendingFields ?? {}).map((key) => [key, null])); | ||
| const optimisticData: OnyxUpdate[] = []; | ||
| const isDistanceRequest = TransactionUtils.isDistanceRequest(transaction); |
There was a problem hiding this comment.
👋 Could you please arrange isDistanceRequest right under isScanRequest so we have them grouped nicely ?
|
@ikevin127 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: Nativeandroid.movAndroid: mWeb Chromeandroid-mweb.moviOS: Nativeios.moviOS: mWeb Safariios-mweb.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
ikevin127
left a comment
There was a problem hiding this comment.
@nkdengineer Regarding the unhappy path, in case the TrackExpense call fails for whatever reason given that we set the optimistic data to newQuickAction this means that if the call fails -> we will see the optimistically set newQuickAction in the UI.
To cover for the unhappy path I think we should also push the same object, below to the failureData but with action as: quickAction.action which is the current quickAction action (before the call is made) which is set by Onyx.connect at the top of the file.
|
@ikevin127 please check again |
ikevin127
left a comment
There was a problem hiding this comment.
@ikevin127 please check again
Thanks for applying the requested change! LGTM 🚀
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
Ah, this was going to be added in a follow-up 😅 |
|
🚀 Deployed to staging by https://github.com/marcochavezf in version: 1.4.65-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.65-5 🚀
|
Details
Fixed Issues
$ #40097
PROPOSAL: #40097 (comment)
Tests
Offline tests
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
Android: mWeb Chrome
iOS: Native
ios-resize.mp4
iOS: mWeb Safari
ios-mweb-resize.mp4
MacOS: Chrome / Safari
web-resize.mp4
MacOS: Desktop
desktop-resize.mp4