Skip to content

Commit 6977dc0

Browse files
committed
feat(webapp): tidy up the integration setup modals
Connect GitHub repository: the repository filter field no longer draws a blue border and ring when focused. It is a bare input, so @tailwindcss/forms was styling its focus state and overriding the app%s own treatment. Set up Vercel Integration: the project dropdown reads at full brightness, Cancel becomes secondary, and the TRIGGER_SECRET_KEY note becomes the dropdown%s field description rather than a detached paragraph, so it sits at the same distance as every other field hint. The copy now carries the step on its own, so the redundant "Select Vercel Project" heading is gone, and it no longer promises to sync "your API keys" when what actually syncs is one key. Also brightens the Vercel logo in the install and connect buttons and in the connected-project line, where it was inheriting dimmed body colour.
1 parent 1572655 commit 6977dc0

3 files changed

Lines changed: 42 additions & 40 deletions

File tree

apps/webapp/app/components/integrations/VercelOnboardingModal.tsx

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { FormButtons } from "~/components/primitives/FormButtons";
1313
import { FormError } from "~/components/primitives/FormError";
1414
import { Header3 } from "~/components/primitives/Headers";
1515
import { Hint } from "~/components/primitives/Hint";
16+
import { InputGroup } from "~/components/primitives/InputGroup";
1617
import { Label } from "~/components/primitives/Label";
1718
import { Paragraph } from "~/components/primitives/Paragraph";
1819
import { Select, SelectItem } from "~/components/primitives/Select";
@@ -797,52 +798,51 @@ export function VercelOnboardingModal({
797798
<div className="mt-4">
798799
{showProjectSelection && (
799800
<div className="flex flex-col gap-4">
800-
<Header3>Select Vercel Project</Header3>
801-
<Paragraph className="text-sm">
802-
Choose which Vercel project to connect with this Trigger.dev project. Your API keys
803-
will be automatically synced to Vercel.
801+
<Paragraph>
802+
Choose the Vercel project to pair with this Trigger.dev project.
804803
</Paragraph>
805804

806805
{availableProjects.length === 0 ? (
807806
<Callout variant="warning">
808807
No Vercel projects found. Please create a project in Vercel first.
809808
</Callout>
810809
) : (
811-
<Select
812-
disabled={availableProjects.length === 1}
813-
value={selectedVercelProject?.id || ""}
814-
setValue={(value) => {
815-
if (!Array.isArray(value)) {
816-
const project = availableProjects.find((p) => p.id === value);
817-
setSelectedVercelProject(project || null);
818-
setProjectSelectionError(null);
819-
}
820-
}}
821-
items={availableProjects}
822-
filter={availableProjects.length > 5 ? { keys: ["name"] } : undefined}
823-
variant="tertiary/medium"
824-
placeholder="Select a Vercel project"
825-
dropdownIcon
826-
text={selectedVercelProject?.name || "Select a project"}
827-
>
828-
{availableProjects.map((project) => (
829-
<SelectItem key={project.id} value={project.id}>
830-
{project.name}
831-
</SelectItem>
832-
))}
833-
</Select>
810+
<InputGroup fullWidth>
811+
<Select
812+
disabled={availableProjects.length === 1}
813+
value={selectedVercelProject?.id || ""}
814+
setValue={(value) => {
815+
if (!Array.isArray(value)) {
816+
const project = availableProjects.find((p) => p.id === value);
817+
setSelectedVercelProject(project || null);
818+
setProjectSelectionError(null);
819+
}
820+
}}
821+
items={availableProjects}
822+
filter={availableProjects.length > 5 ? { keys: ["name"] } : undefined}
823+
variant="secondary/medium"
824+
placeholder="Select a Vercel project"
825+
dropdownIcon
826+
text={selectedVercelProject?.name || "Select a project"}
827+
>
828+
{availableProjects.map((project) => (
829+
<SelectItem key={project.id} value={project.id}>
830+
{project.name}
831+
</SelectItem>
832+
))}
833+
</Select>
834+
<Hint>
835+
Your{" "}
836+
<code className="rounded bg-background-raised px-1 py-0.5 text-xs text-text-bright">
837+
TRIGGER_SECRET_KEY
838+
</code>{" "}
839+
is synced to Vercel for each environment once connected.
840+
</Hint>
841+
</InputGroup>
834842
)}
835843

836844
{projectSelectionError && <FormError>{projectSelectionError}</FormError>}
837845

838-
<Hint>
839-
Once connected, your{" "}
840-
<code className="text-xs rounded bg-background-raised px-1 py-0.5 text-text-bright">
841-
TRIGGER_SECRET_KEY
842-
</code>{" "}
843-
will be automatically synced to Vercel for each environment.
844-
</Hint>
845-
846846
<FormButtons
847847
confirmButton={
848848
<div className="flex items-center gap-2">
@@ -866,7 +866,7 @@ export function VercelOnboardingModal({
866866
</div>
867867
}
868868
cancelButton={
869-
<Button variant="tertiary/medium" onClick={handleSkipOnboarding}>
869+
<Button variant="secondary/medium" onClick={handleSkipOnboarding}>
870870
Cancel
871871
</Button>
872872
}

apps/webapp/app/components/primitives/Select.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,9 @@ export function ComboBox({
699699
<Ariakit.Combobox
700700
autoSelect={autoSelect}
701701
render={<input placeholder={placeholder} />}
702-
className="flex-1 bg-transparent text-xs text-text-dimmed outline-hidden"
702+
// border-0/ring-0: @tailwindcss/forms styles a focused bare input with a
703+
// blue border and ring, which clashes with the app's focus treatment.
704+
className="flex-1 border-0 bg-transparent text-xs text-text-dimmed outline-hidden focus:border-0 focus:ring-0"
703705
{...props}
704706
/>
705707
{shortcut && (

apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.vercel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ function VercelSettingsRows({
594594
noPermissionTooltip={noPermissionTooltip}
595595
to={vercelAppInstallPath(organizationSlug, projectSlug)}
596596
variant="secondary/small"
597-
LeadingIcon={() => <VercelLogo className="-mx-1 size-3.5" />}
597+
LeadingIcon={() => <VercelLogo className="-mx-1 size-3.5 text-text-bright" />}
598598
>
599599
Install Vercel app
600600
</PermissionLink>
@@ -615,7 +615,7 @@ function VercelSettingsRows({
615615
LeadingIcon={
616616
isLoadingProjects
617617
? () => <SpinnerWhite className="size-4" />
618-
: () => <VercelLogo className="-mx-1 size-3.5" />
618+
: () => <VercelLogo className="-mx-1 size-3.5 text-text-bright" />
619619
}
620620
>
621621
{isLoadingProjects ? "Loading projects…" : "Connect Vercel project"}
@@ -840,7 +840,7 @@ function ConnectedVercelProjectForm({
840840
<>
841841
<span className="mr-2 inline-block size-1.5 rounded-full bg-success align-[0.15em]" />
842842
Vercel project
843-
<VercelLogo className="relative -top-px mx-1.5 inline size-3.5 align-text-bottom" />
843+
<VercelLogo className="relative -top-px mx-1.5 inline size-3.5 align-text-bottom text-text-bright" />
844844
{connectedProject.vercelProjectName} connected on{" "}
845845
<DateTime
846846
date={connectedProject.createdAt}

0 commit comments

Comments
 (0)