Skip to content

Commit 9b56d3e

Browse files
authored
feat: fix connector form and pallette (#1355)
Signed-off-by: Calvin Lee <[email protected]>
1 parent 7237424 commit 9b56d3e

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

packages/ui/src/views/connectors/connector-entity-form.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ export const ConnectorEntityForm = (props: ConnectorEntityFormProps): JSX.Elemen
8383
requiredMessagePerInput: { ['select']: 'Selection is required' }
8484
}
8585
})
86-
console.log(selectedSecret, 'selectedSecret', formEntity)
8786

8887
return (
8988
<RootForm
@@ -99,12 +98,12 @@ export const ConnectorEntityForm = (props: ConnectorEntityFormProps): JSX.Elemen
9998
{rootForm => (
10099
<EntityFormLayout.Root>
101100
<EntityFormSectionLayout.Root>
102-
<EntityFormSectionLayout.Header>
101+
<EntityFormSectionLayout.Header className="!px-0">
103102
<EntityFormSectionLayout.Title className="!my-0">
104103
Connect to {formEntity.data.name}
105104
</EntityFormSectionLayout.Title>
106105
</EntityFormSectionLayout.Header>
107-
<EntityFormSectionLayout.Form>
106+
<EntityFormSectionLayout.Form className="!px-0">
108107
<RenderForm className="space-y-4" factory={inputComponentFactory} inputs={formDefinition} />
109108
{apiError && (
110109
<Alert.Container variant="destructive" className="my-8">

packages/ui/src/views/connectors/connector-reference/connector-reference.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ export const ConnectorReference: React.FC<ConnectorReferenceProps> = ({
6868

6969
return (
7070
<div className="flex flex-col">
71-
<span className="mb-4 font-medium">Select an existing Connector:</span>
7271
<div className="flex-1">
7372
<EntityReference<ConnectorItem>
7473
entities={connectorsData}

packages/ui/src/views/connectors/connectors-pallete-drawer.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ export const ConnectorsPalette = (props: ConnectorsPaletteProps): JSX.Element =>
2626
const [query, setQuery] = useState('')
2727

2828
const connectorsFiltered = useMemo(
29-
() => connectors.filter((connector: { type: string | string[] }) => connector.type.includes(query)),
29+
() =>
30+
connectors.filter((connector: { name: string }) => connector.name.toLowerCase().includes(query.toLowerCase())),
3031
[query, connectors]
3132
)
3233

3334
return (
3435
<ConnectorsPaletteLayout.Root>
35-
<ConnectorsPaletteLayout.Header className="!border-none">
36+
<ConnectorsPaletteLayout.Header className="!border-none !p-0">
3637
<ConnectorsPaletteLayout.Title className="!mt-0">Connector Setup</ConnectorsPaletteLayout.Title>
3738
<ConnectorsPaletteLayout.Subtitle className="text-foreground-4">
3839
{'Select a Connector'}
@@ -44,7 +45,7 @@ export const ConnectorsPalette = (props: ConnectorsPaletteProps): JSX.Element =>
4445
}}
4546
/>
4647
</ConnectorsPaletteLayout.Header>
47-
<StepsPaletteContentLayout.Root>
48+
<StepsPaletteContentLayout.Root className="!px-0">
4849
<ConnectorsPaletteSection
4950
connectors={connectorsFiltered}
5051
onSelect={connector => {

packages/ui/src/views/unified-pipeline-studio/components/palette-drawer/components/step-palette-content-layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const StepsPaletteContentLayout = {
2020
},
2121

2222
SectionItem: function SectionHeader({ children }: { children: React.ReactNode }) {
23-
return <div className="mb-3 flex flex-col rounded-md border p-2 hover:!bg-background-4">{children}</div>
23+
return <div className="mb-3 flex flex-col rounded-md border hover:!bg-background-4">{children}</div>
2424
}
2525
}
2626

packages/ui/src/views/unified-pipeline-studio/components/palette-drawer/components/step-palette-item-layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { cn } from '@utils/cn'
33
const StepsPaletteItemLayout = {
44
Root: function Root({ children, ...rest }: React.PropsWithChildren<React.HTMLAttributes<HTMLDivElement>>) {
55
return (
6-
<div className="flex size-full cursor-pointer flex-row gap-2" {...rest}>
6+
<div className="flex size-full cursor-pointer flex-row gap-2 p-2" {...rest}>
77
{children}
88
</div>
99
)

0 commit comments

Comments
 (0)