File tree 3 files changed +11
-11
lines changed
site/src/pages/CreateWorkspacePage
3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -54,13 +54,13 @@ const CreateWorkspaceExperimentRouter: FC = () => {
54
54
} ;
55
55
56
56
return (
57
- < NewFormContext . Provider value = { { toggleOptedOut } } >
57
+ < ExperimentalFormContext . Provider value = { { toggleOptedOut } } >
58
58
{ optOutQuery . data . optedOut ? (
59
59
< CreateWorkspacePage />
60
60
) : (
61
61
< CreateWorkspacePageExperimental />
62
62
) }
63
- </ NewFormContext . Provider >
63
+ </ ExperimentalFormContext . Provider >
64
64
) ;
65
65
}
66
66
@@ -71,6 +71,6 @@ export default CreateWorkspaceExperimentRouter;
71
71
72
72
const optOutKey = ( id : string ) => `parameters.${ id } .optOut` ;
73
73
74
- export const NewFormContext = createContext <
74
+ export const ExperimentalFormContext = createContext <
75
75
{ toggleOptedOut : ( ) => void } | undefined
76
76
> ( undefined ) ;
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ import {
47
47
useValidationSchemaForRichParameters ,
48
48
} from "utils/richParameters" ;
49
49
import * as Yup from "yup" ;
50
- import { NewFormContext } from "./CreateWorkspaceExperimentRouter" ;
50
+ import { ExperimentalFormContext } from "./CreateWorkspaceExperimentRouter" ;
51
51
import type {
52
52
CreateWorkspaceMode ,
53
53
ExternalAuthPollingState ,
@@ -106,7 +106,7 @@ export const CreateWorkspacePageView: FC<CreateWorkspacePageViewProps> = ({
106
106
onSubmit,
107
107
onCancel,
108
108
} ) => {
109
- const newFormContext = useContext ( NewFormContext ) ;
109
+ const experimentalFormContext = useContext ( ExperimentalFormContext ) ;
110
110
const [ owner , setOwner ] = useState ( defaultOwner ) ;
111
111
const [ suggestedName , setSuggestedName ] = useState ( ( ) =>
112
112
generateWorkspaceName ( ) ,
@@ -221,11 +221,11 @@ export const CreateWorkspacePageView: FC<CreateWorkspacePageViewProps> = ({
221
221
< PageHeader
222
222
actions = {
223
223
< >
224
- { newFormContext && (
224
+ { experimentalFormContext && (
225
225
< Button
226
226
size = "sm"
227
227
variant = "outline"
228
- onClick = { newFormContext . toggleOptedOut }
228
+ onClick = { experimentalFormContext . toggleOptedOut }
229
229
>
230
230
Try out the new workspace creation flow ✨
231
231
</ Button >
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ import {
33
33
import { getFormHelpers , nameValidator } from "utils/formUtils" ;
34
34
import type { AutofillBuildParameter } from "utils/richParameters" ;
35
35
import * as Yup from "yup" ;
36
- import { NewFormContext } from "./CreateWorkspaceExperimentRouter" ;
36
+ import { ExperimentalFormContext } from "./CreateWorkspaceExperimentRouter" ;
37
37
import type {
38
38
CreateWorkspaceMode ,
39
39
ExternalAuthPollingState ,
@@ -97,7 +97,7 @@ export const CreateWorkspacePageViewExperimental: FC<
97
97
owner,
98
98
setOwner,
99
99
} ) => {
100
- const newFormContext = useContext ( NewFormContext ) ;
100
+ const experimentalFormContext = useContext ( ExperimentalFormContext ) ;
101
101
const [ suggestedName , setSuggestedName ] = useState ( ( ) =>
102
102
generateWorkspaceName ( ) ,
103
103
) ;
@@ -278,11 +278,11 @@ export const CreateWorkspacePageViewExperimental: FC<
278
278
279
279
{ template . deprecated && < Pill type = "warning" > Deprecated</ Pill > }
280
280
281
- { newFormContext && (
281
+ { experimentalFormContext && (
282
282
< Button
283
283
size = "sm"
284
284
variant = "subtle"
285
- onClick = { newFormContext . toggleOptedOut }
285
+ onClick = { experimentalFormContext . toggleOptedOut }
286
286
>
287
287
Go back to the classic workspace creation flow
288
288
</ Button >
You can’t perform that action at this time.
0 commit comments