-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[HOLD for payment 2024-07-10] [HOLD for payment 2024-07-02] [$250] Search - RHP loads infinitely when deleting expense from report details page #44212
Comments
Triggered auto assignment to @jliexpensify ( |
Triggered auto assignment to @jasperhuangg ( |
👋 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:
|
@jasperhuangg FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
We think that this bug might be related to #wave-collect - Release 1 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Search - RHP loads infinitely when deleting expense from RHP What is the root cause of that problem?New feature: delete from report details. The logic when user deletes expense report from report details will go back to previous screen. I think the correct navigation is to goback to transaction search page. What changes do you think we should make in order to solve the problem?We could make a library function to get previous screen name, something like: const state = navigationRef.getState();
const previousScreenName = state.routes.at(-1)?.state?.routes?.at(-2)?.name;
// for further details we must check on the routes length;
// this is used for illustration In ReportDetailsPage, we can use this library function as In here: App/src/pages/ReportDetailsPage.tsx Lines 633 to 637 in 0176052
Modify the code into: if (!navigateBackToAfterDelete.current) {
return;
}
+if (previousScreenName === SCREENS.RIGHT_MODAL.SEARCH_REPORT) {
+ navigateBackToAfterDelete.current = undefined;
+ Navigation.dismissModal();
+ return;
+}
Navigation.goBack(navigateBackToAfterDelete.current);
So we check on previous screen, if it is We could use same method in report opened in RHP -> three dots menu -> delete expense. |
@tsa321 do you have a link to the PR that caused this issue? |
@mountiny I believe It is new feature. The delete expense button is displayed in report details. I have worked on #43970 and I have tried to revert it, but the problem persists—the loading skeleton view is displayed indefinitely. I believe the expected behavior is to return to the transaction search page instead of the search report in the RHP, since the report is deleted. |
Job added to Upwork: https://www.upwork.com/jobs/~012d8ed6a1d54a3505 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif ( |
Yeah I think the RHP should close and we should remove the expense from the search too cc @luacmartins |
@tsa321 I checked your proposal and you correctly found a root cause of this issue :) However, I think that this solution could be a bit more simpler. For example, to determine if we are in the Search tab we can check the topmost central pane route. Thanks to that we have more readable information which module of the app is currently opened:
if (!navigateBackToAfterDelete.current) {
return;
}
+if (topmostCentralPaneRoute?.name === SCREENS.SEARCH.CENTRAL_PANE) {
+ navigateBackToAfterDelete.current = undefined;
+ Navigation.dismissModal();
+ return;
+}
Navigation.goBack(navigateBackToAfterDelete.current); Furthermore, I noticed that the same logic is used in components: Screen.Recording.2024-06-24.at.14.28.55.movAfter deleting an expense, we're redirected to the ReportScreen, to me it should also close RHP. If so, we can add this logic to header components as well, I think that we can create a separate function to handle that |
📣 @c3024 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Confirmed this fixed the bug in staging. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.1-19 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-07-02. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Hi @c3024 - any checklist needed? |
This is a new feature and the bug was caught in Staging itself so there is no regression test needed as well. I think there is no need for a checklist here. |
Correct, we'll add test steps as part of the project wrap up. |
Payment Summary: |
Paid and job closed! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.3-7 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-07-10. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.1-0
Reproducible in staging?: y
Reproducible in production?: n
If this was caught during regression testing, add the test name, ID and link from TestRail: exp around vhttps://expensify.testrail.io/index.php?/tests/view/4662005
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause internal team
Slack conversation:
Action Performed:
Expected Result:
RHP will close because the transaction is deleted.
Actual Result:
RHP loads infinitely.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6521562_1719066498914.20240622_202515.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @jliexpensifyThe text was updated successfully, but these errors were encountered: