Skip to content

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

refactor(studio): simplify pipeline advanced settings (#49841)

Danny White442e40a30b03
diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/AdvancedSettings.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/AdvancedSettings.tsx
index 877915b1e54..23b147e9699 100644
--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/AdvancedSettings.tsx
+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/AdvancedSettings.tsx
@@ -5,7 +5,6 @@ import {
AccordionContent,
AccordionItem,
AccordionTrigger,
- Badge,
FormControl,
FormField,
FormInputGroupInput,
@@ -42,8 +41,8 @@ export const AdvancedSettings = ({
}) => {
const handleNumberChange =
(field: { onChange: (value?: number) => void }) => (e: ChangeEvent<HTMLInputElement>) => {
- const val = e.target.value
- field.onChange(val === '' ? undefined : Number(val))
+ const parsed = e.target.valueAsNumber
+ field.onChange(e.target.value === '' || Number.isNaN(parsed) ? undefined : parsed)
}
return (
@@ -59,7 +58,6 @@ export const AdvancedSettings = ({
</div>
</AccordionTrigger>
<AccordionContent className="pb-0! pt-3 [&>div]:flex [&>div]:flex-col [&>div]:gap-y-4">
- {/* Batch wait time - applies to all destinations */}
<FormField
control={form.control}
name="maxFillMs"
@@ -161,7 +159,7 @@ export const AdvancedSettings = ({
<SelectTrigger>
{INVALIDATED_SLOT_BEHAVIOR_LABELS[field.value ?? 'error']}
</SelectTrigger>
- <SelectContent>
+ <SelectContent side="bottom" collisionPadding={16}>
<SelectItem value="error" className="[&>span]:top-2.5">
<p>Block startup</p>
<p className="text-foreground-lighter">
@@ -188,12 +186,7 @@ export const AdvancedSettings = ({
name="connectionPoolSize"
render={({ field }) => (
<FormItemLayout
- label={
- <div className="flex flex-col gap-y-2">
- <span>Connection pool size</span>
- <Badge className="w-min">BigQuery only</Badge>
- </div>
- }
+ label="Connection pool size"
layout="horizontal"
description="Number of BigQuery connections used for destination writes."
>
@@ -222,12 +215,7 @@ export const AdvancedSettings = ({
name="maxStalenessMins"
render={({ field }) => (
<FormItemLayout
- label={
- <div className="flex flex-col gap-y-2">
- <span>Maximum staleness</span>
- <Badge className="w-min">BigQuery only</Badge>
- </div>
- }
+ label="Maximum staleness"
layout="horizontal"
description="Set the maximum age of query results while BigQuery applies ongoing changes, or leave blank for the freshest results."
>