[$250] Different back navigation from more features hyperlink on tags page
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.72-0 Reproducible in staging?: Y Reproducible in production?: Y 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: N/A Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause - Internal Team
Action Performed:
- Navigate to staging.new.expensify.com and sign in with an Expensifail account
- Create a workspace
- Enable tags and rules in more features
- Add a tag
- Open the tag and tap on "More features" hyperlink
- Tap on the back icon at the top left corner
- Open the tag again
- Tap on the "More features" hyper link
- Tap on the browser back button
Expected Result:
App navigates to Tags page
Actual Result:
App navigates to workspace editor or other page, which is not the same behavior as navigating back using the apps back navigation
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [ ] Android: Standalone
- [ ] Android: HybridApp
- [ ] Android: mWeb Chrome
- [ ] iOS: Standalone
- [x] iOS: HybridApp
- [ ] iOS: mWeb Safari
- [ ] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/fc1387aa-25ea-4fec-8d09-ef835bf7936d
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021865177208410818944
- Upwork Job ID: 1865177208410818944
- Last Price Increase: 2024-12-06
Issue Owner
Current Issue Owner: @hungvu193
Triggered auto assignment to @twisterdotcom (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.
Proposal
Please re-state the problem that we are trying to solve in this issue.
App navigates to workspace editor or other page, which is not the same behavior as navigating back using the apps back navigation
What is the root cause of that problem?
We are using normal navigate here
https://github.com/Expensify/App/blob/24793797a140b3f65a7de0511adccdcb51bc1394/src/pages/workspace/tags/TagSettingsPage.tsx#L196
Tag page is open on top of workspaceInitiaPage so canAccessRoute is incorrectly computed
https://github.com/Expensify/App/blob/0e28aa4d7ab0e5ba4d2b050c47dc78b35a45992f/src/pages/workspace/WorkspaceInitialPage.tsx#L360-L362
And we get dismiss all RHP modal in this useEffect. It leads to we navigate to workspace init page in the video in OP
https://github.com/Expensify/App/blob/0e28aa4d7ab0e5ba4d2b050c47dc78b35a45992f/src/pages/workspace/WorkspaceInitialPage.tsx#L372-L375
What changes do you think we should make in order to solve the problem?
When workspace init is the only route in the navigator state. We can use the function closeAndNavigate to navigate
onPress={() => Navigation.closeAndNavigate(ROUTES.WORKSPACE_MORE_FEATURES.getRoute(policyID))}
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
Or we can use function navigate with type 'UP'
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Job added to Upwork: https://www.upwork.com/jobs/~021865177208410818944
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 (External)
I'll prioritize reviewing this issue tomorrow
Thanks for the proposal @daledah. I think using both types UP for navigate or closeAndNavigate will lead to another issue, when pressing back from WorkspaceMoreFeaturePage, it navigates to Tags page instead of WorkspaceListPage.
https://github.com/user-attachments/assets/f907094e-5d31-4c7d-91ee-3b9710a0df42
App navigates to Tags page
@hungvu193 it seems to be expected in OP
I think that's expected for Safari, but it looks weird to me in Chrome.
@twisterdotcom Can you take a look at my comment above and let me know what's your thought? ty
I think that's expected for Safari, but it looks weird to me in Chrome.
@hungvu193 agree with you, I'm investigating and will reply soon
Still waiting for proposals
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@twisterdotcom, @hungvu193 Whoops! This issue is 2 days overdue. Let's get this updated quick!
Not overdue still waiting for proposals
I think given this is niche and doesn't truly affect or even confuse that much I will close. Perhaps if we ever do a big bug rundown we'll come back to it.