import { ExternalLink, X } from 'lucide-react' import Image from 'next/image' import { LOCAL_STORAGE_KEYS } from 'common' import { useEditorType } from 'components/layouts/editors/EditorsLayout.hooks' import { ButtonTooltip } from 'components/ui/ButtonTooltip' import { InlineLinkClassName } from 'components/ui/InlineLink' import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage' import { BASE_PATH } from 'lib/constants' import { useAppStateSnapshot } from 'state/app-state' import { Alert_Shadcn_, AlertDescription_Shadcn_, AlertTitle_Shadcn_, Badge, Button, cn, HoverCard, HoverCardContent_Shadcn_, HoverCardTrigger_Shadcn_, } from 'ui' import { useIsSQLEditorTabsEnabled, useIsTableEditorTabsEnabled } from './FeaturePreviewContext' export const TableEditorTabsPreview = () => { return (
api-docs-side-panel-preview

The Table Editor now features tabs for improved navigation and organization. Have multiple tables opened across schemas and conveniently go across them without having to switch schemas. Collapse the sidebar for a bigger real estate while browsing your data.

Enabling this preview will:

) } export const TabsUpdateCallout = () => { const editor = useEditorType() const appSnap = useAppStateSnapshot() const isTableEditorTabsEnabled = useIsTableEditorTabsEnabled() const isSQLEditorTabsEnabled = useIsSQLEditorTabsEnabled() const isTabsEnabled = isTableEditorTabsEnabled || isSQLEditorTabsEnabled const [tableEditorTabsPreviewState] = useLocalStorageQuery( LOCAL_STORAGE_KEYS.UI_TABLE_EDITOR_TABS, '' ) const [sqlEditorTabsPreviewState] = useLocalStorageQuery( LOCAL_STORAGE_KEYS.UI_SQL_EDITOR_TABS, '' ) const [tabsInterfaceAcknowledge, setTabsInterfaceAcknowledge] = useLocalStorageQuery( LOCAL_STORAGE_KEYS.TABS_INTERFACE_ACKNOWLEDGED, false ) const isDefaultOptedInTabs = isTabsEnabled && tableEditorTabsPreviewState === '' && sqlEditorTabsPreviewState === '' if (!isDefaultOptedInTabs || tabsInterfaceAcknowledge) return null return ( NEW Tabs Interface for Editors The Table and SQL Editors now feature tabs for improved navigation and organization! Check out our{' '} { appSnap.setSelectedFeaturePreview( editor === 'table' ? LOCAL_STORAGE_KEYS.UI_TABLE_EDITOR_TABS : LOCAL_STORAGE_KEYS.UI_SQL_EDITOR_TABS ) appSnap.setShowFeaturePreviewModal(true) }} > feature previews {' '} for more information. } className="absolute top-2 right-2 px-1" onClick={() => setTabsInterfaceAcknowledge(true)} tooltip={{ content: { side: 'bottom', text: 'Dismiss' } }} /> ) } export const TabsUpdateTooltip = () => { const editor = useEditorType() const appSnap = useAppStateSnapshot() const isTableEditorTabsEnabled = useIsTableEditorTabsEnabled() const isSQLEditorTabsEnabled = useIsSQLEditorTabsEnabled() const isTabsEnabled = isTableEditorTabsEnabled || isSQLEditorTabsEnabled const [tableEditorTabsPreviewState] = useLocalStorageQuery( LOCAL_STORAGE_KEYS.UI_TABLE_EDITOR_TABS, '' ) const [sqlEditorTabsPreviewState] = useLocalStorageQuery( LOCAL_STORAGE_KEYS.UI_SQL_EDITOR_TABS, '' ) const [tabsInterfaceAcknowledge, setTabsInterfaceAcknowledge] = useLocalStorageQuery( LOCAL_STORAGE_KEYS.TABS_INTERFACE_ACKNOWLEDGED, false ) const isDefaultOptedInTabs = isTabsEnabled && tableEditorTabsPreviewState === '' && sqlEditorTabsPreviewState === '' if (!isDefaultOptedInTabs || tabsInterfaceAcknowledge) return null return (
NEW

Tabs Interface for Editors

The Table and SQL Editors now feature tabs for improved navigation and organization! Check out our{' '} { appSnap.setSelectedFeaturePreview( editor === 'table' ? LOCAL_STORAGE_KEYS.UI_TABLE_EDITOR_TABS : LOCAL_STORAGE_KEYS.UI_SQL_EDITOR_TABS ) appSnap.setShowFeaturePreviewModal(true) }} > feature previews {' '} for more information.

) }