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
Expense - Unable to drag and drop receipt to Upload receipt RHP #49901
Version Number: 9.0.41-2 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers):applausetester+kh010901@applause.expensifail.com Issue reported by: Applause - Internal Team
Action Performed:
Go to staging.new.expensify.com
Go to DM
Submit an expense without receipt
Go to transaction thread
Click on Add receipt modal
Drag and drop an image to the RHP
Expected Result:
Image can be dragged and dropped to Upload receipt RHP
Actual Result:
Image cannot be dragged and dropped to Upload receipt RHP
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
👋 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:
Identify the pull request that introduced this issue and revert it.
What changes do you think we should make in order to solve the problem?
Here, If getReportRHPActiveRoute return empty string then we should get the active route from getActiveRouteWithoutParams.
Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_SCAN.getRoute(// rest of paramsNavigation.getReportRHPActiveRoute()||Navigation.getActiveRouteWithoutParams(),),)
I think @bernhardoj already fixed this here? Should I assign you to this one? I don't think this should be weekly btw, I'll change it to Hourly until we confirm this is solved today since it's a rough bug.
Activity
github-actions commentedon Sep 29, 2024
👋 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:
melvin-bot commentedon Sep 29, 2024
Triggered auto assignment to @carlosmiceli (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.lanitochka17 commentedon Sep 29, 2024
We think that this bug might be related to #wave-control
ishpaul777 commentedon Sep 29, 2024
offending PR #47990
ishpaul777 commentedon Sep 29, 2024
Edited by proposal-police: This proposal was edited at 2024-09-29 20:15:28 UTC.
Edits: Fix code links, added video
Proposal
Please re-state the problem that we are trying to solve in this issue.
Unable to drag and drop receipt to Upload receipt RHP
What is the root cause of that problem?
here we are explictly disable the drag and drop functionality when backTo route is not available.
App/src/pages/iou/request/step/IOURequestStepScan/index.tsx
Line 698 in 3047c1b
in this PR #47990, we replaced getActiveRouteWithoutParams with getReportRHPActiveRoute which return empty string when report is not in RHP.
App/src/components/ReportActionItem/MoneyRequestView.tsx
Line 538 in 3047c1b
What changes do you think we should make in order to solve the problem?
Here, If getReportRHPActiveRoute return empty string then we should get the active route from getActiveRouteWithoutParams.
Screen.Recording.2024-09-30.at.1.47.38.AM.mov
Nodebrute commentedon Sep 29, 2024
Edited by proposal-police: This proposal was edited at 2024-09-29 20:25:27 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Unable to drag and drop receipt to Upload receipt RHP
What is the root cause of that problem?
We recently started using
Navigation.getReportRHPActiveRoute()everywhere, but this issue only happens onScan pageApp/src/pages/iou/request/step/IOURequestStepScan/index.tsx
Line 698 in 3047c1b
It's because
shouldShowWrapperwill befalseand the top part will be cut offApp/src/pages/iou/request/step/IOURequestStepScan/index.tsx
Line 698 in 3047c1b
What changes do you think we should make in order to solve the problem?
We can create a new variable
const isEditing = action === CONST.IOU.ACTION.EDITand we can pass it hereApp/src/pages/iou/request/step/IOURequestStepScan/index.tsx
Line 698 in 3047c1b
Optional: We can also fix this in IOURequestStepScan/index.native.tsx file
We should check for other pages too where we have this issue and fix it
What alternative solutions did you explore? (Optional)
Or we can do something like this here
Alternative 2
Pass shouldShowWrapper here
App/src/pages/iou/request/step/IOURequestStepScan/index.tsx
Line 698 in 3047c1b
huult commentedon Sep 30, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Android- expense - In camera screen receipt header is missing
What is the root cause of that problem?
The
backToisundefined, which prevents the wrapper from showing and causes this issue.App/src/pages/iou/request/step/IOURequestStepScan/index.tsx
Line 698 in 3634670
backToisundefinedbecauseNavigation.getReportRHPActiveRoute()returnsundefinedwhen clicked from the money request view.App/src/components/ReportActionItem/MoneyRequestView.tsx
Line 538 in 3047c1b
What changes do you think we should make in order to solve the problem?
We should check if
getReportRHPActiveRoutereturnsundefined, and if so, usegetActiveRouteWithoutParams.// src/components/ReportActionItem/MoneyRequestView.tsx#L538 {shouldShowReceiptEmptyState && ( <ReceiptEmptyState hasError={hasErrors} disabled={!canEditReceipt} onPress={() => Navigation.navigate( ROUTES.MONEY_REQUEST_STEP_SCAN.getRoute( CONST.IOU.ACTION.EDIT, iouType, transaction?.transactionID ?? '-1', report?.reportID ?? '-1', - Navigation.getReportRHPActiveRoute(), + Navigation.getReportRHPActiveRoute() || Navigation.getActiveRouteWithoutParams(), ), ) } /> )}What alternative solutions did you explore? (Optional)
We used getActiveRouteWithoutParams instead of getReportRHPActiveRoute.
// src/components/ReportActionItem/MoneyRequestView.tsx#L538 {shouldShowReceiptEmptyState && ( <ReceiptEmptyState hasError={hasErrors} disabled={!canEditReceipt} onPress={() => Navigation.navigate( ROUTES.MONEY_REQUEST_STEP_SCAN.getRoute( CONST.IOU.ACTION.EDIT, iouType, transaction?.transactionID ?? '-1', report?.reportID ?? '-1', - Navigation.getReportRHPActiveRoute(), + Navigation.getActiveRouteWithoutParams(), ), ) } /> )}Note: Same as my proposal posted previously.
Details
POCGonals commentedon Sep 30, 2024
Not a Web-E blocker
carlosmiceli commentedon Sep 30, 2024
I think @bernhardoj already fixed this here? Should I assign you to this one? I don't think this should be weekly btw, I'll change it to Hourly until we confirm this is solved today since it's a rough bug.
melvin-bot commentedon Sep 30, 2024
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
bernhardoj commentedon Sep 30, 2024
@carlosmiceli yes, I'm fixing it in #49916. Not sure if I need to get assigned here though.
rayane-d commentedon Sep 30, 2024
The linked PR fixes this blocker and is ready for merging and cherry-picking to staging
carlosmiceli commentedon Sep 30, 2024
Since @luacmartins is reviewing that PR I'll let him decide, should @bernhardoj be assigned to this issue too?
luacmartins commentedon Sep 30, 2024
Confirmed fix on staging.
luacmartins commentedon Sep 30, 2024
This was a regression so I'm gonna close the issue.