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

Poc/split navs #49539

Draft
wants to merge 258 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
258 commits
Select commit Hold shift + click to select a range
4ddc955
Add BottomTabBar to WorkspaceInitialPage and SettingsWorkspaces
WojtekBoman Jul 25, 2024
49d73c8
Fix pressing settings tab when navigating deeper into workspaces
WojtekBoman Jul 25, 2024
79e4a6f
Turn off animation for FullScreenNavigator
WojtekBoman Jul 25, 2024
96d0d6f
use shouldUseNarrowLayout instead of isSmallScreenWidth
adamgrzybowski Aug 6, 2024
c31bd2b
fix pressing on settings tab while in workspace navigator
adamgrzybowski Aug 6, 2024
f3870a6
Add todo comments for new navigation logic, adjust split navigators, …
WojtekBoman Sep 3, 2024
6a296fe
Remove ActiveCentralPaneRouteContext
WojtekBoman Sep 3, 2024
4be604a
Refactor useActiveWorkspace
WojtekBoman Sep 7, 2024
6d36f7b
Add createSplitNavigator
WojtekBoman Sep 11, 2024
5966038
Refactor switching policyID
WojtekBoman Sep 13, 2024
dd632df
improve routers
adamgrzybowski Sep 18, 2024
49978c7
add setter to activeWorkspaceID context
adamgrzybowski Sep 18, 2024
b39663e
Fix LHN paddings
WojtekBoman Sep 19, 2024
82fe640
Refactor ActiveWorkspaceProvider useEffect
WojtekBoman Sep 19, 2024
9e5e6e3
Add navigateToReportWithPolicyCheck
WojtekBoman Sep 20, 2024
578f6f3
Add MODAL_ROUTES_TO_DISMISS
WojtekBoman Sep 20, 2024
4fabb15
Refactor navigateToReportWithPolicyCheck
WojtekBoman Sep 20, 2024
5ccfdee
remember state between tabs
adamgrzybowski Sep 20, 2024
6336d7f
Disable animation for settings workspaces screen
WojtekBoman Sep 20, 2024
7e483b7
Handle deeplinking to report with policyID in URL
WojtekBoman Sep 23, 2024
82d6df1
Test freezing split navigators
WojtekBoman Sep 24, 2024
d2ba718
Remove state listener from FreezeWrapper
WojtekBoman Sep 24, 2024
83c94a6
Freeze WorkspaceSplitNavigator
WojtekBoman Sep 24, 2024
9ddd42c
Replace FullScreenNavigator with SplitNavigator
WojtekBoman Jun 18, 2024
4e72842
Rename Split to SplitStack
WojtekBoman Jun 19, 2024
8b590d1
Rename useNavigationReset to useHandleScreenResize
WojtekBoman Jun 19, 2024
72dbdf1
Rename FullScreenNavigator to WorkspaceNavigator
WojtekBoman Jun 19, 2024
557d7aa
Add BottomTabBar to WorkspaceInitialPage and SettingsWorkspaces
WojtekBoman Jul 25, 2024
ac3fc8f
Fix pressing settings tab when navigating deeper into workspaces
WojtekBoman Jul 25, 2024
ae70ac4
fix pressing on settings tab while in workspace navigator
adamgrzybowski Aug 6, 2024
19bf5d9
Add todo comments for new navigation logic, adjust split navigators, …
WojtekBoman Sep 3, 2024
fdb6e13
Refactor useActiveWorkspace
WojtekBoman Sep 7, 2024
0488fd2
Add createSplitNavigator
WojtekBoman Sep 11, 2024
bc2adfe
improve routers
adamgrzybowski Sep 18, 2024
6d6d0ab
add setter to activeWorkspaceID context
adamgrzybowski Sep 18, 2024
40e6e1e
Fix LHN paddings
WojtekBoman Sep 19, 2024
9ff0e05
remember state between tabs
adamgrzybowski Sep 20, 2024
0a374cc
Disable animation for settings workspaces screen
WojtekBoman Sep 20, 2024
51895f5
Add getStateToRender to createSplitStackNavigator, splits types fixes
WojtekBoman Sep 24, 2024
44b9c7b
Fix switching between home and workspace settings
WojtekBoman Sep 24, 2024
3ba0aaf
Fix navigating from BottomTabAvatar when current route is WorkspaceIn…
WojtekBoman Sep 26, 2024
32288b1
Fix flickering in frozen split navigators
WojtekBoman Sep 27, 2024
784cf89
Fix lint in createCustomStackNavigator/index.tsx
WojtekBoman Sep 30, 2024
a1d9a3a
Add missing import to AuthScreens, fix styles in SearchPage
WojtekBoman Oct 7, 2024
5bb5b16
Fix styles in SearchPage
WojtekBoman Oct 7, 2024
94aaab1
move all mappings to one directory RELATIONS
adamgrzybowski Oct 3, 2024
d499b5c
remove old linkTo
adamgrzybowski Oct 3, 2024
18216bc
refactor getAdaptedState
adamgrzybowski Oct 7, 2024
98127ae
Merge pull request #106 from software-mansion-labs/poc/split-adapted-…
adamgrzybowski Oct 7, 2024
6860510
fix prettier
adamgrzybowski Oct 7, 2024
5f6fe49
Remove w param from navigate when navigating to chats from bottom tab
WojtekBoman Oct 8, 2024
4fe5789
Add template of goUp
WojtekBoman Sep 30, 2024
cf25855
Handle navigating back to sidebar screen
WojtekBoman Sep 30, 2024
e2a304e
Replace FullScreenNavigator with SplitNavigator
WojtekBoman Jun 18, 2024
a3f95c8
Rename Split to SplitStack
WojtekBoman Jun 19, 2024
665f795
Rename FullScreenNavigator to WorkspaceNavigator
WojtekBoman Jun 19, 2024
ab72ccc
Add BottomTabBar to WorkspaceInitialPage and SettingsWorkspaces
WojtekBoman Jul 25, 2024
a9d0bf8
Add todo comments for new navigation logic, adjust split navigators, …
WojtekBoman Sep 3, 2024
9c7967a
Refactor useActiveWorkspace
WojtekBoman Sep 7, 2024
af90faf
Add createSplitNavigator
WojtekBoman Sep 11, 2024
097a82a
improve routers
adamgrzybowski Sep 18, 2024
f398653
add setter to activeWorkspaceID context
adamgrzybowski Sep 18, 2024
58be5b5
Fix LHN paddings
WojtekBoman Sep 19, 2024
0f9efb9
remember state between tabs
adamgrzybowski Sep 20, 2024
9148db3
Test freezing split navigators
WojtekBoman Sep 24, 2024
d74d1eb
Fix flickering in frozen split navigators
WojtekBoman Sep 27, 2024
3d73e89
Fix types in getMinimalAction and goUp functions
WojtekBoman Oct 2, 2024
b2aedc2
Fix replacing a sidebar screen in split navigators
WojtekBoman Oct 2, 2024
38d466f
Adjust Navigation.resetToHome to work with SplitNavigators
WojtekBoman Oct 4, 2024
e2ad744
Replace some usages of resetToHome with goUp(ROUTES.HOME)
WojtekBoman Oct 7, 2024
53fe13e
Cleanup linkTo and getMinimalAction
WojtekBoman Oct 8, 2024
05d529a
Cleanup navigation changes
WojtekBoman Oct 8, 2024
ece8857
Remove mappings from linkingConfig
WojtekBoman Oct 8, 2024
8b44987
Merge pull request #105 from software-mansion-labs/poc/split-go-up
WojtekBoman Oct 8, 2024
741c10d
fix mapping and SplitStackRouter
adamgrzybowski Oct 8, 2024
a6c28f8
remove dismissModalWithReport
adamgrzybowski Oct 8, 2024
47c8e0b
resolve some todos
adamgrzybowski Oct 8, 2024
4b1cedd
bring back stateToRender
adamgrzybowski Oct 8, 2024
8b7e4a0
Add PARAMS_TO_OMIT_WHEN_COMPARING_ROUTES
WojtekBoman Oct 8, 2024
222e8ad
Remove unused files, fix lint and typescript errors
WojtekBoman Oct 9, 2024
b83d53d
Remove remaining occurences of Navigation.closeAndNavigate
WojtekBoman Oct 9, 2024
a214ae0
Fix animation when navigating to central screen of split navigator
WojtekBoman Oct 9, 2024
d7bd472
Fix customGetPathFromState
WojtekBoman Oct 9, 2024
00001dd
add optimization for root navigator
adamgrzybowski Oct 9, 2024
93eb244
remove FreezeWrapper
adamgrzybowski Oct 9, 2024
7b36a3b
Add tests section to the NAVIGATION.md
WojtekBoman Oct 9, 2024
59df51e
Merge pull request #107 from software-mansion-labs/poc/split-perf
adamgrzybowski Oct 9, 2024
65c5468
Merge branch 'main' into poc/split-navs
WojtekBoman Oct 10, 2024
9e34f96
Add freezing sidebar screen
WojtekBoman Oct 11, 2024
63fed48
Dont freeze sidebar screen when modal navigator is above in the navig…
WojtekBoman Oct 11, 2024
413e777
Fix navigating from SearchRouterList to chat
WojtekBoman Oct 11, 2024
d2e2119
Handle deeplinking to the url with policyID
WojtekBoman Oct 11, 2024
3d9199c
Remove unused code, add fixes to search
WojtekBoman Oct 14, 2024
1e1e06b
Fix sidebar tests
WojtekBoman Oct 14, 2024
cd5cf44
Add ts fixes
WojtekBoman Oct 14, 2024
45dd97a
Migrate FloatingActionButton to useOnyx and add small cleanups
Kicu Oct 14, 2024
74f8e18
Add lint fixes
WojtekBoman Oct 14, 2024
564fe9e
Merge pull request #109 from software-mansion-labs/kicu/poc/migrate-fab
Kicu Oct 15, 2024
9aed8a0
Remove shouldEnforceFallback param, add comments
WojtekBoman Oct 15, 2024
a8b8d0d
Merge pull request #108 from software-mansion-labs/poc/split-navs-fre…
adamgrzybowski Oct 15, 2024
dc6dfc2
Refactor comments about goBack
WojtekBoman Oct 16, 2024
ee31d12
Fix passing policyID to ReportsSplitNavigator when opening app from d…
WojtekBoman Oct 18, 2024
b6b4ad8
Fix passsing backTo from SCREENS.WORKSPACE.PROFILE to SCREENS.WORKSPA…
WojtekBoman Oct 18, 2024
3dfd640
Merge pull request #110 from software-mansion-labs/poc/split/checks
WojtekBoman Oct 18, 2024
356519c
changes in doc
adamgrzybowski Oct 18, 2024
481f591
Refactor variables names in customGetPathFromState
WojtekBoman Oct 18, 2024
cbae813
Merge pull request #111 from software-mansion-labs/poc/set-policyID-i…
WojtekBoman Oct 18, 2024
0cdad81
Merge branch 'main' into poc/split-navs
WojtekBoman Oct 18, 2024
2f137ca
Fix getting topmost route in AddPersonalBankAccountPage, add todo com…
WojtekBoman Oct 18, 2024
e6a4c54
Fix ts in getStateToRender in createSplitStackNavigator/index.tsx
WojtekBoman Oct 18, 2024
b9fff42
Merge branch 'main' into poc/split-navs
WojtekBoman Oct 18, 2024
2391422
Merge pull request #112 from software-mansion-labs/poc/docs
adamgrzybowski Oct 18, 2024
c7f7040
fix perf and matching central screen after deeplink
adamgrzybowski Oct 18, 2024
e07125b
Merge pull request #113 from software-mansion-labs/poc/perf-and-match…
adamgrzybowski Oct 18, 2024
0612b54
Fix displaying active tab when search is opened
WojtekBoman Oct 21, 2024
dcdf021
Refactor isSplitNavigatorRoute and isFullScreenRoute
WojtekBoman Oct 21, 2024
9efb031
Fix navigating to previously opened settings tab
WojtekBoman Oct 21, 2024
4881e68
Remove getTopMostCentralPaneRouteFromRootState from Navigation.ts
WojtekBoman Oct 21, 2024
31069c1
fix getRouteParamsToCompare
adamgrzybowski Oct 21, 2024
75c4b80
fix goUp on WorkspaceListPage
adamgrzybowski Oct 21, 2024
e69c349
fix animation for navigating to WorkspadceListPage
adamgrzybowski Oct 21, 2024
d6f3322
remove unused code
adamgrzybowski Oct 21, 2024
03bd743
fix animation for navigating to Sidebar screens
adamgrzybowski Oct 21, 2024
90b5e67
Merge branch 'poc/split-navs' into poc/fixes
adamgrzybowski Oct 21, 2024
5f09a69
Merge pull request #114 from software-mansion-labs/poc/fixes
adamgrzybowski Oct 21, 2024
e56bdaa
Revert "Migrate FloatingActionButton to useOnyx and add small cleanups"
adamgrzybowski Oct 22, 2024
a0b5c50
Merge branch 'main' into poc/split-navs
adamgrzybowski Oct 22, 2024
e8b58f8
Merge branch 'main' into poc/split-navs
adamgrzybowski Oct 22, 2024
b16a7ca
fix SETTINGS_TO_RHP
adamgrzybowski Oct 22, 2024
9132ffd
fix perf tests
adamgrzybowski Oct 22, 2024
0fc9470
fix perf tests v2
adamgrzybowski Oct 22, 2024
b23a3f1
Fix bottom tab width in InitialSettingsPage
WojtekBoman Oct 23, 2024
a95797c
Remove some todo comments
WojtekBoman Oct 23, 2024
052d352
Fix getting previousSelectedCentralScreen in adaptStateIfNecessary
WojtekBoman Oct 23, 2024
6701e9f
Remove money request rhp screens from SIDEBAR_TO_RHP
WojtekBoman Oct 24, 2024
a3063c8
Fix issue: Expense - App does not open destination report after submi…
WojtekBoman Oct 24, 2024
d0a1b69
fix: Attachment - New attachment window is opened when switching betw…
adamgrzybowski Oct 24, 2024
0ab9076
Fix issue: Android - No animation when navigating in and out of works…
WojtekBoman Oct 25, 2024
f4dd1bf
Fix issue: Web - Hold - App flickers after entering reason and saving…
WojtekBoman Oct 25, 2024
927c68b
Fix issue: Group - App returns to group settings page after saving gr…
WojtekBoman Oct 25, 2024
8cd6ade
Adjust getTopmostReportActionID and cleanup getTopmostReportID
WojtekBoman Oct 25, 2024
37b5cc0
Merge pull request #116 from software-mansion-labs/poc/fix-attachments
adamgrzybowski Oct 25, 2024
072ea6a
Fix issue: QBO - Preferred exporter/Export date tab do not auto-close…
WojtekBoman Oct 25, 2024
2d30771
Add test steps for issues related to split navigators
WojtekBoman Oct 25, 2024
eb35ca7
Merge pull request #117 from software-mansion-labs/poc/split-dismiss-…
WojtekBoman Oct 25, 2024
34b56d9
Merge branch 'main' into poc/split-navs
WojtekBoman Oct 25, 2024
fac8f6f
fix: Book travel - Unable to select country in company address page
adamgrzybowski Oct 25, 2024
eb8c882
add tests for: Attachment - New attachment window is opened when swit…
adamgrzybowski Oct 25, 2024
79a508f
Merge pull request #118 from software-mansion-labs/poc/fix-country-pi…
adamgrzybowski Oct 25, 2024
ec4a01e
Web - Thread - Highlighted message is not dismissed after clicking on…
adamgrzybowski Oct 28, 2024
287d7ed
fix typo
adamgrzybowski Oct 28, 2024
e8cc9c3
add test
adamgrzybowski Oct 28, 2024
be7fe0d
Merge pull request #119 from software-mansion-labs/poc/link-to-reports
adamgrzybowski Oct 28, 2024
868b305
Fix issue: BA - Back button on connect bank account modal opens incor…
WojtekBoman Oct 28, 2024
fb326c3
fix passing params from rhp in adapted state
adamgrzybowski Oct 28, 2024
b9a1119
fix Search - App returns to Inbox after deleting expense from report …
adamgrzybowski Oct 28, 2024
0f46afb
Merge pull request #120 from software-mansion-labs/poc/fix-adapted-st…
adamgrzybowski Oct 28, 2024
c1d813f
Merge pull request #121 from software-mansion-labs/poc/fix-navigation…
WojtekBoman Oct 29, 2024
223e383
Merge branch 'main' into poc/split-navs
WojtekBoman Oct 29, 2024
30c9748
add comments to RELATIONS files
adamgrzybowski Oct 29, 2024
8fcd73c
fix Submitting expense flow from tabs different than inbox
adamgrzybowski Oct 29, 2024
84f1543
remove forRoute suffix
adamgrzybowski Oct 29, 2024
21e1863
add tests
adamgrzybowski Oct 29, 2024
86fb765
Merge pull request #122 from software-mansion-labs/poc/fix-default-route
adamgrzybowski Oct 29, 2024
92e47ac
Fix issue: Android - Offline indicator is below the app navigation bar
WojtekBoman Oct 29, 2024
8ddbd8e
Merge pull request #123 from software-mansion-labs/poc/split-flix-ban…
adamgrzybowski Oct 29, 2024
f4d7f2e
Fix issue: Expensify Card - App crashes when opening fields in Card d…
WojtekBoman Oct 30, 2024
4c7c320
Fix issue: Expensify Card - Back button on profile returns to member …
WojtekBoman Oct 30, 2024
6dde5fd
Fix issue: Workflow - Not here Page appears when editing first approver
WojtekBoman Oct 30, 2024
dfdd15d
Fix issue: Android - Expensify card - Directed to connect bank accoun…
WojtekBoman Oct 30, 2024
27a356d
Add a test for bank account flow
WojtekBoman Oct 30, 2024
e528b6a
Merge pull request #124 from software-mansion-labs/poc/split-bank-acc…
WojtekBoman Oct 30, 2024
8fa61a2
Fix issue: App opens room details page when tapping RHP back button a…
WojtekBoman Oct 30, 2024
9fd294b
Fix counting distanceToPop in goBack
WojtekBoman Oct 31, 2024
75c3f18
Fix fallbackRoute in selectExportDate in QuickbooksExportDateSelectPage
WojtekBoman Oct 31, 2024
0ad8a87
Merge branch 'main' into poc/split-navs
WojtekBoman Oct 31, 2024
8e44d87
Adjust goUp to handle navigating back when targetState is rootState
WojtekBoman Oct 31, 2024
ed0ebca
Merge pull request #129 from software-mansion-labs/poc/fix-go-up
adamgrzybowski Oct 31, 2024
4c2c180
Fix issue: Track expense - Member list opens again after clicking bac…
WojtekBoman Nov 4, 2024
65b6c89
Adjust getAdaptedState to handle OnboardingModalNavigator
WojtekBoman Nov 4, 2024
6f65c7c
Fix issue: Group chat - Default group chat name when created offline …
WojtekBoman Nov 5, 2024
b213f93
Add test steps for the issue: Opening particular onboarding pages fro…
WojtekBoman Nov 5, 2024
33d6012
Merge pull request #130 from software-mansion-labs/poc/split-navs-ada…
WojtekBoman Nov 5, 2024
0c90d16
Merge branch 'main' into poc/split-navs
WojtekBoman Nov 6, 2024
44bde76
Fix issue: Expense - Report details RHP opens after deleting receipt
WojtekBoman Nov 6, 2024
6fc9f27
adjust navigation patch for new screens and navigators
adamgrzybowski Nov 8, 2024
c52cbaa
implement new freeze wrapper
adamgrzybowski Nov 8, 2024
dab0ad4
use new freeze wrapper
adamgrzybowski Nov 8, 2024
4dbdd23
Merge pull request #134 from software-mansion-labs/poc/freeze-perf
adamgrzybowski Nov 8, 2024
a455bac
Merge branch 'main' into poc/split-navs
WojtekBoman Nov 12, 2024
f6084ec
Adjust getIsScreenBlurred to native platforms
WojtekBoman Nov 12, 2024
122fc6a
Merge pull request #135 from software-mansion-labs/poc/adjust-get-is-…
WojtekBoman Nov 13, 2024
43f48d3
Make ReportsSplitNavigator public
WojtekBoman Nov 14, 2024
b5eb92b
Refactor the comment about state reset after logout
WojtekBoman Nov 14, 2024
4cb080c
Merge pull request #137 from software-mansion-labs/poc/split-login-pa…
WojtekBoman Nov 14, 2024
34d6403
Cleanup ActiveWorkspaceProvider
WojtekBoman Nov 14, 2024
0cd11da
Fix animationTypeForReplace for RHP screens
WojtekBoman Nov 15, 2024
5d978e3
Add GetStateForActionHandlers
WojtekBoman Nov 15, 2024
99166de
Fix ParamList in WorkspacePerDiemPage
WojtekBoman Nov 18, 2024
061f2ca
Fix types in RELATIONS and getAdaptedStateFromPath
WojtekBoman Nov 18, 2024
3659ad0
Remove @todo comment from getAdaptedStateFromPath
WojtekBoman Nov 18, 2024
62b1cda
Remove NAVIGATION.TYPE.UP
WojtekBoman Nov 18, 2024
20efb77
Remove passing CONST.NAVIGATION.ACTION_TYPE.PUSH as a type param to N…
WojtekBoman Nov 18, 2024
2df2704
Fix lint in CustomRouter.ts
WojtekBoman Nov 18, 2024
4849fb7
Rename shouldDismissSideModalNavigator to isNavigatingToModalFromModal
WojtekBoman Nov 18, 2024
0de350b
Merge pull request #138 from software-mansion-labs/poc/split-cleanup
WojtekBoman Nov 18, 2024
e211447
Replace isSearchTopmostRoute with isSearchTopmostFullScreenRoute
WojtekBoman Nov 18, 2024
a846373
Cleanup handleDismissModalAction
WojtekBoman Nov 22, 2024
954a411
Merge branch 'main' into poc/split-merge-native-stacks
WojtekBoman Dec 2, 2024
c7c315e
Adjust split router to native stack
WojtekBoman Dec 2, 2024
785259f
Merge pull request #147 from software-mansion-labs/poc/split-merge-na…
WojtekBoman Dec 2, 2024
9765499
Adjust PlatformStackNavigator typescript and styles to SplitNavigators
WojtekBoman Dec 3, 2024
37203aa
Remove searchRoute from PlatformStack types
WojtekBoman Dec 3, 2024
741ce5f
Add getSplitNavigatorOptions
WojtekBoman Dec 4, 2024
899084b
Add parentRoute to CustomCodeProps
WojtekBoman Dec 4, 2024
861f87a
Fix lint
WojtekBoman Dec 4, 2024
2e212a7
Merge pull request #149 from software-mansion-labs/poc/split-adjust-t…
WojtekBoman Dec 10, 2024
93fa76d
Remove BOTTOM_TAB, cleanup code related to SplitNavigators
WojtekBoman Nov 25, 2024
4ace213
Cleanup config.ts
WojtekBoman Nov 25, 2024
fd99fa8
Remove subscribe
WojtekBoman Nov 25, 2024
d54df17
Remove Navigation.removeScreenFromNavigationState
WojtekBoman Nov 25, 2024
9280e9e
Fix typo in NavigationUtils.ts
WojtekBoman Nov 25, 2024
9fbccec
Add navigation helpers
WojtekBoman Nov 25, 2024
be9cb55
Move navigation functions to helpers package
WojtekBoman Nov 26, 2024
e8749f4
Make goUp private
WojtekBoman Nov 26, 2024
3ed172e
Rename SplitNavigatorLHNScreen to SplitNavigatorSidebarScreen
WojtekBoman Nov 26, 2024
dd7a57c
Rename createSplitNavigator to getInitialSplitNavigatorState
WojtekBoman Nov 26, 2024
2afede2
Fix goBack calls with shouldPopToTop
WojtekBoman Nov 26, 2024
3afe817
Remove LHN_TO_SPLIT_NAVIGATOR_MAPPING
WojtekBoman Nov 26, 2024
324b598
Cleanup navigation types and remove redundant mapping files
WojtekBoman Nov 27, 2024
f44db08
Add missing docs to navigation functions
WojtekBoman Nov 27, 2024
216c812
Cleanup isNavigatorName
WojtekBoman Nov 28, 2024
f46818a
Adjust comment in SIDEBAR_TO_RHP
WojtekBoman Nov 29, 2024
7cf08be
Refactor getTopmostReportParam to getTopmostReportParams
WojtekBoman Nov 29, 2024
21f7bf6
Adjust getOnboardingAdaptedState docs
WojtekBoman Nov 29, 2024
b11cba2
Adjust screen navigation props types
WojtekBoman Dec 11, 2024
b15bcca
Rename SplitStack to Split
WojtekBoman Dec 11, 2024
e69b8f0
Fix tests that use useActiveWorkspace
WojtekBoman Dec 11, 2024
2896031
Fix mocking isSearchTopmostFullScreenRoute in IOUTest
WojtekBoman Dec 11, 2024
686dde6
Update relations files and remove redundant mappings
WojtekBoman Dec 11, 2024
d7d0ff3
Add popToTop method to Navigation.ts
WojtekBoman Dec 11, 2024
097d3c5
Unification of comments in Navigation.ts
WojtekBoman Dec 11, 2024
0ae4aac
Fix goBack in navigateToConciergeChatAndDeleteReport
WojtekBoman Dec 11, 2024
7345d80
Merge pull request #142 from software-mansion-labs/poc/bottom-tab-cle…
WojtekBoman Dec 11, 2024
ade9a19
Merge branch 'main' into poc/split-navs
WojtekBoman Dec 11, 2024
27c6f92
Simplify ActiveWorkspaceContextProvider
WojtekBoman Dec 12, 2024
96289b1
Adjust BaseSidebarScreen workspace reset hook to split navigators
WojtekBoman Dec 12, 2024
18ad376
Remove Navigation.switchPolicyID
WojtekBoman Dec 12, 2024
14068c4
Adjust createInverseRelation, fix SPLIT_TO_SIDEBAR
WojtekBoman Dec 12, 2024
0a11e29
Fix Navigation.popToTop
WojtekBoman Dec 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
271 changes: 271 additions & 0 deletions contributingGuides/NAVIGATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,274 @@ The action for the first step created with `getMinimalAction` looks like this:

