Skip to content
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

[$250] IOS - Empty screen seen when navigating back from workspace description the second time #53589

Open
2 of 8 tasks
lanitochka17 opened this issue Dec 4, 2024 · 9 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@lanitochka17
Copy link

lanitochka17 commented Dec 4, 2024

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.71-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
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:

  1. Open IOS hybrid app
  2. Create a workspace give it a custom description
  3. Navigate to the inbox
  4. Open workspace chat
  5. Tap on the custom description to navigate to description setting of the workspace
  6. Navigate back twice by tapping on the top left back icon until you reach workspace editor page
  7. Tap on Workspace chat
  8. Re do step 5
  9. Tap on the top corner back icon or swipe from left to right

Expected Result:

Empty screen does not get shown

Actual Result:

Empty screen gets shown and the workspace profile settings page animation is wrong, it slides from right to left after the empty screen has been shown first

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6684551_1733335793079.ScreenRecording_12-04-2024_21-02-36_1.1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021865096772528155887
  • Upwork Job ID: 1865096772528155887
  • Last Price Increase: 2024-12-06
Issue OwnerCurrent Issue Owner: @ishpaul777
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 4, 2024
Copy link

melvin-bot bot commented Dec 4, 2024

Triggered auto assignment to @muttmuure (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.

@muttmuure muttmuure added Weekly KSv2 External Added to denote the issue can be worked on by a contributor and removed Daily KSv2 labels Dec 6, 2024
Copy link

melvin-bot bot commented Dec 6, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021865096772528155887

@melvin-bot melvin-bot bot changed the title IOS - Empty screen seen when navigating back from workspace description the second time [$250] IOS - Empty screen seen when navigating back from workspace description the second time Dec 6, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 6, 2024
Copy link

melvin-bot bot commented Dec 6, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 (External)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Dec 6, 2024
@ikevin127
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue

Empty screen gets shown and the workspace profile settings page animation is wrong, it slides from right to left after the empty screen has been shown first.

What is the root cause of that problem?

TLDR: The same RCA detailed in my proposal of this other issue.

Note

This issue is only present on narrow layout devices (native / mWeb) where screens displayed in RHP act as a modal.

// We are checking if the user can access the route.
// If user can't access the route, we are dismissing any modals that are open when the NotFound view is shown
const canAccessRoute = activeRoute && menuItems.some((item) => item.routeName === activeRoute);
useEffect(() => {
if (!shouldShowNotFoundPage && canAccessRoute) {
return;
}
if (wasRendered.current) {
return;
}
wasRendered.current = true;
// We are dismissing any modals that are open when the NotFound view is shown
Navigation.isNavigationReady().then(() => {
Navigation.closeRHPFlow();
});
}, [canAccessRoute, shouldShowNotFoundPage]);

When we open the workspace's initial page, the active route becomes Workspace_Initial. However, the current canAccessRoute logic only checks for the sub-page route - therefore when it compares the active route with itself, it fails because menuItems doesn't contain Workspace_Initial.

We actually have the logic to only run it once here, but when we open the search page, all routes are "hidden" as explained here. Because of this, the wasRendered logic in WorkspaceInitialPage won't work as expected -> when we try to open the filter page, the previously "hidden" routes are added back to the stack and canAccessRoute becomes false which will dismiss any RHP that we try to open (Filters).

Credits to bernhardoj for the RCA.

What changes do you think we should make in order to solve the problem?

We had a similar issue which I reviewed recently here where we navigated away from WorkspaceProfileSharePage to a report without dismissing the currently opened modal which caused a weird UI bug in the QR Code because the same modal would be opened twice.

Same as proposed in the other issue, a practical solution for this kind of problem is to simply replace the way we navigate away from WS to the report here:

onPress={() => Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(currentUserPolicyExpenseChat?.reportID ?? '-1'))}

to use Navigation.dismissModal instead:

onPress={() => Navigation.dismissModal(currentUserPolicyExpenseChat?.reportID ?? '-1')}

Why dismissing the modal first fixes our issue ?
Because as explained in RCA, on narrow layout devices (native / mWeb) screens displayed in RHP act as a modal and by dismissing it when navigating to the report, all the conditions which lead to the empty screen showing when navigating back in our case, will now work as expected.

Important

I proposed the same solution for this issue and because this solution would fix both issues, if my solution is selected on any of the two issues -> we should put the other one on HOLD.

Result video (before / after)

iOS: Native
Before After
before.mp4
after.mp4

Copy link

melvin-bot bot commented Dec 10, 2024

@muttmuure, @ishpaul777 Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Dec 10, 2024
@ishpaul777
Copy link
Contributor

i'll try to priortize the review today 🙇

@melvin-bot melvin-bot bot removed the Overdue label Dec 10, 2024
@ishpaul777
Copy link
Contributor

@ikevin127 Will this issue be fixed in #53600, i see we got a proposal selected there?

@ikevin127
Copy link
Contributor

Will this issue be fixed in #53600, i see we got a proposal selected there?

cc @bernhardoj for input on this question

@bernhardoj
Copy link
Contributor

No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

5 participants