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

[Wave 8] Ideal nav #33280

Merged
merged 634 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
634 commits
Select commit Hold shift + click to select a range
6a53628
Add notification handling for web and desktop
mateuuszzzzz Jan 17, 2024
a2f8575
Remove redundant comment
mateuuszzzzz Jan 17, 2024
e7d3044
Merge branch 'ideal-nav-merge' into @kosmydel/ideal-nav-fixes-4
kosmydel Jan 18, 2024
401f2c1
fix back button (111)
kosmydel Jan 18, 2024
7f72d9d
new WalletEmptyState design (96, 103)
kosmydel Jan 18, 2024
56d9f51
fix resizing (102)
kosmydel Jan 18, 2024
07d2c99
fix resizing (102)
kosmydel Jan 18, 2024
f394f14
fix animations on native (95, 97, 100)
kosmydel Jan 18, 2024
5427e8f
handle backTo param
adamgrzybowski Jan 18, 2024
70f812d
fix types
kosmydel Jan 18, 2024
bd653a5
fix imports
adamgrzybowski Jan 18, 2024
c4c7d9c
update config
adamgrzybowski Jan 18, 2024
d09905d
Merge pull request #26 from software-mansion-labs/@kosmydel/ideal-nav…
kosmydel Jan 18, 2024
11c842f
migrate AllSettingsScreen to TS (115)
kosmydel Jan 18, 2024
4fe51e9
Merge branch 'ideal-nav-merge' into ideal-nav-merge-back-to
adamgrzybowski Jan 18, 2024
ee6172e
Merge pull request #27 from software-mansion-labs/ideal-nav-merge-bac…
adamgrzybowski Jan 18, 2024
66d3e10
migrate WorkspaceNamePage to TS (113)
kosmydel Jan 18, 2024
6640cb8
fix types
kosmydel Jan 18, 2024
1446189
use ROUTES.HOME
adamgrzybowski Jan 18, 2024
feac02c
Merge branch 'main' into ideal-nav-merge
adamgrzybowski Jan 18, 2024
f16400e
Merge branch 'ideal-nav-merge' into wave8/workspace-switcher-url
adamgrzybowski Jan 18, 2024
89ba96e
add ROUTES.ROOT
adamgrzybowski Jan 18, 2024
9de5686
fix imports
adamgrzybowski Jan 18, 2024
f3435ae
Merge branch 'ideal-nav-merge' into @kosmydel/ideal-nav-ts-migration
kosmydel Jan 18, 2024
fe330e8
Fix policyMemberAccountIDs types
WojtekBoman Jan 18, 2024
7c80568
Run prettier
WojtekBoman Jan 18, 2024
c66cd2f
Make workspace editor read-only for users without admin and narrow it…
mateuuszzzzz Jan 18, 2024
073a96b
Merge pull request #28 from software-mansion-labs/@kosmydel/ideal-nav…
adamgrzybowski Jan 18, 2024
9dae931
Run lint and prettier
mateuuszzzzz Jan 18, 2024
7d15bf7
run prettier
mateuuszzzzz Jan 18, 2024
1c1062e
Add missing selector
mateuuszzzzz Jan 18, 2024
3d29b64
fix types
adamgrzybowski Jan 18, 2024
0149e26
Merge pull request #25 from software-mansion-labs/wave8/workspace-swi…
adamgrzybowski Jan 18, 2024
6fd5f60
Add siwtchPolicyID method
WojtekBoman Jan 18, 2024
4f65130
Refactor switchPolicyID
WojtekBoman Jan 19, 2024
f8ba23f
Add docs to the switchPolicyID method
WojtekBoman Jan 19, 2024
5dbc2ac
Merge branch 'ideal-nav-merge' into wave8/switch-workspace-redirect
WojtekBoman Jan 19, 2024
3354570
Remove dependency cycle
WojtekBoman Jan 19, 2024
f6bfbf0
Refactor switching workspace
WojtekBoman Jan 19, 2024
56c144d
Sort workspaces in the switcher
WojtekBoman Jan 19, 2024
775ba64
Highlight selected workspace
WojtekBoman Jan 19, 2024
3c08d28
Refactor usersWorkspace deps
WojtekBoman Jan 19, 2024
95fd6df
Merge pull request #29 from software-mansion-labs/wave8/switch-worksp…
WojtekBoman Jan 19, 2024
761d5f4
Add policyMembers to props in SidebarLinksData
WojtekBoman Jan 19, 2024
75b4641
Fix lint
WojtekBoman Jan 22, 2024
b3d28e4
Exclude function to sort workspaces
WojtekBoman Jan 22, 2024
bfd39d2
Fix filtering policy members
WojtekBoman Jan 22, 2024
8f84a6a
Remove policyID from the state for the Home page
WojtekBoman Jan 22, 2024
421e695
Remove unnecessary optional chaining
WojtekBoman Jan 22, 2024
05f1cba
Fix textIconLeft type and displaying expensify logo in the workspace …
WojtekBoman Jan 22, 2024
b117947
fix (129)
kosmydel Jan 22, 2024
9ef4101
fix creating new workspace (130)
kosmydel Jan 22, 2024
3532770
Make checking fill color more readable
WojtekBoman Jan 22, 2024
5951071
Merge branch 'ideal-nav-merge' into ideal-nav/workspaces-order
WojtekBoman Jan 22, 2024
20abac8
Merge pull request #30 from software-mansion-labs/ideal-nav/workspace…
WojtekBoman Jan 22, 2024
dadc7b7
Run prettier
WojtekBoman Jan 22, 2024
6dfcf69
hide delete workspace (126)
kosmydel Jan 22, 2024
cc8b6a4
refactor, fix issues (127, 136)
kosmydel Jan 22, 2024
6b6c935
fix native icon in WS switcher (133)
kosmydel Jan 22, 2024
9cb27d4
add no results to WS switcher (134)
kosmydel Jan 22, 2024
32fcf6d
fixes (147, 148, 150 - 157)
kosmydel Jan 23, 2024
a2a2f93
Merge branch 'ideal-nav-merge' into @kosmydel/ideal-nav-fixes-v5
kosmydel Jan 23, 2024
aebefcd
fixes (157, 159, 166)
kosmydel Jan 23, 2024
7708dc5
fix anonymous user log in (146)
kosmydel Jan 23, 2024
f806420
Add navigateToGlobalWorkspaceHome
WojtekBoman Jan 23, 2024
ab570e1
Add fix to dismissModal
WojtekBoman Jan 23, 2024
8c6b2df
Handle navigating to current workspace
WojtekBoman Jan 23, 2024
7827673
Merge pull request #33 from software-mansion-labs/@kosmydel/ideal-nav…
WojtekBoman Jan 23, 2024
3918b4a
Refactor dismissModal to handle switching workspaces
WojtekBoman Jan 23, 2024
ea76d2b
Merge branch 'ideal-nav-merge' into wave8/switch-report-with-workspace
WojtekBoman Jan 23, 2024
1dbe75f
Fix navigating with switching workspace
WojtekBoman Jan 23, 2024
33d6ca3
Add switchPolicyIDParams
WojtekBoman Jan 23, 2024
2e4f00f
Merge pull request #34 from software-mansion-labs/wave8/switch-report…
WojtekBoman Jan 23, 2024
fe86804
Add fixes (174, 177)
WojtekBoman Jan 24, 2024
696ca4e
Fix passing fill color prop in SubscriptAvatar
WojtekBoman Jan 24, 2024
0c6dff1
fix full width (141, 169)
kosmydel Jan 24, 2024
08f3e97
fix tooltips in account settings (143)
kosmydel Jan 24, 2024
7e63a44
Rename workspace switcher route
WojtekBoman Jan 24, 2024
908128b
Remove the policyID from the url when user is anonymous (178)
WojtekBoman Jan 24, 2024
e76f6ad
fix section paddings (167, 169)
kosmydel Jan 24, 2024
6c24f0f
fix missing owner (82)
kosmydel Jan 24, 2024
3fa4b96
Add defaultValue for session in SidebarLinksData
WojtekBoman Jan 24, 2024
1c435ca
[WorkspaceSwitcher] Handle disabling workspace for native platforms (…
mateuuszzzzz Jan 24, 2024
6727a91
[WorkspaceSwitcher] Do not grey out content and display default curso…
mateuuszzzzz Jan 24, 2024
568d316
Add dismissModalWithReport
WojtekBoman Jan 24, 2024
4a04a26
Merge pull request #35 from software-mansion-labs/w8/ideal-nav-fixes
WojtekBoman Jan 24, 2024
8a9b4ef
Merge branch 'ideal-nav-merge' into @kosmydel/ideal-nav-merge-fixes-v6
kosmydel Jan 25, 2024
af13b6a
prettier
kosmydel Jan 25, 2024
1d6e812
Merge pull request #36 from software-mansion-labs/@kosmydel/ideal-nav…
WojtekBoman Jan 25, 2024
86fa3aa
Fix opening Concierge chat when user is logged in first time
WojtekBoman Jan 25, 2024
82a9d2b
fix edit avatar icon size (171)
filip-solecki Jan 25, 2024
da1ab33
fix share code size (168)
filip-solecki Jan 25, 2024
b17f94e
fix plus icon fill and center the row (132, 164)
filip-solecki Jan 25, 2024
3c35774
Fix padding for name (128)
filip-solecki Jan 25, 2024
a0aa9bf
Add hover on workspace row (161)
filip-solecki Jan 25, 2024
6258ae0
update padding horizontal
filip-solecki Jan 25, 2024
e1e4582
Merge pull request #38 from software-mansion-labs/@filip-solecki/idea…
kosmydel Jan 25, 2024
691d494
Merge branch 'main' into ideal-nav-merge
WojtekBoman Jan 25, 2024
f336611
Merge branch 'ideal-nav-merge' into w8/ideal-nav-fixes-v2
WojtekBoman Jan 25, 2024
5899cff
Fix displaying welcome modal (179)
WojtekBoman Jan 25, 2024
aef7322
Remove unnecessary comment
WojtekBoman Jan 25, 2024
3c629da
Merge pull request #40 from software-mansion-labs/w8/ideal-nav-fixes-v2
WojtekBoman Jan 25, 2024
493318e
fix path with policyId inside FullScreenSettings
adamgrzybowski Jan 25, 2024
68f8b43
Merge branch 'ideal-nav-merge' into ideal-nav-fix-path
adamgrzybowski Jan 25, 2024
f3c9605
fix prettier
adamgrzybowski Jan 25, 2024
ed57401
Merge pull request #41 from software-mansion-labs/ideal-nav-fix-path
adamgrzybowski Jan 25, 2024
21bee7d
fix hover color for settings subnav
cdOut Jan 26, 2024
07f1848
fix search bar background color
cdOut Jan 26, 2024
2fdef8e
unify button style with other options in wallet page
cdOut Jan 26, 2024
955bd4b
fix hover style for profile settings list
cdOut Jan 26, 2024
2bdf278
fix initial settings list dependencies
cdOut Jan 26, 2024
140229f
Merge pull request #42 from software-mansion-labs/@cdOut/ideal-nav-fi…
cdOut Jan 26, 2024
d8871bf
Fix blocking view width (185)
filip-solecki Jan 26, 2024
c9813bf
Fix initial focus in OptionsSelector (145, 149)
filip-solecki Jan 26, 2024
a53233b
Fix initial focus on WorkspaceSwitcherPage (145, 149)
filip-solecki Jan 26, 2024
f2b8296
Fix workspace avatar size (187)
filip-solecki Jan 26, 2024
e6296fe
Add comment to setting focus element to null
filip-solecki Jan 26, 2024
447f033
Merge pull request #43 from software-mansion-labs/@filip-solecki/idea…
filip-solecki Jan 26, 2024
e7d0a0b
add metainfo to adapted state
adamgrzybowski Jan 23, 2024
3abdd8b
fix types in linkingConfig
adamgrzybowski Jan 23, 2024
e66ef29
Add docs to new dismissModal methods
WojtekBoman Jan 26, 2024
ad602a1
Merge branch 'ideal-nav-merge' into ideal-nav/dismiss-modal
WojtekBoman Jan 26, 2024
3310097
Fix import EmptyObject type
WojtekBoman Jan 26, 2024
c4b9e41
add state diff for navigation in rhp
adamgrzybowski Jan 26, 2024
79d9ddf
remove TODO from comments
adamgrzybowski Jan 26, 2024
e6202e2
Merge pull request #44 from software-mansion-labs/ideal-nav-merge-sta…
adamgrzybowski Jan 26, 2024
652f13f
Merge pull request #37 from software-mansion-labs/ideal-nav/dismiss-m…
adamgrzybowski Jan 26, 2024
67b07ec
Merge branch 'main' into ideal-nav-merge
adamgrzybowski Jan 26, 2024
038db1c
remove PublicBottomTabNavigator
adamgrzybowski Jan 26, 2024
f22d3d9
Handle empty policyID in checking rbr/gbr
WojtekBoman Jan 26, 2024
96f3ecf
Handle RBR/GBR for workspace settings
WojtekBoman Jan 26, 2024
09ef7d5
Fix IOUTest
WojtekBoman Jan 26, 2024
a70cdc4
fix WorkspaceNamePage types
adamgrzybowski Jan 26, 2024
24c8909
fix WorkspaceNamePage types v2
adamgrzybowski Jan 26, 2024
75416fd
add back button in track distance (208)
kosmydel Jan 29, 2024
18740a8
fix hover for selected workspace menu (198)
cdOut Jan 29, 2024
0f1de7e
add custom backdrop for avatar crop (205)
cdOut Jan 29, 2024
24981b1
fix row edge-to-edge for widescreen (199)
cdOut Jan 29, 2024
e9d316a
fix workspace switcher search bar styling (201)
cdOut Jan 29, 2024
9aebafa
Add brickRoadIndicators in the settings tab
WojtekBoman Jan 29, 2024
dbcb7fe
remove navigation to profile when pressing the profile picture (204)
cdOut Jan 29, 2024
16e5fdc
Fix updating the avatar in the workspace switcher
WojtekBoman Jan 29, 2024
5b52d5b
darken search text color in light mode (197)
cdOut Jan 29, 2024
d166371
Merge branch 'main' into ideal-nav-merge
adamgrzybowski Jan 29, 2024
8763e9f
fix (188)
kosmydel Jan 29, 2024
e5b6631
Merge branch 'ideal-nav-merge' into @kosmydel/ideal-nav-issues-v7
kosmydel Jan 29, 2024
606b4cd
Revert "fix (188)"
kosmydel Jan 29, 2024
680f0b9
Fix deeplinks with the workspace id (207)
WojtekBoman Jan 29, 2024
e471bff
fix lint errors
cdOut Jan 29, 2024
c1b44f4
Refactor selector in the workspace switcher button
WojtekBoman Jan 29, 2024
0eb0d0d
Fix types in linkTo
WojtekBoman Jan 29, 2024
d87cff1
Fix getPolicy types
WojtekBoman Jan 29, 2024
98cd8b4
Fix matchingBottomTabRoute in linkTo
WojtekBoman Jan 29, 2024
51fa161
Merge pull request #46 from software-mansion-labs/w8/ideal-nav-fixes-v3
WojtekBoman Jan 29, 2024
84071e8
Migrate WorkspacesListPage to TS
filip-solecki Jan 30, 2024
80dc8cb
fix access to WS overview (188)
kosmydel Jan 30, 2024
e8bf3ec
fix WS switching when non admin (209)
kosmydel Jan 30, 2024
044d521
Handle displaying brick roads on the chat button tab
WojtekBoman Jan 30, 2024
106e8d7
Refactor bottomTabStatusIndicator style
WojtekBoman Jan 30, 2024
22e06e0
Remove BrickRoadsUtils file
WojtekBoman Jan 30, 2024
303454c
Fix margin for a brick road in MenuItem
WojtekBoman Jan 30, 2024
6966b00
Merge pull request #45 from software-mansion-labs/@cdOut/ideal-nav-fi…
cdOut Jan 30, 2024
5cbebb3
CR fixes
filip-solecki Jan 30, 2024
d8b642d
dont save not-found path
adamgrzybowski Jan 30, 2024
5868409
Merge branch 'ideal-nav-merge' into @kosmydel/ideal-nav-issues-v7
kosmydel Jan 30, 2024
671cb6e
fix offline indicator on full page not found view (191)
kosmydel Jan 30, 2024
9b16806
Merge pull request #48 from software-mansion-labs/ts/WorkspacesListPage
kosmydel Jan 30, 2024
f8a926b
Fix goBack when workspace with given policyID does not exist
filip-solecki Jan 30, 2024
037feba
Merge branch 'ideal-nav-merge' into ideal-nav/rbr-gbr-fixes
WojtekBoman Jan 30, 2024
0010e02
Merge pull request #51 from software-mansion-labs/@filip-solecki/fix-…
filip-solecki Jan 30, 2024
383d224
Add BrickRoadIndicatorIconProps in WorkspacesListRow
WojtekBoman Jan 30, 2024
71f9b47
Merge pull request #50 from software-mansion-labs/ideal-nav/rbr-gbr-f…
WojtekBoman Jan 30, 2024
4812b79
Merge branch 'main' into ideal-nav-merge
kosmydel Jan 31, 2024
61267ec
fix not always showing announce rooms
kosmydel Jan 31, 2024
92ceb2a
fix padding (PR 35126)
kosmydel Jan 31, 2024
3bb9b68
Merge branch 'ideal-nav-merge' into @kosmydel/ideal-nav-issues-v7
kosmydel Jan 31, 2024
a5344d7
center vertically HeaderSkeletonView
kosmydel Jan 31, 2024
2c67081
fix sharecode width
kosmydel Jan 31, 2024
3ea3027
fix types
kosmydel Jan 31, 2024
4c3945f
Fix TS on WorkspacesListPage
filip-solecki Jan 31, 2024
d748d01
Merge pull request #52 from software-mansion-labs/@filip-solecki/ts-f…
kosmydel Jan 31, 2024
1424356
Fix showing not-found when the new workspace is created (215)
WojtekBoman Jan 31, 2024
8700cc3
cleanup
kosmydel Jan 31, 2024
6ee3a1d
Fix active state (212,211)
filip-solecki Jan 31, 2024
16cac42
center search bar text
kosmydel Jan 31, 2024
4a01664
add temporary fix for splash screen
adamgrzybowski Jan 31, 2024
16f8040
fix settings status button
kosmydel Jan 31, 2024
7291cdf
refactor dismissModal function
kosmydel Jan 31, 2024
a47c9b2
fix lint
adamgrzybowski Jan 31, 2024
9f49c50
Merge pull request #53 from software-mansion-labs/ideal-nav-merge-spl…
kosmydel Jan 31, 2024
8391d34
Merge branch 'ideal-nav-merge' into @kosmydel/ideal-nav-issues-v7
kosmydel Jan 31, 2024
69ff971
Merge branch 'ideal-nav-merge' into @kosmydel/ideal-nav-issues-v7
kosmydel Jan 31, 2024
b33e251
modify margins for workspace switcher (200)
cdOut Jan 31, 2024
6d59633
Revert optional status changes
kosmydel Jan 31, 2024
e6e22bf
fix lint
kosmydel Jan 31, 2024
73c6c75
fix loading indicator in the header
kosmydel Jan 31, 2024
a1142bc
Merge pull request #49 from software-mansion-labs/@kosmydel/ideal-nav…
kosmydel Jan 31, 2024
496059e
Merge branch 'ideal-nav-merge' into w8/ideal-nav-fixes-v4
WojtekBoman Jan 31, 2024
b60bc80
Merge pull request #54 from software-mansion-labs/w8/ideal-nav-fixes-v4
kosmydel Jan 31, 2024
7ce42f4
Fix NewExpensify icon color
WojtekBoman Jan 31, 2024
75d6d88
fix previous temporary fix
adamgrzybowski Jan 31, 2024
ed3b10b
Fix padding android
kosmydel Jan 31, 2024
700677e
Merge pull request #56 from software-mansion-labs/@kosmydel/fix-paddi…
WojtekBoman Jan 31, 2024
3a2108a
Add hovered effect on the workspace switcher button (210)
WojtekBoman Jan 31, 2024
acd6fa9
Merge pull request #58 from software-mansion-labs/w8/ideal-nav-fixes-v5
WojtekBoman Jan 31, 2024
8401a04
Merge pull request #57 from software-mansion-labs/@filip-solecki/idea…
filip-solecki Jan 31, 2024
7860696
fix for goBack on ProfilePage and WorkspacesListPage
adamgrzybowski Jan 31, 2024
a8b35da
Migrate WorkspaceSwitcherPage
filip-solecki Feb 1, 2024
039b575
Refactor comments
WojtekBoman Feb 1, 2024
1fe4cd6
Fix rbr/gbr in bottom tab bar
WojtekBoman Feb 1, 2024
d30ff8c
Merge pull request #59 from software-mansion-labs/w8/ideal-nav-fixes-v6
filip-solecki Feb 1, 2024
2ff8e8f
Remove CONST.BRICK_ROAD
WojtekBoman Feb 1, 2024
e20a5f4
Fix crash
kosmydel Feb 1, 2024
55242e5
Refactor getWorkspacesUnreadStatuses and getWorkspacesBrickRoads
WojtekBoman Feb 1, 2024
f305cc1
Refactor getChatTabBrickRoad
WojtekBoman Feb 1, 2024
5303059
Merge branch 'ideal-nav-merge' into w8/ideal-nav-fixes-v7
WojtekBoman Feb 1, 2024
e8689ec
Add fix to ActiveWorkspaceContext
WojtekBoman Feb 1, 2024
2940dc1
Refactor getChatTabBrickRoad
WojtekBoman Feb 1, 2024
b20f497
Add missing docs in Policy.ts
WojtekBoman Feb 1, 2024
b3ae304
Add fix to ActiveWorkspaceContext
WojtekBoman Feb 1, 2024
f4611da
Merge pull request #61 from software-mansion-labs/w8/ideal-nav-fixes-v7
kosmydel Feb 1, 2024
45ec867
Merge branch 'main' into ideal-nav-merge
adamgrzybowski Feb 1, 2024
8ee68ed
remove old todo comment
adamgrzybowski Feb 1, 2024
219dba9
Merge branch 'ideal-nav-merge' into @filip-solecki/ts-workspaceSwitch…
WojtekBoman Feb 1, 2024
c4466cc
remove commented out code WorkspaceAvatar
adamgrzybowski Feb 1, 2024
a0a3384
change policyId to policyID
adamgrzybowski Feb 1, 2024
583ff18
start comment with capital letter
adamgrzybowski Feb 1, 2024
26ccc06
rename WorkspacesUtils
adamgrzybowski Feb 1, 2024
af81459
add new line
adamgrzybowski Feb 1, 2024
773f323
add new line v2
adamgrzybowski Feb 1, 2024
45ec582
add new line v3
adamgrzybowski Feb 1, 2024
c88334e
improve comments
adamgrzybowski Feb 1, 2024
63994bd
fix type
adamgrzybowski Feb 1, 2024
858339a
Refactor WorkspaceSwitcherPage
WojtekBoman Feb 1, 2024
6a889f1
Refactor WorkspaceSwitcherPage
WojtekBoman Feb 1, 2024
351c499
add small fixes
adamgrzybowski Feb 1, 2024
b724a86
add small fixes v2
adamgrzybowski Feb 1, 2024
b195a1e
add small fixes v3
adamgrzybowski Feb 1, 2024
c257720
Merge pull request #62 from software-mansion-labs/ideal-nav-merge-cle…
adamgrzybowski Feb 1, 2024
efea383
Refactor workspace switcher and PolicyMembersUtils
WojtekBoman Feb 1, 2024
47e3c9f
Refactor showReportActionNotification
WojtekBoman Feb 1, 2024
918ae0c
Merge pull request #63 from software-mansion-labs/w8/ideal-nav-fixes-v8
WojtekBoman Feb 1, 2024
4535afc
Merge branch 'ideal-nav-merge' into @filip-solecki/ts-workspaceSwitch…
WojtekBoman Feb 1, 2024
3be8752
Merge pull request #60 from software-mansion-labs/@filip-solecki/ts-w…
WojtekBoman Feb 1, 2024
1d67c25
fix typo
adamgrzybowski Feb 1, 2024
941f4c0
add helper commit
adamgrzybowski Feb 1, 2024
c91892f
add helper commit v2
adamgrzybowski Feb 1, 2024
f7c5b6a
disable sidebar test
adamgrzybowski Feb 1, 2024
d9165c5
add comment for disabled test
adamgrzybowski Feb 1, 2024
46d5d85
Merge branch 'main' into ideal-nav-merge
tomekzaw Feb 1, 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
5 changes: 5 additions & 0 deletions assets/images/cards-and-domains.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/images/home.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/images/new-expensify.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/images/wrench.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 === 'Home' && isScreenActive !== STATE_ON_TOP;
+ const isHomeScreenAndNotOnTop = (route.name === 'BottomTabNavigator' || route.name === 'Settings_Root') && isScreenActive !== STATE_ON_TOP;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason that we need to check for Settings_Root? Shouldn't we check for FullScreenNavigator instead?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to keep the Settings_Root screen unmounted, so the full-screen account settings work properly. This is the LHN presenting InitialSettingsPage. It has to be mounted all the time the account settings are opened.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to add comment explaining this in more detail and also rename the variable name to match the behaviour more closely

+
const {
headerShown = true,
Expand Down
2 changes: 2 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Onyx from 'react-native-onyx';
import {PickerStateProvider} from 'react-native-picker-select';
import {SafeAreaProvider} from 'react-native-safe-area-context';
import '../wdyr';
import ActiveWorkspaceContextProvider from './components/ActiveWorkspace/ActiveWorkspaceProvider';
import ColorSchemeWrapper from './components/ColorSchemeWrapper';
import ComposeProviders from './components/ComposeProviders';
import CustomStatusBarAndBackground from './components/CustomStatusBarAndBackground';
Expand Down Expand Up @@ -69,6 +70,7 @@ function App() {
PickerStateProvider,
EnvironmentProvider,
CustomStatusBarAndBackgroundContextProvider,
ActiveWorkspaceContextProvider,
]}
>
<CustomStatusBarAndBackground />
Expand Down
21 changes: 15 additions & 6 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ const CONST = {
// Use Environment.getEnvironmentURL to get the complete URL with port number
DEV_NEW_EXPENSIFY_URL: 'https://dev.new.expensify.com:',
OLDDOT_URLS: {
ADMIN_POLICIES_URL: 'admin_policies',
ADMIN_DOMAINS_URL: 'admin_domains',
INBOX: 'inbox',
},

Expand Down Expand Up @@ -1013,6 +1015,7 @@ const CONST = {
3: 100,
},
},
CENTRAL_PANE_ANIMATION_HEIGHT: 200,
LHN_SKELETON_VIEW_ITEM_HEIGHT: 64,
EXPENSIFY_PARTNER_NAME: 'expensify.com',
EMAIL: {
Expand Down Expand Up @@ -1331,6 +1334,7 @@ const CONST = {
REIMBURSEMENT_MANUAL: 'reimburseManual',
},
ID_FAKE: '_FAKE_',
EMPTY: 'EMPTY',
},

CUSTOM_UNITS: {
Expand Down Expand Up @@ -1481,6 +1485,10 @@ const CONST = {
OTHER_INVISIBLE_CHARACTERS: /[\u3164]/g,

REPORT_FIELD_TITLE: /{report:([a-zA-Z]+)}/g,

PATH_WITHOUT_POLICY_ID: /\/w\/[a-zA-Z0-9]+(\/|$)/,

POLICY_ID_FROM_PATH: /\/w\/([a-zA-Z0-9]+)(\/|$)/,
},

PRONOUNS: {
Expand All @@ -1490,7 +1498,7 @@ const CONST = {
GUIDES_CALL_TASK_IDS: {
CONCIERGE_DM: 'NewExpensifyConciergeDM',
WORKSPACE_INITIAL: 'WorkspaceHome',
WORKSPACE_SETTINGS: 'WorkspaceGeneralSettings',
WORKSPACE_OVERVIEW: 'WorkspaceOverview',
adamgrzybowski marked this conversation as resolved.
Show resolved Hide resolved
WORKSPACE_CARD: 'WorkspaceCorporateCards',
WORKSPACE_REIMBURSE: 'WorkspaceReimburseReceipts',
WORKSPACE_BILLS: 'WorkspacePayBills',
Expand Down Expand Up @@ -3102,11 +3110,6 @@ const CONST = {
CAROUSEL: 3,
},

BRICK_ROAD: {
GBR: 'GBR',
RBR: 'RBR',
},

/**
* Constants for types of violations.
* Defined here because they need to be referenced by the type system to generate the
Expand Down Expand Up @@ -3165,6 +3168,12 @@ const CONST = {

MINI_CONTEXT_MENU_MAX_ITEMS: 4,

WORKSPACE_SWITCHER: {
NAME: 'Expensify',
SUBSCRIPT_ICON_SIZE: 8,
MINIMUM_WORKSPACES_TO_SHOW_SEARCH: 8,
},

REPORT_FIELD_TITLE_FIELD_ID: 'text_title',
adamgrzybowski marked this conversation as resolved.
Show resolved Hide resolved
} as const;

Expand Down
16 changes: 14 additions & 2 deletions src/Expensify.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ const propTypes = {
/** Whether a new update is available and ready to install. */
updateAvailable: PropTypes.bool,

/** Tells us if the sidebar has rendered */
/** Tells us if the sidebar has rendered - TODO: We don't use it as temporary solution to fix not hidding splashscreen */
adamgrzybowski marked this conversation as resolved.
Show resolved Hide resolved
adamgrzybowski marked this conversation as resolved.
Show resolved Hide resolved
// eslint-disable-next-line react/no-unused-prop-types
isSidebarLoaded: PropTypes.bool,

/** Information about a screen share call requested by a GuidesPlus agent */
Expand All @@ -83,6 +84,9 @@ const propTypes = {
/** Whether we should display the notification alerting the user that focus mode has been auto-enabled */
focusModeNotification: PropTypes.bool,

/** Last visited path in the app */
lastVisitedPath: PropTypes.string,

...withLocalizePropTypes,
};

Expand All @@ -97,6 +101,7 @@ const defaultProps = {
isCheckingPublicRoom: true,
updateRequired: false,
focusModeNotification: false,
lastVisitedPath: undefined,
};

const SplashScreenHiddenContext = React.createContext({});
Expand All @@ -107,6 +112,7 @@ function Expensify(props) {
const [isOnyxMigrated, setIsOnyxMigrated] = useState(false);
const [isSplashHidden, setIsSplashHidden] = useState(false);
const [hasAttemptedToOpenPublicRoom, setAttemptedToOpenPublicRoom] = useState(false);
const [initialUrl, setInitialUrl] = useState(null);

useEffect(() => {
if (props.isCheckingPublicRoom) {
Expand All @@ -125,7 +131,7 @@ function Expensify(props) {
[isSplashHidden],
);

const shouldInit = isNavigationReady && (!isAuthenticated || props.isSidebarLoaded) && hasAttemptedToOpenPublicRoom;
const shouldInit = isNavigationReady && hasAttemptedToOpenPublicRoom;
const shouldHideSplash = shouldInit && !isSplashHidden;

const initializeClient = () => {
Expand Down Expand Up @@ -187,6 +193,7 @@ function Expensify(props) {

// If the app is opened from a deep link, get the reportID (if exists) from the deep link and navigate to the chat report
Linking.getInitialURL().then((url) => {
setInitialUrl(url);
Report.openReportFromDeepLink(url, isAuthenticated);
});

Expand Down Expand Up @@ -247,6 +254,8 @@ function Expensify(props) {
<NavigationRoot
onReady={setNavigationReady}
authenticated={isAuthenticated}
lastVisitedPath={props.lastVisitedPath}
initialUrl={initialUrl}
/>
</SplashScreenHiddenContext.Provider>
)}
Expand Down Expand Up @@ -286,6 +295,9 @@ export default compose(
key: ONYXKEYS.FOCUS_MODE_NOTIFICATION,
initWithStoredValues: false,
},
lastVisitedPath: {
key: ONYXKEYS.LAST_VISITED_PATH,
},
}),
)(Expensify);

Expand Down
1 change: 1 addition & 0 deletions src/NAVIGATORS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* */
export default {
CENTRAL_PANE_NAVIGATOR: 'CentralPaneNavigator',
BOTTOM_TAB_NAVIGATOR: 'BottomTabNavigator',
LEFT_MODAL_NAVIGATOR: 'LeftModalNavigator',
RIGHT_MODAL_NAVIGATOR: 'RightModalNavigator',
FULL_SCREEN_NAVIGATOR: 'FullScreenNavigator',
Expand Down
8 changes: 6 additions & 2 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ const ONYXKEYS = {
// Max width supported for HTML <canvas> element
MAX_CANVAS_WIDTH: 'maxCanvasWidth',

// Stores last visited path
LAST_VISITED_PATH: 'lastVisitedPath',

// Stores the recently used report fields
RECENTLY_USED_REPORT_FIELDS: 'recentlyUsedReportFields',

Expand Down Expand Up @@ -447,6 +450,7 @@ type OnyxValues = {
[ONYXKEYS.MAX_CANVAS_AREA]: number;
[ONYXKEYS.MAX_CANVAS_HEIGHT]: number;
[ONYXKEYS.MAX_CANVAS_WIDTH]: number;
[ONYXKEYS.LAST_VISITED_PATH]: string | undefined;
[ONYXKEYS.RECENTLY_USED_REPORT_FIELDS]: OnyxTypes.RecentlyUsedReportFields;
[ONYXKEYS.UPDATE_REQUIRED]: boolean;

Expand Down Expand Up @@ -484,8 +488,8 @@ type OnyxValues = {
// Forms
[ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM]: OnyxTypes.AddDebitCardForm;
[ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM_DRAFT]: OnyxTypes.AddDebitCardForm;
[ONYXKEYS.FORMS.WORKSPACE_SETTINGS_FORM]: OnyxTypes.Form;
[ONYXKEYS.FORMS.WORKSPACE_SETTINGS_FORM_DRAFT]: OnyxTypes.Form;
[ONYXKEYS.FORMS.WORKSPACE_SETTINGS_FORM]: OnyxTypes.WorkspaceSettingsForm;
[ONYXKEYS.FORMS.WORKSPACE_SETTINGS_FORM_DRAFT]: OnyxTypes.WorkspaceSettingsForm;
[ONYXKEYS.FORMS.WORKSPACE_RATE_AND_UNIT_FORM]: OnyxTypes.Form;
[ONYXKEYS.FORMS.WORKSPACE_RATE_AND_UNIT_FORM_DRAFT]: OnyxTypes.Form;
[ONYXKEYS.FORMS.CLOSE_ACCOUNT_FORM]: OnyxTypes.Form;
Expand Down
24 changes: 19 additions & 5 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ function getUrlWithBackToParam<TUrl extends string>(url: TUrl, backTo?: string):
}

const ROUTES = {
HOME: '',
// If the user opens this route, we'll redirect them to the path saved in the last visited path or to the home page if the last visited path is empty.
ROOT: '',

// This route renders the list of reports.
HOME: 'home',

ALL_SETTINGS: 'all-settings',

// This is a utility route used to go to the user's concierge chat, or the sign-in page if the user's not authenticated
CONCIERGE: 'concierge',
Expand Down Expand Up @@ -59,7 +65,7 @@ const ROUTES = {
route: 'bank-account/:stepToOpen?',
getRoute: (stepToOpen = '', policyID = '', backTo?: string) => getUrlWithBackToParam(`bank-account/${stepToOpen}?policyID=${policyID}`, backTo),
},

WORKSPACE_SWITCHER: 'workspace-switcher',
SETTINGS: 'settings',
SETTINGS_PROFILE: 'settings/profile',
SETTINGS_SHARE_CODE: 'settings/shareCode',
Expand Down Expand Up @@ -439,9 +445,17 @@ const ROUTES = {
route: 'workspace/:policyID/invite-message',
getRoute: (policyID: string) => `workspace/${policyID}/invite-message` as const,
},
WORKSPACE_SETTINGS: {
route: 'workspace/:policyID/settings',
getRoute: (policyID: string) => `workspace/${policyID}/settings` as const,
WORKSPACE_OVERVIEW: {
route: 'workspace/:policyID/overview',
getRoute: (policyID: string) => `workspace/${policyID}/overview` as const,
},
WORKSPACE_OVERVIEW_CURRENCY: {
route: 'workspace/:policyID/overview/currency',
getRoute: (policyID: string) => `workspace/${policyID}/overview/currency` as const,
},
WORKSPACE_OVERVIEW_NAME: {
route: 'workspace/:policyID/overview/name',
getRoute: (policyID: string) => `workspace/${policyID}/overview/name` as const,
},
WORKSPACE_AVATAR: {
route: 'workspace/:policyID/avatar',
Expand Down
11 changes: 9 additions & 2 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const PROTECTED_SCREENS = {

const SCREENS = {
...PROTECTED_SCREENS,
ALL_SETTINGS: 'AllSettings',
REPORT: 'Report',
PROFILE_AVATAR: 'ProfileAvatar',
WORKSPACE_AVATAR: 'WorkspaceAvatar',
Expand All @@ -20,6 +21,7 @@ const SCREENS = {
TRANSITION_BETWEEN_APPS: 'TransitionBetweenApps',
VALIDATE_LOGIN: 'ValidateLogin',
UNLINK_LOGIN: 'UnlinkLogin',
SETTINGS_CENTRAL_PANE: 'SettingsCentralPane',
SETTINGS: {
ROOT: 'Settings_Root',
SHARE_CODE: 'Settings_Share_Code',
Expand Down Expand Up @@ -86,6 +88,10 @@ const SCREENS = {
},
LEFT_MODAL: {
SEARCH: 'Search',
WORKSPACE_SWITCHER: 'WorkspaceSwitcher',
},
WORKSPACE_SWITCHER: {
ROOT: 'WorkspaceSwitcher_Root',
},
RIGHT_MODAL: {
SETTINGS: 'Settings',
Expand Down Expand Up @@ -194,7 +200,7 @@ const SCREENS = {

WORKSPACE: {
INITIAL: 'Workspace_Initial',
SETTINGS: 'Workspace_Settings',
OVERVIEW: 'Workspace_Overview',
CARD: 'Workspace_Card',
REIMBURSE: 'Workspace_Reimburse',
RATE_AND_UNIT: 'Workspace_RateAndUnit',
Expand All @@ -204,7 +210,8 @@ const SCREENS = {
MEMBERS: 'Workspace_Members',
INVITE: 'Workspace_Invite',
INVITE_MESSAGE: 'Workspace_Invite_Message',
CURRENCY: 'Workspace_Settings_Currency',
CURRENCY: 'Workspace_Overview_Currency',
NAME: 'Workspace_Overview_Name',
},

EDIT_REQUEST: {
Expand Down
11 changes: 11 additions & 0 deletions src/components/ActiveWorkspace/ActiveWorkspaceContext.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {createContext} from 'react';

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

const ActiveWorkspaceContext = createContext<ActiveWorkspaceContextType>({activeWorkspaceID: undefined, setActiveWorkspaceID: () => undefined});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we have a default value here?

I usually do null as ActiveWorkspaceContextType so that the code throws error if the context is accessed without its corresponding provider up in the component tree.

Copy link
Contributor

@WojtekBoman WojtekBoman Feb 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have some contexts in the app where we define default values like here, for example: ShowContextMenuContext and PopoverContextValue, so we implemented it analagously


export default ActiveWorkspaceContext;
export {type ActiveWorkspaceContextType};
19 changes: 19 additions & 0 deletions src/components/ActiveWorkspace/ActiveWorkspaceProvider.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React, {useMemo, useState} from 'react';
import type ChildrenProps from '@src/types/utils/ChildrenProps';
import ActiveWorkspaceContext from './ActiveWorkspaceContext';

function ActiveWorkspaceContextProvider({children}: ChildrenProps) {
const [activeWorkspaceID, setActiveWorkspaceID] = useState<string | undefined>(undefined);

const value = useMemo(
() => ({
activeWorkspaceID,
setActiveWorkspaceID,
}),
[activeWorkspaceID],
);
adamgrzybowski marked this conversation as resolved.
Show resolved Hide resolved

return <ActiveWorkspaceContext.Provider value={value}>{children}</ActiveWorkspaceContext.Provider>;
}

export default ActiveWorkspaceContextProvider;
1 change: 1 addition & 0 deletions src/components/AvatarCropModal/AvatarCropModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ function AvatarCropModal({imageUri = '', imageName = '', imageType = '', onClose
isVisible={isVisible}
type={CONST.MODAL.MODAL_TYPE.RIGHT_DOCKED}
onModalHide={resetState}
shouldUseCustomBackdrop
>
<ScreenWrapper
style={[styles.pb0]}
Expand Down
Loading
Loading