@@ -171,7 +171,11 @@ export const CreateWorkspacePageView: FC<CreateWorkspacePageViewProps> = ({
171
171
</ Stack >
172
172
</ PageHeader >
173
173
174
- < HorizontalForm onSubmit = { form . handleSubmit } css = { { padding : "16px 0" } } >
174
+ < HorizontalForm
175
+ name = "create-workspace-form"
176
+ onSubmit = { form . handleSubmit }
177
+ css = { { padding : "16px 0" } }
178
+ >
175
179
{ Boolean ( error ) && < ErrorAlert error = { error } /> }
176
180
177
181
{ mode === "duplicate" && (
@@ -204,15 +208,30 @@ export const CreateWorkspacePageView: FC<CreateWorkspacePageViewProps> = ({
204
208
</ Stack >
205
209
) }
206
210
207
- < TextField
208
- { ...getFieldHelpers ( "name" ) }
209
- disabled = { creatingWorkspace }
210
- // resetMutation facilitates the clearing of validation errors
211
- onChange = { onChangeTrimmed ( form , resetMutation ) }
212
- autoFocus
213
- fullWidth
214
- label = "Workspace Name"
215
- />
211
+ < div >
212
+ < TextField
213
+ { ...getFieldHelpers ( "name" ) }
214
+ disabled = { creatingWorkspace }
215
+ // resetMutation facilitates the clearing of validation errors
216
+ onChange = { onChangeTrimmed ( form , resetMutation ) }
217
+ autoFocus
218
+ fullWidth
219
+ label = "Workspace Name"
220
+ />
221
+ < FormHelperText data-chromatic = "ignore" >
222
+ Need a suggestion?{ " " }
223
+ < Button
224
+ variant = "text"
225
+ css = { styles . nameSuggestion }
226
+ onClick = { async ( ) => {
227
+ await form . setFieldValue ( "name" , suggestedName ) ;
228
+ rerollSuggestedName ( ) ;
229
+ } }
230
+ >
231
+ { suggestedName }
232
+ </ Button >
233
+ </ FormHelperText >
234
+ </ div >
216
235
217
236
{ permissions . createWorkspaceForUser && (
218
237
< UserAutocomplete
@@ -234,7 +253,9 @@ export const CreateWorkspacePageView: FC<CreateWorkspacePageViewProps> = ({
234
253
>
235
254
< FormFields >
236
255
{ requiresExternalAuth && (
237
- < Alert severity = "error" >
256
+ // This should really be a `notice` but `severity` is a MUI prop, and we'd need
257
+ // to basically make our own `Alert` component.
258
+ < Alert severity = "info" >
238
259
To create a workspace using the selected template, please
239
260
ensure you are authenticated with all the external providers
240
261
listed below.
0 commit comments