From fab2fea562f870eb548492f36e3442193c6e988f Mon Sep 17 00:00:00 2001 From: bkellam Date: Tue, 25 Feb 2025 17:27:36 -0800 Subject: [PATCH] onboarding tweaks --- .../gerritConnectionCreationForm.tsx | 1 - .../giteaConnectionCreationForm.tsx | 1 - .../githubConnectionCreationForm.tsx | 1 - .../gitlabConnectionCreationForm.tsx | 1 - .../sharedConnectionCreationForm.tsx | 22 ++++++++++++------- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/packages/web/src/app/[domain]/components/connectionCreationForms/gerritConnectionCreationForm.tsx b/packages/web/src/app/[domain]/components/connectionCreationForms/gerritConnectionCreationForm.tsx index 30516397..e910c93d 100644 --- a/packages/web/src/app/[domain]/components/connectionCreationForms/gerritConnectionCreationForm.tsx +++ b/packages/web/src/app/[domain]/components/connectionCreationForms/gerritConnectionCreationForm.tsx @@ -21,7 +21,6 @@ export const GerritConnectionCreationForm = ({ onCreated }: GerritConnectionCrea title="Create a Gerrit connection" defaultValues={{ config: JSON.stringify(defaultConfig, null, 2), - name: 'my-gerrit-connection', }} schema={gerritSchema} quickActions={gerritQuickActions} diff --git a/packages/web/src/app/[domain]/components/connectionCreationForms/giteaConnectionCreationForm.tsx b/packages/web/src/app/[domain]/components/connectionCreationForms/giteaConnectionCreationForm.tsx index e77f505b..4df4797a 100644 --- a/packages/web/src/app/[domain]/components/connectionCreationForms/giteaConnectionCreationForm.tsx +++ b/packages/web/src/app/[domain]/components/connectionCreationForms/giteaConnectionCreationForm.tsx @@ -20,7 +20,6 @@ export const GiteaConnectionCreationForm = ({ onCreated }: GiteaConnectionCreati title="Create a Gitea connection" defaultValues={{ config: JSON.stringify(defaultConfig, null, 2), - name: 'my-gitea-connection', }} schema={giteaSchema} quickActions={giteaQuickActions} diff --git a/packages/web/src/app/[domain]/components/connectionCreationForms/githubConnectionCreationForm.tsx b/packages/web/src/app/[domain]/components/connectionCreationForms/githubConnectionCreationForm.tsx index d600c33f..64e4d3f9 100644 --- a/packages/web/src/app/[domain]/components/connectionCreationForms/githubConnectionCreationForm.tsx +++ b/packages/web/src/app/[domain]/components/connectionCreationForms/githubConnectionCreationForm.tsx @@ -20,7 +20,6 @@ export const GitHubConnectionCreationForm = ({ onCreated }: GitHubConnectionCrea title="Create a GitHub connection" defaultValues={{ config: JSON.stringify(defaultConfig, null, 2), - name: 'my-github-connection', }} schema={githubSchema} quickActions={githubQuickActions} diff --git a/packages/web/src/app/[domain]/components/connectionCreationForms/gitlabConnectionCreationForm.tsx b/packages/web/src/app/[domain]/components/connectionCreationForms/gitlabConnectionCreationForm.tsx index d8c76c71..77508f24 100644 --- a/packages/web/src/app/[domain]/components/connectionCreationForms/gitlabConnectionCreationForm.tsx +++ b/packages/web/src/app/[domain]/components/connectionCreationForms/gitlabConnectionCreationForm.tsx @@ -20,7 +20,6 @@ export const GitLabConnectionCreationForm = ({ onCreated }: GitLabConnectionCrea title="Create a GitLab connection" defaultValues={{ config: JSON.stringify(defaultConfig, null, 2), - name: 'my-gitlab-connection', }} schema={gitlabSchema} quickActions={gitlabQuickActions} diff --git a/packages/web/src/app/[domain]/components/connectionCreationForms/sharedConnectionCreationForm.tsx b/packages/web/src/app/[domain]/components/connectionCreationForms/sharedConnectionCreationForm.tsx index 2d02a0f7..5fa2f94f 100644 --- a/packages/web/src/app/[domain]/components/connectionCreationForms/sharedConnectionCreationForm.tsx +++ b/packages/web/src/app/[domain]/components/connectionCreationForms/sharedConnectionCreationForm.tsx @@ -17,7 +17,7 @@ import { useForm } from "react-hook-form"; import { z } from "zod"; import ConfigEditor, { isConfigValidJson, onQuickAction, QuickActionFn } from "../configEditor"; import { useDomain } from "@/hooks/useDomain"; -import { Loader2 } from "lucide-react"; +import { InfoIcon, Loader2 } from "lucide-react"; import { ReactCodeMirrorRef } from "@uiw/react-codemirror"; import { SecretCombobox } from "./secretCombobox"; import strings from "@/lib/strings"; @@ -26,7 +26,7 @@ import useCaptureEvent from "@/hooks/useCaptureEvent"; interface SharedConnectionCreationFormProps { type: CodeHostType; defaultValues: { - name: string; + name?: string; config: string; }; title: string; @@ -117,12 +117,17 @@ export default function SharedConnectionCreationForm({ return (
-
- -

{title}

+
+
+ +

{title}

+
+ + Connections are used to specify what repositories you want Sourcebot to sync. +
({ {...field} spellCheck={false} autoFocus={true} + placeholder="my-connection" />