Add NAVIGATORS.WORKSPACE_NAVIGATOR#86438
Conversation
f342827 to
cb8cc63
Compare
cb8cc63 to
1c3e00b
Compare
1c3e00b to
9ab0bdb
Compare
| if (lastFullScreenRoute?.key) { | ||
| // If the user opened the workspace/domain split navigator from a different tab, we don't want to animate the entering transition. | ||
| // To make it feel like bottom tab navigator. | ||
| workspaceOrDomainSplitsWithoutEnteringAnimation.add(lastFullScreenRoute.key); |
There was a problem hiding this comment.
When entering the workspace from another screen, is the animation no longer shown? I think it should behave like the other tab navigators and not show it, but I just wanted to make sure
There was a problem hiding this comment.
Currently it's nested in WorkspaceNavigator so we simplified this logic a lot, a now this screen has its own animation, when we switch between tabs it's not animated as WorkspaceNavigator doesn't have an entering animation
There was a problem hiding this comment.
I think we no longer use this set
| import SCREENS from '@src/SCREENS'; | ||
|
|
||
| const FULL_SCREENS_SET = new Set([...Object.values(SIDEBAR_TO_SPLIT), NAVIGATORS.SEARCH_FULLSCREEN_NAVIGATOR, SCREENS.WORKSPACES_LIST, SCREENS.HOME]); | ||
| const FULL_SCREENS_SET = new Set([...Object.values(SIDEBAR_TO_SPLIT), NAVIGATORS.SEARCH_FULLSCREEN_NAVIGATOR, SCREENS.WORKSPACES_LIST, SCREENS.HOME, NAVIGATORS.WORKSPACE_NAVIGATOR]); |
There was a problem hiding this comment.
do we need SCREENS.WORKSPACES_LIST int this place
There was a problem hiding this comment.
I believe we do! It's still a full screen page, but nested. We'll refactor it in #85234
| } | ||
| navigation.preload(SCREENS.WORKSPACES_LIST, {}); | ||
| } | ||
| // Currently the Account tab is preloaded, while Search and Inbox are not preloaded due to their potential complexity. |
There was a problem hiding this comment.
I think we can just write that we simply preload the settings page, and the others are no longer needed due to updates and the architect, especially since the root tab navigator will be introduced soon.
There was a problem hiding this comment.
💡 Codex Review
handlePushFullscreenAction() now forwards generic PUSH actions unchanged, so navigation paths like Navigation.navigate(ROUTES.WORKSPACE_INITIAL...) (for example from WorkspaceJoinUserPage) can create WORKSPACE_NAVIGATOR with only a split child and no SCREENS.WORKSPACES_LIST underneath. The new navigator design assumes the list is always the base route, and without it iOS back-swipe/back from workspace/domain screens can pop out of the tab instead of returning to Workspaces List. Please inject/rehydrate [WORKSPACES_LIST, <split>] for WORKSPACE_NAVIGATOR pushes, not only for OPEN_WORKSPACE_SPLIT / OPEN_DOMAIN_SPLIT and deep-link adaptation.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
Looks like it's related to our changes 2026-03-27.17.20.30.mov |
|
On the domain members screen 2026-03-27.17.37.18.mov |
|
For some reason, the bottom menu appears with a delay after opening the create domain screen and returning back But with the create workspace screen is the same situation 2026-03-27.17.41.35.mov |
|
PR doesn’t need product input as a refactor PR. Unassigning and unsubscribing myself. |
Explanation of Change
Previously, the Workspaces tab was modelled using three separate root-level screens/navigators pushed onto the root stack independently:
SCREENS.WORKSPACES_LISTNAVIGATORS.WORKSPACE_SPLIT_NAVIGATORNAVIGATORS.DOMAIN_SPLIT_NAVIGATORThis caused a number of issues:
WorkspaceSplitNavigator→ "back" toWorkspacesListrequired customgoBacklogic, and on iOS the swipe gesture didn't work correctly because the list wasn't underneath the split navigator in the same stack.WorkspaceSplitNavigatorwas controlled by a mutableSet(workspaceOrDomainSplitsWithoutEnteringAnimation) which was shared global state and had to be cleaned up manually.getAdaptedStateFromPathhandling required special-cased logic to prependWORKSPACES_LISTbefore workspace split navigators.This PR introduces
NAVIGATORS.WORKSPACE_NAVIGATOR, a dedicated persistent stack navigator that owns the full Workspaces tab hierarchy:This change is a prerequisite for #85234 — Root Tab Navigator, which introduces a bottom tab navigator for top-level navigation. Consolidating the Workspaces tab into a single persistent
WorkspaceNavigatoris a necessary step before that navigator can be treated as a first-class tab in the tab structure.Fixed Issues
#85260 (partial)
PROPOSAL:
Tests
Prerequisites
1. Workspaces List page renders correctly
/workspaces.2. Navigating into a workspace and back
SLIDE_FROM_RIGHTanimation./workspaces/:policyID/overview.3. iOS swipe-back gesture from workspace to list
WorkspacesListPageis revealed underneath — the swipe gesture works correctly because the list is now part of the same stack.4. Navigating into a domain and back
5. Tab switching preserves workspace state
6. Deep linking to a workspace screen
/workspaces/:policyID/members.WorkspaceNavigatoron the stack, showing the Members screen, withWorkspacesListunderneath in the back stack.WorkspacesList.7. Deep linking to the workspaces list
/workspaces.8. Session storage restoration after reload
/workspaces/:policyID/tags).WorkspacesList.9. Tab bar highlight
Offline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2026-03-27.at.10.16.17.mov
Android: mWeb Chrome
Screen.Recording.2026-03-27.at.11.11.14.mov
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-03-27.at.10.39.16.mov