-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Wave 8] Ideal nav #33280
Changes from all commits
6a53628
a2f8575
e7d3044
401f2c1
7f72d9d
56d9f51
07d2c99
f394f14
5427e8f
70f812d
bd653a5
c4c7d9c
d09905d
11c842f
4fe51e9
ee6172e
66d3e10
6640cb8
1446189
feac02c
f16400e
89ba96e
9de5686
f3435ae
fe330e8
7c80568
c66cd2f
073a96b
9dae931
7d15bf7
1c1062e
3d29b64
0149e26
6fd5f60
4f65130
f8ba23f
5dbc2ac
3354570
f6bfbf0
56c144d
775ba64
3c08d28
95fd6df
761d5f4
75b4641
b3d28e4
bfd39d2
8f84a6a
421e695
05f1cba
b117947
9ef4101
3532770
5951071
20abac8
dadc7b7
6dfcf69
cc8b6a4
6b6c935
9cb27d4
32fcf6d
a2a2f93
aebefcd
7708dc5
f806420
ab570e1
8c6b2df
7827673
3918b4a
ea76d2b
1dbe75f
33d6ca3
2e4f00f
fe86804
696ca4e
0c6dff1
08f3e97
7e63a44
908128b
e76f6ad
6c24f0f
3fa4b96
1c435ca
6727a91
568d316
4a04a26
8a9b4ef
af13b6a
1d6e812
86fa3aa
82a9d2b
da1ab33
b17f94e
3c35774
a0aa9bf
6258ae0
e1e4582
691d494
f336611
5899cff
aef7322
3c629da
493318e
68f8b43
f3c9605
ed57401
21bee7d
07f1848
2fdef8e
955bd4b
2bdf278
140229f
d8871bf
c9813bf
a53233b
f2b8296
e6296fe
447f033
e7d0a0b
3abdd8b
e66ef29
ad602a1
3310097
c4b9e41
79d9ddf
e6202e2
652f13f
67b07ec
038db1c
f22d3d9
96f3ecf
09ef7d5
a70cdc4
24c8909
75416fd
18740a8
0f1de7e
24981b1
e9d316a
9aebafa
dbcb7fe
16e5fdc
5b52d5b
d166371
8763e9f
e5b6631
606b4cd
680f0b9
e471bff
c1b44f4
0eb0d0d
d87cff1
98cd8b4
51fa161
84071e8
80dc8cb
e8bf3ec
044d521
106e8d7
22e06e0
303454c
6966b00
5cbebb3
d8b642d
5868409
671cb6e
9b16806
f8a926b
037feba
0010e02
383d224
71f9b47
4812b79
61267ec
92ceb2a
3bb9b68
a5344d7
2c67081
3ea3027
4c3945f
d748d01
1424356
8700cc3
6ee3a1d
16cac42
4a01664
16f8040
7291cdf
a47c9b2
9f49c50
8391d34
69ff971
b33e251
6d59633
e6e22bf
73c6c75
a1142bc
496059e
b60bc80
7ce42f4
75d6d88
ed3b10b
700677e
3a2108a
acd6fa9
8401a04
7860696
a8b35da
039b575
1fe4cd6
d30ff8c
2ff8e8f
e20a5f4
55242e5
f305cc1
5303059
e8689ec
2940dc1
b20f497
b3ae304
f4611da
45ec867
8ee68ed
219dba9
c4466cc
a0a3384
583ff18
26ccc06
af81459
773f323
45ec582
c88334e
63994bd
858339a
6a889f1
351c499
b724a86
b195a1e
c257720
efea383
47e3c9f
918ae0c
4535afc
3be8752
1d67c25
941f4c0
c91892f
f7c5b6a
d9165c5
46d5d85
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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}); | ||
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. should we have a default value here? I usually do 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. We have some contexts in the app where we define default values like here, for example: |
||
|
||
export default ActiveWorkspaceContext; | ||
export {type ActiveWorkspaceContextType}; |
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; |
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.
Is there a reason that we need to check for
Settings_Root
? Shouldn't we check forFullScreenNavigator
instead?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.
We have to keep the
Settings_Root
screen unmounted, so the full-screen account settings work properly. This is the LHN presentingInitialSettingsPage
. It has to be mounted all the time the account settings are opened.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.
Would be nice to add comment explaining this in more detail and also rename the variable name to match the behaviour more closely