-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Revert "fix: an empty report state shows briefly when opening transaction thread in Reports" #61778
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
Revert "fix: an empty report state shows briefly when opening transaction thread in Reports" #61778
Conversation
@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] |
src/libs/MoneyRequestReportUtils.ts
Outdated
@@ -88,7 +88,7 @@ function isSingleTransactionReport(report: OnyxEntry<Report>, transactions: Tran | |||
* Likewise, if report has only 1 connected transaction, then we also use other views. | |||
*/ | |||
function shouldDisplayReportTableView(report: OnyxEntry<Report>, transactions: Transaction[]) { | |||
if (!report || !transactions.length) { | |||
if (!report || (!transactions.length && report.type === 'iou')) { |
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.
I am not sure about this solution, it just uses assumption the iou report wont ever be empty which technically could happen too
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.
Got it. So I suggest reverting the entire condition for now, as I don't yet fully understand the flow of the new table report view and how we handle data there.
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.
Agreed
Given this is a straight revert now, can we get it approved and merged so it goes to main now for testing/dev without this bug, and then staging at the same time as the core PR for empty states? |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
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.
Straight revert
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
if (!report || !transactions.length) { | ||
return false; | ||
} | ||
|
||
return !isReportTransactionThread(report) && !isSingleTransactionReport(report, transactions); |
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.
@martasudol what do you think about this? Maybe this could work 🤔
if (!report) {
return false;
}
return (isMoneyRequestReport(report) || isInvoiceReport(report)) && !isReportTransactionThread(report) && !isSingleTransactionReport(report, transactions);
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.
Unfortunately, empty state is still flashing with this change:
Nagranie.z.ekranu.2025-05-12.o.11.08.54.mov
🚀 Deployed to staging by https://github.com/mountiny in version: 9.1.45-0 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.1.45-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.1.45-21 🚀
|
Explanation of Change
This PR reverts changes from #61657
Fixed Issues
$#60951
& https://expensify.slack.com/archives/C07NMDKEFMH/p1746723041360239?thread_ts=1745948047.201979&cid=C07NMDKEFMH
Tests
Offline tests
N/A
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectioncanBeMissing
param foruseOnyx
toggleReport
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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Nagranie.z.ekranu.2025-05-9.o.14.08.16.mov
MacOS: Desktop