The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: update banner and layouts for smaller screens
Jonathan Summers-Muir6d6c699f46b2
diff --git a/studio/components/interfaces/Functions/Functions.constants.ts b/studio/components/interfaces/Functions/Functions.constants.tsindex 5f8be838045..5941f7457f5 100644--- a/studio/components/interfaces/Functions/Functions.constants.ts+++ b/studio/components/interfaces/Functions/Functions.constants.ts@@ -1,4 +1,4 @@export const WARNING_MESSAGE = {- title: ' Supabase Functions is pre release',- description: 'Functions are currently experimental, and will be prone to breaking changes',+ title: ' Functions is pre release',+ description: 'Functions are experimental and will be prone to breaking changes',}diff --git a/studio/components/interfaces/Functions/FunctionsLayout.tsx b/studio/components/interfaces/Functions/FunctionsLayout.tsxindex a539500390c..19e745a2890 100644--- a/studio/components/interfaces/Functions/FunctionsLayout.tsx+++ b/studio/components/interfaces/Functions/FunctionsLayout.tsx@@ -35,10 +35,10 @@ const PageLayout = ({ children, centered }: { children?: React.ReactNode; centerreturn (<BaseLayout>- <WarningBanner title={WARNING_MESSAGE.title} description={WARNING_MESSAGE.description} />{centered ? (<>- <div className="mx-auto max-w-5xl py-32 px-5">+ <WarningBanner title={WARNING_MESSAGE.title} description={WARNING_MESSAGE.description} />+ <div className="mx-auto max-w-5xl py-24 px-5"><div className="flex items-center gap-3"><divclassName="w-6 h-6 bg-brand-300 border border-brand-600 rounded text-brand-900@@ -54,63 +54,78 @@ const PageLayout = ({ children, centered }: { children?: React.ReactNode; center</div></>) : (- <div className="h-full flex flex-col flex-grow py-10">+ <div className="h-full flex flex-col flex-grow py-6"><divclassName="w-full mx-autotransition-all+ flex flex-colpx-5- lg:px-20+ lg:px-16xl:px-241xl:px-282xl:px-32- flex flex-col- gap-8+ gap-4">- <div className="flex items-center gap-3">- <div- className="w-6 h-6 bg-brand-300 border border-brand-600 rounded text-brand-900+ <div+ className="flex+ flex-col+ gap-y-4+ xl:flex-row+ item-center+ justify-between"+ >+ <div className="flex items-center gap-3">+ <div+ className="w-6 h-6 bg-brand-300 border border-brand-600 rounded text-brand-900flex items-center justify-center"- >- <IconCode size={14} strokeWidth={3} />- </div>- <Link href={`/project/${ref}/functions`}>- <h1- className="+ >+ <IconCode size={14} strokeWidth={3} />+ </div>+ <Link href={`/project/${ref}/functions`}>+ <h1+ className="transition-colorstext-2xl text-scale-1200cursor-pointerhover:text-scale-1100"- >- Functions- </h1>- </Link>-- {name && (- <>- <span className="text-scale-800 dark:text-scale-700">- <svg- viewBox="0 0 24 24"- width="16"- height="16"- stroke="currentColor"- strokeWidth="1"- strokeLinecap="round"- strokeLinejoin="round"- fill="none"- shapeRendering="geometricPrecision"- >- <path d="M16 3.549L7.12 20.600"></path>- </svg>- </span>- <h5 className="text-2xl text-scale-1200">{name}</h5>- </>- )}+ >+ Functions+ </h1>+ </Link>++ {name && (+ <>+ <span className="text-scale-800 dark:text-scale-700">+ <svg+ viewBox="0 0 24 24"+ width="16"+ height="16"+ stroke="currentColor"+ strokeWidth="1"+ strokeLinecap="round"+ strokeLinejoin="round"+ fill="none"+ shapeRendering="geometricPrecision"+ >+ <path d="M16 3.549L7.12 20.600"></path>+ </svg>+ </span>+ <h5 className="text-2xl text-scale-1200">{name}</h5>+ </>+ )}+ </div>+ <div>+ <WarningBanner+ title={WARNING_MESSAGE.title}+ description={WARNING_MESSAGE.description}+ />+ </div></div>{item && <FunctionsNav item={item} />}</div>@@ -124,10 +139,12 @@ const PageLayout = ({ children, centered }: { children?: React.ReactNode; centertransition-allpx-5- lg:px-20+ lg:px-16xl:px-241xl:px-282xl:px-32++ gap-4">{children}diff --git a/studio/components/layouts/LogsExplorerLayout/LogsExplorerLayout.tsx b/studio/components/layouts/LogsExplorerLayout/LogsExplorerLayout.tsxindex cbf99c9a405..67572ad3c8b 100644--- a/studio/components/layouts/LogsExplorerLayout/LogsExplorerLayout.tsx+++ b/studio/components/layouts/LogsExplorerLayout/LogsExplorerLayout.tsx@@ -28,23 +28,21 @@ const PageLayout = ({return (<BaseLayout>- <div className="h-full flex flex-col flex-grow">+ <div className="h-full flex flex-col flex-grow py-6"><divclassName="- pt-10- pb-2w-full mx-autotransition-all+ flex flex-colpx-5- lg:px-20+ lg:px-16xl:px-241xl:px-282xl:px-32- flex flex-col- gap-8+ gap-4"><div className="flex items-center gap-3">@@ -66,11 +64,14 @@ const PageLayout = ({h-full flex flex-col flex-groww-full mx-autotransition-all+px-5- lg:px-20+ lg:px-16xl:px-241xl:px-282xl:px-32++ gap-4">{children}diff --git a/studio/components/ui/WarningBanner.tsx b/studio/components/ui/WarningBanner.tsxindex fe5ff13fa9d..26079d95775 100644--- a/studio/components/ui/WarningBanner.tsx+++ b/studio/components/ui/WarningBanner.tsx@@ -2,14 +2,14 @@ import { IconAlertCircle } from '@supabase/ui'const WarningBanner = ({ title, description }: { title: string; description: string }) => {return (- <div className="bg-yellow-900 px-6 py-4">- <div className="flex gap-3">+ <div className="rounded bg-yellow-900 px-6 py-3">+ <div className="flex flex-row gap-4"><div className="mt-1 text-yellow-1100 dark:text-yellow-800"><IconAlertCircle size={14} strokeWidth={2} /></div>- <div className="flex flex-col lg:flex-row lg:items-center lg:gap-3">- <h1 className="text-base text-scale-1200 dark:text-scale-100">{title}</h1>- <p className="text-sm text-yellow-1100 dark:text-yellow-800">{description}</p>+ <div className="flex flex-col xl:flex-row gap-x-3 items-start xl:items-center">+ <h1 className="text-sm text-scale-1200 dark:text-scale-100">{title}</h1>+ <p className="text-xs text-yellow-1200 dark:text-yellow-800">{description}</p></div></div></div>diff --git a/studio/pages/project/[ref]/functions/[id]/details.tsx b/studio/pages/project/[ref]/functions/[id]/details.tsxindex 1825abd5fc6..2f1081666c8 100644--- a/studio/pages/project/[ref]/functions/[id]/details.tsx+++ b/studio/pages/project/[ref]/functions/[id]/details.tsx@@ -96,88 +96,90 @@ const PageLayout = () => {return (<FunctionsLayout>- <div className="grid gap-y-12 lg:grid-cols-2 lg:gap-x-16">+ <div className="grid gap-y-4 lg:grid-cols-2 lg:gap-x-8"><div><divclassName="- px-12 py-8 bg-scale-100 dark:bg-scale-300 rounded border drop-shadow-sm+ px-10 py-8 bg-scale-100 dark:bg-scale-300 rounded border drop-shadow-sm">- {console.log('inside the render', functions.byId(id))}- <div>{selectedFunction?.createdAt}</div>-- <div className="space-y-4">- <div>- <span className="block text-scale-900 text-xs mb-1">Function name</span>- <div className="text-base text-scale-1100">{selectedFunction?.name}</div>+ <div className="space-y-4 w-full">+ <div className="grid grid-cols-3">+ <span className="block text-scale-1000 text-sm mb-1">Function name</span>+ <div className="text-base text-scale-1200">{selectedFunction?.name}</div></div>- <div>- <span className="block text-scale-900 text-xs mb-1">Status</span>- <div className="flex items-center gap-2">- <div- className="text-base bg-brand-300 dark:bg-brand-100 px-3 py-0.5 rounded-full lowercasefirst-letter:- flex items-center gap-3 lowercase text-brand-900+ <div className="grid grid-cols-3">+ <span className="block text-scale-1000 text-sm mb-1">Status</span>+ <div className="flex flex-col gap-2 col-span-2">+ <div className="flex">+ <div+ className="+ text-base bg-brand-300 dark:bg-brand-100 px-3 py-0.5 rounded-full lowercasefirst-letter+ flex flex-row items-center gap-3 lowercase text-brand-900"- >- {selectedFunction?.status}- <div className="relative w-2 h-2">- <span className="flex h-2 w-2">- <span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-brand-800 opacity-75"></span>- <span className="relative inline-flex rounded-full h-2 w-2 bg-brand-900"></span>- </span>+ >+ {selectedFunction?.status}+ <div className="relative w-2 h-2">+ <span className="flex h-2 w-2">+ <span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-brand-800 opacity-75"></span>+ <span className="relative inline-flex rounded-full h-2 w-2 bg-brand-900"></span>+ </span>+ </div></div></div>- <span className="text-xs text-scale-900">This function is running correctly</span>+ <span className="text-sm text-scale-900">This function is running correctly</span></div></div>- <div>- <span className="block text-scale-900 text-xs mb-1">Endpoint url</span>- <Link- href={`https://${ref}.functions.supabase.co/${selectedFunction?.slug}`}- passHref- >- <a- className="flex items-center gap-2 group text-scale-1100 hover:text-scale-1200"- target="_target"+ <div className="grid grid-cols-3">+ <span className="block text-scale-1000 text-sm mb-1 cols-span-1">Endpoint url</span>+ <div className="col-span-2">+ <Link+ href={`https://${ref}.functions.supabase.co/${selectedFunction?.slug}`}+ passHref>- <span className="underline">{`https://${ref}.functions.supabase.co/${selectedFunction?.slug}`}</span>- <IconExternalLink size={14} />- </a>- </Link>+ <a className="group text-scale-1100 hover:text-scale-1200" target="_target">+ <span className="underline break-words w-full">{`https://${ref}.functions.supabase.co/${selectedFunction?.slug}`}</span>+ </a>+ </Link>+ </div></div>- <div>- <span className="block text-scale-900 text-xs mb-1">Created at</span>- <div className="text-base text-scale-1100">+ <div className="grid grid-cols-3">+ <span className="block text-scale-1000 text-sm mb-1">Created at</span>+ <div className="text-base text-scale-1200 col-span-2">{selectedFunction?.created_at &&dayjs(selectedFunction.created_at).format('dddd, MMMM D, YYYY h:mm A')}</div></div>- <div>- <span className="block text-scale-900 text-xs mb-1">Updated at</span>- <div className="text-base text-scale-1100">+ <div className="grid grid-cols-3">+ <span className="block text-scale-1000 text-sm mb-1">Updated at</span>+ <div className="text-base text-scale-1200 col-span-2">{selectedFunction?.updated_at &&dayjs(selectedFunction.updated_at).format('dddd, MMMM D, YYYY h:mm A')}</div></div>- <div>- <span className="block text-scale-900 text-xs mb-1">Version</span>- <div className="text-base text-scale-1100">v {selectedFunction?.version}</div>+ <div className="grid grid-cols-3">+ <span className="block text-scale-1000 text-sm mb-1">Version</span>+ <div className="text-base text-scale-1200 col-span-2">+ v{selectedFunction?.version}+ </div></div>- <div>- <span className="block text-scale-900 text-xs mb-1">Regions</span>- <div className="flex items-center gap-3">- <div className="text-base text-scale-1100 flex items-center gap-2">+ <div className="grid grid-cols-3">+ <span className="block text-scale-1000 text-sm mb-1">Regions</span>+ <div className="flex flex-col gap-1 col-span-2">+ <div className="text-base text-scale-1200 flex items-center gap-2"><IconGlobe /><span>Earth</span></div>- <span className="text-xs text-scale-900">Supabase functions run on the edge</span>+ <span className="text-sm text-scale-1000">+ All functions are deployed globally+ </span></div></div></div>@@ -185,7 +187,7 @@ const PageLayout = () => {</div><div><div- className="px-12 py-8+ className="px-10 py-8bg-scale-100 dark:bg-scale-300 border drop-shadow-smroundedspace-y-6"diff --git a/studio/pages/project/[ref]/functions/index.tsx b/studio/pages/project/[ref]/functions/index.tsxindex c07a15bd1f8..7d400ad2a1d 100644--- a/studio/pages/project/[ref]/functions/index.tsx+++ b/studio/pages/project/[ref]/functions/index.tsx@@ -147,12 +147,11 @@ const EmptyFunctions = () => {const FunctionsList = ({ functions }: { functions: Function[] }) => {return (<>- <div className="flex flex-col gap-3 py-12">+ <div className="flex flex-col gap-3 py-6"><div className="flex justify-between items-center"><span className="text-sm text-scale-900">{`${functions.length} function${functions.length > 1 ? 's' : ''} deployed`}</span>- <Input icon={<IconSearch size={14} />} size="tiny" /></div><div><Table