### Deeplinking
There is no minimal action for deeplinking directly to the `Profile` screen. But because the `Settings_root` is not on the stack, pressing UP will reset the params for navigators to the correct ones.

### Tests

#### There should be a proper report under attachment screen after reload

1. Open any report with image attachment on narrow layout.
2. Open attachment.
3. Reload the page.
4. Verify that after pressing back arrow in the header you are on the report where you sent the attachment.


#### There is a proper split navigator under RHP with a sidebar screen only for screens that can be opened from the sidebar

1. Open the browser on narrow layout with url `/settings/profile/status`.
2. Reload the page.
3. Verify that after pressing back arrow in the header you are on the settings root page.


#### There is a proper split navigator under the overlay after refreshing page with RHP/LHP on wide screen

1. Open the browser on wide screen with url `/settings/profile/display-name`.
2. Verify that you can see settings profile page under the overlay of RHP.


#### There is a proper split navigator under the overlay after deeplinking to page with RHP/LHP on wide screen

1. Open the browser on wide screen.
2. Open any report.
3. Send message with url `/settings/profile/display-name`.
4. Press the sent link
5. Verify that the settings profile screen is now visible under the overlay

#### The Workspace list page is displayed (SCREENS.SETTINGS.WORKSPACES) after clicking the Settings tab from the Workspace settings screen

