-
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 optimistic data for distance request #32943
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 Has some problem with my android app, please help to test with this device. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2023-12-13.at.12.50.41.AM.movAndroid: mWeb ChromeScreen.Recording.2023-12-13.at.12.49.23.AM.moviOS: NativeScreen.Recording.2023-12-13.at.12.45.48.AM.moviOS: mWeb SafariScreen.Recording.2023-12-13.at.12.44.53.AM.movMacOS: Chrome / SafariScreen.Recording.2023-12-13.at.12.38.44.AM.movMacOS: DesktopScreen.Recording.2023-12-13.at.12.42.25.AM.mov |
@dukenv0307 Lint is failing. |
@allroundexperts Fixed. |
src/libs/actions/IOU.js
Outdated
waitForCollectionCallback: true, | ||
callback: (val) => { | ||
if (!val) { | ||
allTransactionDrafts = {}; |
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.
Usually, the variable is initialized to {}
and then this just becomes an early return. That way it's safe (from a code standpoint) to access allTransactionDrafts
before it's fully initialized.
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.
+1
src/libs/actions/IOU.js
Outdated
waitForCollectionCallback: true, | ||
callback: (val) => { | ||
if (!val) { | ||
allTransactionDrafts = {}; |
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.
+1
src/libs/actions/IOU.js
Outdated
@@ -61,6 +61,20 @@ Onyx.connect({ | |||
}, | |||
}); | |||
|
|||
let allTransactionDrafts; |
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 So we will initialize it here, right?
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.
yes
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.
@luacmartins Updated.
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!
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.
Perfect, thanks for that change.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Fix optimistic data for distance request (cherry picked from commit 380e687)
…ing-32943-1 🍒 Cherry pick PR #32943 to staging 🍒
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.4.11-22 🚀
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.4.11-22 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.11-25 🚀
|
Details
Fix optimistic data for distance request
Fixed Issues
$ #32891
PROPOSAL: #32891 (comment)
Tests
Offline tests
Same as 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)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
Android: Native
Android: mWeb Chrome
Screen.Recording.2023-12-13.at.02.11.14.mov
iOS: Native
Screen.Recording.2023-12-13.at.02.19.32.mov
iOS: mWeb Safari
Screen.Recording.2023-12-13.at.02.12.34.mov
MacOS: Chrome / Safari
web-1.mov
MacOS: Desktop
Screen.Recording.2023-12-13.at.02.24.40.mov