-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Display MoneyRequestReport on Inbox and navigate to it from preview #60119
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
Display MoneyRequestReport on Inbox and navigate to it from preview #60119
Conversation
f0df1d4
to
01ea0be
Compare
🚧 @shawnborton has triggered a test app build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
Nice, feeling good so far. I commented elsewhere about the weird delay we get when the report loads (you see the empty state for a flash, and then the table rows come in) but I think we can handle that elsewhere. |
c6cfe19
to
2f46854
Compare
71ed84f
to
e6f62f2
Compare
e6f62f2
to
508dc79
Compare
508dc79
to
eb19b89
Compare
@DylanDylann 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] |
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.
Left a few comments, other than that LGTM
src/components/ReportActionItem/TransactionPreview/TransactionPreviewContent.tsx
Outdated
Show resolved
Hide resolved
src/components/MoneyRequestReportView/MoneyRequestReportView.tsx
Outdated
Show resolved
Hide resolved
src/pages/home/ReportScreen.tsx
Outdated
const policy = policies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`]; | ||
const isTopMostReportId = currentReportIDValue?.currentReportID === reportIDFromRoute; | ||
const didSubscribeToReportLeavingEvents = useRef(false); | ||
const backTo = route?.params?.backTo as string; | ||
|
||
const {canUseTableReportView} = usePermissions(); | ||
const isSingleTransactionView = getIfReportIsSingleTransaction(report, reportTransactions, canUseTableReportView); |
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 isSingleTransactionView = getIfReportIsSingleTransaction(report, reportTransactions, canUseTableReportView); | |
const isSingleTransactionView = shouldRenderAsSingleTransactionView(report, reportTransactions, canUseTableReportView); |
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.
should I change the name of the const as well? because the name of the function was done like this to aligned with the const name.
so something like:
const shouldRenderAsSingleTransactionView = getShouldRenderAsSingleTransactionView(report, reportTransactions, canUseTableReportView);
?
5dc3d86
to
ffd6ee3
Compare
@DylanDylann please take a look. Note: There are several lint errors for newly added |
src/pages/home/ReportScreen.tsx
Outdated
@@ -318,7 +318,7 @@ function ReportScreen({route, navigation}: ReportScreenProps) { | |||
const backTo = route?.params?.backTo as string; | |||
|
|||
const {canUseTableReportView} = usePermissions(); | |||
const isSingleTransactionView = getIfReportIsSingleTransaction(report, reportTransactions, canUseTableReportView); | |||
const isReportSingleTransaction = getIfReportIsSingleTransaction(report, reportTransactions, canUseTableReportView); |
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.
getIsReportSingleTransaction
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.
(Note for myself remember to clean up styles with border radius)
🚧 @mountiny has triggered a test app build. You can view the workflow run here. |
ffd6ee3
to
4137ffb
Compare
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.
Ok the build seems to work fine so lets try this one out!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Performance Comparison Report 📊 (1/10)Significant Changes To Duration
Show details
|
Performance Comparison Report 📊 (10/10)Meaningless Changes To Duration (9/9)Show entries
Show details
|
Performance Comparison Report 📊 (2/10)Meaningless Changes To Duration (1/9)Show entries
Show details
|
Performance Comparison Report 📊 (3/10)Meaningless Changes To Duration (2/9)Show entries
Show details
|
Performance Comparison Report 📊 (4/10)Meaningless Changes To Duration (3/9)Show entries
Show details
|
Performance Comparison Report 📊 (5/10)Meaningless Changes To Duration (4/9)Show entries
Show details
|
Performance Comparison Report 📊 (6/10)Meaningless Changes To Duration (5/9)Show entries
Show details
|
Performance Comparison Report 📊 (7/10)Meaningless Changes To Duration (6/9)Show entries
Show details
|
Performance Comparison Report 📊 (8/10)Meaningless Changes To Duration (7/9)Show entries
Show details
|
Performance Comparison Report 📊 (9/10)Meaningless Changes To Duration (8/9)Show entries
Show details
|
@Expensify/mobile-deployers 📣 Please look into this performance regression as it's a deploy blocker. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.1.32-0 🚀
|
Agree with Vit. Some higlights: One thing that happened here which might have some consequences is that Other than that:
|
I think the new way that we use to display the transactions in the report might have caused this bug: #60834 |
🚀 Deployed to production by https://github.com/thienlnam in version: 9.1.32-8 🚀
|
Explanation of Change
This PR implements 2 things mainly
MoneyRequestReportView
in the context of Inbox - onReportScreen
(/r/:reportID
route) for the types of reports we want to showThis flowchart (hopefully) helps one understand how we render reportActions now:
Done
moneyRequestReport
and if true -> renderMoneyRequestReportActionsList
to show table view, instead of standardReportActionsView
SearchMoneyRequestReport
andReportScreen
TransactionPreview
andMoneyRequestReportPreview
were simplified and refactored (but not much visual changes there)Fixed Issues
$ #57509
PROPOSAL:
Tests
Offline tests
QA Steps
Same as tests
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
rec-reports-andr.mp4
Android: mWeb Chrome
Screen.Recording.2025-04-15.at.15.59.26.mov
iOS: Native
rec-reports-ios.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
rec-reports-web.mp4
MacOS: Desktop