1. Open any workspace settings (Settings → Workspaces → Select any workspace)
2. Click the Settings button on the bottom tab.
3. Verify that the Workspace list is displayed (`/settings/workspaces`)
4. Select any workspace again.
5. Reload the page.
6. Click the Settings button on the bottom tab.
7. Verify that the Workspace list is displayed (`/settings/workspaces`)


#### The last visited screen in the settings tab is saved when switching between tabs

1. Open the app.
2. Go to the settings tab.
3. Open the workspace list.
4. Select any workspace.
5. Switch between tabs and open the settings tabs again.
6. Verify that the last visited page in this tab is displayed.


#### The Workspace selected in the application is reset when you select a chat that does not belong to the current policy

1. Open the home page.
2. Click on the Expensify icon in the upper left corner.
3. Select any workspace.
4. Click on the magnifying glass above the list of available chats.
5. Select a chat that does not belong to the workspace selected in the third step.
6. Verify if the chat is opened and the global workspace is selected.


#### The selected workspace is saved between Search and Inbox tabs

1. Open the Inbox tab.
2. Change the workspace using the workspace switcher.
3. Switch to the Search tab and verify if the workspace selected in the second step is also selected in the Search.
4. Change the workspace once again.
5. Go back to the Inbox.
6. Verify if the workspace selected in the fourth step is also selected in the Inbox tab.

