-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Better Expense Report View] Deleting second to last expense & [Not BERV] concierge message fix + #61680 follow-up #61777
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
Conversation
5f7f497
to
59dda04
Compare
59dda04
to
b513435
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] |
372aa6b
to
58df08a
Compare
please ping me when this is ready |
@DylanDylann you good to review today? |
I will try to complete my review on this PR today (sure 80%) or at least early tomorrow |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeScreen.Recording.2025-05-14.at.18.41.34.moviOS: HybridAppScreen.Recording.2025-05-14.at.18.43.17.moviOS: mWeb SafariScreen.Recording.2025-05-14.at.18.38.57.movMacOS: Chrome / SafariScreen.Recording.2025-05-14.at.18.12.12.movMacOS: DesktopScreen.Recording.2025-05-14.at.18.45.33.mov |
src/components/ReportActionItem/TransactionPreview/TransactionPreviewContent.tsx
Show resolved
Hide resolved
I notice a weird behavior while deleting the expense offline. We can discuss this problem later Screen.Recording.2025-05-14.at.18.45.33.mov |
The rest looks fine |
I think this should be handled in a separate PR, I've made a quick test and deleted expense is still in the Onyx report actions when offline so it is not really much related + this PR actually handles 2 issues & follow-up so I suggest to keep it this way, WDYT? |
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 but please add test and QA steps for the concierge issue
@neil-marcellini done. |
@@ -60,6 +60,7 @@ function TransactionPreviewContent({ | |||
const ownerAccountID = iouReport?.ownerAccountID ?? reportPreviewAction?.childOwnerAccountID ?? CONST.DEFAULT_NUMBER_ID; | |||
const isReportAPolicyExpenseChat = isPolicyExpenseChat(chatReport); | |||
const {amount: requestAmount, comment: requestComment, merchant, tag, category, currency: requestCurrency} = transactionDetails; | |||
const reportActions = useMemo(() => (iouReport ? getReportActions(iouReport) ?? {} : {}), [iouReport]); |
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.
Wouldnt it be cleaner to user something like
const [reportActions] = useOnyx(ONYXKEYS.COLLECTION.REPORT_ACTIONS, {canBeMissing: false});
with a selector?
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.
dont wanna block on this as the pr brings valuable improvements but I think useOnyx with selector is more App like solution
✋ 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 production by https://github.com/mountiny in version: 9.1.46-12 🚀
|
Explanation of Change
The problem is that when we delete expenses with comments from report and there is only one expense left, the application changes the table report view to single transaction report view, but it renders a message for every action in the report, we want to avoid this and filter out deleted expenses from the render. This is what this PR does.
In addition, this fixes Concierge message not disappearing when deleting expense without category and covers follow-up from #61680 (comment)
Note: incorrect reply count is related to BE, mentioned in #61775
Fixed Issues
$ #61775
$ #60999
PROPOSAL: N/A
Tests
Offline tests
Same as 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
Concierge.mp4
Android: mWeb Chrome
iOS: Native
iOS.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
Web.mov
MacOS: Desktop