From fa3b7dc2b375b892b3409ef372585a2eda8c83f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Sibiril?= <81782+aureliensibiril@users.noreply.github.com> Date: Fri, 24 Jul 2026 14:27:48 +0200 Subject: [PATCH] Add docs button to the API-key connect dialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Add Source card links to a connector's docs, but the API-key connect dialog did not, so a user filling in an API key had no path to the setup instructions. Add a "Documentation" button to the dialog footer, styled like Cancel and on the left of the Cancel/Connect row, shown only when the provider has a docs page. Extract the rendering into a shared ConnectorDocumentationLink component with a link/button variant (the card keeps the quiet link, the dialog uses the button) and give DialogFooter an optional start slot for left-aligned footer content. Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com> --- .../dialogs/AddAccessReviewSourceDialog.tsx | 14 +--- .../_components/APIKeyConnectorDialog.tsx | 15 ++++- .../ConnectorDocumentationLink.tsx | 66 +++++++++++++++++++ packages/ui/src/Molecules/Dialog/Dialog.tsx | 18 +++-- 4 files changed, 95 insertions(+), 18 deletions(-) create mode 100644 apps/console/src/pages/organizations/access-reviews/dialogs/_components/ConnectorDocumentationLink.tsx diff --git a/apps/console/src/pages/organizations/access-reviews/dialogs/AddAccessReviewSourceDialog.tsx b/apps/console/src/pages/organizations/access-reviews/dialogs/AddAccessReviewSourceDialog.tsx index f3fe65d8e..cddfbf1b8 100644 --- a/apps/console/src/pages/organizations/access-reviews/dialogs/AddAccessReviewSourceDialog.tsx +++ b/apps/console/src/pages/organizations/access-reviews/dialogs/AddAccessReviewSourceDialog.tsx @@ -29,7 +29,6 @@ import { DialogContent, DialogFooter, DropdownItem, - IconArrowLink, Input, ThirdPartyLogo, useDialogRef, @@ -42,6 +41,7 @@ import type { AddAccessReviewSourceDialogConnectorProviderInfoFragment$data } fr import { APIKeyConnectorDialog } from "./_components/APIKeyConnectorDialog"; import { ClientCredentialsConnectorDialog } from "./_components/ClientCredentialsConnectorDialog"; +import { ConnectorDocumentationLink } from "./_components/ConnectorDocumentationLink"; import { DatadogConnectDialog, ZendeskConnectDialog, @@ -162,17 +162,7 @@ export function AddAccessReviewSourceDialog({

{info.displayName}

- {info.documentationUrl && ( - - {__("Documentation")} - - - )} +
{isConnected ? ( diff --git a/apps/console/src/pages/organizations/access-reviews/dialogs/_components/APIKeyConnectorDialog.tsx b/apps/console/src/pages/organizations/access-reviews/dialogs/_components/APIKeyConnectorDialog.tsx index 732856281..8e852ab94 100644 --- a/apps/console/src/pages/organizations/access-reviews/dialogs/_components/APIKeyConnectorDialog.tsx +++ b/apps/console/src/pages/organizations/access-reviews/dialogs/_components/APIKeyConnectorDialog.tsx @@ -48,6 +48,8 @@ import { PostHogDeploymentField, } from "../PostHogDeploymentField"; +import { ConnectorDocumentationLink } from "./ConnectorDocumentationLink"; + const createAPIKeyConnectorMutation = graphql` mutation APIKeyConnectorDialogCreateAPIKeyConnectorMutation( $input: CreateAPIKeyConnectorInput! @@ -415,7 +417,18 @@ export function APIKeyConnectorDialog({ )} - + + ) + : undefined + } + > + ); + } + + return ( + + {__("Documentation")} + + + ); +} diff --git a/packages/ui/src/Molecules/Dialog/Dialog.tsx b/packages/ui/src/Molecules/Dialog/Dialog.tsx index 31f05d139..587480091 100644 --- a/packages/ui/src/Molecules/Dialog/Dialog.tsx +++ b/packages/ui/src/Molecules/Dialog/Dialog.tsx @@ -195,19 +195,27 @@ export function DialogFooter({ children, exitLabel, className, + start, }: { children?: ReactNode; exitLabel?: string; className?: string; + // Optional content aligned to the footer's left edge (e.g. a documentation + // link), on the same line as the Cancel/confirm buttons. When set, the footer + // switches to justify-between; otherwise it keeps the default right alignment. + start?: ReactNode; }) { const { __ } = useTranslate(); const { footer } = dialog(); return ( -