#### Going up to the workspace list page after refreshing on the workspace settings and pressing the up button

1. Open the workspace settings from the deep link (use a link in format: `/settings/workspaces/:policyID:/profile`)
2. Click the app’s back button.
3. Verify if the workspace list is displayed.

#### Going up to the RHP screen provided in the backTo parameter in the url

1. Open the settings tab.
2. Go to the Profile page.
3. Click the Address button.
4. Click the Country button.
5. Reload the page.
6. Click the app’s back button.
7. Verify if the Profile address page is displayed (`/settings/profile/address`)

#### There is proper split navigator under the overlay after refreshing page in RHP that includes valid reportID in params

wide layout :

1. Open any report.
2. Open report details (press the chat header).
3. Reload the app.
4. Verify that the report under the overlay is the same as the one opened in report details.

narrow layout :

1. Open any report
2. Open report details (press the chat header).
3. Reload the app.
4. Verify that after pressing back arrow in the header you are on the report previously seen in the details page.

#### Navigating back to the Workspace Switcher from the created workspace

1. Open the app and go to the Inbox tab.
2. Open the workspace switcher (Click on the button in the upper left corner).
3. Create a new workspace by clicking on the + button.
4. Navigate back using the back button in the app.
5. Verify if the workspace switcher is displayed with the report screen below it

