-
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 blank map preview on employee side #51840
Conversation
@ishpaul777 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: NativeScreen.Recording.2024-11-06.at.12.01.21.AM.movAndroid: mWeb ChromeScreen.Recording.2024-11-06.at.12.03.32.AM.moviOS: NativeScreen.Recording.2024-11-05.at.11.47.56.PM.moviOS: mWeb SafariScreen.Recording.2024-11-05.at.11.41.55.PM.movMacOS: Chrome / SafariScreen.Recording.2024-11-05.at.11.32.43.PM-1.movMacOS: DesktopScreen.Recording.2024-11-06.at.12.49.03.AM.mov |
✋ 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/Gonals in version: 9.0.59-0 🚀
|
if (updatedTransaction?.pendingFields) { | ||
pendingFields = { | ||
...pendingFields, | ||
...updatedTransaction?.pendingFields, | ||
}; | ||
} | ||
|
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.
Hey @nkdengineer @ishpaul777, could you please explain this change?
The only place where the pendingFields
is used later is here:
Lines 2669 to 2678 in 17cae11
optimisticData.push({ | |
onyxMethod: Onyx.METHOD.MERGE, | |
key: `${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`, | |
value: { | |
...updatedTransaction, | |
pendingFields, | |
isLoading: hasPendingWaypoints, | |
errorFields: null, | |
}, | |
}); |
Doesn't it do basically the same thing you've introduced here?
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.
@paultsimura The problem is getUpdatedTransaction
function can return another pendingFields
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, and they will be passed to optimisticData
because we use ...updatedTransaction
(which includes the new pendingFields
) as the first line in the code I've referenced.
Am I missing something?
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, and they will be passed to optimisticData because we use ...updatedTransaction (which includes the new pendingFields) as the first line in the code I've referenced.
Yes, that's correct.
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.
Nevermind, I see it now.
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.59-3 🚀
|
Explanation of Change
Fixed Issues
$ #51285
PROPOSAL: #51285 (comment)
Tests
Precondition:
Employee' side:
Admin's side:
Employee's side:
Verify that: When admin changes the distance unit setting, map preview for distance expense should update on employee side on selecting distance rate with different unit
However, map preview on admin's side in expense details page gets updated as expected
Offline tests
same as above
QA Steps
same as above
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.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 and/or tagged@Expensify/design
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
android.mov
Android: mWeb Chrome
android-mweb.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
web-resize.mp4
MacOS: Desktop
web-resize.mp4