Skip to content

Commit fab2fea

Browse files
onboarding tweaks
1 parent 5c2bf01 commit fab2fea

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

packages/web/src/app/[domain]/components/connectionCreationForms/gerritConnectionCreationForm.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export const GerritConnectionCreationForm = ({ onCreated }: GerritConnectionCrea
2121
title="Create a Gerrit connection"
2222
defaultValues={{
2323
config: JSON.stringify(defaultConfig, null, 2),
24-
name: 'my-gerrit-connection',
2524
}}
2625
schema={gerritSchema}
2726
quickActions={gerritQuickActions}

packages/web/src/app/[domain]/components/connectionCreationForms/giteaConnectionCreationForm.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export const GiteaConnectionCreationForm = ({ onCreated }: GiteaConnectionCreati
2020
title="Create a Gitea connection"
2121
defaultValues={{
2222
config: JSON.stringify(defaultConfig, null, 2),
23-
name: 'my-gitea-connection',
2423
}}
2524
schema={giteaSchema}
2625
quickActions={giteaQuickActions}

packages/web/src/app/[domain]/components/connectionCreationForms/githubConnectionCreationForm.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export const GitHubConnectionCreationForm = ({ onCreated }: GitHubConnectionCrea
2020
title="Create a GitHub connection"
2121
defaultValues={{
2222
config: JSON.stringify(defaultConfig, null, 2),
23-
name: 'my-github-connection',
2423
}}
2524
schema={githubSchema}
2625
quickActions={githubQuickActions}

packages/web/src/app/[domain]/components/connectionCreationForms/gitlabConnectionCreationForm.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export const GitLabConnectionCreationForm = ({ onCreated }: GitLabConnectionCrea
2020
title="Create a GitLab connection"
2121
defaultValues={{
2222
config: JSON.stringify(defaultConfig, null, 2),
23-
name: 'my-gitlab-connection',
2423
}}
2524
schema={gitlabSchema}
2625
quickActions={gitlabQuickActions}

packages/web/src/app/[domain]/components/connectionCreationForms/sharedConnectionCreationForm.tsx

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { useForm } from "react-hook-form";
1717
import { z } from "zod";
1818
import ConfigEditor, { isConfigValidJson, onQuickAction, QuickActionFn } from "../configEditor";
1919
import { useDomain } from "@/hooks/useDomain";
20-
import { Loader2 } from "lucide-react";
20+
import { InfoIcon, Loader2 } from "lucide-react";
2121
import { ReactCodeMirrorRef } from "@uiw/react-codemirror";
2222
import { SecretCombobox } from "./secretCombobox";
2323
import strings from "@/lib/strings";
@@ -26,7 +26,7 @@ import useCaptureEvent from "@/hooks/useCaptureEvent";
2626
interface SharedConnectionCreationFormProps<T> {
2727
type: CodeHostType;
2828
defaultValues: {
29-
name: string;
29+
name?: string;
3030
config: string;
3131
};
3232
title: string;
@@ -117,12 +117,17 @@ export default function SharedConnectionCreationForm<T>({
117117

118118
return (
119119
<div className={cn("flex flex-col max-w-3xl mx-auto bg-background border rounded-lg p-6", className)}>
120-
<div className="flex flex-row items-center gap-3 mb-6">
121-
<ConnectionIcon
122-
type={type}
123-
className="w-7 h-7"
124-
/>
125-
<h1 className="text-3xl">{title}</h1>
120+
<div className="flex flex-col gap-4 mb-8">
121+
<div className="flex flex-row items-center gap-3">
122+
<ConnectionIcon
123+
type={type}
124+
className="w-7 h-7"
125+
/>
126+
<h1 className="text-3xl">{title}</h1>
127+
</div>
128+
<span className="flex flex-row items-center">
129+
<InfoIcon className="w-4 h-4 mr-2" />Connections are used to specify what repositories you want Sourcebot to sync.
130+
</span>
126131
</div>
127132
<Form
128133
{...form}
@@ -141,6 +146,7 @@ export default function SharedConnectionCreationForm<T>({
141146
{...field}
142147
spellCheck={false}
143148
autoFocus={true}
149+
placeholder="my-connection"
144150
/>
145151
</FormControl>
146152
<FormMessage />

0 commit comments

Comments
 (0)