#### Going up to the sidebar screen

Linked issue: https://github.com/Expensify/App/pull/44138

1. Go to Subscription page in the settings tab.
2. Click on Request refund button
3. Verify that modal shown
4. Next click Downgrade...
5. Verify that modal got closed, your account is downgraded and the Home page is opened.

#### Navigating back from the Search page with invalid query parameters

1. Open the search page with invalid query parameters (e.g `/search?q=from%3a`)
2. Press the app's back button on the not found page.
3. Verify that the Search page with default query parameters is displayed.

#### Navigating to the chat from the link in the thread

1. Open any chat.
2. If there are no messages in the chat, send a message.
3. Press reply in thread.
4. Press the "From" link in the displayed header.
5. Verify if the link correctly redirects to the chat opened in the first step.

#### Expense - App does not open destination report after submitting expense

Linked issue: https://github.com/Expensify/App/pull/49539#issuecomment-2432400819

1. Launch the app.
2. Open FAB > Submit expense > Manual.
3. Submit a manual expense to any user (as long as the user is not the currrently opened report and the receiver is not workspace chat).
4. Verify if the destination report is opened after submitting expense.

#### QBO - Preferred exporter/Export date tab do not auto-close after value selected

Linked issue: https://github.com/Expensify/App/pull/49539#issuecomment-2433342220

