The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore(studio): clarify smart region selector (#39918)
Danny Whiteb3852a391be4
diff --git a/apps/docs/content/guides/platform/regions.mdx b/apps/docs/content/guides/platform/regions.mdxindex 594e3f80cbf..fc46be89e6b 100644--- a/apps/docs/content/guides/platform/regions.mdx+++ b/apps/docs/content/guides/platform/regions.mdx@@ -1,18 +1,19 @@---title: Available regions-subtitle: Spin up Supabase projects in our global regions----The following regions are available for your Supabase projects.+Each Supabase project is deployed to one primary region. Choose the location closest to your users for the best performance.-## Smart region selection+## General regions-Smart Region Selection is a feature that allows you to select from a list of broader regions. Optimizations are made to ensure that the selected region has compute capacity availability.+For most projects, we recommend choosing a general region. Supabase will deploy your project to an available AWS region within that area based on current infrastructure capacity.<SmartRegionsList />-Currently, smart region selection is not available for read replicas and project-related operations via the management API.+Note: General regions aren’t yet supported for read replicas or management via the API.-## AWS+## Specific regions++If you prefer, you can choose an exact AWS region for your project.<RegionsList />diff --git a/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx b/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsxindex d7578686bc4..e793ecfc5a9 100644--- a/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx+++ b/apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx@@ -38,6 +38,14 @@ interface RegionSelectorProps {// I tried using https://flagpack.xyz/docs/development/react/ but couldn't get it to render// ^ can try again next time+// Map backend region names to user-friendly display names+const getDisplayNameForSmartRegion = (name: string): string => {+ if (name === 'APAC') {+ return 'Asia-Pacific'+ }+ return name+}+export const RegionSelector = ({form,instanceSize,@@ -149,7 +157,9 @@ export const RegionSelector = ({/>)}<span className="text-foreground">- {selectedRegion?.name ?? field.value}+ {selectedRegion?.name+ ? getDisplayNameForSmartRegion(selectedRegion.name)+ : field.value}</span></div>)}@@ -159,7 +169,7 @@ export const RegionSelector = ({{smartRegionEnabled && (<><SelectGroup_Shadcn_>- <SelectLabel_Shadcn_>Smart Region Selection</SelectLabel_Shadcn_>+ <SelectLabel_Shadcn_>General regions</SelectLabel_Shadcn_>{smartRegions.map((value) => {return (<SelectItem_Shadcn_@@ -174,7 +184,9 @@ export const RegionSelector = ({className="w-5 rounded-sm"src={`${BASE_PATH}/img/regions/${value.code}.svg`}/>- <span className="text-foreground">{value.name}</span>+ <span className="text-foreground">+ {getDisplayNameForSmartRegion(value.name)}+ </span></div><div>@@ -194,7 +206,7 @@ export const RegionSelector = ({)}<SelectGroup_Shadcn_>- <SelectLabel_Shadcn_>All Regions</SelectLabel_Shadcn_>+ <SelectLabel_Shadcn_>Specific regions</SelectLabel_Shadcn_>{regionOptions.map((value) => {return (<SelectItem_Shadcn_