-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Implement flexible bottom tab bar #49539
Merged
mountiny
merged 499 commits into
Expensify:main
from
software-mansion-labs:poc/split-navs
Feb 12, 2025
Merged
Changes from 3 commits
Commits
Show all changes
499 commits
Select commit
Hold shift + click to select a range
097d3c5
Unification of comments in Navigation.ts
WojtekBoman 0ae4aac
Fix goBack in navigateToConciergeChatAndDeleteReport
WojtekBoman 7345d80
Merge pull request #142 from software-mansion-labs/poc/bottom-tab-cle…
WojtekBoman ade9a19
Merge branch 'main' into poc/split-navs
WojtekBoman 27c6f92
Simplify ActiveWorkspaceContextProvider
WojtekBoman 96289b1
Adjust BaseSidebarScreen workspace reset hook to split navigators
WojtekBoman 18ad376
Remove Navigation.switchPolicyID
WojtekBoman 14068c4
Adjust createInverseRelation, fix SPLIT_TO_SIDEBAR
WojtekBoman 0a11e29
Fix Navigation.popToTop
WojtekBoman 5117a9f
Adjust ResizeScreenTests to SplitNavigator structure
WojtekBoman 08f5c9d
Fix goBack types
WojtekBoman 579608e
Remove useNavigationResetRootOnLayoutChange
WojtekBoman 79202d1
Fix go back using swipe from not found policy page
WojtekBoman 9f5bccb
Hide bottom tab on workspace initial page when policy is not found
WojtekBoman faeaf9a
Simplify getAdaptedState
WojtekBoman e7a5150
Add comment to NAVIGATORS.WORKSPACE_SPLIT_NAVIGATOR linking config
WojtekBoman 49c49f9
Handle adding SettingsSplit under WorkspaceSplit in getAdaptedState
WojtekBoman 4620ac7
Add shouldDisplayPolicyNotFoundPage
WojtekBoman f405f7e
Simplify getRoutePolicyID
WojtekBoman 2e08e1e
Remove backTo param from Workspace Initial Page
WojtekBoman 3e7f16c
Merge pull request #154 from software-mansion-labs/poc/fix-adapt-state
adamgrzybowski c611aa2
fix copying params for sidebar in adaptStateIfNecessary
adamgrzybowski 7438d33
implement TopLevelBottomTabBar and proper animations
adamgrzybowski 88b9998
Merge pull request #155 from software-mansion-labs/poc/top-level-bott…
adamgrzybowski 28ed8b9
Merge branch 'main' into poc/split-navs
WojtekBoman 99fc247
Fix lint
WojtekBoman 17759f4
Remove Navigation.popToTop and add shouldPopToTop to GoBackOptions
WojtekBoman 1480723
Fix types in getAdaptedStateFromPath
WojtekBoman af2058d
Add splitNavigator to RootNavigatorOptions
WojtekBoman 98247e3
Merge branch 'main' into poc/split-navs
WojtekBoman e5fa16b
Merge branch 'main' into poc/split-navs
WojtekBoman 4b2949d
Add resetPolicyIDInNavigationState
WojtekBoman 0a07ab6
add final review adjustments
adamgrzybowski 94f9dfb
remove index file for helpers
adamgrzybowski 1b32364
Fix navigating to workspaces list using settings tab button
WojtekBoman 2d6951a
remove isSplitNavigatorName
adamgrzybowski 84a15f5
Merge pull request #157 from software-mansion-labs/poc/split-reset-po…
WojtekBoman c81e83d
Merge branch 'main' into poc/split-navs
WojtekBoman 9fbe3d3
Merge branch 'poc/split-navs' into poc/final-review-adjustments
adamgrzybowski e22f82a
Merge pull request #158 from software-mansion-labs/poc/final-review-a…
adamgrzybowski e575d1b
fix resetPolicyIDInNavigationState
adamgrzybowski f4ef875
fix ts problems
adamgrzybowski 3bc1739
Split BOTTOM_TABS const to a separate file to fix imports
Kicu 03e6a6d
Move setNavigationActionToMicrotaskQueue to Navigation.ts
WojtekBoman c4fa287
Add tests for Navigation.goBack
WojtekBoman 4a6766e
Add tests for Navigation.goBack with comparing route params
WojtekBoman 3acba0a
Add test for going back to previous split
WojtekBoman 5232577
Cleanup and group go back tests
WojtekBoman 0b6c39f
Add test for going back to the page present in the split navigator th…
WojtekBoman a22cf59
Add NavigateTests
WojtekBoman 3a9fd70
Add SwitchPolicyIDTests
WojtekBoman c404c02
Create package for navigation tests
WojtekBoman 3960579
Move setNavigationActionToMicrotaskQueue to helpers
WojtekBoman 8bc926d
Refactor old names in nav tests
WojtekBoman 9c9d28c
Move TestNavigationContainer to test utils
WojtekBoman b21cb6a
Merge pull request #156 from software-mansion-labs/poc/go-back-tests
adamgrzybowski 6589e68
fix tests
adamgrzybowski f05d53c
fix lint
adamgrzybowski 8648ce7
fix tests v2
adamgrzybowski 3af5702
Adjust useBottomTabIsFocused to splits
WojtekBoman e07c4f5
Merge branch 'main' into poc/split-navs
WojtekBoman d514067
Mock TopLevelBottomTabBar in navigation tests
WojtekBoman 5f90743
Fix lint in ReportUtils
WojtekBoman 0812be8
Merge branch 'main' into poc/split-navs
WojtekBoman c1d8459
Add LinkToOptions
WojtekBoman c11217d
Adjust navigate calls to LinkToOptions
WojtekBoman f1bc522
Add backTo param to SelectDelegateRolePage
WojtekBoman 52ce458
fix tooltips for sidebar list
adamgrzybowski 667a052
fix tooltipis on bottom tab bar
adamgrzybowski 21be090
remove leftover style
adamgrzybowski 114b059
Merge pull request #159 from software-mansion-labs/poc/link-to-options
WojtekBoman 36c1238
fix fab tooltip
adamgrzybowski 6d1010f
fix tests and typecheck
adamgrzybowski 2b5299a
Merge pull request #160 from software-mansion-labs/poc/split-tooltips
adamgrzybowski 50f36ea
fix tests v2
adamgrzybowski ac8a578
change name to isTooltipAllowed
adamgrzybowski 072f0d9
Merge branch 'main' into poc/split-navs
WojtekBoman 8292c1e
fix tests v3
adamgrzybowski 133e7d2
Add optional chaining to useIsBottomTabVisibleDirectly
WojtekBoman a7207b8
Merge branch 'main' into poc/split-navs
adamgrzybowski 12cf649
Merge branch 'main' into poc/split-navs
WojtekBoman 0da271f
remove unnecessary line
adamgrzybowski e6a96a4
Merge branch 'main' into poc/split-navs
WojtekBoman 52c7e39
Fix dismissModal in submitPerDiemExpense
WojtekBoman 29d62e7
Merge branch 'main' into poc/split-navs
WojtekBoman 8a45900
create SidebarSpacerWrapper
adamgrzybowski 4bade3d
reorganize screen options
adamgrzybowski eb76552
fix naming for createSplitNavigator
adamgrzybowski 8c879b0
Fix issue: Web - App opens invite member confirmation page when press…
WojtekBoman 905e986
Merge pull request #163 from software-mansion-labs/splits/fix-safari-…
adamgrzybowski 1b051fd
Fix issue: Workspace settings - Clicking RHP back button does not clo…
WojtekBoman 151f989
Merge pull request #164 from software-mansion-labs/poc/fixes-after-re…
WojtekBoman 045a00f
fix stat index in adaptStateIfNecessary
adamgrzybowski 9bd4941
Merge pull request #165 from software-mansion-labs/splits/fix-split-r…
adamgrzybowski 76c44f9
fix bottom bar over composer on safari mobile
adamgrzybowski 0988220
handle styles for platforms
adamgrzybowski fbf309c
improve comment
adamgrzybowski eed4ebc
Merge pull request #166 from software-mansion-labs/splits/fix-safar-b…
adamgrzybowski 2d5107f
Fix search menu overflowing on scrolling on mobile
Kicu c973fa6
Fix contextual search item missing in router
Kicu e5fde2a
Merge pull request #167 from software-mansion-labs/kicu/help-navi-search
WojtekBoman f04858c
Cleanup split navigators code
WojtekBoman 16e4838
Add persistentScreens props
WojtekBoman 422db51
Add useIsCurrentRouteHome
WojtekBoman 1eb0557
Add GetStateForActionHandlers docs
WojtekBoman 20a6ae7
Add docs to showSettingsPage
WojtekBoman ca99a85
Exclude switchPolicyID logic to navigation helpers
WojtekBoman c336b80
Fix imports in FAB
WojtekBoman 0c50bef
Remove unnecessary check in SearchPageNarrow
WojtekBoman d8eaaad
Add getTopmostReportsSplitNavigator
WojtekBoman 4a5d43e
Add replaceWithSplitNavigator
WojtekBoman 0fd49e5
Add warnings to handleOpenWorkspaceSplitAction
WojtekBoman 0e88076
Exclude navigation tests to separate file
WojtekBoman fc5e1ec
Fix showing tooltips in OptionRowLHN
WojtekBoman 49d50bb
Merge pull request #161 from software-mansion-labs/poc/code-cleanup
WojtekBoman 1437b88
Fix issue: Desktop - Filter by WS - The E icon is misaligned on the r…
WojtekBoman ecba313
Fix issue: Expense - Amount editor RHP slides in from the right inste…
WojtekBoman d472353
Fix adding params to additionalAction in linkTo
WojtekBoman 561bab6
Merge pull request #168 from software-mansion-labs/poc/fixes-after-re…
WojtekBoman 7d7a0db
Merge branch 'main' into poc/split-navs
WojtekBoman ff4a363
Fix imports in InitialSettingsPage
WojtekBoman 65838b5
fix position
adamgrzybowski c128d35
fix isTooltipAllowed timing issue
adamgrzybowski acb842c
simplify condition
adamgrzybowski d1f82ba
Merge pull request #169 from software-mansion-labs/splits/bottom-tab-…
adamgrzybowski 406c209
Fix issue: Contact methods - Lets make sure it is you page appears twice
WojtekBoman e1778df
Fix issue: Web - Copilot - RHP is not dismissed after adding a copilot
WojtekBoman 4cfdaa8
Fix issue: Workspace - Wrong navigation when opening workspace after …
WojtekBoman f1b1404
Run prettier
WojtekBoman 750155c
fix xero export page nav bug
SzymczakJ 55bc370
Merge branch 'poc/split-navs' into @szymczak/xero-export-page-nav-bug
SzymczakJ a0b57dc
Merge pull request #171 from software-mansion-labs/@szymczak/xero-exp…
SzymczakJ 90dcc91
Fix issue: Scan expense - Selecting replace on the receipt of a scann…
WojtekBoman 5bcc320
Merge pull request #170 from software-mansion-labs/poc/fixes-after-re…
WojtekBoman 7b38421
Merge branch 'main' into poc/split-navs
WojtekBoman 95b9ed9
fix blinking of bottom tab
adamgrzybowski dd31a78
Merge pull request #172 from software-mansion-labs/splits/fix-blinkin…
adamgrzybowski b6ab4cb
fix misalgined bottom tab bar on empty workspace list
adamgrzybowski 0bd0bc8
Merge pull request #173 from software-mansion-labs/splits/fix-misalig…
adamgrzybowski b0c90fc
fix invoices - it's no here page
289Adam289 69745d5
Merge pull request #174 from software-mansion-labs/289Adam289/fix-nav…
289Adam289 55d7b0b
Fix issue: Expensify Card -App crashes when clicking Card limit/Limit…
WojtekBoman 6474240
fix 2fa navi bug
SzymczakJ 0347c3d
Merge pull request #176 from software-mansion-labs/@szymczak/fix-2fa-…
SzymczakJ d6fddec
Merge pull request #175 from software-mansion-labs/poc/fixes-after-re…
WojtekBoman 9f4fe6f
fix SageIntacct wrong nav in out-of-pocket expenses
SzymczakJ e8c3815
Merge pull request #177 from software-mansion-labs/@szymczak/fix-sage…
SzymczakJ a17b7bb
Fix issue: Workflows - RHP opens not here page when returning from Ap…
WojtekBoman 42fcb57
Merge pull request #179 from software-mansion-labs/poc/fixes-after-re…
WojtekBoman d9bfcf9
fix admins button dismiss modal crash
adamgrzybowski 68f9160
Merge pull request #180 from software-mansion-labs/splits/fix-admins-…
adamgrzybowski 0b4807d
Fix composer focus when navigating when starting new chat
Kicu 2b169c0
Simplify ReportSplitNavigator
Kicu b4ab2d3
Simplify focusing logic and fix focusing composer after message edit.
Kicu 20808cb
fix get physical card navigation flow
SzymczakJ 427ba66
Merge pull request #182 from software-mansion-labs/@szymczak/fix–get–…
SzymczakJ 44d3f19
fix hold modal
adamgrzybowski 225ca63
Merge pull request #183 from software-mansion-labs/splits/fix-hold-modal
adamgrzybowski 0e43795
Merge pull request #181 from software-mansion-labs/kicu/fix-composer-…
Kicu e1896b1
fix card not immediately appearing after assigning
SzymczakJ 49f4491
Merge branch 'main' into poc/split-navs
WojtekBoman 14e612f
Add CONST.NAVIGATION_TESTS
WojtekBoman 9299ea3
Remove getTopmostRouteName and replace it with focusedRoute.
Kicu 03f1271
Merge pull request #184 from software-mansion-labs/kicu/nav-cleantopmost
Kicu f1ba2dd
Merge pull request #186 from software-mansion-labs/@szymczak/card-not…
SzymczakJ 35ffdfe
use proper backTo param
adamgrzybowski 579a8b3
Merge pull request #187 from software-mansion-labs/splits/fix-wrong-r…
adamgrzybowski 36ef0c3
Fix navigating to tag list view for multitags
Kicu c5d99ed
sync submodule with main
Kicu a29d2e2
Fix broken auth params when opening desktop App from deeplink.
Kicu 1c88720
Merge pull request #188 from software-mansion-labs/kicu/nav-fix-multi…
Kicu 0b2a175
Improve naming around resetting route params on logout
Kicu 82b4f9d
Merge pull request #189 from software-mansion-labs/kicu/nav-fix-deskt…
Kicu b5e1778
Merge branch 'main' into poc/split-navs
WojtekBoman 0f4090a
fix per diem nav bug
SzymczakJ 445f747
Merge pull request #191 from software-mansion-labs/@szymczak/fix-per-…
SzymczakJ 25054fe
fix bottom bar on not found view
adamgrzybowski 38c0fd1
create goBackToHome
adamgrzybowski 007b1ff
Merge pull request #192 from software-mansion-labs/splits/goBackToHome
adamgrzybowski ad50a6f
Fix issue: Workspace - Unable to close upgrade success modal with Got…
WojtekBoman 9c5583f
Fix issue: Android - Workspace - Device back button returns to worksp…
WojtekBoman 26d82cd
Fix issue: Distance - The ‘More features’ hyperlink redirects to a pa…
WojtekBoman 1f8e5bd
Fix issue: Accounting - RHP for connection setup disappears after upg…
WojtekBoman 71a853c
create container for bottomContent
adamgrzybowski 1029f37
Merge pull request #194 from software-mansion-labs/splits/fix-bottom-…
adamgrzybowski 64bea11
Merge pull request #193 from software-mansion-labs/poc/fixes-after-re…
adamgrzybowski 2f6e5cc
Fix issue: Reports - Workspace switcher is not cleared after resettin…
WojtekBoman ac85b4e
Fix issue: Search-Menu with the saved search stays on the screen afte…
WojtekBoman c5ccc08
Fix issue: Private notes - User navigates to Private notes page when …
WojtekBoman 286e640
Merge pull request #195 from software-mansion-labs/poc/fixes-after-re…
WojtekBoman 7addc32
Merge branch 'main' into poc/split-navs
WojtekBoman 9948ee1
fix issue: Workspace - RHP back button reopens member list after retu…
adamgrzybowski 9ef25f7
fix issue: Multi tags-RHP returns to tag settings instead of tag deta…
adamgrzybowski b72775e
extract goBack
adamgrzybowski 97df421
Merge pull request #196 from software-mansion-labs/splits/fix-some-go…
adamgrzybowski 0c97c37
Fix issue: Hybrid - Expense Details - App crashes after tapping on 'G…
WojtekBoman 0ff9667
Fix lint in WorkspaceProfilePage
WojtekBoman 95fc9f0
Fix issue: Android - Workspace - No animation when opening workspace …
WojtekBoman f3d5e81
Merge pull request #197 from software-mansion-labs/poc/fixes-after-re…
adamgrzybowski 3fdd3b0
Remove setActiveWorkspaceID from useMemo in ActiveWorkspaceProvider
WojtekBoman a330c14
Remove FULL_SCREEN_NAVIGATOR from NAVIGATORS
WojtekBoman 31c6de4
remove unnecessary dependency
adamgrzybowski 2a15f9b
fix condition for adding keys full screen blocking view
adamgrzybowski 6afa9a7
Fix showing bottom side of pages displayed in ScreenWrapper
WojtekBoman 8d2936c
Merge pull request #199 from software-mansion-labs/splits/review-fixes
WojtekBoman 5a6b153
Remove withNavigation
WojtekBoman cb1bb00
Merge pull request #198 from software-mansion-labs/fix/poc-screen-wra…
WojtekBoman dffbb6d
improve bottom tab bar performance
adamgrzybowski 7afde6e
fix commnet
adamgrzybowski 649a987
Merge pull request #200 from software-mansion-labs/splits/fix-delayed…
adamgrzybowski 4f00f36
Fix navigating back from CountrySelectionPage
WojtekBoman 02ceecc
Remove unused prop from FreezeWrapper
WojtekBoman 9c0f61a
Replace isEmpty with isEmptyObject in SplitRouter
WojtekBoman e042499
Fix CONST.NAVIGATION.ACTION_TYPE.SWITCH_POLICY_ID type in RootStackNa…
WojtekBoman 6a5bb49
Fix function name in getIsScreenWithBottomTabFocused
WojtekBoman 5cc046f
improve effect TopLevelBottomTabBar
adamgrzybowski 2536565
Remove @TODO comments from Report.ts
WojtekBoman cfe1583
Wrap SearchPageNarrow with FreezeWrapper
WojtekBoman 02e1088
Remove unnecessary comment from SearchPage component
WojtekBoman 663cf56
Merge pull request #202 from software-mansion-labs/splits/review-fixe…
WojtekBoman 74d9d1f
Merge pull request #201 from software-mansion-labs/poc/fixes-after-re…
WojtekBoman d0af1d5
Merge branch 'main' into poc/split-navs
WojtekBoman 4dcbc80
improve comment
adamgrzybowski 54fca6a
fix tests
adamgrzybowski 7a94577
Merge pull request #203 from software-mansion-labs/splits/review-fixe…
adamgrzybowski 94c53a2
fix name in createRootStackNavigator
adamgrzybowski 803c6ef
remove todo comments
adamgrzybowski 3249dac
fix comment
adamgrzybowski fdf57fe
fix reassure tests
adamgrzybowski adc0457
use SCREENS const
adamgrzybowski 30644b5
Merge pull request #204 from software-mansion-labs/splits/review-fixe…
adamgrzybowski 0acfc15
fix reassure tests v2
adamgrzybowski 4ccf4d6
fix reassure tests v3
adamgrzybowski b2103e2
fix crash on AddPersonalBankAccountPage
adamgrzybowski f8e8d98
Add backTo when navigating to IOURequestStepTime
WojtekBoman 3bafff4
Merge pull request #205 from software-mansion-labs/poc/fix-per-diem-g…
adamgrzybowski 9237d3b
change fallbackRoute to backToRoute
adamgrzybowski eb8ec32
fix naming in root router
adamgrzybowski f134b1c
Merge branch 'main' into poc/split-navs
adamgrzybowski 9a5140d
fix freeze related to iou start
adamgrzybowski 0200ec4
fix goBack to iou start
adamgrzybowski 408806c
Fix navigating from WorkspaceConfirmationPage on a wide layout
WojtekBoman c031dd7
Add ReportsSplitNavigator docs and adjust comment in ActiveWorkspaceP…
WojtekBoman d372bc2
Add displayName to TopLevelBottomTabBar
WojtekBoman 178491f
Adjust params in getAllCardsForWorkspace
WojtekBoman 5f8a034
Merge pull request #206 from software-mansion-labs/poc/fix-navigating…
adamgrzybowski f13005d
add comment for blocking view context
adamgrzybowski fb7296a
Adjust goBack functions in bank account pages
WojtekBoman 06579cb
Merge branch 'main' into poc/split-navs
adamgrzybowski 676d331
Merge branch 'main' into poc/split-navs
adamgrzybowski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -19,6 +19,7 @@ import * as Session from '@userActions/Session'; | |||||
import {updateOnboardingLastVisitedPath} from '@userActions/Welcome'; | ||||||
import {getOnboardingInitialPath} from '@userActions/Welcome/OnboardingFlow'; | ||||||
import CONST from '@src/CONST'; | ||||||
import NAVIGATORS from '@src/NAVIGATORS'; | ||||||
import ONYXKEYS from '@src/ONYXKEYS'; | ||||||
import type {Route} from '@src/ROUTES'; | ||||||
import ROUTES from '@src/ROUTES'; | ||||||
|
@@ -175,7 +176,21 @@ function NavigationRoot({authenticated, lastVisitedPath, initialUrl, onReady, sh | |||||
if (!lastRoute) { | ||||||
return; | ||||||
} | ||||||
navigationRef.reset({...rootState, index: 0, routes: [{...lastRoute, params: {}}]}); | ||||||
|
||||||
// REPORTS_SPLIT_NAVIGATOR will persist after user logout, because it is used both for logged-in and logged-out users | ||||||
// That's why for ReportsSplit we need to explicitly clear params when resetting navigation state, | ||||||
// However in case other routes (related to login/logout) appear in nav state, then we want to preserve params for those | ||||||
const isReportSplitNavigatorMounted = lastRoute.name === NAVIGATORS.REPORTS_SPLIT_NAVIGATOR; | ||||||
navigationRef.reset({ | ||||||
...rootState, | ||||||
index: 0, | ||||||
routes: [ | ||||||
{ | ||||||
...lastRoute, | ||||||
params: isReportSplitNavigatorMounted ? undefined : lastRoute.params, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
}, | ||||||
], | ||||||
}); | ||||||
}, [authenticated, previousAuthenticated]); | ||||||
|
||||||
const handleStateChange = (state: NavigationState | undefined) => { | ||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.