Precondition: Workspace with QBO integration connected.

1. Go to Workspace > Accounting.
2. Click on Export > Preferred exporter (or Export date).
3. Click on value.
4. Verify if the value chosen in the third step is selected and the app redirects to the Export page.

#### Web - Hold - App flickers after entering reason and saving it when holding expense

Linked issue: https://github.com/Expensify/App/pull/49539#issuecomment-2433389682

1. Launch the app.
2. Open DM with any user.
3. Submit two expenses to them.
4. Click on the expense preview to go to expense report.
5. Click on any preview to go to transaction thread.
6. Go back to expense report.
7. Right click on the expense preview in Step 5 > Hold.
8. Enter a reason and save it.
9. Verify if the app does not flicker after entering reason and saving it.

#### Group - App returns to group settings page after saving group name

Linked issue: https://github.com/Expensify/App/pull/49539#issuecomment-2433381800

1. Launch the app.
2. Create a group chat.
3. Go to group chat.
4. Click on the group chat header.
5. Click Group name field.
6. Click Save.
7. Verify if the app returs to group details RHP after saving group name.

#### Going up to a screen with any params

Linked issue: https://github.com/Expensify/App/pull/49539#issuecomment-2432694948

1. Press the FAB.
2. Select "Book travel".
3. Press "Book travel" in the new RHP pane.
4. Press "Country".
5. Select any country.
6. Verify that the country you selected is actually visible in the form.

