Skip to content

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

chore(studio): remove mobile toolbar flag (#45317)

Francesco Sansalvadore072006ba0fc5
diff --git a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx
index 10be0ebca9a..b12a2a67c4d 100644
--- a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx
+++ b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx
@@ -125,13 +125,6 @@ export const useIsJitDbAccessEnabled = () => {
return jitDbAccessEnabled && flags[LOCAL_STORAGE_KEYS.UI_PREVIEW_JIT_DB_ACCESS]
}
-export const useIsFloatingMobileToolbarEnabled = () => {
- const { flags } = useFeaturePreviewContext()
- const showFloatingMobileToolbar = useFlag('enableFloatingMobileToolbar')
-
- return showFloatingMobileToolbar && flags[LOCAL_STORAGE_KEYS.UI_PREVIEW_FLOATING_MOBILE_TOOLBAR]
-}
-
export const useIsRLSTesterEnabled = () => {
const { flags } = useFeaturePreviewContext()
const rlsTesterEnabled = useFlag('rlsTester')
diff --git a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx
index fefd7d4bf69..ae16a7b11a1 100644
--- a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx
+++ b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx
@@ -25,7 +25,6 @@ import {
import { AdvisorRulesPreview } from './AdvisorRulesPreview'
import { CLSPreview } from './CLSPreview'
import { useFeaturePreviewContext, useFeaturePreviewModal } from './FeaturePreviewContext'
-import { FloatingMobileToolbarPreview } from './FloatingMobileToolbarPreview'
import { JitDbAccessPreview } from './JitDbAccessPreview'
import { PgDeltaDiffPreview } from './PgDeltaDiffPreview'
import { PlatformWebhooksPreview } from './PlatformWebhooksPreview'
@@ -47,7 +46,6 @@ const FEATURE_PREVIEW_KEY_TO_CONTENT: {
[LOCAL_STORAGE_KEYS.UI_PREVIEW_UNIFIED_LOGS]: <UnifiedLogsPreview />,
[LOCAL_STORAGE_KEYS.UI_PREVIEW_PLATFORM_WEBHOOKS]: <PlatformWebhooksPreview />,
[LOCAL_STORAGE_KEYS.UI_PREVIEW_JIT_DB_ACCESS]: <JitDbAccessPreview />,
- [LOCAL_STORAGE_KEYS.UI_PREVIEW_FLOATING_MOBILE_TOOLBAR]: <FloatingMobileToolbarPreview />,
[LOCAL_STORAGE_KEYS.UI_PREVIEW_RLS_TESTER]: <RLSTesterPreview />,
}
diff --git a/apps/studio/components/interfaces/App/FeaturePreview/FloatingMobileToolbarPreview.tsx b/apps/studio/components/interfaces/App/FeaturePreview/FloatingMobileToolbarPreview.tsx
deleted file mode 100644
index 9141ef8ccfc..00000000000
--- a/apps/studio/components/interfaces/App/FeaturePreview/FloatingMobileToolbarPreview.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import Image from 'next/image'
-
-import { BASE_PATH } from '@/lib/constants'
-
-export const FloatingMobileToolbarPreview = () => {
- return (
- <div className="flex flex-col gap-2">
- <p className="text-foreground-light text-sm mb-4">
- A floating toolbar conveniently positioned at the bottom of the screen on mobile viewports
- to quickly access the Command Menu, Help, Advisor Panel, Editor Panel, and AI Assistant
- buttons.
- </p>
- <p className="text-foreground-light text-sm mb-4">
- It can be dragged to any position on the screen to move it if it gets in the way of
- important content so you can keep working on your project.
- </p>
- <Image
- src={`${BASE_PATH}/img/previews/floating-toolbar-preview.png`}
- width={1296}
- height={900}
- quality={100}
- alt="floating-mobile-toolbar-preview"
- className="rounded border"
- />
- <div className="space-y-2 !mt-4">
- <p className="text-sm">Enabling this preview will:</p>
- <ul className="list-disc pl-6 text-sm text-foreground-light space-y-1">
- <li>Show the floating toolbar at the bottom of the screen on mobile viewports</li>
- <li>Hide the second row of mobile navigation bar</li>
- </ul>
- </div>
- </div>
- )
-}
diff --git a/apps/studio/components/interfaces/App/FeaturePreview/useFeaturePreviews.ts b/apps/studio/components/interfaces/App/FeaturePreview/useFeaturePreviews.ts
index a122fd093cc..84a19a214fd 100644
--- a/apps/studio/components/interfaces/App/FeaturePreview/useFeaturePreviews.ts
+++ b/apps/studio/components/interfaces/App/FeaturePreview/useFeaturePreviews.ts
@@ -20,7 +20,6 @@ export const useFeaturePreviews = (): FeaturePreview[] => {
const { isEligible: isEnterpriseOrSupabaseOrg } = useIsEnterpriseOrSupabaseOrg()
const pgDeltaDiffEnabled = useFlag('pgdeltaDiff')
- const showFloatingMobileToolbar = useFlag('enableFloatingMobileToolbar')
const platformWebhooksEnabled = useFlag('platformWebhooks')
const jitDbAccessEnabled = useFlag('jitDbAccess')
const rlsTesterEnabled = useFlag('rlsTester')
@@ -90,14 +89,5 @@ export const useFeaturePreviews = (): FeaturePreview[] => {
isPlatformOnly: false,
isDefaultOptIn: false,
},
- {
- key: LOCAL_STORAGE_KEYS.UI_PREVIEW_FLOATING_MOBILE_TOOLBAR,
- name: 'Floating Mobile Toolbar',
- discussionsUrl: 'https://github.com/orgs/supabase/discussions/43721',
- enabled: showFloatingMobileToolbar,
- isNew: true,
- isPlatformOnly: false,
- isDefaultOptIn: true,
- },
].sort((a, b) => Number(b.isNew) - Number(a.isNew))
}
diff --git a/apps/studio/components/layouts/Navigation/LayoutHeader/LayoutHeader.tsx b/apps/studio/components/layouts/Navigation/LayoutHeader/LayoutHeader.tsx
index 548a0b58bda..e72c31eb559 100644
--- a/apps/studio/components/layouts/Navigation/LayoutHeader/LayoutHeader.tsx
+++ b/apps/studio/components/layouts/Navigation/LayoutHeader/LayoutHeader.tsx
@@ -14,7 +14,6 @@ import { HeaderUpgradeButton } from './HeaderUpgradeButton'
import { HomeIcon } from './HomeIcon'
import { LocalVersionPopover } from './LocalVersionPopover'
import { MergeRequestButton } from './MergeRequestButton'
-import { useIsFloatingMobileToolbarEnabled } from '@/components/interfaces/App/FeaturePreview/FeaturePreviewContext'
import { ConnectButton } from '@/components/interfaces/ConnectButton/ConnectButton'
import { ConnectSheet } from '@/components/interfaces/ConnectSheet/ConnectSheet'
import { LocalDropdown } from '@/components/interfaces/LocalDropdown'
@@ -71,7 +70,6 @@ export const LayoutHeader = ({
const { data: selectedProject } = useSelectedProjectQuery()
const { data: selectedOrganization } = useSelectedOrganizationQuery()
- const showFloatingMobileToolbar = useIsFloatingMobileToolbarEnabled()
const commandMenuEnabled = useIsShortcutEnabled(SHORTCUT_IDS.COMMAND_MENU_OPEN)
const isAccountPage = router.pathname.startsWith('/account')
@@ -101,12 +99,7 @@ export const LayoutHeader = ({
return (
<>
- <header
- className={cn(
- 'flex h-11 md:h-12 items-center shrink-0 border-b',
- showFloatingMobileToolbar && 'hidden md:flex'
- )}
- >
+ <header className="hidden md:flex h-11 md:h-12 items-center shrink-0 border-b">
{backToDashboardURL && isAccountPage && (
<div className="flex items-center justify-center border-r flex-0 md:hidden h-full aspect-square">
<Link
diff --git a/apps/studio/components/layouts/Navigation/NavigationBar/MobileNavigationBar.tsx b/apps/studio/components/layouts/Navigation/NavigationBar/MobileNavigationBar.tsx
index 7945514e16a..e2ee1c30af3 100644
--- a/apps/studio/components/layouts/Navigation/NavigationBar/MobileNavigationBar.tsx
+++ b/apps/studio/components/layouts/Navigation/NavigationBar/MobileNavigationBar.tsx
@@ -1,16 +1,15 @@
import { useParams } from 'common'
-import { ChevronLeft, Menu, Search } from 'lucide-react'
+import { ChevronLeft, Menu } from 'lucide-react'
import Link from 'next/link'
import { useState } from 'react'
import { Button, cn } from 'ui'
-import { CommandMenuTrigger, MobileSheetNav } from 'ui-patterns'
+import { MobileSheetNav } from 'ui-patterns'
import { HeaderUpgradeButton } from '../LayoutHeader/HeaderUpgradeButton'
import { HomeIcon } from '../LayoutHeader/HomeIcon'
import { useMobileSheet } from './MobileSheetContext'
import { OrgSelector } from './OrgSelector'
import { ProjectBranchSelector } from './ProjectBranchSelector'
-import { useIsFloatingMobileToolbarEnabled } from '@/components/interfaces/App/FeaturePreview/FeaturePreviewContext'
import { ConnectButton } from '@/components/interfaces/ConnectButton/ConnectButton'
import { LocalDropdown } from '@/components/interfaces/LocalDropdown'
import { SidebarContent } from '@/components/interfaces/Sidebar'
@@ -31,7 +30,6 @@ const MobileNavigationBar = ({
backToDashboardURL?: string
}) => {
const [isSheetOpen, setIsSheetOpen] = useState(false)
- const showFloatingMobileToolbar = useIsFloatingMobileToolbarEnabled()
const { ref: projectRef, slug } = useParams()
const { data: selectedOrganization } = useSelectedOrganizationQuery()
const { isPending: isLoadingOrganizations } = useOrganizationsQuery()
@@ -50,7 +48,7 @@ const MobileNavigationBar = ({
)}
>
<div className={cn('flex min-w-0 shrink items-center gap-2', !IS_PLATFORM && 'pl-2')}>
- {showFloatingMobileToolbar && backToDashboardURL && (
+ {backToDashboardURL && (
<div className="flex items-center justify-center ml-1 flex-0 md:hidden h-full aspect-square">
<Link
href={backToDashboardURL}
@@ -73,25 +71,6 @@ const MobileNavigationBar = ({
)}
</div>
<div className="flex shrink-0 gap-2">
- {!showFloatingMobileToolbar && (
- <CommandMenuTrigger>
- <button
- type="button"
- className={cn(
- 'group',
- 'grow h-[30px] rounded-md',
- 'p-2',
- 'flex items-center justify-between',
- 'bg-transparent border-none text-foreground-lighter',
- 'hover:bg-transparent/100 hover:border-strong hover:text-foreground-light',
- 'focus-visible:!outline-4 focus-visible:outline-offset-1 focus-visible:outline-brand-600',
- 'transition'
- )}
- >
- <Search size={18} strokeWidth={2} />
- </button>
- </CommandMenuTrigger>
- )}
{IS_PLATFORM && <HeaderUpgradeButton />}
{IS_PLATFORM ? <UserDropdown /> : <LocalDropdown />}
{!hideMobileMenu && (
@@ -108,7 +87,7 @@ const MobileNavigationBar = ({
<MobileSheetNav open={isSheetOpen} onOpenChange={setIsSheetOpen} data-state="expanded">
<SidebarContent />
</MobileSheetNav>
- {showFloatingMobileToolbar && <FloatingMobileToolbar hideMobileMenu={hideMobileMenu} />}
+ <FloatingMobileToolbar hideMobileMenu={hideMobileMenu} />
</div>
)
}
diff --git a/apps/studio/public/img/previews/floating-toolbar-preview.png b/apps/studio/public/img/previews/floating-toolbar-preview.png
deleted file mode 100644
index c2563010b33..00000000000
Binary files a/apps/studio/public/img/previews/floating-toolbar-preview.png and /dev/null differ
diff --git a/packages/common/constants/local-storage.ts b/packages/common/constants/local-storage.ts
index f8390ab399e..04ec911b6c3 100644
--- a/packages/common/constants/local-storage.ts
+++ b/packages/common/constants/local-storage.ts
@@ -22,7 +22,6 @@ export const LOCAL_STORAGE_KEYS = {
UI_PREVIEW_ADVISOR_RULES: 'supabase-ui-advisor-rules',
UI_PREVIEW_QUEUE_OPERATIONS: 'supabase-ui-queue-operations',
UI_PREVIEW_PG_DELTA_DIFF: 'supabase-ui-pg-delta-diff',
- UI_PREVIEW_FLOATING_MOBILE_TOOLBAR: 'supabase-ui-floating-mobile-toolbar',
UI_PREVIEW_PLATFORM_WEBHOOKS: 'supabase-ui-platform-webhooks',
UI_PREVIEW_JIT_DB_ACCESS: 'supabase-ui-jit-db-access',
UI_PREVIEW_RLS_TESTER: 'supabase-ui-rls-tester',