Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Add docs to compute add ons and improve scroll width of add ons

Joshen Lim5312b8bcc5d6
diff --git a/studio/components/interfaces/Billing/AddOns/ComputeSizeSelection.tsx b/studio/components/interfaces/Billing/AddOns/ComputeSizeSelection.tsx
index 1b5262cc216..080b518db15 100644
--- a/studio/components/interfaces/Billing/AddOns/ComputeSizeSelection.tsx
+++ b/studio/components/interfaces/Billing/AddOns/ComputeSizeSelection.tsx
@@ -1,6 +1,6 @@
import { FC } from 'react'
import Link from 'next/link'
-import { Badge, Button, Radio } from 'ui'
+import { Badge, Button, IconExternalLink, Radio } from 'ui'
import { useFlag, useParams } from 'hooks'
import { getProductPrice } from '../Billing.utils'
@@ -25,14 +25,23 @@ const ComputeSizeSelection: FC<Props> = ({
return (
<div className="space-y-4">
- <div>
- <div className="flex items-center space-x-2">
- <h4 className="text-lg">Database add-ons</h4>
- <Badge color="green">Optional</Badge>
+ <div className="flex items-center justify-between">
+ <div>
+ <div className="flex items-center space-x-2">
+ <h4 className="text-lg">Compute add-ons</h4>
+ <Badge color="green">Optional</Badge>
+ </div>
+ <p className="text-sm text-scale-1100">
+ Choose the database instance size that best fits your needs
+ </p>
</div>
- <p className="text-sm text-scale-1100">
- Choose the database instance size that best fits your needs
- </p>
+ <Link href="https://supabase.com/docs/guides/platform/compute-add-ons">
+ <a target="_blank">
+ <Button type="default" icon={<IconExternalLink strokeWidth={1.5} />}>
+ About compute add-ons
+ </Button>
+ </a>
+ </Link>
</div>
{addonUpdateDisabled ? (
<DisabledWarningDueToIncident title="Updating database add-ons is currently disabled" />
diff --git a/studio/components/interfaces/Billing/EnterpriseUpdate.tsx b/studio/components/interfaces/Billing/EnterpriseUpdate.tsx
index 1755c1dc42e..bf98cd7e4aa 100644
--- a/studio/components/interfaces/Billing/EnterpriseUpdate.tsx
+++ b/studio/components/interfaces/Billing/EnterpriseUpdate.tsx
@@ -184,12 +184,15 @@ const EnterpriseUpdate: FC<Props> = ({
enterTo="transform opacity-100 translate-x-0"
className="flex w-full items-start justify-between"
>
- <div className="2xl:min-w-5xl mx-auto mt-10 px-32">
+ <div className="flex-grow mt-10">
<div className="relative space-y-4">
<div className="space-y-8">
- <h4 className="text-scale-900 text-lg">Change your project's subscription</h4>
+ <div className="space-y-4 2xl:min-w-5xl mx-auto px-32">
+ <h4 className="text-lg text-scale-900 !mb-8">Change your project's subscription</h4>
+ </div>
+
<div
- className="space-y-8 overflow-scroll pb-8"
+ className="space-y-8 overflow-y-auto pb-8 2xl:min-w-5xl mx-auto px-32"
style={{ height: 'calc(100vh - 6.4rem - 57px)' }}
>
<h3 className="text-xl">
diff --git a/studio/components/interfaces/Billing/ProUpgrade.tsx b/studio/components/interfaces/Billing/ProUpgrade.tsx
index 2a9f6134004..7fe2e78c578 100644
--- a/studio/components/interfaces/Billing/ProUpgrade.tsx
+++ b/studio/components/interfaces/Billing/ProUpgrade.tsx
@@ -201,100 +201,101 @@ const ProUpgrade: FC<Props> = ({
enterTo="transform opacity-100 translate-x-0"
className="flex w-full items-start justify-between"
>
- <div className="2xl:min-w-5xl mx-auto mt-10 px-32">
+ <div className="flex-grow mt-10">
<div className="relative space-y-4">
- <BackButton onClick={() => onSelectBack()} />
- <div className="space-y-8">
- <h4 className="text-lg text-scale-900">Change your project's subscription</h4>
- <div
- className="space-y-8 overflow-scroll pb-8"
- style={{ height: 'calc(100vh - 9rem - 57px)' }}
- >
- <div className="space-y-2">
- {!isManagingProSubscription ? (
+ <div className="space-y-4 2xl:min-w-5xl mx-auto px-32">
+ <BackButton onClick={() => onSelectBack()} />
+ <h4 className="text-lg text-scale-900 !mb-8">Change your project's subscription</h4>
+ </div>
+
+ <div
+ className="space-y-8 overflow-y-auto pb-8 2xl:min-w-5xl mx-auto px-32"
+ style={{ height: 'calc(100vh - 9rem - 57px)' }}
+ >
+ <div className="space-y-2">
+ {!isManagingProSubscription ? (
+ <>
+ <h3 className="text-xl">
+ Welcome to <span className="text-brand-900">Pro</span>
+ </h3>
+ <p className="text-base text-scale-1100">
+ Your new subscription will begin immediately after payment
+ </p>
+ </>
+ ) : (
+ <>
+ <h3 className="text-3xl">
+ Managing your <span className="text-brand-900">Pro</span> plan
+ </h3>
+ {/* <p className="text-base text-scale-1100">
+ Your billing cycle will reset after payment
+ </p> */}
+ </>
+ )}
+ </div>
+ <div className="flex items-center justify-between gap-16 rounded border border-panel-border-light border-panel-border-dark bg-panel-body-light px-6 py-4 drop-shadow-sm dark:bg-panel-body-dark">
+ <div>
+ <div className="flex items-center space-x-2">
+ <p>Enable spend cap</p>
+ <IconHelpCircle
+ size={16}
+ strokeWidth={1.5}
+ className="cursor-pointer opacity-50 transition hover:opacity-100"
+ onClick={() => setShowSpendCapHelperModal(true)}
+ />
+ </div>
+ <p className="text-sm text-scale-1100">
+ If enabled, additional resources will not be charged on a per-usage basis
+ </p>
+ </div>
+ <Toggle
+ checked={isSpendCapEnabled}
+ onChange={() => setIsSpendCapEnabled(!isSpendCapEnabled)}
+ />
+ </div>
+ {projectRegion !== 'af-south-1' && (
+ <>
+ {currentAddons.supportPlan !== undefined && (
<>
- <h3 className="text-xl">
- Welcome to <span className="text-brand-900">Pro</span>
- </h3>
- <p className="text-base text-scale-1100">
- Your new subscription will begin immediately after payment
- </p>
+ <Divider light />
+ <SupportPlan currentOption={currentAddons.supportPlan} />
</>
- ) : (
+ )}
+ {isCustomDomainsEnabled && customDomainOptions.length > 0 && (
<>
- <h3 className="text-3xl">
- Managing your <span className="text-brand-900">Pro</span> plan
- </h3>
- {/* <p className="text-base text-scale-1100">
- Your billing cycle will reset after payment
- </p> */}
+ <Divider light />
+ <CustomDomainSelection
+ options={customDomainOptions}
+ currentOption={
+ isManagingProSubscription ? currentAddons.customDomains : undefined
+ }
+ selectedOption={selectedAddons.customDomains}
+ onSelectOption={setSelectedCustomDomainOption}
+ />
</>
)}
- </div>
- <div className="flex items-center justify-between gap-16 rounded border border-panel-border-light border-panel-border-dark bg-panel-body-light px-6 py-4 drop-shadow-sm dark:bg-panel-body-dark">
- <div>
- <div className="flex items-center space-x-2">
- <p>Enable spend cap</p>
- <IconHelpCircle
- size={16}
- strokeWidth={1.5}
- className="cursor-pointer opacity-50 transition hover:opacity-100"
- onClick={() => setShowSpendCapHelperModal(true)}
+ {isPITRSelfServeEnabled && pitrDurationOptions.length > 0 && (
+ <>
+ <Divider light />
+ <PITRDurationSelection
+ pitrDurationOptions={pitrDurationOptions}
+ currentPitrDuration={
+ isManagingProSubscription ? currentAddons.pitrDuration : undefined
+ }
+ selectedPitrDuration={selectedAddons.pitrDuration}
+ onSelectOption={setSelectedPITRDuration}
/>
- </div>
- <p className="text-sm text-scale-1100">
- If enabled, additional resources will not be charged on a per-usage basis
- </p>
- </div>
- <Toggle
- checked={isSpendCapEnabled}
- onChange={() => setIsSpendCapEnabled(!isSpendCapEnabled)}
+ </>
+ )}
+ <Divider light />
+ <ComputeSizeSelection
+ computeSizes={computeSizes || []}
+ currentComputeSize={currentAddons.computeSize}
+ selectedComputeSize={selectedAddons.computeSize}
+ onSelectOption={setSelectedComputeSize}
/>
- </div>
- {projectRegion !== 'af-south-1' && (
- <>
- {currentAddons.supportPlan !== undefined && (
- <>
- <Divider light />
- <SupportPlan currentOption={currentAddons.supportPlan} />
- </>
- )}
- {isCustomDomainsEnabled && customDomainOptions.length > 0 && (
- <>
- <Divider light />
- <CustomDomainSelection
- options={customDomainOptions}
- currentOption={
- isManagingProSubscription ? currentAddons.customDomains : undefined
- }
- selectedOption={selectedAddons.customDomains}
- onSelectOption={setSelectedCustomDomainOption}
- />
- </>
- )}
- {isPITRSelfServeEnabled && pitrDurationOptions.length > 0 && (
- <>
- <Divider light />
- <PITRDurationSelection
- pitrDurationOptions={pitrDurationOptions}
- currentPitrDuration={
- isManagingProSubscription ? currentAddons.pitrDuration : undefined
- }
- selectedPitrDuration={selectedAddons.pitrDuration}
- onSelectOption={setSelectedPITRDuration}
- />
- </>
- )}
- <Divider light />
- <ComputeSizeSelection
- computeSizes={computeSizes || []}
- currentComputeSize={currentAddons.computeSize}
- selectedComputeSize={selectedAddons.computeSize}
- onSelectOption={setSelectedComputeSize}
- />
- </>
- )}
- </div>
+ </>
+ )}
</div>
</div>
</div>