From acb17a466064bdc077720181bb337f475a5b5d37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20De=20Freitas?= <6485562+adefreitas@users.noreply.github.com> Date: Wed, 13 Aug 2025 15:51:35 +0100 Subject: [PATCH 1/5] feat: add functioning integration searchbar --- .../integration-picker/IntegrationPicker.tsx | 22 ++- .../components/IntegrationFields.tsx | 137 ++++++++++-------- .../components/IntegrationList.tsx | 62 ++++++-- .../components/cardFooter.tsx | 10 +- .../hooks/useIntegrationPicker.ts | 5 + 5 files changed, 155 insertions(+), 81 deletions(-) diff --git a/src/modules/integration-picker/IntegrationPicker.tsx b/src/modules/integration-picker/IntegrationPicker.tsx index f37c1f5..cf66b71 100644 --- a/src/modules/integration-picker/IntegrationPicker.tsx +++ b/src/modules/integration-picker/IntegrationPicker.tsx @@ -48,6 +48,7 @@ export const IntegrationPicker: React.FC = ({ setSelectedIntegration, setFormData, handleConnect, + resetConnectionState, } = useIntegrationPicker({ token, baseUrl, @@ -61,8 +62,15 @@ export const IntegrationPicker: React.FC = ({ footer={ setSelectedIntegration(null)} + showActions={!connectionState.loading && !connectionState.success} + onBack={ + accountData + ? undefined + : () => { + setSelectedIntegration(null); + resetConnectionState(); + } + } onNext={handleConnect} /> } @@ -70,12 +78,20 @@ export const IntegrationPicker: React.FC = ({ selectedIntegration && ( setSelectedIntegration(null)} + onBack={ + accountData + ? undefined + : () => { + setSelectedIntegration(null); + resetConnectionState(); + } + } guide={guide} /> ) } height={height} + padding="0" > {isHubLinkAccountReleaseEnabled && ( = ({ }; return ( - - {guide && } - {error && } - {error && {error.provider_response}} - - {fields.map((field) => { - const key = - typeof field.key === 'object' - ? JSON.stringify(field.key) - : String(field.key); - return ( -
- {(field.type === 'text' || - field.type === 'number' || - field.type === 'password') && ( - handleFieldChange(key, value)} - disabled={field.readOnly} - label={field.label} - tooltip={field.guide?.tooltip} - description={field.guide?.description} - type={field.type} - /> - )} + + + {guide && } + {error && } + {error && {error.provider_response}} + + {fields.map((field) => { + const key = + typeof field.key === 'object' + ? JSON.stringify(field.key) + : String(field.key); + return ( +
+ {(field.type === 'text' || + field.type === 'number' || + field.type === 'password') && ( + handleFieldChange(key, value)} + disabled={field.readOnly} + label={field.label} + tooltip={field.guide?.tooltip} + description={field.guide?.description} + type={field.type} + /> + )} - {field.type === 'text_area' && ( -