mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 18:05:11 +03:00
Hides the "Multigres" term from user-facing surfaces — it's the tech powering High Availability projects, but "High Availability" is the only term users should see for now (per Slack discussion with Saxon/Ivan). **Changed:** - High Availability badge hover card (project overview) no longer says "Driven by Multigres" - Project creation HA toggle description drops the Multigres name + multigres.com link, keeps the informational copy - All schema dropdowns now hide the `multigres` schema on HA projects, by wiring in the previously-unused `filterSchemasForHighAvailability` helper: - `SchemaSelector` (shared — Table Editor, Functions, Indexes, Triggers, Schema Visualizer, etc.) - `ExposedSchemaSelector` (API settings → exposed schemas) - `EnableExtensionModal`, `CreateIndexSidePanel`, `ForeignKeySelector`, `WrapperTableEditor`, Integrations install sheet `AdvancedSettings` - SQL editor schema autocomplete (`useAddDefinitions`) - Schema list computations in the touched components are now memoized (incl. stabilizing `SchemaSelector`'s `excludedSchemas` default so the memo actually holds) **Added:** - Unit tests for `filterSchemasForHighAvailability` / `resolveHighAvailability` - MSW component test for `SchemaSelector` asserting `multigres` is hidden on HA projects and still shown on non-HA projects The filter is HA-gated on purpose: a self-hosted/non-HA user with their own schema named `multigres` still sees it. The flag-gated Multigres option in Logs is intentionally untouched — that exposure is kept for the Multigres team's debugging (separate track). ## To test - On an HA project (`high_availability: true`): hover the High Availability badge on project overview — no "Multigres" mention; open schema dropdowns in Table Editor / Database pages / SQL editor autocomplete — no `multigres` schema - Project creation with HA entitlement: toggle description has no Multigres wording/link - On a non-HA project: schema dropdowns behave as before <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Improvements** * Made schema dropdowns and related selectors high-availability aware across extensions, indexes, integrations, SQL editing, API exposed schemas, and relationship editors. * Updated project high-availability UI text and badge hover description to remove outdated branding and clarify horizontally scalable Postgres architecture. * **Tests** * Added coverage to ensure the schema “multigres” option is hidden/shown correctly based on high availability, and validated high-availability value handling. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
53 lines
2.1 KiB
TypeScript
53 lines
2.1 KiB
TypeScript
import { ArrowRight } from 'lucide-react'
|
|
import Link from 'next/link'
|
|
import { cn, HoverCard, HoverCardContent, HoverCardTrigger, Separator } from 'ui'
|
|
|
|
import { ServerLightGrid } from './ServerLightGrid'
|
|
import { DOCS_URL } from '@/lib/constants'
|
|
|
|
interface HighAvailabilityBadgeProps {
|
|
size?: 'default' | 'small'
|
|
}
|
|
|
|
export function HighAvailabilityBadge({ size = 'default' }: HighAvailabilityBadgeProps) {
|
|
return (
|
|
<HoverCard openDelay={200} closeDelay={100}>
|
|
<HoverCardTrigger asChild>
|
|
<div
|
|
className={cn(
|
|
'relative inline-flex items-center justify-center overflow-hidden rounded-md text-center font-mono uppercase',
|
|
'cursor-default whitespace-nowrap font-medium tracking-[0.06em] text-[11px] leading-[1.1] px-[5.5px] py-[3px]',
|
|
'transition-all',
|
|
'border border-purple-700 dark:border-purple-600/50',
|
|
'bg-purple-400 text-purple-1100 dark:bg-purple-100'
|
|
)}
|
|
>
|
|
{size === 'small' ? 'HA' : 'High Availability'}
|
|
<span className="animate-badge-shimmer pointer-events-none absolute inset-0 bg-gradient-to-br from-transparent via-white/35 to-transparent blur-md" />
|
|
</div>
|
|
</HoverCardTrigger>
|
|
<HoverCardContent side="bottom" align="start" className="w-72 overflow-hidden p-0">
|
|
<div className="h-24 bg-surface-75">
|
|
<ServerLightGrid />
|
|
</div>
|
|
<Separator />
|
|
<div className="flex flex-col gap-1 p-3 px-5">
|
|
<p className="text-sm text-foreground-light">
|
|
A horizontally scalable Postgres architecture that supports highly-available and
|
|
globally distributed deployments.
|
|
</p>
|
|
<Link
|
|
href={`${DOCS_URL}/guides/deployment/high-availability`}
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
className="mt-1 inline-flex items-center gap-1 text-xs text-foreground-lighter transition-colors hover:text-foreground"
|
|
>
|
|
Read more
|
|
<ArrowRight size={12} strokeWidth={1.5} />
|
|
</Link>
|
|
</div>
|
|
</HoverCardContent>
|
|
</HoverCard>
|
|
)
|
|
}
|