Skip to content

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

chore: add compute price to enabled features (#38696)

Alaister Young7f0fbe378d36
diff --git a/apps/studio/components/interfaces/DiskManagement/fields/ComputeSizeField.tsx b/apps/studio/components/interfaces/DiskManagement/fields/ComputeSizeField.tsx
index 75d12fc5d41..6f7245d9d5e 100644
--- a/apps/studio/components/interfaces/DiskManagement/fields/ComputeSizeField.tsx
+++ b/apps/studio/components/interfaces/DiskManagement/fields/ComputeSizeField.tsx
@@ -33,6 +33,7 @@ import {
import { BillingChangeBadge } from '../ui/BillingChangeBadge'
import FormMessage from '../ui/FormMessage'
import { NoticeBar } from '../ui/NoticeBar'
+import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
/**
* to do: this could be a type from api-types
@@ -55,6 +56,8 @@ export function ComputeSizeField({ form, disabled }: ComputeSizeFieldProps) {
const { data: org } = useSelectedOrganizationQuery()
const { data: project, isLoading: isProjectLoading } = useSelectedProjectQuery()
+ const showComputePrice = useIsFeatureEnabled('project_addons:show_compute_price')
+
const { computeSize, storageType } = form.watch()
const {
@@ -221,21 +224,23 @@ export function ComputeSizeField({ form, disabled }: ComputeSizeFieldProps) {
<Lock size={14} />
</div>
) : (
- <>
- <span
- className="text-foreground text-sm font-semibold"
- translate="no"
- >
- ${price}
- </span>
- <span className="text-foreground-light translate-y-[1px]">
- {' '}
- /{' '}
- {compute.price_interval === 'monthly'
- ? 'month'
- : 'hour'}
- </span>
- </>
+ showComputePrice && (
+ <>
+ <span
+ className="text-foreground text-sm font-semibold"
+ translate="no"
+ >
+ ${price}
+ </span>
+ <span className="text-foreground-light translate-y-[1px]">
+ {' '}
+ /{' '}
+ {compute.price_interval === 'monthly'
+ ? 'month'
+ : 'hour'}
+ </span>
+ </>
+ )
)}
</div>
</div>
diff --git a/packages/common/enabled-features/enabled-features.json b/packages/common/enabled-features/enabled-features.json
index 16b692a3b83..30ca1cb6f7b 100644
--- a/packages/common/enabled-features/enabled-features.json
+++ b/packages/common/enabled-features/enabled-features.json
@@ -63,6 +63,7 @@
"project_homepage:show_examples": true,
"project_addons:dedicated_ipv4_address": true,
+ "project_addons:show_compute_price": true,
"project_settings:custom_domains": true,
"project_settings:show_disable_legacy_api_keys": true,
diff --git a/packages/common/enabled-features/enabled-features.schema.json b/packages/common/enabled-features/enabled-features.schema.json
index 6e49d7d2f12..313975ad619 100644
--- a/packages/common/enabled-features/enabled-features.schema.json
+++ b/packages/common/enabled-features/enabled-features.schema.json
@@ -209,6 +209,10 @@
"type": "boolean",
"description": "Show the dedicated IPv4 address addon"
},
+ "project_addons:show_compute_price": {
+ "type": "boolean",
+ "description": "Show the compute price in the compute and disk page"
+ },
"project_settings:custom_domains": {
"type": "boolean",
@@ -295,6 +299,7 @@
"project_homepage:show_instance_size",
"project_homepage:show_examples",
"project_addons:dedicated_ipv4_address",
+ "project_addons:show_compute_price",
"project_settings:custom_domains",
"project_settings:show_disable_legacy_api_keys",
"project_settings:legacy_jwt_keys",