Files
supabase/apps/studio/components/interfaces/App/FeaturePreview/useFeaturePreviews.ts
Francesco Sansalvadore f622bc6ea0 feat(studio): dashboard integrations update (#46671)
- remove "Marketplace" branding and naming from integrations section
- remove "featured partners" hero with multiple partners
- keep only _one_ featured partner to start with (Grafana)
- gate each partner integration with separate flags to enable
testing/releasing them separately

## Before
<img width="1487" height="834" alt="Screenshot 2026-06-08 at 11 00 19"
src="https://github.com/user-attachments/assets/9359a98f-18f8-4b1e-be23-63646cf66106"
/>

## After
<img width="1494" height="849" alt="Screenshot 2026-06-08 at 11 03 57"
src="https://github.com/user-attachments/assets/2c28cf36-97f0-4bbd-8c97-7998768e6ce6"
/>
2026-06-09 15:30:42 +02:00

98 lines
2.8 KiB
TypeScript

import { LOCAL_STORAGE_KEYS, useFlag } from 'common'
export type FeaturePreview = {
key: string
name: string
discussionsUrl?: string
isNew: boolean
/** If feature flag is only relevant for the hosted platform */
isPlatformOnly: boolean
/** If feature flag should be enabled by default for users, if not yet toggled before */
isDefaultOptIn: boolean
/** Visibility in the feature preview modal (For feature flagging a feature preview) */
enabled: boolean
}
export const useFeaturePreviews = (): FeaturePreview[] => {
const isUnifiedLogsPreviewAvailable = useFlag('unifiedLogs')
const pgDeltaDiffEnabled = useFlag('pgdeltaDiff')
const platformWebhooksEnabled = useFlag('platformWebhooks')
const jitDbAccessEnabled = useFlag('jitDbAccess')
return [
{
key: LOCAL_STORAGE_KEYS.UI_PREVIEW_RLS_TESTER,
name: 'RLS Tester',
discussionsUrl: 'https://github.com/orgs/supabase/discussions/45233',
enabled: true,
isNew: true,
isPlatformOnly: false,
isDefaultOptIn: false,
},
{
key: LOCAL_STORAGE_KEYS.UI_PREVIEW_UNIFIED_LOGS,
name: 'Updated Logs interface',
discussionsUrl: 'https://github.com/orgs/supabase/discussions/37234',
enabled: isUnifiedLogsPreviewAvailable,
isNew: true,
isPlatformOnly: true,
isDefaultOptIn: false,
},
{
key: LOCAL_STORAGE_KEYS.UI_PREVIEW_ADVISOR_RULES,
name: 'Disable Advisor rules',
discussionsUrl: undefined,
enabled: true,
isNew: false,
isPlatformOnly: true,
isDefaultOptIn: false,
},
{
key: LOCAL_STORAGE_KEYS.UI_PREVIEW_PG_DELTA_DIFF,
name: 'PG Delta Diff',
discussionsUrl: undefined,
isNew: false,
isPlatformOnly: true,
isDefaultOptIn: true,
enabled: pgDeltaDiffEnabled,
},
{
key: LOCAL_STORAGE_KEYS.UI_PREVIEW_PLATFORM_WEBHOOKS,
name: 'Platform webhooks',
discussionsUrl: undefined,
isNew: true,
isPlatformOnly: true,
isDefaultOptIn: false,
enabled: platformWebhooksEnabled,
},
{
key: LOCAL_STORAGE_KEYS.UI_PREVIEW_JIT_DB_ACCESS,
name: 'Temporary access',
discussionsUrl: undefined,
isNew: true,
isPlatformOnly: true,
isDefaultOptIn: false,
enabled: jitDbAccessEnabled,
},
{
key: LOCAL_STORAGE_KEYS.UI_PREVIEW_CLS,
name: 'Column-level privileges',
discussionsUrl: 'https://github.com/orgs/supabase/discussions/20295',
enabled: true,
isNew: false,
isPlatformOnly: false,
isDefaultOptIn: false,
},
{
key: LOCAL_STORAGE_KEYS.UI_PREVIEW_MARKETPLACE,
name: 'Integrations layout',
discussionsUrl: undefined,
enabled: true,
isNew: true,
isPlatformOnly: false,
isDefaultOptIn: true,
},
].sort((a, b) => Number(b.isNew) - Number(a.isNew))
}