The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
remove globe in onboarding (#33021)
Saxon Fletcher79e656f735a7
diff --git a/apps/studio/components/interfaces/ProjectCreation/ProjectVisual.tsx b/apps/studio/components/interfaces/ProjectCreation/ProjectVisual.tsxindex e0fede711fe..a2bd9b7b8ea 100644--- a/apps/studio/components/interfaces/ProjectCreation/ProjectVisual.tsx+++ b/apps/studio/components/interfaces/ProjectCreation/ProjectVisual.tsx@@ -78,7 +78,7 @@ export const ProjectVisual = memo(key="info"variants={variants}transition={{- duration: 1.25,+ duration: 0.3,ease: 'easeInOut',}}className={`hidden lg:block absolute z-30 p-4 bg-surface-100 min-w-80 rounded-lg border shadow-lg`}@@ -156,65 +156,15 @@ export const ProjectVisual = memo(</TooltipProvider></motion.div>)}- <motion.div- layout- layoutId="globe"- className="hidden lg:block absolute z-10 pointer-events-none aspect-square right-0"- initial={{- scale: showInfo ? '100%' : '95%',- x: showInfo ? '0%' : '10%',- opacity: showInfo ? 1 : 0.3,- width: sqlStatements.length > 0 ? '60%' : '100%',- top: sqlStatements.length > 0 ? '0' : '50%',- y: sqlStatements.length > 0 ? '-35%' : '-50%',- }}- animate={{- scale: showInfo ? '100%' : '90%',- x: showInfo ? (sqlStatements.length > 0 ? '20%' : '0%') : '10%',- opacity: showInfo ? 1 : 0.3,- width: sqlStatements.length > 0 ? '50%' : '100%',- top: sqlStatements.length > 0 ? '0' : '50%',- y: sqlStatements.length > 0 ? '-35%' : '-50%',- }}- transition={{- duration: 1.25,- ease: 'easeInOut',- }}- >- <div className="absolute inset-[10%] bg-background-200 rounded-full" />- <div- className="absolute inset-0"- style={{ maskImage: 'linear-gradient(to top right, black, transparent 50%)' }}- >- <Globe- currentLocation={- showInfo && selectedRegion?.location- ? [selectedRegion.location.latitude, selectedRegion.location.longitude]- : undefined- }- markers={[- ...Object.values(AWS_REGIONS).map(- (region) => region.location as [number, number]- ),- ...Object.values(FLY_REGIONS).map(- (region) => region.location as [number, number]- ),- ]}- />- </div>- </motion.div>-<AnimatePresence>- {sqlStatements.length > 0 && (- <motion.div- initial={{ opacity: 0, scale: 1.05 }}- animate={{ opacity: 1, scale: 1, transition: { delay: 1 } }}- exit={{ opacity: 0 }}- className="h-full z-20"- >- <SchemaVisualizer sqlStatements={sqlStatements} className="h-full z-20" />- </motion.div>- )}+ <motion.div+ initial={{ opacity: 0, scale: 1.05 }}+ animate={{ opacity: 1, scale: 1, transition: { delay: 1 } }}+ exit={{ opacity: 0 }}+ className={`h-full z-20 ${sqlStatements.length === 0 ? 'pointer-events-none' : ''}`}+ >+ <SchemaVisualizer sqlStatements={sqlStatements} className="h-full z-20" />+ </motion.div></AnimatePresence></div></div>diff --git a/apps/studio/components/interfaces/ProjectCreation/SchemaFlow.tsx b/apps/studio/components/interfaces/ProjectCreation/SchemaFlow.tsxindex 67f65b416af..31ffdc8d702 100644--- a/apps/studio/components/interfaces/ProjectCreation/SchemaFlow.tsx+++ b/apps/studio/components/interfaces/ProjectCreation/SchemaFlow.tsx@@ -76,7 +76,7 @@ export const SchemaFlow = ({ nodes: initialNodes, edges: initialEdges }: SchemaF><Backgroundgap={16}- className="[&>*]:stroke-foreground-muted opacity-[25%]"+ className="[&>*]:stroke-foreground-muted opacity-[50%]"variant={BackgroundVariant.Dots}color={'inherit'}/>diff --git a/apps/studio/components/interfaces/SchemaVisualizer/index.tsx b/apps/studio/components/interfaces/SchemaVisualizer/index.tsxindex 4e14e3bc8d9..434cb599e6f 100644--- a/apps/studio/components/interfaces/SchemaVisualizer/index.tsx+++ b/apps/studio/components/interfaces/SchemaVisualizer/index.tsx@@ -69,11 +69,13 @@ export const SchemaVisualizer = ({ sqlStatements, className }: SchemaVisualizerPif (sqlStatements.length === 0) {setNodes([])setEdges([])- executedStatements.current.clear()- // Reset database- db.current = new PGlite()- // Re-run initial auth schema setup- db.current.exec(AUTH_SCHEMA_SQL)+ if (executedStatements.current.size) {+ executedStatements.current.clear()+ // Reset database+ db.current = new PGlite()+ // Re-run initial auth schema setup+ db.current.exec(AUTH_SCHEMA_SQL)+ }return}diff --git a/apps/studio/pages/new/[slug].tsx b/apps/studio/pages/new/[slug].tsxindex 95ec252499b..58b5a0d8e56 100644--- a/apps/studio/pages/new/[slug].tsx+++ b/apps/studio/pages/new/[slug].tsx@@ -38,6 +38,7 @@ import {ProjectCreateVariables,useProjectCreateMutation,} from 'data/projects/project-create-mutation'+import { TelemetryActions } from 'common/telemetry-constants'import { useProjectsQuery } from 'data/projects/projects-query'import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query'import { useCheckPermissions } from 'hooks/misc/useCheckPermissions'@@ -81,6 +82,7 @@ import { Input } from 'ui-patterns/DataInputs/Input'import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'import { InfoTooltip } from 'ui-patterns/info-tooltip'import { useAvailableOrioleImageVersion } from 'data/config/project-creation-postgres-versions-query'+import { useSendEventMutation } from 'data/telemetry/send-event-mutation'type DesiredInstanceSize = components['schemas']['DesiredInstanceSize']@@ -134,6 +136,8 @@ const Wizard: NextPageWithLayout = () => {const router = useRouter()const { slug, projectName } = useParams()+ const { mutate: sendEvent } = useSendEventMutation()+const projectCreationDisabled = useFlag('disableProjectCreationAndUpdate')const projectVersionSelectionDisabled = useFlag('disableProjectVersionSelection')const cloudProviderEnabled = useFlag('enableFlyCloudProvider')@@ -194,6 +198,9 @@ const Wizard: NextPageWithLayout = () => {isSuccess: isSuccessNewProject,} = useProjectCreateMutation({onSuccess: (res) => {+ sendEvent({+ action: TelemetryActions.PROJECT_CREATION_SIMPLE_VERSION_SUBMITTED,+ })router.push(`/project/${res.ref}/building`)},})diff --git a/packages/common/telemetry-constants.ts b/packages/common/telemetry-constants.tsindex 218d3e94028..db784607bef 100644--- a/packages/common/telemetry-constants.ts+++ b/packages/common/telemetry-constants.ts@@ -26,6 +26,7 @@ export enum TelemetryActions {FEATURE_PREVIEW_ENABLED = 'feature_preview_enabled',FEATURE_PREVIEW_DISABLED = 'feature_preview_disabled',+ PROJECT_CREATION_SIMPLE_VERSION_SUBMITTED = 'project_creation_simple_version_submitted',PROJECT_CREATION_INITIAL_STEP_PROMPT_INTENDED = 'project_creation_initial_step_prompt_intended',PROJECT_CREATION_INITIAL_STEP_SUBMITTED = 'project_creation_initial_step_submitted',PROJECT_CREATION_SECOND_STEP_PROMPT_INTENDED = 'project_creation_second_step_prompt_intended',@@ -304,6 +305,17 @@ export interface FeaturePreviewDisabledEvent {}}+/**+ * Existing project creation form was submitted and the project was created.+ *+ * @group Events+ * @source studio+ * @page new/{slug}+ */+export interface ProjectCreationSimpleVersionSubmittedEvent {+ action: TelemetryActions.PROJECT_CREATION_SIMPLE_VERSION_SUBMITTED+}+/*** On the InitialStep.tsx screen, where user can chose to prompt, start blank or migrate, at least 5 characters were typed* in the prompt textarea indicating an intention to use the prompt.@@ -865,6 +877,7 @@ export type TelemetryEvent =| FeaturePreviewsClickedEvent| FeaturePreviewEnabledEvent| FeaturePreviewDisabledEvent+ | ProjectCreationSimpleVersionSubmittedEvent| ProjectCreationInitialStepPromptIntendedEvent| ProjectCreationInitialStepSubmittedEvent| ProjectCreationSecondStepPromptIntendedEvent