#### Change params of existing attachments screens instead of pushing new screen on the stack

Linked issue: https://github.com/Expensify/App/pull/49539#issuecomment-2432360626

1. Open any chat.
2. Send at least two images.
3. Open attachment by pressing on image.
4. Press arrow on the side of attachment modal to navigate to the second image.
5. Close the modal with X in the corner.
6. Verify that the modal is now fully closed.

#### Navigate instead of push for reports with same reportID

Linked issue: https://github.com/Expensify/App/pull/49539#issuecomment-2433351709

1. Open app on wide layout web.
2. Go to report A (any report).
3. Go to report B (any report with message).
4. Press reply in thread.
5. Press on header subtitle.
6. Press on the report B in the sidebar.
7. Verify that the message you replied to is no longer highlighted.
8. Press the browsers back button.
9. Verify that you are on the A report.


#### Don't push the default full screen route if not necessary.

1. Open app on wide layout web.
2. Open search tab.
3. Press track expense.
4. Verify that the split navigator hasn't changed under the overlay.

#### BA - Back button on connect bank account modal opens incorporation state modal

Linked issue: https://github.com/Expensify/App/pull/49539#issuecomment-2433261611

Precondition: Use staging server (it can be set in Settings >> Troubleshoot)

1. Launch the app.
2. Navigate to Settings >> Workspaces >> Workspace >> Workflows.
3. Select Connect with Plaid option.
4. Go through the Plaid flow (Added Wells Fargo details).
5. Complete the Personal info, Company info & agreements section.
6. Note user redirected to page with the header Connect bank account and the option to disconnect your now set up bank account.
7. Tap back button on connect bank account modal.
8. Verify if the connect bank account modal is closed and the Workflows page is opened with the bank account added.

#### App opens room details page when tapping RHP back button after saving Private notes in DM

Linked issue: https://github.com/Expensify/App/pull/49539#issuecomment-2433321607

1. Launch the app.
2. Open DM with any user that does not have content in Private notes.
3. Click on the chat header.
4. Click Private notes.
5. Enter anything and click Save.
6. Click on the RHP back button.
7. Verify if the Profile RHP Page is opened (URL in the format /a/:accountID).

#### Opening particular onboarding pages from a link and going back

Linked issue: https://github.com/Expensify/App/issues/50177

