-
Notifications
You must be signed in to change notification settings - Fork 3k
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 one-expense report loading #50147
Fix one-expense report loading #50147
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-10-08.at.12.01.00.AM.movAndroid: mWeb ChromeScreen.Recording.2024-10-07.at.11.59.51.PM.moviOS: NativeScreen.Recording.2024-10-07.at.11.58.06.PM.moviOS: mWeb SafariScreen.Recording.2024-10-07.at.11.56.12.PM.movMacOS: Chrome / SafariScreen.Recording.2024-10-07.at.11.50.15.PM.movMacOS: DesktopScreen.Recording.2024-10-07.at.11.52.42.PM.mov |
const mostRecentReportAction = reportActions.at(0); | ||
const isMostRecentReportIOU = mostRecentReportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU; | ||
const isSingleIOUReportAction = reportActions.filter((action) => action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU).length === 1; | ||
const isSingleExpenseReport = ReportUtils.isExpenseReport(report) && isMostRecentReportIOU && isSingleIOUReportAction; | ||
const isSingleInvoiceReport = ReportUtils.isInvoiceReport(report) && isMostRecentReportIOU && isSingleIOUReportAction; | ||
const shouldShowMostRecentReportAction = | ||
!!mostRecentReportAction && |
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.
It seems like this case would have already been caught by the !!mostRecentReportAction
check, could you elaborate why it wasn't?
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.
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.
isMostRecentReportIOU
is mostRecentReportAction
&& is IOU
isSingleExpenseReport
and isSingleInvoiceReport
both also include the check isMostRecentReportIOU
so I'd think they would have been caught by the !!mostRecentReportAction
.
Am I misreading the code?
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.
Hm, but as you mentioned the isMostRecentReportIOU
also includes the check for IOU
report action type, and that's the main part of this check.
Found a console warning while testing and reported it here |
@allroundexperts @grgia Do you have any more questions regarding the PR? Any ETA on the review? |
Looks good from my end. |
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 to me!
@grgia kind bump here 🙂 |
✋ 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/grgia in version: 9.0.47-1 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 9.0.47-4 🚀
|
Details
Fix one-expense report loading.
Fixed Issues
$ #49853
PROPOSAL: #49853 (comment)
Tests
Offline tests
Same as in the Tests section.
QA Steps
Same as in the Tests section.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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.mp4
Android: mWeb Chrome
android_web.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios_web.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4