Closed lanitochka17 closed 1 month ago
Triggered auto assignment to @jliexpensify (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.
@jliexpensify 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
The expense RHP closes after clicking on the From subtitle link
When we open the report detail page from RHP Report Screen and click on the parent subtitle, we use goBack
to navigate back to the report screen but it doesn't work as expected.
We only navigate back to the fallbackRoute
if isFirstRouteInNavigator
is true
or we're in the central panel. In this case, the RHP stack has two screens RHP ReportScreen
--> Report Detail Page
so isFirstRouteInNavigator
is false
at both times we call goBack
(we call goBack
two times immediately so navigationRef.current.getState()
is the same) and then we only go back to the previous screen two times Report Detail Page
--> RHP ReportScreen
--> Search Page
.
https://github.com/Expensify/App/blob/8e79c59615feb7de82e4aaa42d8b2297542f5b3b/src/libs/Navigation/Navigation.ts#L211
We should pass shouldEnforceFallback
param as true
here to make sure we will use the fallbackRoute
when we call goBack
the second time.
We can use Navigation.isNavigationReady()
to wait until the first goBack
is complete before calling goBack
the second time. With this at the second time the RHP stack has only RHP ReportScreen
and then isFirstRouteInNavigator
is true
that leads we navigate to the fallbackRoute
// Pop the thread report screen before navigating to the chat report.
Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(parentReportID));
if (isVisibleAction && !isOffline) {
// Pop the chat report screen before navigating to the linked report action.
Navigation.isNavigationReady().then(() => {
Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(parentReportID, parentReportActionID));
});
}
Job added to Upwork: https://www.upwork.com/jobs/~01d7addf8985df968d
I'm able to repro this
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (External
)
I am unable to replicate in the latest main
https://github.com/user-attachments/assets/d5626510-2a5e-4170-8a04-969ee6937715
@fedirjh I'm still able to reproduce this on the latest main bug by disabling the strict mode. Correct me if I missed something.
https://github.com/user-attachments/assets/a08c8aeb-c6f7-4408-b94e-6ec59964c6b0
@jliexpensify, @fedirjh Huh... This is 4 days overdue. Who can take care of this?
Thank you, @nkdengineer, for the suggestion. I managed to reproduce the issue on the dev by disabling strict mode. The proposed solution also seems satisfactory to me, so let's move forward with implementing the main solution.
Let's proceed with @nkdengineer's proposal;
π π π C+ reviewed
Triggered auto assignment to @NikkiWines, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@NikkiWines Please help to take a look when you have a chance, thanks.
Sorry for the delay, agreed that @nkdengineer's proposal looks good π
π£ @nkdengineer π An offer has been automatically sent to your Upwork account for the Contributor role π Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
Regression Test Proposal
Submit an expense
Go to Search
Click on the expense submitted in Step 3
Click on the RHP header
Click on the From subtitle link
Verify that: App will open the report from the subtitle link
Paid and job remvoed
$250 approved for @fedirjh
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.14-2 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
App will open the report from the subtitle link
Actual Result:
The expense RHP closes after clicking on the From subtitle link
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/719753a0-3af0-46ec-9187-cf3fca3ada25
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @fedirjh