Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

feat: Reorder new project panels (#27858)

Ivan Vasilovbfbec5bc781b
diff --git a/apps/studio/pages/new/[slug].tsx b/apps/studio/pages/new/[slug].tsx
index 83a60863e2f..d2a06d245a6 100644
--- a/apps/studio/pages/new/[slug].tsx
+++ b/apps/studio/pages/new/[slug].tsx
@@ -671,138 +671,8 @@ const Wizard: NextPageWithLayout = () => {
</FormItemLayout>
)}
/>
- </Panel.Content>
- )}
-
- <Panel.Content>
- <FormField_Shadcn_
- control={form.control}
- name="dbPass"
- render={({ field }) => (
- <FormItemLayout
- label="Database Password"
- layout="horizontal"
- description={
- <>
- <PasswordStrengthBar
- passwordStrengthScore={form.getValues('dbPassStrength')}
- password={field.value}
- passwordStrengthMessage={passwordStrengthMessage}
- generateStrongPassword={generateStrongPassword}
- />
- </>
- }
- >
- <FormControl_Shadcn_>
- <Input
- copy={field.value.length > 0}
- type="password"
- placeholder="Type in a strong password"
- {...field}
- autoComplete="off"
- onChange={async (event) => {
- field.onChange(event)
- form.trigger('dbPassStrength')
- const value = event.target.value
- if (event.target.value === '') {
- await form.setValue('dbPassStrength', 0)
- await form.trigger('dbPass')
- } else {
- await delayedCheckPasswordStrength(value)
- }
- }}
- />
- </FormControl_Shadcn_>
- </FormItemLayout>
- )}
- />
- </Panel.Content>
-
- <Panel.Content>
- <FormField_Shadcn_
- control={form.control}
- name="dbRegion"
- render={({ field }) => (
- <RegionSelector
- field={field}
- form={form}
- cloudProvider={form.getValues('cloudProvider') as CloudProvider}
- />
- )}
- />
- </Panel.Content>
-
- <Panel.Content>
- <Collapsible_Shadcn_>
- <CollapsibleTrigger_Shadcn_ className="group/advanced-trigger font-mono uppercase tracking-widest text-xs flex items-center gap-1 text-foreground-lighter/75 hover:text-foreground-light transition data-[state=open]:text-foreground-light">
- Advanced options
- <ChevronRight
- size={16}
- strokeWidth={1}
- className="mr-2 group-data-[state=open]/advanced-trigger:rotate-90 group-hover/advanced-trigger:text-foreground-light transition"
- />
- </CollapsibleTrigger_Shadcn_>
- <CollapsibleContent_Shadcn_ className="pt-5 data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down">
- <FormField_Shadcn_
- control={form.control}
- name="dataApi"
- render={({ field }) => (
- <>
- <FormItemLayout
- label="What connections do you plan to use?"
- description="This setting can be changed after the project is created"
- layout="horizontal"
- >
- <FormControl_Shadcn_>
- <RadioGroupStacked
- // Due to radio group not supporting boolean values
- // value is converted to boolean
- onValueChange={(value) => field.onChange(value === 'true')}
- defaultValue={field.value.toString()}
- >
- <FormItem_Shadcn_ asChild>
- <FormControl_Shadcn_>
- <RadioGroupStackedItem
- value={'true'}
- label="Data API + Connection String"
- description="For connecting from the browser, mobile and server."
- />
- </FormControl_Shadcn_>
- </FormItem_Shadcn_>
- <FormItem_Shadcn_ asChild>
- <FormControl_Shadcn_>
- <RadioGroupStackedItem
- label="Only Connection String"
- value="false"
- description="For connecting via server."
- className={cn(
- !form.getValues('dataApi') && '!rounded-b-none'
- )}
- />
- </FormControl_Shadcn_>
- </FormItem_Shadcn_>
- </RadioGroupStacked>
- </FormControl_Shadcn_>
- {!form.getValues('dataApi') && (
- <Admonition
- className="rounded-t-none"
- type={'warning'}
- title="Data API will effectively be disabled"
- >
- PostgREST which powers the Data API will have no schemas
- available to it.
- </Admonition>
- )}
- </FormItemLayout>
- </>
- )}
- />
- </CollapsibleContent_Shadcn_>
- </Collapsible_Shadcn_>
- </Panel.Content>
- {orgSubscription && orgSubscription.plan.id !== 'free' && (
- <Panel.Content>
<FormItemLayout
+ className="pt-4"
label={
<div className="space-y-4">
<span>Compute Billing</span>
@@ -959,6 +829,133 @@ const Wizard: NextPageWithLayout = () => {
</FormItemLayout>
</Panel.Content>
)}
+
+ <Panel.Content>
+ <FormField_Shadcn_
+ control={form.control}
+ name="dbPass"
+ render={({ field }) => (
+ <FormItemLayout
+ label="Database Password"
+ layout="horizontal"
+ description={
+ <>
+ <PasswordStrengthBar
+ passwordStrengthScore={form.getValues('dbPassStrength')}
+ password={field.value}
+ passwordStrengthMessage={passwordStrengthMessage}
+ generateStrongPassword={generateStrongPassword}
+ />
+ </>
+ }
+ >
+ <FormControl_Shadcn_>
+ <Input
+ copy={field.value.length > 0}
+ type="password"
+ placeholder="Type in a strong password"
+ {...field}
+ autoComplete="off"
+ onChange={async (event) => {
+ field.onChange(event)
+ form.trigger('dbPassStrength')
+ const value = event.target.value
+ if (event.target.value === '') {
+ await form.setValue('dbPassStrength', 0)
+ await form.trigger('dbPass')
+ } else {
+ await delayedCheckPasswordStrength(value)
+ }
+ }}
+ />
+ </FormControl_Shadcn_>
+ </FormItemLayout>
+ )}
+ />
+ </Panel.Content>
+
+ <Panel.Content>
+ <FormField_Shadcn_
+ control={form.control}
+ name="dbRegion"
+ render={({ field }) => (
+ <RegionSelector
+ field={field}
+ form={form}
+ cloudProvider={form.getValues('cloudProvider') as CloudProvider}
+ />
+ )}
+ />
+ </Panel.Content>
+
+ <Panel.Content>
+ <Collapsible_Shadcn_>
+ <CollapsibleTrigger_Shadcn_ className="group/advanced-trigger font-mono uppercase tracking-widest text-xs flex items-center gap-1 text-foreground-lighter/75 hover:text-foreground-light transition data-[state=open]:text-foreground-light">
+ Security options
+ <ChevronRight
+ size={16}
+ strokeWidth={1}
+ className="mr-2 group-data-[state=open]/advanced-trigger:rotate-90 group-hover/advanced-trigger:text-foreground-light transition"
+ />
+ </CollapsibleTrigger_Shadcn_>
+ <CollapsibleContent_Shadcn_ className="pt-5 data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down">
+ <FormField_Shadcn_
+ control={form.control}
+ name="dataApi"
+ render={({ field }) => (
+ <>
+ <FormItemLayout
+ label="What connections do you plan to use?"
+ description="This setting can be changed after the project is created"
+ layout="horizontal"
+ >
+ <FormControl_Shadcn_>
+ <RadioGroupStacked
+ // Due to radio group not supporting boolean values
+ // value is converted to boolean
+ onValueChange={(value) => field.onChange(value === 'true')}
+ defaultValue={field.value.toString()}
+ >
+ <FormItem_Shadcn_ asChild>
+ <FormControl_Shadcn_>
+ <RadioGroupStackedItem
+ value={'true'}
+ label="Data API + Connection String"
+ description="For connecting from the browser, mobile and server."
+ />
+ </FormControl_Shadcn_>
+ </FormItem_Shadcn_>
+ <FormItem_Shadcn_ asChild>
+ <FormControl_Shadcn_>
+ <RadioGroupStackedItem
+ label="Only Connection String"
+ value="false"
+ description="For connecting via server."
+ className={cn(
+ !form.getValues('dataApi') && '!rounded-b-none'
+ )}
+ />
+ </FormControl_Shadcn_>
+ </FormItem_Shadcn_>
+ </RadioGroupStacked>
+ </FormControl_Shadcn_>
+ {!form.getValues('dataApi') && (
+ <Admonition
+ className="rounded-t-none"
+ type={'warning'}
+ title="Data API will effectively be disabled"
+ >
+ PostgREST which powers the Data API will have no schemas
+ available to it.
+ </Admonition>
+ )}
+ </FormItemLayout>
+ </>
+ )}
+ />
+ </CollapsibleContent_Shadcn_>
+ </Collapsible_Shadcn_>
+ </Panel.Content>
</>
)}