Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Chore/misc integration nudges (#30720)

Terry Sutton9e5cb993299b
diff --git a/apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTab.tsx b/apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTab.tsx
index c17d3158abb..d86dbac261b 100644
--- a/apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTab.tsx
+++ b/apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTab.tsx
@@ -59,11 +59,11 @@ export const IntegrationOverviewTab = ({
src={`${router.basePath}/img/supabase-logo.svg`}
className=" h-2.5 cursor-pointer rounded"
/>
- <span>Database Extension</span>
+ <span>Postgres Module</span>
</Badge>
<Markdown
className="max-w-full"
- content={`This integration uses the ${integration.requiredExtensions.map((x) => `\`${x}\``).join(', ')}
+ content={`This integration uses the ${integration.requiredExtensions.map((x) => `\`${x}\``).join(', ')}
extension${integration.requiredExtensions.length > 1 ? 's' : ''} directly in your Postgres database.
${hasMissingExtensions ? `Install ${integration.requiredExtensions.length > 1 ? 'these' : 'this'} database extension${integration.requiredExtensions.length > 1 ? 's' : ''} to use ${integration.name} in your project.` : ''}
`}
diff --git a/apps/studio/components/interfaces/Integrations/Landing/AvailableIntegrations.tsx b/apps/studio/components/interfaces/Integrations/Landing/AvailableIntegrations.tsx
index d00fd8f68ff..2b4ce16f354 100644
--- a/apps/studio/components/interfaces/Integrations/Landing/AvailableIntegrations.tsx
+++ b/apps/studio/components/interfaces/Integrations/Landing/AvailableIntegrations.tsx
@@ -10,6 +10,11 @@ import { IntegrationCard, IntegrationLoadingCard } from './IntegrationCard'
import { useInstalledIntegrations } from './useInstalledIntegrations'
type IntegrationCategory = 'all' | 'wrapper' | 'postgres_extensions' | 'custom'
+const CATEGORIES = [
+ { key: 'all', label: 'All Integrations' },
+ { key: 'wrapper', label: 'Wrappers' },
+ { key: 'postgres_extension', label: 'Postgres Modules' },
+] as const
export const AvailableIntegrations = () => {
const [selectedCategory, setSelectedCategory] = useQueryState(
@@ -29,10 +34,8 @@ export const AvailableIntegrations = () => {
// available integrations for install
const integrationsByCategory =
selectedCategory === 'all'
- ? availableIntegrations.filter((i) => !installedIds.includes(i.id))
- : availableIntegrations.filter(
- (i) => !installedIds.includes(i.id) && i.type === selectedCategory
- )
+ ? availableIntegrations
+ : availableIntegrations.filter((i) => i.type === selectedCategory)
const filteredIntegrations = (
search.length > 0
? integrationsByCategory.filter((i) => i.name.toLowerCase().includes(search.toLowerCase()))
@@ -47,23 +50,21 @@ export const AvailableIntegrations = () => {
onValueChange={(value) => setSelectedCategory(value as IntegrationCategory)}
>
<TabsList_Shadcn_ className="px-10 gap-2 border-b-0 border-t pt-5">
- {['all', 'wrapper', 'postgres_extension'].map((category) => (
+ {CATEGORIES.map((category) => (
<TabsTrigger_Shadcn_
- key={category}
- value={category}
- onClick={() => setSelectedCategory(category as IntegrationCategory)}
+ key={category.key}
+ value={category.key}
+ onClick={() => setSelectedCategory(category.key as IntegrationCategory)}
className={cn(
buttonVariants({
size: 'tiny',
- type: selectedCategory === category ? 'default' : 'outline',
+ type: selectedCategory === category.key ? 'default' : 'outline',
}),
- selectedCategory === category ? 'text-foreground' : 'text-foreground-lighter',
+ selectedCategory === category.key ? 'text-foreground' : 'text-foreground-lighter',
'!rounded-full px-3'
)}
>
- {category === 'all'
- ? 'All Integrations'
- : category.replace('_', ' ').replace(/\b\w/g, (char) => char.toUpperCase())}
+ {category.label}
</TabsTrigger_Shadcn_>
))}
<Input
@@ -98,7 +99,10 @@ export const AvailableIntegrations = () => {
error={error}
/>
)}
- {isSuccess && filteredIntegrations.map((i) => <IntegrationCard key={i.id} {...i} />)}
+ {isSuccess &&
+ filteredIntegrations.map((i) => (
+ <IntegrationCard key={i.id} {...i} isInstalled={installedIds.includes(i.id)} />
+ ))}
{isSuccess && search.length > 0 && filteredIntegrations.length === 0 && (
<NoSearchResults
className="xl:col-span-3 2xl:col-span-4"
diff --git a/apps/studio/components/interfaces/Integrations/Landing/IntegrationCard.tsx b/apps/studio/components/interfaces/Integrations/Landing/IntegrationCard.tsx
index 3134a304c41..0e21237fc78 100644
--- a/apps/studio/components/interfaces/Integrations/Landing/IntegrationCard.tsx
+++ b/apps/studio/components/interfaces/Integrations/Landing/IntegrationCard.tsx
@@ -1,11 +1,14 @@
import Link from 'next/link'
import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectContext'
-import { Badge, cn } from 'ui'
+import { Badge, cn, TooltipContent_Shadcn_, TooltipTrigger_Shadcn_, Tooltip_Shadcn_ } from 'ui'
import ShimmeringLoader from 'ui-patterns/ShimmeringLoader'
import { IntegrationDefinition } from './Integrations.constants'
+import { BadgeCheck, Maximize } from 'lucide-react'
-type IntegrationCardProps = IntegrationDefinition & {}
+type IntegrationCardProps = IntegrationDefinition & {
+ isInstalled?: boolean
+}
const INTEGRATION_CARD_STYLE = cn(
'w-full h-full pl-5 pr-6 py-3 bg-surface-100 hover:bg-surface-200 hover:border-strong',
@@ -28,7 +31,14 @@ export const IntegrationLoadingCard = () => {
)
}
-export const IntegrationCard = ({ id, beta, name, icon, description }: IntegrationCardProps) => {
+export const IntegrationCard = ({
+ id,
+ beta,
+ name,
+ icon,
+ description,
+ isInstalled,
+}: IntegrationCardProps) => {
const { project } = useProjectContext()
return (
@@ -37,7 +47,7 @@ export const IntegrationCard = ({ id, beta, name, icon, description }: Integrati
<div className="w-10 h-10 relative bg-white border rounded-md flex items-center justify-center">
{icon()}
</div>
- <div className="grow basis-0 w-full flex flex-col justify-between items-start gap-y-2">
+ <div className="grow basis-0 w-full flex flex-col justify-between items-start gap-y-2 relative">
<div className="flex-col justify-start items-start gap-y-0.5 flex">
<div className="flex items-center gap-x-2">
<p className="text-foreground text-sm">{name}</p>
@@ -49,9 +59,17 @@ export const IntegrationCard = ({ id, beta, name, icon, description }: Integrati
</div>
<p className="text-foreground-light text-xs">{description}</p>
</div>
- <Badge className="bg-opacity-100 bg-surface-300 flex items-center gap-x-1.5">
- <span>Official</span>
- </Badge>
+ <div className="flex items-center gap-x-4">
+ <Badge className="bg-opacity-100 bg-surface-300 flex items-center gap-x-1.5">
+ <span>Official</span>
+ </Badge>
+ {isInstalled && (
+ <div className="flex items-center gap-x-1">
+ <BadgeCheck size={14} className="text-brand-600" />
+ <span className=" text-brand-600 text-xs">Installed</span>
+ </div>
+ )}
+ </div>
</div>
</div>
</Link>
diff --git a/apps/studio/components/interfaces/Integrations/Landing/Integrations.constants.tsx b/apps/studio/components/interfaces/Integrations/Landing/Integrations.constants.tsx
index 7d84094de0a..f016a84e281 100644
--- a/apps/studio/components/interfaces/Integrations/Landing/Integrations.constants.tsx
+++ b/apps/studio/components/interfaces/Integrations/Landing/Integrations.constants.tsx
@@ -226,8 +226,8 @@ const supabaseIntegrations: IntegrationDefinition[] = [
},
{
id: 'webhooks',
- type: 'custom' as const,
- name: `Webhooks`,
+ type: 'postgres_extension' as const,
+ name: `Database Webhooks`,
icon: ({ className, ...props } = {}) => (
<Webhook className={cn('inset-0 p-2 text-black w-full h-full', className)} {...props} />
),
@@ -276,7 +276,7 @@ const supabaseIntegrations: IntegrationDefinition[] = [
id: 'graphiql',
type: 'postgres_extension' as const,
requiredExtensions: ['pg_graphql'],
- name: `GraphiQL`,
+ name: `GraphQL`,
icon: ({ className, ...props } = {}) => (
<Image
fill
diff --git a/apps/studio/pages/project/[ref]/integrations/[id]/[pageId]/[childId]/index.tsx b/apps/studio/pages/project/[ref]/integrations/[id]/[pageId]/[childId]/index.tsx
index e25dc2980fe..99f17904eb3 100644
--- a/apps/studio/pages/project/[ref]/integrations/[id]/[pageId]/[childId]/index.tsx
+++ b/apps/studio/pages/project/[ref]/integrations/[id]/[pageId]/[childId]/index.tsx
@@ -53,7 +53,7 @@ const IntegrationPage: NextPageWithLayout = () => {
return <div>Integration not found</div>
}
- if (!Component) return <div>Component not found</div>
+ if (!Component) return <div className="p-10 text-sm">Component not found</div>
return <Component />
}
diff --git a/apps/studio/pages/project/[ref]/integrations/[id]/[pageId]/index.tsx b/apps/studio/pages/project/[ref]/integrations/[id]/[pageId]/index.tsx
index e25dc2980fe..99f17904eb3 100644
--- a/apps/studio/pages/project/[ref]/integrations/[id]/[pageId]/index.tsx
+++ b/apps/studio/pages/project/[ref]/integrations/[id]/[pageId]/index.tsx
@@ -53,7 +53,7 @@ const IntegrationPage: NextPageWithLayout = () => {
return <div>Integration not found</div>
}
- if (!Component) return <div>Component not found</div>
+ if (!Component) return <div className="p-10 text-sm">Component not found</div>
return <Component />
}
diff --git a/apps/studio/pages/project/[ref]/integrations/[id]/index.tsx b/apps/studio/pages/project/[ref]/integrations/[id]/index.tsx
index e25dc2980fe..99f17904eb3 100644
--- a/apps/studio/pages/project/[ref]/integrations/[id]/index.tsx
+++ b/apps/studio/pages/project/[ref]/integrations/[id]/index.tsx
@@ -53,7 +53,7 @@ const IntegrationPage: NextPageWithLayout = () => {
return <div>Integration not found</div>
}
- if (!Component) return <div>Component not found</div>
+ if (!Component) return <div className="p-10 text-sm">Component not found</div>
return <Component />
}