Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.48k stars 2.83k forks source link

Workspace - Inbox briefly displayed when creating WS from selector and going back #50850

Open IuliiaHerets opened 2 days ago

IuliiaHerets commented 2 days ago

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.49-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5088507&group_by=cases:section_id&group_order=asc&group_id=296775 Issue reported by: Applause Internal Team

Action Performed:

  1. Open the Expensify app.
  2. Tap on the workspace selector on the top left corner.
  3. Tap on the "+" icon to add a new workspace.
  4. Once navigated to workspace menu, tap on the arrow on the top left corner.
  5. Verify you are redirected to workspace selector again.

Expected Result:

After the workspace is created and the user should be navigated to the new workspace menu, and when the back arrow is tapped, the app should return to workspace selector.

Actual Result:

When the user lands on new workspace menu and tap the back arrow to return to workspace selector, the inbox is displayed for a second, before the user lands on selector again.

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/e09bb819-9eee-4cd6-a43e-52ce9faa4567

https://github.com/user-attachments/assets/323abdf3-e4d0-4fcf-b676-787d04336f0c

View all open jobs on GitHub

melvin-bot[bot] commented 2 days ago

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

IuliiaHerets commented 2 days ago

We think that this bug might be related to #wave-collect - Release 1

IuliiaHerets commented 2 days ago

@puneetlath 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

daledah commented 2 days ago

Edited by proposal-police: This proposal was edited at 2024-10-16 11:38:54 UTC.

Proposal

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

When the user lands on new workspace menu and tap the back arrow to return to workspace selector, the inbox is displayed for a second, before the user lands on selector again.

What is the root cause of that problem?

When we click back button, it calls: https://github.com/Expensify/App/blob/a53705da129d1398725fa4464cb64e7f53168e2f/src/pages/workspace/WorkspaceInitialPage.tsx#L380-L381

Navigation.navigate(route.params?.backTo as Route) is only called when the navigation is ready after Navigation.resetToHome() is called. Hence the inbox is displayed for a second, before the user lands on selector again.

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

Just need to update https://github.com/Expensify/App/blob/a53705da129d1398725fa4464cb64e7f53168e2f/src/pages/workspace/WorkspaceInitialPage.tsx#L380-L381

                            if (isSmallScreenWidth) {
                                Navigation.navigate(route.params?.backTo as Route);
                            } else {
                                Navigation.isNavigationReady().then(() => Navigation.navigate(route.params?.backTo as Route));
                            }

With this change, we can remove the "inbox is displayed for a second, before the user lands on selector again." in small screen.

What alternative solutions did you explore? (Optional)