-
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
[Awaiting Payment] [$250] Split & Invoice -Preview shows empty receipt placeholder when there is no way to add a receipt #53524
Comments
Triggered auto assignment to @garrettmknight ( |
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
|
Job added to Upwork: https://www.upwork.com/jobs/~021864292349376469824 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rojiphil ( |
I don't think we'll need to block the deploy for this fix. |
Edited by proposal-police: This proposal was edited at 2024-12-04 13:06:23 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Empty receipt placeholder is displayed for split and invoice preview when there is no option to add a receipt in the first place. What is the root cause of that problem?We always show the App/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx Line 351 in 1462048
App/src/components/ReceiptImage.tsx Lines 111 to 115 in 361a024
What changes do you think we should make in order to solve the problem?We should hide the receipt component if the transaction doesn't have the receipt and it's split in
App/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx Line 351 in 1462048
And hide it in
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?It's a UI bug and I don't think we need a test case here. Or we can create a util
What alternative solutions did you explore? (Optional) |
@mkzie2 Thanks for your proposal. The RCA is correct as we are showing the receipt preview without checking if we can show receipt preview or not. However, instead of focusing on the condition to show, can you please update the proposal to focus on when not to show (i.e. when split and invoice preview). |
Edited by proposal-police: This proposal was edited at 2024-12-04 14:28:36 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Split & Invoice -Preview shows empty receipt placeholder when there is no way to add a receipt What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
// This is just pseudocode, we can refactor this in the PR.
const isInvoice = ReportUtils.isInvoiceReport(iouReport);
const canUserPerformWriteAction = !!ReportUtils.canUserPerformWriteAction(iouReport);
const isAdmin = policy?.role === CONST.POLICY.ROLE.ADMIN;
const isApprover = ReportUtils.isMoneyRequestReport(iouReport) && iouReport?.managerID !== null && session?.accountID === iouReport?.managerID;
const currentUserPersonalDetails = useCurrentUserPersonalDetails();
const isRequestor = currentUserPersonalDetails.accountID === action?.actorAccountID;
const canEditReceipt = canUserPerformWriteAction && ReportUtils.canEditFieldOfMoneyRequest(action, CONST.EDIT_REQUEST_FIELD.RECEIPT);
const isSettled = ReportUtils.isSettled(iouReport?.reportID);
const shouldShowReceiptEmptyState =
!isInvoice && !isApproved && !isSettled && (canEditReceipt || isAdmin || isApprover || isRequestor) && (canEditReceipt || ReportUtils.isPaidGroupPolicy(iouReport));
const lastThreeTransactions = allTransactions.slice(-3).filter((t) => TransactionUtils.hasReceipt(t) || shouldShowReceiptEmptyState);
const lastThreeReceipts = lastThreeTransactions.map((transaction) => ({...ReceiptUtils.getThumbnailAndImageURIs(transaction), transaction}));
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore? (Optional) |
@rojiphil could you please check my proposal? Thanks! |
@mkzie2 @Krishna2323 Thanks both for your proposals. However, your proposals lack clarity on both the root cause and the solution and is unacceptable to me in its current form. Can you please be more precise with respect to the root cause and solution? |
Updated proposal. |
📣 @rojiphil 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @Krishna2323 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@garrettmknight @rojiphil @lakchote @Krishna2323 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
PR will be up within 24 hours. |
@rojiphil PR is ready for review ^, sorry for delay🙏🏻 |
This issue has not been updated in over 15 days. @garrettmknight, @rojiphil, @lakchote, @Krishna2323 eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
Still working on the PR. |
I just chatted with @dannymcclain about this. It turns out this is an intentional result of our design framework, and it's going to change in the near future with a few other projects. Sorry for the confusion! I'll still pay out full for this since there was so much work done. @Krishna2323 please close your PR when you get a chance. |
@garrettmknight, I have closed the PR, thanks for confirmation and payment🙏🏻. |
Payment Summary:
|
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.71-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
Empty receipt placeholder should not be displayed for split and invoice preview because there is no option to add a receipt in the first place.
Actual Result:
Empty receipt placeholder is displayed for split and invoice preview when there is no option to add a receipt in the first place.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6683822_1733279800030.receipt.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @rojiphilThe text was updated successfully, but these errors were encountered: