Skip to content

Commit 55daf2e

Browse files
committed
chore(webapp): remove the temporary integrations settings preview
Deletes the development-only preview that forced every conditionally hidden state on the project Integrations page to render at once, along with the placeholder data and the devReveal props that drove it. The real conditions are restored: the GitHub panel returns null when the app is not configured, and the Vercel section only renders where the integration is supported. Also drops the explanatory comments added while iterating on the layout.
1 parent 2a4051a commit 55daf2e

9 files changed

Lines changed: 10 additions & 505 deletions

File tree

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ type BuildSettingsFieldsProps = {
3838
currentTriggerVersionFetchFailed?: boolean;
3939
/** Hide the section-level master toggles for "Pull env vars" and "Discover new env vars". */
4040
hideSectionToggles?: boolean;
41-
/**
42-
* "settings" renders the env var sections as settings rows (project Integrations
43-
* page); "card" keeps the bordered card used by the onboarding modal.
44-
*/
4541
layout?: "settings" | "card";
4642
};
4743

@@ -400,11 +396,6 @@ export function BuildSettingsFields({
400396
);
401397
}
402398

403-
/**
404-
* One environment's toggle as a settings row. The reason a toggle is disabled
405-
* is shown as a permanent description rather than a hover tooltip, and the
406-
* environment badge dims to match.
407-
*/
408399
function EnvToggleRow({
409400
slug,
410401
checked,
@@ -418,9 +409,7 @@ function EnvToggleRow({
418409
checked: boolean;
419410
disabled: boolean;
420411
disabledReason?: string;
421-
/** Names the control that unlocks this row; see tailwind.css for the rules. */
422412
unlockHint?: string;
423-
/** Name other rows can point at to highlight this row's toggle. */
424413
unlockTarget?: string;
425414
onCheckedChange: (checked: boolean) => void;
426415
}) {

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

Lines changed: 0 additions & 180 deletions
This file was deleted.

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -695,14 +695,10 @@ export function ComboBox({
695695
...props
696696
}: ComboBoxProps) {
697697
return (
698-
// pl-0: the bare input carries its own left padding from @tailwindcss/forms,
699-
// so padding here too would indent the filter past the options below it.
700698
<div className="flex h-9 w-full flex-none items-center border-b border-grid-dimmed bg-transparent pl-0 pr-3 text-xs text-text-dimmed outline-hidden">
701699
<Ariakit.Combobox
702700
autoSelect={autoSelect}
703701
render={<input placeholder={placeholder} />}
704-
// border-0/ring-0: @tailwindcss/forms styles a focused bare input with a
705-
// blue border and ring, which clashes with the app's focus treatment.
706702
className="flex-1 border-0 bg-transparent text-xs text-text-dimmed outline-hidden focus:border-0 focus:ring-0"
707703
{...props}
708704
/>

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ export function SettingsRowTitle({
101101
htmlFor?: string;
102102
className?: string;
103103
}) {
104-
// `block` matters: as an inline element this would sit in an anonymous line
105-
// box sized by the inherited line-height, padding the top of every row.
106104
const classes = cn(
107105
"block font-sans text-sm font-semibold leading-tight text-text-bright",
108106
className

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.settings.integrations/route.tsx

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ import React, { useCallback, useEffect, useRef, useState } from "react";
66
import { typedjson, useTypedFetcher, useTypedLoaderData } from "remix-typedjson";
77
import { z } from "zod";
88
import { InlineCode } from "~/components/code/InlineCode";
9-
import {
10-
DEV_REVEAL_ALL,
11-
devRevealVercelOnboardingData,
12-
} from "~/components/integrations/devRevealIntegrations";
139
import { Button } from "~/components/primitives/Buttons";
1410
import { FormError } from "~/components/primitives/FormError";
1511
import { Input } from "~/components/primitives/Input";
@@ -45,7 +41,6 @@ import {
4541
VercelSettingsPanel,
4642
} from "../resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.vercel";
4743

48-
/** Read by the parent settings layout to title the page. */
4944
export const handle = { pageTitle: "Integrations" };
5045

5146
export const loader = dashboardLoader(
@@ -222,10 +217,7 @@ export default function IntegrationsSettingsPage() {
222217
const nextUrl = searchParams.get("next");
223218
const [isModalOpen, setIsModalOpen] = useState(false);
224219
const vercelFetcher = useTypedFetcher<typeof vercelLoader>();
225-
// DEV_REVEAL_ALL: the real payload needs a Vercel org integration, which local
226-
// development has none of, so the modal could not be opened at all.
227-
const onboardingData =
228-
vercelFetcher.data?.onboardingData ?? (DEV_REVEAL_ALL ? devRevealVercelOnboardingData : null);
220+
const onboardingData = vercelFetcher.data?.onboardingData ?? null;
229221

230222
// Helper to open modal and ensure query param is present
231223
const openVercelOnboarding = useCallback(() => {
@@ -355,14 +347,10 @@ export default function IntegrationsSettingsPage() {
355347
}
356348
}, [onboardingData, vercelFetcher.state, openVercelOnboarding]);
357349

358-
// DEV_REVEAL_ALL: force both integrations on locally. Remove before merging.
359-
const showGitHubSection = githubAppEnabled || DEV_REVEAL_ALL;
360-
const showVercelSection = vercelIntegrationEnabled || DEV_REVEAL_ALL;
361-
362350
return (
363351
<>
364352
<SettingsContainer className="md:mt-6">
365-
{showGitHubSection && (
353+
{githubAppEnabled && (
366354
<React.Fragment>
367355
<SettingsSection>
368356
<SettingsHeader title="Git settings" />
@@ -372,11 +360,10 @@ export default function IntegrationsSettingsPage() {
372360
environmentSlug={environment.slug}
373361
billingPath={v3BillingPath({ slug: organization.slug })}
374362
layout="settings"
375-
devReveal={DEV_REVEAL_ALL}
376363
/>
377364
</SettingsSection>
378365

379-
{showVercelSection && (
366+
{vercelIntegrationEnabled && (
380367
<SettingsSection>
381368
<SettingsHeader title="Vercel integration" />
382369
<VercelSettingsPanel
@@ -387,7 +374,6 @@ export default function IntegrationsSettingsPage() {
387374
isLoadingVercelData={
388375
vercelFetcher.state === "loading" || vercelFetcher.state === "submitting"
389376
}
390-
devReveal={DEV_REVEAL_ALL}
391377
/>
392378
</SettingsSection>
393379
)}
@@ -412,17 +398,17 @@ export default function IntegrationsSettingsPage() {
412398
</SettingsContainer>
413399

414400
{/* Vercel Onboarding Modal */}
415-
{showVercelSection && (
401+
{vercelIntegrationEnabled && (
416402
<VercelOnboardingModal
417403
isOpen={isModalOpen}
418404
onClose={closeVercelOnboarding}
419405
onboardingData={onboardingData}
420406
organizationSlug={organization.slug}
421407
projectSlug={project.slug}
422408
environmentSlug={environment.slug}
423-
hasStagingEnvironment={vercelFetcher.data?.hasStagingEnvironment ?? DEV_REVEAL_ALL}
424-
hasPreviewEnvironment={vercelFetcher.data?.hasPreviewEnvironment ?? DEV_REVEAL_ALL}
425-
hasOrgIntegration={vercelFetcher.data?.hasOrgIntegration ?? DEV_REVEAL_ALL}
409+
hasStagingEnvironment={vercelFetcher.data?.hasStagingEnvironment ?? false}
410+
hasPreviewEnvironment={vercelFetcher.data?.hasPreviewEnvironment ?? false}
411+
hasOrgIntegration={vercelFetcher.data?.hasOrgIntegration ?? false}
426412
nextUrl={nextUrl ?? undefined}
427413
vercelManageAccessUrl={vercelFetcher.data?.vercelManageAccessUrl}
428414
onDataReload={(vercelEnvironmentId) => {
@@ -601,10 +587,6 @@ function BuildSettingsForm({ buildSettings }: { buildSettings: BuildSettings })
601587
);
602588
}
603589

604-
/**
605-
* Right-hand control column for a settings row whose action is a text input:
606-
* fixed width so the inputs line up, with room for a validation message below.
607-
*/
608590
function SettingsControl({ children }: { children: React.ReactNode }) {
609591
return <div className="flex w-64 flex-col gap-1">{children}</div>;
610592
}

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.settings/route.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export const loader = async ({ request, params }: LoaderFunctionArgs) => {
4444

4545
const DEFAULT_PAGE_TITLE = "Project settings";
4646

47-
/** Child settings routes can name themselves via `export const handle = { pageTitle }`. */
4847
function usePageTitle() {
4948
const matches = useMatches();
5049
for (let i = matches.length - 1; i >= 0; i--) {

0 commit comments

Comments
 (0)