From 2b7fe2e4aac314747b152c836f726e55e31efc78 Mon Sep 17 00:00:00 2001 From: Saxon Fletcher Date: Wed, 25 Jun 2025 16:07:37 +1000 Subject: [PATCH] layout issues and github check --- .../BranchManagement/CreateBranchModal.tsx | 3 -- .../IntegrationSettings.tsx | 6 ++- .../SidePanelGitHubRepoLinker.tsx | 5 +- .../AutomaticBranchingRow.tsx | 3 +- .../GithubIntegration/GithubSection.tsx | 54 ++++++++++--------- 5 files changed, 38 insertions(+), 33 deletions(-) diff --git a/apps/studio/components/interfaces/BranchManagement/CreateBranchModal.tsx b/apps/studio/components/interfaces/BranchManagement/CreateBranchModal.tsx index c1d6e2de9e3..455aaad2ddd 100644 --- a/apps/studio/components/interfaces/BranchManagement/CreateBranchModal.tsx +++ b/apps/studio/components/interfaces/BranchManagement/CreateBranchModal.tsx @@ -247,9 +247,6 @@ export const CreateBranchModal = () => {
{isChecking && } - {field.value && !isChecking && !form.formState.errors.gitBranchName && ( - - )}
diff --git a/apps/studio/components/interfaces/Organization/IntegrationSettings/IntegrationSettings.tsx b/apps/studio/components/interfaces/Organization/IntegrationSettings/IntegrationSettings.tsx index c9c1859e950..3e5bd730ab8 100644 --- a/apps/studio/components/interfaces/Organization/IntegrationSettings/IntegrationSettings.tsx +++ b/apps/studio/components/interfaces/Organization/IntegrationSettings/IntegrationSettings.tsx @@ -1,4 +1,5 @@ import { PermissionAction } from '@supabase/shared-types/out/constants' +import { useRouter } from 'next/router' import { useCallback } from 'react' import { toast } from 'sonner' @@ -42,6 +43,7 @@ const IntegrationImageHandler = ({ title }: { title: 'vercel' | 'github' }) => { } const IntegrationSettings = () => { + const router = useRouter() const org = useSelectedOrganization() const canReadGithubConnection = useCheckPermissions( @@ -69,8 +71,8 @@ const IntegrationSettings = () => { const sidePanelsStateSnapshot = useSidePanelsStateSnapshot() const onAddGitHubConnection = useCallback(() => { - sidePanelsStateSnapshot.setGithubConnectionsOpen(true) - }, [sidePanelsStateSnapshot]) + router.push('/project/_/settings/integrations') + }, [router]) const onDeleteGitHubConnection = useCallback( async (connection: IntegrationProjectConnection) => { diff --git a/apps/studio/components/interfaces/Organization/IntegrationSettings/SidePanelGitHubRepoLinker.tsx b/apps/studio/components/interfaces/Organization/IntegrationSettings/SidePanelGitHubRepoLinker.tsx index 660369c15c0..c61c9e34973 100644 --- a/apps/studio/components/interfaces/Organization/IntegrationSettings/SidePanelGitHubRepoLinker.tsx +++ b/apps/studio/components/interfaces/Organization/IntegrationSettings/SidePanelGitHubRepoLinker.tsx @@ -349,7 +349,7 @@ const SidePanelGitHubRepoLinker = ({ projectRef }: SidePanelGitHubRepoLinkerProp if (!open) sidePanelStateSnapshot.setGithubConnectionsOpen(false) }} > - +
Automatic Branching - Create a Supabase branch for every GitHub branch and sync them on commit and merge. + Create a Supabase branch for every GitHub pull request and sync them on every commit + and merge. diff --git a/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/AutomaticBranchingRow.tsx b/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/AutomaticBranchingRow.tsx index dbe9d291042..4a5ae20f996 100644 --- a/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/AutomaticBranchingRow.tsx +++ b/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/AutomaticBranchingRow.tsx @@ -73,7 +73,8 @@ export const AutomaticBranchingRow = () => {
Automatic Branching

- Create a Supabase branch for every GitHub branch and sync them on commit and merge. + Create a Supabase branch for every GitHub pull request and sync them on every commit and + merge.

diff --git a/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GithubSection.tsx b/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GithubSection.tsx index b071a9fd899..04ed5e793df 100644 --- a/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GithubSection.tsx +++ b/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GithubSection.tsx @@ -1,47 +1,51 @@ import { PermissionAction } from '@supabase/shared-types/out/constants' -import Image from 'next/image' import { ScaffoldContainer, - ScaffoldDescription, ScaffoldSection, - ScaffoldSectionTitle, + ScaffoldSectionContent, + ScaffoldSectionDetail, } from 'components/layouts/Scaffold' import NoPermission from 'components/ui/NoPermission' import { useCheckPermissions } from 'hooks/misc/useCheckPermissions' import { BASE_PATH } from 'lib/constants' -import { cn } from 'ui' import { AutomaticBranchingRow } from './AutomaticBranchingRow' +const IntegrationImageHandler = ({ title }: { title: 'vercel' | 'github' }) => { + return ( + {`${title} + ) +} + const GitHubSection = () => { const canReadGitHubConnection = useCheckPermissions( PermissionAction.READ, 'integrations.github_connections' ) + const GitHubTitle = `GitHub Integration` + return ( - -
- {`GitHub -
- GitHub Integration - - Connect any of your GitHub repositories to a project. - -
-
- {!canReadGitHubConnection ? ( - - ) : ( - - )} + + +

Connect any of your GitHub repositories to a project.

+ +
+ + {!canReadGitHubConnection ? ( + + ) : ( +
+

Integration features

+ +
+ )} +
)