From ad2f4e4f81bd3bb0dad2b041fb58a1ff6be6ea95 Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Mon, 2 Feb 2026 16:20:38 +0800 Subject: [PATCH] Update copywriting for database replication if flag is on --- .../Database/Replication/ComingSoon.tsx | 14 +++++++--- .../Database/Replication/Destinations.tsx | 26 +++++++++++-------- .../Infrastructure/InfrastructureActivity.tsx | 17 +++++------- .../[ref]/database/replication/index.tsx | 7 ++--- 4 files changed, 36 insertions(+), 28 deletions(-) diff --git a/apps/studio/components/interfaces/Database/Replication/ComingSoon.tsx b/apps/studio/components/interfaces/Database/Replication/ComingSoon.tsx index cfcca53a244..0816a5cd1fe 100644 --- a/apps/studio/components/interfaces/Database/Replication/ComingSoon.tsx +++ b/apps/studio/components/interfaces/Database/Replication/ComingSoon.tsx @@ -3,10 +3,13 @@ import { useTheme } from 'next-themes' import Link from 'next/link' import { useMemo } from 'react' import ReactFlow, { Background, Handle, Position, ReactFlowProvider } from 'reactflow' + import 'reactflow/dist/style.css' +import { useParams } from 'common' import { BASE_PATH } from 'lib/constants' import { Button, Card, CardContent } from 'ui' + import { NODE_WIDTH } from '../../Settings/Infrastructure/InfrastructureConfiguration/InstanceConfiguration.constants' const STATIC_NODES = [ @@ -61,22 +64,25 @@ const STATIC_EDGES = [ { id: 'e1-4', source: '1', target: '4', type: 'smoothstep', animated: true }, ] -export const ReplicationComingSoon = ({ projectRef }: { projectRef: string }) => { +export const ReplicationComingSoon = () => { return ( - + ) } -const ReplicationStaticMockup = ({ projectRef }: { projectRef: string }) => { +const ReplicationStaticMockup = () => { + const { ref: projectRef = '_' } = useParams() const nodes = useMemo(() => STATIC_NODES, []) const edges = useMemo(() => STATIC_EDGES, []) const { resolvedTheme } = useTheme() const backgroundPatternColor = - resolvedTheme === 'dark' ? 'rgba(255, 255, 255, 0.3)' : 'rgba(0, 0, 0, 0.4)' + resolvedTheme === 'dark' && projectRef !== '_' + ? 'rgba(255, 255, 255, 0.3)' + : 'rgba(0, 0, 0, 0.4)' const nodeTypes = useMemo( () => ({ diff --git a/apps/studio/components/interfaces/Database/Replication/Destinations.tsx b/apps/studio/components/interfaces/Database/Replication/Destinations.tsx index 6d1f0fa32e9..779e26ce868 100644 --- a/apps/studio/components/interfaces/Database/Replication/Destinations.tsx +++ b/apps/studio/components/interfaces/Database/Replication/Destinations.tsx @@ -1,8 +1,4 @@ import { useQueryClient } from '@tanstack/react-query' -import { Plus, Search, X } from 'lucide-react' -import { useEffect, useRef, useState } from 'react' - -import { useReadReplicasQuery } from '@/data/read-replicas/replicas-query' import { useFlag, useParams } from 'common' import { AlertError } from 'components/ui/AlertError' import { DocsButton } from 'components/ui/DocsButton' @@ -13,26 +9,30 @@ import { useReplicationPipelinesQuery } from 'data/replication/pipelines-query' import { useReplicationSourcesQuery } from 'data/replication/sources-query' import { useCheckEntitlements } from 'hooks/misc/useCheckEntitlements' import { DOCS_URL } from 'lib/constants' +import { Plus, Search, X } from 'lucide-react' +import { useEffect, useRef, useState } from 'react' import { Button, Card, CardContent, - cn, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, + cn, } from 'ui' import { GenericSkeletonLoader } from 'ui-patterns' import { Input } from 'ui-patterns/DataInputs/Input' + import { REPLICA_STATUS } from '../../Settings/Infrastructure/InfrastructureConfiguration/InstanceConfiguration.constants' import { DestinationPanel } from './DestinationPanel/DestinationPanel' import { DestinationRow } from './DestinationRow' import { EnableReplicationCallout } from './EnableReplicationCallout' import { PIPELINE_ERROR_MESSAGES } from './Pipeline.utils' import { ReadReplicaRow } from './ReadReplicas/ReadReplicaRow' +import { useReadReplicasQuery } from '@/data/read-replicas/replicas-query' export const Destinations = () => { const queryClient = useQueryClient() @@ -281,14 +281,18 @@ export const Destinations = () => { className={cn( 'w-full', 'border border-dashed bg-surface-100 border-overlay', - 'flex flex-col px-10 rounded-lg justify-center items-center py-8 mt-4' + 'flex flex-col px-16 rounded-lg justify-center items-center py-8 mt-4' )} > -

Create your first destination

-

- Destinations are external platforms where your database changes are automatically - sent. Connect to various data warehouses and analytics platforms to enable real-time - data pipelines. +

+ {unifiedReplication + ? 'Replication keeps your data in sync across systems' + : 'Create your first destination'} +

+

+ {unifiedReplication + ? 'Deploy read replicas for lower latency and better resource management, or capture database changes to external platforms for real-time data pipelines.' + : 'Destinations are external platforms where your database changes are automatically sent. Connect to various data warehouses and analytics platforms to enable real-time data pipelines.'}