The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix(studio): SSOConfig field widths (#44114)
Danny Whitef01afa7f668a
diff --git a/apps/studio/components/interfaces/Organization/SSO/AttributeMapping.tsx b/apps/studio/components/interfaces/Organization/SSO/AttributeMapping.tsxindex 75a23ad76ef..0acdfea2e44 100644--- a/apps/studio/components/interfaces/Organization/SSO/AttributeMapping.tsx+++ b/apps/studio/components/interfaces/Organization/SSO/AttributeMapping.tsx@@ -1,6 +1,5 @@import { Plus, Trash } from 'lucide-react'-import { UseFormReturn, useFieldArray } from 'react-hook-form'-+import { useFieldArray, UseFormReturn } from 'react-hook-form'import {Button,FormControl_Shadcn_,@@ -10,6 +9,7 @@ import {Input_Shadcn_,} from 'ui'import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'+import type { SSOConfigFormSchema } from './SSOConfig'type ProviderAttribute = 'emailMapping' | 'userNameMapping' | 'firstNameMapping' | 'lastNameMapping'@@ -119,7 +119,7 @@ export const AttributeMapping = ({<p>Map SSO attributes to user fields</p><div className="flex flex-col gap-y-2 my-2 mt-4"><p>Presets for supported identity providers:</p>- <div className="flex items-center gap-x-2">+ <div className="flex flex-wrap items-center gap-2">{PROVIDER_PRESETS.map((preset) => (<Button key={preset.name} type="outline" onClick={() => applyPreset(preset)}>{preset.name}@@ -131,7 +131,7 @@ export const AttributeMapping = ({}className="gap-1">- <div className="grid gap-2 justify-start">+ <div className="grid w-full max-w-sm min-w-0 gap-3"><MappingFieldArray form={form} fieldName={emailField} label="email" required /><MappingFieldArrayform={form}@@ -175,20 +175,25 @@ const MappingFieldArray = ({})return (- <div className="w-96 space-y-1">- <div className="flex justify-between items-center">+ <div className="w-full min-w-0 space-y-1">+ <div className="flex items-center justify-between gap-2"><span className="text-foreground-light">{label}</span>- {required ? <></> : <span className="text-foreground-muted">Optional</span>}+ {!required ? <span className="text-foreground-muted">Optional</span> : null}</div>- <div className="grid gap-2 w-full">+ <div className="grid w-full min-w-0 gap-2">{fields.map((field, idx) => (- <div key={field.id} className="flex gap-2 items-start">+ <div key={field.id} className="flex min-w-0 items-start gap-2"><FormField_Shadcn_name={`${fieldName}.${idx}.value`}render={({ field }) => (- <FormItem_Shadcn_ className="flex-1">+ <FormItem_Shadcn_ className="min-w-0 flex-1"><FormControl_Shadcn_>- <Input_Shadcn_ {...field} placeholder={placeholder} autoComplete="off" />+ <Input_Shadcn_+ {...field}+ className="min-w-0"+ placeholder={placeholder}+ autoComplete="off"+ /></FormControl_Shadcn_><FormMessage_Shadcn_ /></FormItem_Shadcn_>@@ -197,7 +202,7 @@ const MappingFieldArray = ({<Buttontype="default"icon={<Trash size={12} />}- className="h-[34px] w-[34px]"+ className="h-[34px] w-[34px] shrink-0"disabled={fields.length <= 1}onClick={() => remove(idx)}/>@@ -205,7 +210,7 @@ const MappingFieldArray = ({))}<Button- type="text"+ type="default"icon={<Plus className="w-4 h-4" />}onClick={() => append({ value: '' })}className="w-auto self-start justify-self-start"diff --git a/apps/studio/components/interfaces/Organization/SSO/SSODomains.tsx b/apps/studio/components/interfaces/Organization/SSO/SSODomains.tsxindex 996ddb5297d..53b10c8dfb9 100644--- a/apps/studio/components/interfaces/Organization/SSO/SSODomains.tsx+++ b/apps/studio/components/interfaces/Organization/SSO/SSODomains.tsx@@ -1,6 +1,5 @@import { Plus, Trash } from 'lucide-react'import { useFieldArray, useForm } from 'react-hook-form'-import {Button,FormControl_Shadcn_,@@ -10,6 +9,7 @@ import {Input_Shadcn_,} from 'ui'import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'+import { SSOConfigFormSchema } from './SSOConfig'export const SSODomains = ({ form }: { form: ReturnType<typeof useForm<SSOConfigFormSchema>> }) => {@@ -51,7 +51,7 @@ export const SSODomains = ({ form }: { form: ReturnType<typeof useForm<SSOConfig))}<div><Button- type="text"+ type="default"icon={<Plus className="w-4 h-4" />}size="tiny"onClick={() => append({ value: '' })}diff --git a/apps/studio/components/interfaces/Organization/SSO/SSOMetadata.tsx b/apps/studio/components/interfaces/Organization/SSO/SSOMetadata.tsxindex 65a9db5f888..8b925076acd 100644--- a/apps/studio/components/interfaces/Organization/SSO/SSOMetadata.tsx+++ b/apps/studio/components/interfaces/Organization/SSO/SSOMetadata.tsx@@ -1,7 +1,6 @@import { Upload } from 'lucide-react'import { useEffect, useRef, useState } from 'react'import { useForm } from 'react-hook-form'-import {Button,FormControl_Shadcn_,@@ -15,6 +14,7 @@ import {TabsTrigger_Shadcn_,} from 'ui'import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'+import { SSOConfigFormSchema } from './SSOConfig'export const SSOMetadata = ({@@ -110,7 +110,6 @@ export const SSOMetadata = ({/><Buttontype="default"- size="small"icon={<Upload className="w-4 h-4" />}onClick={() => fileInputRef.current?.click()}>