mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
chore(studio): ship connect section, remove getting started and experiment plumbing (#44329)
## Summary The `connectSection` A/B experiment concluded as a true null (no effect on activation or any downstream metric after 13 days at 50/50, ~153K mature orgs). Saxon decided to ship the Connect section as the permanent experience. This PR removes the Getting Started control variant, the old Connect modal, all experiment flag gating, and related telemetry types. ## Changes - Delete `GettingStarted/` directory (5 files: section component, types, utils, progress hook) - Delete old `Connect.tsx` dialog modal (replaced by ConnectSheet) - Remove `connectSection` PostHog flag reads from `Home.tsx` and `LayoutHeader.tsx` - Remove `getSectionVisibility()` experiment logic and `ConnectSectionVariant` type - Remove `getting-started` from `DEFAULT_SECTION_ORDER` - Always render `<ConnectSheet />` in header (no more conditional with old `<Connect />` modal) - Remove `variant` prop from `ConnectSection` component - Remove 4 getting-started telemetry event interfaces from `telemetry-constants.ts` - Update `mergeSectionOrder` tests to reflect new section order ## Testing Tested on Vercel preview: - [x] Project homepage shows Connect section for new projects (< 10 days old) - [x] Connect section hidden for mature projects (> 10 days old) - [x] Header Connect button opens ConnectSheet (not old modal) - [x] Connect tiles open ConnectSheet with correct tab - [x] Section drag-and-drop still works without getting-started in the order - [x] Existing users with `getting-started` in localStorage order don't break (mergeSectionOrder strips it) ## Linear - fixes GROWTH-730 --------- Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
This commit is contained in:
1 parent
7bbd7060d3
commit
edacf2413d
16 files changed
+46
-1878
No files matched your search
@@ -1,51 +1,41 @@
|
||||
import { expect } from '@playwright/test'
|
||||
|
||||
import { test } from '../utils/test.js'
|
||||
import { toUrl } from '../utils/to-url.js'
|
||||
|
||||
test.describe('Connect', async () => {
|
||||
test('Connect dialog opens when showConnect=true query param is present', async ({
|
||||
page,
|
||||
ref,
|
||||
}) => {
|
||||
test('ConnectSheet opens when showConnect=true query param is present', async ({ page, ref }) => {
|
||||
// Navigate to project page with showConnect=true query param
|
||||
await page.goto(toUrl(`/project/${ref}?showConnect=true`))
|
||||
|
||||
// Wait for the page to load
|
||||
await expect(page.getByRole('heading', { level: 1 })).toBeVisible({ timeout: 30000 })
|
||||
|
||||
// Check that either the Connect dialog or ConnectSheet is visible
|
||||
// The Connect component renders a Dialog with title "Connect to your project"
|
||||
// The ConnectSheet component renders a Sheet with title "Connect to your project"
|
||||
await expect(
|
||||
page.getByRole('heading', { name: 'Connect to your project' })
|
||||
).toBeVisible({ timeout: 30000 })
|
||||
// Check that the ConnectSheet is visible
|
||||
await expect(page.getByRole('heading', { name: 'Connect to your project' })).toBeVisible({
|
||||
timeout: 30000,
|
||||
})
|
||||
})
|
||||
|
||||
test('Connect dialog closes when dismissed', async ({ page, ref }) => {
|
||||
test('ConnectSheet closes when dismissed', async ({ page, ref }) => {
|
||||
// Navigate to project page with showConnect=true query param
|
||||
await page.goto(toUrl(`/project/${ref}?showConnect=true`))
|
||||
|
||||
// Wait for the page to load
|
||||
await expect(page.getByRole('heading', { level: 1 })).toBeVisible({ timeout: 30000 })
|
||||
// Wait for the ConnectSheet to be visible
|
||||
await expect(page.getByRole('heading', { name: 'Connect to your project' })).toBeVisible({
|
||||
timeout: 30000,
|
||||
})
|
||||
|
||||
// Wait for the Connect dialog/sheet to be visible
|
||||
await expect(
|
||||
page.getByRole('heading', { name: 'Connect to your project' })
|
||||
).toBeVisible({ timeout: 30000 })
|
||||
|
||||
// Close the dialog by pressing Escape
|
||||
// Close the sheet by pressing Escape
|
||||
await page.keyboard.press('Escape')
|
||||
|
||||
// Verify the dialog is no longer visible
|
||||
await expect(
|
||||
page.getByRole('heading', { name: 'Connect to your project' })
|
||||
).not.toBeVisible({ timeout: 10000 })
|
||||
// Verify the sheet is no longer visible
|
||||
await expect(page.getByRole('heading', { name: 'Connect to your project' })).not.toBeVisible({
|
||||
timeout: 10000,
|
||||
})
|
||||
|
||||
// Verify the query param is removed from the URL
|
||||
await expect(page).not.toHaveURL(/showConnect=true/)
|
||||
})
|
||||
|
||||
test('Connect button in header opens the Connect dialog', async ({ page, ref }) => {
|
||||
test('Connect button in header opens the ConnectSheet', async ({ page, ref }) => {
|
||||
// Navigate to project page without the query param
|
||||
await page.goto(toUrl(`/project/${ref}`))
|
||||
|
||||
@@ -55,10 +45,10 @@ test.describe('Connect', async () => {
|
||||
// Click the Connect button in the header
|
||||
await page.getByRole('button', { name: 'Connect' }).click()
|
||||
|
||||
// Verify the Connect dialog/sheet opens
|
||||
await expect(
|
||||
page.getByRole('heading', { name: 'Connect to your project' })
|
||||
).toBeVisible({ timeout: 30000 })
|
||||
// Verify the ConnectSheet opens
|
||||
await expect(page.getByRole('heading', { name: 'Connect to your project' })).toBeVisible({
|
||||
timeout: 30000,
|
||||
})
|
||||
|
||||
// Verify the URL has the showConnect query param
|
||||
await expect(page).toHaveURL(/showConnect=true/)
|
||||
|
||||
Reference in new issue
Block a user