-
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
[CP Staging] fix: correctly pass transactions and reportActions to LHN #31007
[CP Staging] fix: correctly pass transactions and reportActions to LHN #31007
Conversation
Also, pull main when ready for review |
a469afb
to
a206095
Compare
@situchan thank you, could you re-review please when you have a moment? |
754f9f5
to
342f675
Compare
@@ -36,9 +36,9 @@ const propTypes = { | |||
}), | |||
|
|||
/** The actions from the parent report */ |
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.
/** The actions from the parent report */ | |
/** The action from the parent report */ |
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.
good eye! done ✅
342f675
to
6301a8a
Compare
const itemParentReportActions = reportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${itemFullReport.parentReportID}`] || {}; | ||
const itemParentReportAction = itemParentReportActions[itemFullReport.parentReportActionID] || {}; | ||
const itemPolicy = policy[`${ONYXKEYS.COLLECTION.POLICY}${itemFullReport.policyID}`] || {}; | ||
const transactionID = lodashGet(itemParentReportAction, [itemFullReport.parentReportActionID, 'originalMessage', 'IOUTransactionID'], ''); |
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.
const transactionID = lodashGet(itemParentReportAction, [itemFullReport.parentReportActionID, 'originalMessage', 'IOUTransactionID'], ''); | |
const transactionID = lodashGet(itemParentReportAction, ['originalMessage', 'IOUTransactionID'], ''); |
Had to watch this with 🦅's eye 😄
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.
oh wow, the 🦅 eye indeed 🤯
6301a8a
to
dacaba0
Compare
@situchan good point, I'd say it's safer to bring back whole transaction as a dependency. I reverted changes to use |
ok scan transaction title is updated in LHN Screen.Recording.2023-11-08.at.6.31.43.PM.mov |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
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.
Thanks for the fix
@mountiny looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
The failing reasssure test was because of different changes in main, none of the changes in this PR influence the ReportScreens performance |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…-in-lhn [CP Staging] fix: correctly pass transactions and reportActions to LHN (cherry picked from commit 73627cf)
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 1.3.96-7 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.96-15 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.98-0 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.98-5 🚀
|
Details
Fixing regressions from #30242. In case no parentActions or parentReportActions were found, it was returning null instead of empty object. Additionally transactions were not passed to the component correctly, causing crashes when trying to access transaction details.
I think none of these regressions would happen if we already had Typescript in this file, really happy we are making progress in this area and seeing more and more stuff rewritten 🙌
Fixed Issues
$ #30998
PROPOSAL:
Tests
Offline tests
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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)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.mov
Android: mWeb Chrome
ANDROID_WEB.mov
iOS: Native
IOS.mov
iOS: mWeb Safari
IOS.WEB.mp4
MacOS: Chrome / Safari
WEB.mov
MacOS: Desktop
DESKTOP.mov