You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-12-30] [$250] iOS&Android Expense - App does not respond to long tap on receipt placeholder area on expense preview #53697
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Version Number: 9.0.72-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both 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):applausetester+zm69@applause.expensifail.com Issue reported by: Applause Internal Team
Action Performed:
Go to staging.new.expensify.com
Go to workspace chat.
Create an expense with receipt.
On the main workspace chat, long tap on the receipt area on the preview.
Note that it responds to long tap and opens menu.
Delete the expense.
Submit an expense without receipt.
On the main workspace chat, long tap on the receipt placeholder area on the preview.
Expected Result:
App will respond to the long tap and open more options menu.
Actual Result:
App does not respond to long tap on the empty receipt placeholder area on the expense preview.
This makes it a nested pressable in a ReportPreview or MoneyRequestPreviewContent. The long press doesn't bubble up, which is why we manually handle the report preview long press to show the context menu.
But we don't do the same for the receipt empty state component.
What changes do you think we should make in order to solve the problem?
But instead of handling the long press manually for receipt empty state, we can just render a View instead of Pressable if the receipt empty state onPress is undefined. (we need to remove the onPress default value)
Then, we can remove the receipt image onPress from the ReportPreview and MoneyRequestPreviewContent. (the onPress is only being used by receipt empty state)
It was added because the parent pressable onPress isn't triggered when pressing on the receipt empty state. But we can remove it now since we won't use nested pressable anymore for the receipt empty state.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
When creating the test for this, I found that it behaves differently when running on the test environment. The issue we have here is basically if we have nested pressable, then only the inner pressable will receive the press/long-press event (which was observed first in this PR).
But when I recreate this on the test environment as simple as this:
changed the title [-]iOS&Android Expense - App does not respond to long tap on receipt placeholder area on expense preview[/-][+][$250] iOS&Android Expense - App does not respond to long tap on receipt placeholder area on expense preview[/+]on Dec 10, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.77-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@suneox@bfitzexpensify@suneox The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
@bernhardoj to be paid $250 for contributor work via ND manual request @suneox to be paid $250 for C+ work - @suneox, please complete the BZ checklist and I'll finalise payment via Upwork
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Dec 6, 2024
Triggered auto assignment to @bfitzexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.bernhardoj commentedon Dec 6, 2024
Edited by proposal-police: This proposal was edited at 2024-12-12 08:04:33 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Long press on a empty receipt doesn't show the context menu.
What is the root cause of that problem?
The receipt empty state is wrapped with a pressable.
App/src/components/ReceiptEmptyState.tsx
Lines 24 to 33 in b9107bf
This makes it a nested pressable in a ReportPreview or MoneyRequestPreviewContent. The long press doesn't bubble up, which is why we manually handle the report preview long press to show the context menu.
App/src/components/ReportActionItem/ReportPreview.tsx
Lines 464 to 468 in b9107bf
But we don't do the same for the receipt empty state component.
What changes do you think we should make in order to solve the problem?
But instead of handling the long press manually for receipt empty state, we can just render a View instead of Pressable if the receipt empty state
onPressis undefined. (we need to remove theonPressdefault value)App/src/components/ReceiptEmptyState.tsx
Lines 24 to 33 in b9107bf
Then, we can remove the receipt image
onPressfrom the ReportPreview and MoneyRequestPreviewContent. (the onPress is only being used by receipt empty state)App/src/components/ReportActionItem/ReportPreview.tsx
Lines 475 to 480 in b9107bf
App/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx
Lines 351 to 355 in b9107bf
It was added because the parent pressable
onPressisn't triggered when pressing on the receipt empty state. But we can remove it now since we won't use nested pressable anymore for the receipt empty state.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
When creating the test for this, I found that it behaves differently when running on the test environment. The issue we have here is basically if we have nested pressable, then only the inner pressable will receive the press/long-press event (which was observed first in this PR).
But when I recreate this on the test environment as simple as this:
the outer pressable long press is triggered just fine. So, the unit test can't cover this case.
melvin-bot commentedon Dec 10, 2024
@bfitzexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!
[-]iOS&Android Expense - App does not respond to long tap on receipt placeholder area on expense preview[/-][+][$250] iOS&Android Expense - App does not respond to long tap on receipt placeholder area on expense preview[/+]melvin-bot commentedon Dec 10, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021866480849153052085
melvin-bot commentedon Dec 10, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @suneox (
External)21 remaining items
melvin-bot commentedon Dec 23, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Dec 23, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.77-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-12-30. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Dec 23, 2024
@suneox @bfitzexpensify @suneox The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
bfitzexpensify commentedon Dec 30, 2024
Payment summary:
@bernhardoj to be paid $250 for contributor work via ND manual request
@suneox to be paid $250 for C+ work - @suneox, please complete the BZ checklist and I'll finalise payment via Upwork
suneox commentedon Dec 30, 2024
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: https://github.com/Expensify/App/pull/52848/files#r1899525216
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
N/A: Due to it isn't an impactful bug
bfitzexpensify commentedon Dec 30, 2024
Thanks! Payment complete.
bernhardoj commentedon Dec 31, 2024
Requested in ND.
JmillsExpensify commentedon Jan 8, 2025
$250 approved for @bernhardoj