Skip to content

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

chore: improve subscription v2 page

Kevin Grüneberg05a1152edd07
diff --git a/studio/components/interfaces/BillingV2/Subscription/AddOns/AddOns.tsx b/studio/components/interfaces/BillingV2/Subscription/AddOns/AddOns.tsx
index e3106033b67..037943496ac 100644
--- a/studio/components/interfaces/BillingV2/Subscription/AddOns/AddOns.tsx
+++ b/studio/components/interfaces/BillingV2/Subscription/AddOns/AddOns.tsx
@@ -65,7 +65,7 @@ const AddOns = ({}: AddOnsProps) => {
<Link href="https://supabase.com/docs/guides/platform/compute-add-ons">
<a target="_blank" rel="noreferrer">
<div className="flex items-center space-x-2 opacity-50 hover:opacity-100 transition">
- <p className="text-sm">About compute add-ons</p>
+ <p className="text-sm">Compute add-ons</p>
<IconExternalLink size={16} strokeWidth={1.5} />
</div>
</a>
@@ -75,7 +75,7 @@ const AddOns = ({}: AddOnsProps) => {
<Link href="https://supabase.com/docs/guides/platform/backups#point-in-time-recovery">
<a target="_blank" rel="noreferrer">
<div className="flex items-center space-x-2 opacity-50 hover:opacity-100 transition">
- <p className="text-sm">About PITR backups</p>
+ <p className="text-sm">PITR backups</p>
<IconExternalLink size={16} strokeWidth={1.5} />
</div>
</a>
@@ -85,7 +85,17 @@ const AddOns = ({}: AddOnsProps) => {
<Link href="https://supabase.com/docs/guides/platform/custom-domains">
<a target="_blank" rel="noreferrer">
<div className="flex items-center space-x-2 opacity-50 hover:opacity-100 transition">
- <p className="text-sm">About custom domains</p>
+ <p className="text-sm">Custom domains</p>
+ <IconExternalLink size={16} strokeWidth={1.5} />
+ </div>
+ </a>
+ </Link>
+ </div>
+ <div>
+ <Link href="https://supabase.com/docs/guides/database/connecting-to-postgres#connection-pooler">
+ <a target="_blank" rel="noreferrer">
+ <div className="flex items-center space-x-2 opacity-50 hover:opacity-100 transition">
+ <p className="text-sm">Connection Pooler</p>
<IconExternalLink size={16} strokeWidth={1.5} />
</div>
</a>
diff --git a/studio/components/interfaces/BillingV2/Subscription/AddOns/PITRSidePanel.tsx b/studio/components/interfaces/BillingV2/Subscription/AddOns/PITRSidePanel.tsx
index b2fe49b1082..cf11037505e 100644
--- a/studio/components/interfaces/BillingV2/Subscription/AddOns/PITRSidePanel.tsx
+++ b/studio/components/interfaces/BillingV2/Subscription/AddOns/PITRSidePanel.tsx
@@ -179,7 +179,7 @@ const PITRSidePanel = () => {
withIcon
variant="info"
className="mb-4"
- title="Changing your compute size is only available on the Pro plan"
+ title="Changing your Point-In-Time-Recovery is only available on the Pro plan"
actions={
<Button type="default" onClick={() => snap.setPanelKey('subscriptionPlan')}>
View available plans
diff --git a/studio/components/interfaces/BillingV2/Subscription/BillingBreakdown.tsx b/studio/components/interfaces/BillingV2/Subscription/BillingBreakdown.tsx
index 9296e821a56..20e485b4e3f 100644
--- a/studio/components/interfaces/BillingV2/Subscription/BillingBreakdown.tsx
+++ b/studio/components/interfaces/BillingV2/Subscription/BillingBreakdown.tsx
@@ -14,10 +14,11 @@ import { USAGE_APPROACHING_THRESHOLD } from 'lib/constants'
import { formatBytes } from 'lib/helpers'
import { partition } from 'lodash'
import { useState } from 'react'
-import { Alert, Button, Collapsible, IconAlertTriangle, IconChevronRight } from 'ui'
+import { Alert, Button, Collapsible, IconAlertTriangle, IconChevronRight, IconInfo } from 'ui'
import { BILLING_BREAKDOWN_METRICS } from './Subscription.constants'
import { useSubscriptionPageStateSnapshot } from 'state/subscription-page'
import Link from 'next/link'
+import * as Tooltip from '@radix-ui/react-tooltip'
export interface BillingBreakdownProps {}
@@ -44,6 +45,8 @@ const BillingBreakdown = ({}: BillingBreakdownProps) => {
const [usageFees, fixedFees] = partition(upcomingInvoice?.lines ?? [], (item) => item.usage_based)
const totalUsageFees = Number(usageFees.reduce((a, b) => a + b.amount, 0).toFixed(2))
+ const largeNumberFormatter = new Intl.NumberFormat('en-US', { maximumFractionDigits: 0 })
+
const hasExceededAnyLimits =
isUsageBillingEnabled === false &&
Object.values(usage ?? {})
@@ -76,15 +79,15 @@ const BillingBreakdown = ({}: BillingBreakdownProps) => {
<p className="text-sm">Included usage summary</p>
{isUsageBillingEnabled ? (
<p className="text-sm text-scale-1000">
- Your plan includes a limited amount of included usage. If the usage on your project
- exceeds these quotas, your subscription will be charged for the overage. It may take
- up to 24 hours for usage stats to update.
+ Your plan includes a limited amount of usage. If the usage on your project exceeds
+ these quotas, your subscription will be charged for the overage. It may take up to 24
+ hours for usage stats to update.
</p>
) : (
<p className="text-sm text-scale-1000">
- Your plan includes a limited amount of included usage. If the usage on your project
- exceeds these quotas, you may experience restrictions, as you are currently not billed
- for overage. It may take up to 24 hours for usage stats to update.
+ Your plan includes a limited amount of usage. If the usage on your project exceeds
+ these quotas, you may experience restrictions, as you are currently not billed for
+ overage. It may take up to 24 hours for usage stats to update.
</p>
)}
@@ -146,6 +149,10 @@ const BillingBreakdown = ({}: BillingBreakdownProps) => {
const isApproachingLimit = hasLimit && usageRatio >= USAGE_APPROACHING_THRESHOLD
const isExceededLimit = hasLimit && usageRatio >= 1
+ const usageFee = subscription?.usage_fees?.find(
+ (item) => item.metric === metric.metric
+ )
+
return (
<div
key={metric.key}
@@ -170,6 +177,63 @@ const BillingBreakdown = ({}: BillingBreakdownProps) => {
</div>
</a>
</Link>
+ {isUsageBillingEnabled && usageFee && (
+ <Tooltip.Root delayDuration={0}>
+ <Tooltip.Trigger>
+ <div className="flex items-center">
+ <IconInfo
+ size={14}
+ strokeWidth={2}
+ className="hover:text-scale-1000"
+ />
+ </div>
+ </Tooltip.Trigger>
+ <Tooltip.Portal>
+ <Tooltip.Content side="bottom">
+ <Tooltip.Arrow className="radix-tooltip-arrow" />
+ <div
+ className={[
+ 'rounded bg-scale-100 py-1 px-2 leading-none shadow',
+ 'border border-scale-200',
+ ].join(' ')}
+ >
+ <div className="text-xs text-scale-1200">
+ {usageFee.pricingStrategy === 'UNIT' ? (
+ <div>
+ <p>
+ {largeNumberFormatter.format(
+ usageFee.pricingOptions.freeUnits
+ )}{' '}
+ {metric.unitName} included
+ </p>
+ <p>
+ then ${usageFee.pricingOptions.perUnitPrice} per{' '}
+ {metric.unitName}
+ </p>
+ </div>
+ ) : usageFee.pricingStrategy === 'PACKAGE' ? (
+ <div>
+ <p>
+ {largeNumberFormatter.format(
+ usageFee.pricingOptions.freeUnits
+ )}{' '}
+ included
+ </p>
+
+ <p>
+ then ${usageFee.pricingOptions.packagePrice} per{' '}
+ {largeNumberFormatter.format(
+ usageFee.pricingOptions.packageSize!
+ )}
+ </p>
+ </div>
+ ) : null}
+ </div>
+ </div>
+ </Tooltip.Content>
+ </Tooltip.Portal>
+ </Tooltip.Root>
+ )}
{isExceededLimit && !isUsageBillingEnabled ? (
<div className="flex items-center space-x-2 min-w-[115px]">
<IconAlertTriangle size={14} strokeWidth={2} className="text-red-900" />
diff --git a/studio/components/interfaces/BillingV2/Subscription/CostControl/CostControl.constants.ts b/studio/components/interfaces/BillingV2/Subscription/CostControl/CostControl.constants.ts
deleted file mode 100644
index 5fc07ed7d0f..00000000000
--- a/studio/components/interfaces/BillingV2/Subscription/CostControl/CostControl.constants.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-// [Joshen TODO] Ideally these come from API, but hard coded for now
-export const USAGE_COSTS = [
- {
- category: 'Database',
- items: [
- { name: 'Database size', unit_amount: 0.125, unit: 'GB' },
- { name: 'Database egress', unit_amount: 0.09, unit: 'GB' },
- ],
- },
- {
- category: 'Authentication',
- items: [
- { name: 'MAUs', unit_amount: 0.00325, unit: 'MAU' },
- { name: 'Single Sign-On (SAML 2.0)', unit_amount: 0.015, unit: 'MAU' },
- ],
- },
- {
- category: 'Storage',
- items: [
- { name: 'Storage size', unit_amount: 0.021, unit: 'GB' },
- { name: 'Storage egress', unit_amount: 0.09, unit: 'GB' },
- { name: 'Image transformations', unit_amount: 5, unit: '1000 origin images' },
- ],
- },
- {
- category: 'Realtime',
- items: [
- { name: 'Concurrent Peak Connections', unit_amount: 10, unit: '1000 connections' },
- { name: 'Messages per month', unit_amount: 2.5, unit: 'million' },
- ],
- },
- {
- category: 'Edge Functions',
- items: [
- { name: 'Invocations', unit_amount: 0.125, unit: 'million' },
- { name: 'Number of functions', unit_amount: 10, unit: '100' },
- ],
- },
-]
diff --git a/studio/components/interfaces/BillingV2/Subscription/CostControl/CostControl.tsx b/studio/components/interfaces/BillingV2/Subscription/CostControl/CostControl.tsx
index 849f7d2089b..87be0ada711 100644
--- a/studio/components/interfaces/BillingV2/Subscription/CostControl/CostControl.tsx
+++ b/studio/components/interfaces/BillingV2/Subscription/CostControl/CostControl.tsx
@@ -34,7 +34,7 @@ const CostControl = ({}: CostControlProps) => {
<div>
<p className="text-base">Cost control</p>
<p className="text-sm text-scale-1000">
- Control whether to allow over-usage and avoid surprise bills
+ Control whether to usage beyond your plans included quota
</p>
</div>
<div className="space-y-2">
@@ -43,7 +43,7 @@ const CostControl = ({}: CostControlProps) => {
<Link href="https://supabase.com/docs/guides/platform/spend-cap">
<a target="_blank" rel="noreferrer">
<div className="flex items-center space-x-2 opacity-50 hover:opacity-100 transition">
- <p className="text-sm">About spend cap</p>
+ <p className="text-sm">Spend cap</p>
<IconExternalLink size={16} strokeWidth={1.5} />
</div>
</a>
@@ -75,9 +75,14 @@ const CostControl = ({}: CostControlProps) => {
</Alert>
) : (
<p className="text-sm text-scale-1000">
- You can control whether your project is charged for additional usage beyond the
- included quota of your subscription plan. If you need to go beyond the included
- quota, simply switch off your spend cap to pay for additional usage.
+ You can control whether your project is charged for additional usage beyond the{' '}
+ <Link href="#breakdown">
+ <a className="text-sm text-green-900 transition hover:text-green-1000">
+ included quota
+ </a>
+ </Link>{' '}
+ of your subscription plan. If you need to go beyond the included quota, simply
+ switch off your spend cap to pay for additional usage.
</p>
)}
@@ -101,9 +106,14 @@ const CostControl = ({}: CostControlProps) => {
Spend cap is {isUsageBillingEnabled ? 'disabled' : 'enabled'}
</p>
<p className="text-sm text-scale-1000">
- {isUsageBillingEnabled
- ? 'You will be charged for any usage above the included quota'
- : 'You will never be charged any extra for usage. However, your project could become unresponsive or enter read only mode if you exceed the included quota'}
+ {isUsageBillingEnabled ? (
+ <span>You will be charged for any usage above the included quota.</span>
+ ) : (
+ <span>
+ You won't be charged any extra for usage. However, your project could become
+ unresponsive or enter read only mode if you exceed the included quota.
+ </span>
+ )}
</p>
{isUsageBillingEnabled && (
<p className="text-sm text-scale-1000 mt-1">
diff --git a/studio/components/interfaces/BillingV2/Subscription/CostControl/SpendCapSidePanel.tsx b/studio/components/interfaces/BillingV2/Subscription/CostControl/SpendCapSidePanel.tsx
index f9ef95c2d0c..bf5069a4e5e 100644
--- a/studio/components/interfaces/BillingV2/Subscription/CostControl/SpendCapSidePanel.tsx
+++ b/studio/components/interfaces/BillingV2/Subscription/CostControl/SpendCapSidePanel.tsx
@@ -9,7 +9,7 @@ import Link from 'next/link'
import { useEffect, useState } from 'react'
import { useSubscriptionPageStateSnapshot } from 'state/subscription-page'
import { Alert, Button, Collapsible, IconChevronRight, IconExternalLink, SidePanel } from 'ui'
-import { USAGE_COSTS } from './CostControl.constants'
+import { BILLING_BREAKDOWN_METRICS } from '../Subscription.constants'
const SPEND_CAP_OPTIONS: {
name: string
@@ -52,11 +52,13 @@ const SpendCapSidePanel = () => {
const isTurningOnCap = !isSpendCapOn && selectedOption === 'on'
const hasChanges = selectedOption !== (isSpendCapOn ? 'on' : 'off')
+ const largeNumberFormatter = new Intl.NumberFormat('en-US', { maximumFractionDigits: 0 })
+
useEffect(() => {
if (visible && subscription !== undefined) {
setSelectedOption(isSpendCapOn ? 'on' : 'off')
}
- }, [visible, isLoading])
+ }, [visible, isLoading, subscription, isSpendCapOn])
const onConfirm = async () => {
if (!projectRef) return console.error('Project ref is required')
@@ -83,6 +85,10 @@ const SpendCapSidePanel = () => {
}
}
+ const billingMetricCategories = Array.from(
+ new Set(BILLING_BREAKDOWN_METRICS.map((it) => it.category))
+ )
+
return (
<SidePanel
size="large"
@@ -137,27 +143,44 @@ const SpendCapSidePanel = () => {
</Table.th>
</>
}
- body={USAGE_COSTS.map((category) => {
+ body={billingMetricCategories.map((category) => {
+ const categoryItems = BILLING_BREAKDOWN_METRICS.filter(
+ (it) => it.category === category
+ )
+
return (
<>
- <Table.tr key={category.category}>
+ <Table.tr key={category}>
<Table.td>
- <p className="text-xs text-scale-1200">{category.category}</p>
+ <p className="text-xs text-scale-1200">{category}</p>
</Table.td>
<Table.td>{null}</Table.td>
</Table.tr>
- {category.items.map((item) => (
- <Table.tr key={item.name}>
- <Table.td>
- <p className="text-xs pl-4">{item.name}</p>
- </Table.td>
- <Table.td>
- <p className="text-xs">
- ${item.unit_amount} per {item.unit}
- </p>
- </Table.td>
- </Table.tr>
- ))}
+ {categoryItems.map((item) => {
+ const costs = subscription?.usage_fees?.find(
+ (it) => it.metric === item.metric
+ )
+
+ if (!costs) return null
+
+ return (
+ <Table.tr key={item.name}>
+ <Table.td>
+ <p className="text-xs pl-4">{item.name}</p>
+ </Table.td>
+ <Table.td>
+ {costs.pricingStrategy === 'UNIT' ? (
+ <p className="text-xs">${costs.pricingOptions.perUnitPrice} per {item.unitName}</p>
+ ) : costs.pricingStrategy === 'PACKAGE' ? (
+ <p className="text-xs">
+ ${costs.pricingOptions.packagePrice} per{' '}
+ {largeNumberFormatter.format(costs.pricingOptions.packageSize!)}
+ </p>
+ ) : null}
+ </Table.td>
+ </Table.tr>
+ )
+ })}
</>
)
})}
@@ -246,7 +269,7 @@ const SpendCapSidePanel = () => {
<p className="text-sm">
{selectedOption === 'on'
? 'Upon clicking confirm, spend cap will be enabled for your project and you will no longer be charged any extra for usage.'
- : 'Upon clicking confirm, spend cap will be disabled for your project and you will be charged for any usage above the included quota'}
+ : 'Upon clicking confirm, spend cap will be disabled for your project and you will be charged for any usage beyong the included quota.'}
</p>
</>
)}
diff --git a/studio/components/interfaces/BillingV2/Subscription/Subscription.constants.ts b/studio/components/interfaces/BillingV2/Subscription/Subscription.constants.ts
index ecd3ebd2d8a..e1284abb6ad 100644
--- a/studio/components/interfaces/BillingV2/Subscription/Subscription.constants.ts
+++ b/studio/components/interfaces/BillingV2/Subscription/Subscription.constants.ts
@@ -3,15 +3,103 @@
export const USAGE_APPROACHING_THRESHOLD = 0.8
export const BILLING_BREAKDOWN_METRICS = [
- { key: 'db_size', name: 'Database space', units: 'bytes', anchor: 'dbSize' },
- { key: 'db_egress', name: 'Database egress', units: 'bytes', anchor: 'dbEgress' },
- { key: 'monthly_active_users', name: 'Active users', units: 'absolute', anchor: 'mau' },
- { key: 'monthly_active_sso_users', name: 'Active SSO users', units: 'absolute', anchor: 'mauSso' },
- { key: 'realtime_peak_connection', name: 'Realtime peak connections', units: 'absolute', anchor: 'realtimePeakConnections' },
- { key: 'realtime_message_count', name: 'Realtime messages', units: 'absolute', anchor: 'realtimeMessageCount' },
- { key: 'func_invocations', name: 'Edge function invocations', units: 'absolute', anchor: 'funcInvocations' },
- { key: 'func_count', name: 'Edge functions', units: 'absolute', anchor: 'funcCount' },
- { key: 'storage_size', name: 'Storage space', units: 'bytes', anchor: 'storageSize' },
- { key: 'storage_egress', name: 'Storage egress', units: 'bytes', anchor: 'storageEgress' },
- { key: 'storage_image_render_count', name: 'Asset transformations', units: 'absolute', anchor: 'storageImageTransformations' },
+ {
+ key: 'db_size',
+ name: 'Database space',
+ units: 'bytes',
+ anchor: 'dbSize',
+ metric: 'DATABASE_SIZE',
+ category: 'Database',
+ unitName: 'GB'
+ },
+ {
+ key: 'db_egress',
+ name: 'Database egress',
+ units: 'bytes',
+ anchor: 'dbEgress',
+ metric: 'DATABASE_EGRESS',
+ category: 'Database',
+ unitName: 'GB'
+ },
+ {
+ key: 'monthly_active_users',
+ name: 'Active users',
+ units: 'absolute',
+ anchor: 'mau',
+ metric: 'MONTHLY_ACTIVE_USERS',
+ category: 'Authentication',
+ unitName: 'MAU'
+ },
+ {
+ key: 'monthly_active_sso_users',
+ name: 'Active SSO users',
+ units: 'absolute',
+ anchor: 'mauSso',
+ metric: 'MONTHLY_ACTIVE_SSO_USERS',
+ category: 'Authentication',
+ unitName: 'MAU'
+ },
+ {
+ key: 'storage_size',
+ name: 'Storage space',
+ units: 'bytes',
+ anchor: 'storageSize',
+ metric: 'STORAGE_SIZE',
+ category: 'Storage',
+ unitName: 'GB'
+ },
+ {
+ key: 'storage_egress',
+ name: 'Storage egress',
+ units: 'bytes',
+ anchor: 'storageEgress',
+ metric: 'STORAGE_EGRESS',
+ category: 'Storage',
+ unitName: 'GB'
+ },
+ {
+ key: 'storage_image_render_count',
+ name: 'Storage Image Transformations',
+ units: 'absolute',
+ anchor: 'storageImageTransformations',
+ metric: 'STORAGE_IMAGES_TRANSFORMED',
+ category: 'Storage',
+ unitName: 'image'
+ },
+ {
+ key: 'realtime_peak_connection',
+ name: 'Realtime peak connections',
+ units: 'absolute',
+ anchor: 'realtimePeakConnections',
+ metric: 'REALTIME_PEAK_CONNECTIONS',
+ category: 'Realtime',
+ unitName: 'connection'
+ },
+ {
+ key: 'realtime_message_count',
+ name: 'Realtime messages',
+ units: 'absolute',
+ anchor: 'realtimeMessageCount',
+ metric: 'REALTIME_MESSAGE_COUNT',
+ category: 'Realtime',
+ unitName: 'message'
+ },
+ {
+ key: 'func_invocations',
+ name: 'Edge function invocations',
+ units: 'absolute',
+ anchor: 'funcInvocations',
+ metric: 'FUNCTION_INVOCATIONS',
+ category: 'Edge Functions',
+ unitName: 'invocation'
+ },
+ {
+ key: 'func_count',
+ name: 'Edge functions',
+ units: 'absolute',
+ anchor: 'funcCount',
+ metric: 'FUNCTION_COUNT',
+ category: 'Edge Functions',
+ unitName: 'function'
+ },
]
diff --git a/studio/components/interfaces/BillingV2/Subscription/Tier/ExitSurveyModal.tsx b/studio/components/interfaces/BillingV2/Subscription/Tier/ExitSurveyModal.tsx
index 27346959ee4..404045ec10d 100644
--- a/studio/components/interfaces/BillingV2/Subscription/Tier/ExitSurveyModal.tsx
+++ b/studio/components/interfaces/BillingV2/Subscription/Tier/ExitSurveyModal.tsx
@@ -93,8 +93,6 @@ const ExitSurveyModal = ({ visible, onClose }: ExitSurveyModalProps) => {
category: 'error',
message: `Failed to cancel subscription: ${error.message}`,
})
- } finally {
- setIsSubmitting(false)
}
try {
@@ -124,6 +122,7 @@ const ExitSurveyModal = ({ visible, onClose }: ExitSurveyModalProps) => {
router.push(`/project/${projectRef}`)
}
onClose(true)
+ window.scrollTo({ top: 0, left: 0, behavior: 'smooth' })
}
}
diff --git a/studio/components/interfaces/BillingV2/Subscription/Tier/SubscriptionPaymentMethod.tsx b/studio/components/interfaces/BillingV2/Subscription/Tier/SubscriptionPaymentMethod.tsx
index 7bf7f58814f..38035f6ad6c 100644
--- a/studio/components/interfaces/BillingV2/Subscription/Tier/SubscriptionPaymentMethod.tsx
+++ b/studio/components/interfaces/BillingV2/Subscription/Tier/SubscriptionPaymentMethod.tsx
@@ -83,17 +83,17 @@ const SubscriptionPaymentMethod = ({ subscription }: SubscriptionTierProps) => {
src={`${BASE_PATH}/img/payment-methods/${subscription.payment_method_card_details?.brand
.replace(' ', '-')
.toLowerCase()}.png`}
- width="32"
+ width="24"
/>
) : (
<IconCreditCard />
)}
- <span>
+ <span className="text-sm">
**** **** ****{' '}
{subscription?.payment_method_card_details?.last_4_digits || '****'}
</span>
</div>
- <div className="flex flex-row space-x-3 text-scale-1000">
+ <div className="flex flex-row space-x-3 text-scale-1000 text-sm">
<span>
Expires {subscription?.payment_method_card_details?.expiry_month || '-'}/
{subscription?.payment_method_card_details?.expiry_year?.toString()?.slice(-2) ||
@@ -106,9 +106,11 @@ const SubscriptionPaymentMethod = ({ subscription }: SubscriptionTierProps) => {
{subscription?.payment_method_type === 'invoice' && (
<>
<div className="flex space-x-3">
- <div >
+ <div>
<p className="text-scale-1100">Payment via invoice</p>
- <p className="text-sm text-scale-1000">You get a monthly invoice and payment link via email.</p>
+ <p className="text-sm text-scale-1000">
+ You get a monthly invoice and payment link via email.
+ </p>
</div>
</div>
</>
@@ -160,8 +162,8 @@ const SubscriptionPaymentMethod = ({ subscription }: SubscriptionTierProps) => {
<Modal.Content>
<div className="py-6 space-y-2">
<p className="text-sm">
- Upon clicking confirm, your next and future invoices will be deducted from the
- selected payment method. There are no immediate charges.
+ Upon clicking confirm, all future charges will be deducted from the selected payment
+ method. There are no immediate charges.
</p>
<div className="!mt-6">
<PaymentMethodSelection
diff --git a/studio/components/interfaces/BillingV2/Subscription/Tier/SubscriptionTier.tsx b/studio/components/interfaces/BillingV2/Subscription/Tier/SubscriptionTier.tsx
index cf41737acbc..ba216a5da01 100644
--- a/studio/components/interfaces/BillingV2/Subscription/Tier/SubscriptionTier.tsx
+++ b/studio/components/interfaces/BillingV2/Subscription/Tier/SubscriptionTier.tsx
@@ -44,7 +44,8 @@ const SubscriptionTier = ({}: SubscriptionTierProps) => {
<a>
<span className="text-sm text-green-900 transition hover:text-green-1000">
organization settings
- </span>.
+ </span>
+ .
</a>
</Link>
</div>
@@ -115,10 +116,23 @@ const SubscriptionTier = ({}: SubscriptionTierProps) => {
{!subscription?.usage_billing_enabled && (
<Alert withIcon variant="info" title="This project is limited by the included usage">
<p className="text-sm text-scale-1000">
- When this project exceeds its included usage quotas, it may become unresponsive.{' '}
- {currentPlan?.id === 'free'
- ? 'If you wish to exceed the included usage, you should upgrade to a paid plan.'
- : 'You can change the Cost Control settings if you plan on exceeding the included usage quotas.'}
+ When this project exceeds its{' '}
+ <Link href="#breakdown">
+ <a className="text-sm text-green-900 transition hover:text-green-1000">
+ included usage quotas
+ </a>
+ </Link>
+ , it may become unresponsive.{' '}
+ {currentPlan?.id === 'free' ? (
+ <span>
+ If you wish to exceed the included usage, you should upgrade to a paid plan.
+ </span>
+ ) : (
+ <span>
+ You can change the Cost control settings if you plan on exceeding the included
+ usage quotas.
+ </span>
+ )}
</p>
</Alert>
)}
diff --git a/studio/components/interfaces/BillingV2/Subscription/Tier/TierUpdateSidePanel.tsx b/studio/components/interfaces/BillingV2/Subscription/Tier/TierUpdateSidePanel.tsx
index f9e81a85be2..ba1826f9945 100644
--- a/studio/components/interfaces/BillingV2/Subscription/Tier/TierUpdateSidePanel.tsx
+++ b/studio/components/interfaces/BillingV2/Subscription/Tier/TierUpdateSidePanel.tsx
@@ -83,6 +83,7 @@ const TierUpdateSidePanel = () => {
})
setSelectedTier(undefined)
onClose()
+ window.scrollTo({ top: 0, left: 0, behavior: 'smooth' })
} catch (error: any) {
ui.setNotification({
error,
@@ -107,7 +108,7 @@ const TierUpdateSidePanel = () => {
<Link href="https://supabase.com/pricing">
<a target="_blank" rel="noreferrer">
<Button type="default" icon={<IconExternalLink strokeWidth={1.5} />}>
- More information
+ Pricing
</Button>
</a>
</Link>