1. Sign in as a new user.
2. Select Something else from the onboarding flow.
3. Reopen/refresh the app.
4. Verify the Personal detail step is shown.
5. Go back.
6. Verify you are navigated back to the Purpose step.
7. Select Manage my team.
8. Choose the employee size.
9. Reopen/refresh the app.
10. Verify the connection integration step is shown.
11. Go back.
12. Verify you are navigated back to the employee size step.
13. Go back.
14. Verify you are navigated back to the Purpose step.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ index 7558eb3..b7bb75e 100644
}) : STATE_TRANSITIONING_OR_BELOW_TOP;
}
+
+ const isHomeScreenAndNotOnTop = (route.name === 'BottomTabNavigator' || route.name === 'Workspace_Initial') && isScreenActive !== STATE_ON_TOP;
+ const isHomeScreenAndNotOnTop = (route.name === 'BottomTabNavigator' || route.name === 'Workspace_Initial' || route.name === 'Home' || route.name === 'Search_Bottom_Tab' || route.name === 'Settings_Root' || route.name === 'ReportsSplitNavigator' || route.name === 'Search_Central_Pane') && isScreenActive !== STATE_ON_TOP;
+
const {
headerShown = true,
Expand Down
4 changes: 0 additions & 4 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {PickerStateProvider} from 'react-native-picker-select';
import {SafeAreaProvider} from 'react-native-safe-area-context';
import '../wdyr';
import ActiveElementRoleProvider from './components/ActiveElementRoleProvider';
import ActiveWorkspaceContextProvider from './components/ActiveWorkspaceProvider';
import ColorSchemeWrapper from './components/ColorSchemeWrapper';
import ComposeProviders from './components/ComposeProviders';
import CustomStatusBarAndBackground from './components/CustomStatusBarAndBackground';
Expand Down Expand Up @@ -34,7 +33,6 @@ import {KeyboardStateProvider} from './components/withKeyboardState';
import CONFIG from './CONFIG';
import Expensify from './Expensify';
import useDefaultDragAndDrop from './hooks/useDefaultDragAndDrop';
import {ReportIDsContextProvider} from './hooks/useReportIDs';
import OnyxUpdateManager from './libs/actions/OnyxUpdateManager';
import {ReportAttachmentsProvider} from './pages/home/report/ReportAttachmentsContext';
import type {Route} from './ROUTES';
Expand Down Expand Up @@ -87,8 +85,6 @@ function App({url}: AppProps) {
EnvironmentProvider,
CustomStatusBarAndBackgroundContextProvider,
ActiveElementRoleProvider,
ActiveWorkspaceContextProvider,
ReportIDsContextProvider,
PlaybackContextProvider,
FullScreenContextProvider,
VolumeContextProvider,
Expand Down
7 changes: 4 additions & 3 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4613,13 +4613,14 @@ const CONST = {
SF_COORDINATES: [-122.4194, 37.7749],

NAVIGATION: {
TYPE: {
UP: 'UP',
},
ACTION_TYPE: {
REPLACE: 'REPLACE',
PUSH: 'PUSH',
NAVIGATE: 'NAVIGATE',

/** These action types are custom for RootNavigator */
SWITCH_POLICY_ID: 'SWITCH_POLICY_ID',
DISMISS_MODAL: 'DISMISS_MODAL',
},
},
TIME_PERIOD: {
Expand Down
4 changes: 3 additions & 1 deletion src/NAVIGATORS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* */
export default {
CENTRAL_PANE_NAVIGATOR: 'CentralPaneNavigator',
BOTTOM_TAB_NAVIGATOR: 'BottomTabNavigator',
LEFT_MODAL_NAVIGATOR: 'LeftModalNavigator',
RIGHT_MODAL_NAVIGATOR: 'RightModalNavigator',
ONBOARDING_MODAL_NAVIGATOR: 'OnboardingModalNavigator',
Expand All @@ -13,4 +12,7 @@ export default {
EXPLANATION_MODAL_NAVIGATOR: 'ExplanationModalNavigator',
MIGRATED_USER_MODAL_NAVIGATOR: 'MigratedUserModalNavigator',
FULL_SCREEN_NAVIGATOR: 'FullScreenNavigator',
REPORTS_SPLIT_NAVIGATOR: 'ReportsSplitNavigator',
SETTINGS_SPLIT_NAVIGATOR: 'SettingsSplitNavigator',
WORKSPACE_SPLIT_NAVIGATOR: 'WorkspaceSplitNavigator',
} as const;
1 change: 0 additions & 1 deletion src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const SCREENS = {
SAVED_SEARCH_RENAME_RHP: 'Search_Saved_Search_Rename_RHP',
ADVANCED_FILTERS_IN_RHP: 'Search_Advanced_Filters_In_RHP',
TRANSACTION_HOLD_REASON_RHP: 'Search_Transaction_Hold_Reason_RHP',
BOTTOM_TAB: 'Search_Bottom_Tab',
},
SETTINGS: {
ROOT: 'Settings_Root',
Expand Down
11 changes: 4 additions & 7 deletions src/components/ActiveWorkspace/ActiveWorkspaceContext.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import {createContext} from 'react';

type ActiveWorkspaceContextType = {
activeWorkspaceID?: string;
setActiveWorkspaceID: (activeWorkspaceID?: string) => void;
};

const ActiveWorkspaceContext = createContext<ActiveWorkspaceContextType>({activeWorkspaceID: undefined, setActiveWorkspaceID: () => undefined});
const ActiveWorkspaceContext = createContext<{activeWorkspaceID: string | undefined; setActiveWorkspaceID: (workspaceID: string | undefined) => void}>({
activeWorkspaceID: undefined,
setActiveWorkspaceID: () => {},
});

export default ActiveWorkspaceContext;
export {type ActiveWorkspaceContextType};
14 changes: 12 additions & 2 deletions src/components/ActiveWorkspaceProvider/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
import React, {useMemo, useState} from 'react';
import {useNavigationState} from '@react-navigation/native';
import React, {useEffect, useMemo, useState} from 'react';
import ActiveWorkspaceContext from '@components/ActiveWorkspace/ActiveWorkspaceContext';
import {getPolicyIDFromState} from '@libs/Navigation/helpers';
import type {RootStackParamList, State} from '@libs/Navigation/types';
import type ChildrenProps from '@src/types/utils/ChildrenProps';

function ActiveWorkspaceContextProvider({children}: ChildrenProps) {
const [activeWorkspaceID, setActiveWorkspaceID] = useState<string | undefined>(undefined);
const policyID = useNavigationState((state) => getPolicyIDFromState(state as State<RootStackParamList>));

const [activeWorkspaceID, setActiveWorkspaceID] = useState<string | undefined>(policyID);

useEffect(() => {
setActiveWorkspaceID(policyID);
}, [policyID, setActiveWorkspaceID]);

const value = useMemo(
() => ({
Expand All @@ -17,3 +26,4 @@ function ActiveWorkspaceContextProvider({children}: ChildrenProps) {
}

export default ActiveWorkspaceContextProvider;
export {};
Loading
Loading