The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
FIx layout in support form (#35065)
Joshen Lim323ac72cb11a
diff --git a/apps/studio/components/interfaces/Database/Migrations/Migrations.tsx b/apps/studio/components/interfaces/Database/Migrations/Migrations.tsxindex 7a3285b3045..317f81ccd45 100644--- a/apps/studio/components/interfaces/Database/Migrations/Migrations.tsx+++ b/apps/studio/components/interfaces/Database/Migrations/Migrations.tsx@@ -7,10 +7,10 @@ import Table from 'components/to-be-cleaned/Table'import CodeEditor from 'components/ui/CodeEditor/CodeEditor'import ShimmeringLoader from 'components/ui/ShimmeringLoader'import { DatabaseMigration, useMigrationsQuery } from 'data/database/migrations-query'-import { Button, Input, SidePanel } from 'ui'-import MigrationsEmptyState from './MigrationsEmptyState'import { Search } from 'lucide-react'+import { Button, Input, SidePanel } from 'ui'import { Admonition } from 'ui-patterns'+import MigrationsEmptyState from './MigrationsEmptyState'const Migrations = () => {const [search, setSearch] = useState('')@@ -55,7 +55,7 @@ const Migrations = () => {><Button key="contact-support" asChild type="default"><Link- href={`/support/new?ref=${project?.ref}&category=dashboard_bug&subject=Unable%20to%20view%20database%20migrations`}+ href={`/support/new?projectRef=${project?.ref}&category=dashboard_bug&subject=Unable%20to%20view%20database%20migrations`}>Contact support</Link>diff --git a/apps/studio/components/interfaces/DiskManagement/fields/ComputeSizeField.tsx b/apps/studio/components/interfaces/DiskManagement/fields/ComputeSizeField.tsxindex 4f1cf7abdff..392804719b8 100644--- a/apps/studio/components/interfaces/DiskManagement/fields/ComputeSizeField.tsx+++ b/apps/studio/components/interfaces/DiskManagement/fields/ComputeSizeField.tsx@@ -292,7 +292,7 @@ export function ComputeSizeField({ form, disabled }: ComputeSizeFieldProps) {)}label={<Link- href={`/support/new?ref=${ref}&category=sales&subject=Enquiry%20about%20larger%20instance%20sizes`}+ href={`/support/new?projectRef=${ref}&category=sales&subject=Enquiry%20about%20larger%20instance%20sizes`}><div className="w-full flex flex-col gap-3 justify-between"><div className="relative px-3 flex justify-between">diff --git a/apps/studio/components/interfaces/Settings/Addons/Addons.tsx b/apps/studio/components/interfaces/Settings/Addons/Addons.tsxindex 5ac63e55595..16cc9ddf870 100644--- a/apps/studio/components/interfaces/Settings/Addons/Addons.tsx+++ b/apps/studio/components/interfaces/Settings/Addons/Addons.tsx@@ -479,7 +479,7 @@ const Addons = () => {</p><Button asChild type="default"><Link- href={`/support/new?ref=${projectRef}&category=sales&subject=Project%20too%20old%20old%20for%20PITR`}+ href={`/support/new?projectRef=${projectRef}&category=sales&subject=Project%20too%20old%20old%20for%20PITR`}><a>Contact support</a></Link>diff --git a/apps/studio/components/interfaces/Settings/Database/DiskSizeConfigurationModal.tsx b/apps/studio/components/interfaces/Settings/Database/DiskSizeConfigurationModal.tsxindex 88854128c21..5da9cc438e0 100644--- a/apps/studio/components/interfaces/Settings/Database/DiskSizeConfigurationModal.tsx+++ b/apps/studio/components/interfaces/Settings/Database/DiskSizeConfigurationModal.tsx@@ -118,7 +118,7 @@ const DiskSizeConfigurationModal = ({</p><Button asChild type="default" className="mt-3"><Link- href={`/support/new?ref=${projectRef}&category=${SupportCategories.PERFORMANCE_ISSUES}&subject=Increase%20disk%20size%20beyond%20200GB`}+ href={`/support/new?projectRef=${projectRef}&category=${SupportCategories.PERFORMANCE_ISSUES}&subject=Increase%20disk%20size%20beyond%20200GB`}>Contact support</Link>diff --git a/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainConfig.tsx b/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainConfig.tsxindex 4d224e353a8..6a7e80b13f0 100644--- a/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainConfig.tsx+++ b/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainConfig.tsx@@ -86,7 +86,7 @@ const CustomDomainConfig = () => {<AlertCircle size={16} strokeWidth={1.5} /><p className="text-sm text-foreground-light">Failed to retrieve custom domain configuration. Please try again later or{' '}- <Link href={`/support/new?ref=${ref}&category=sales`} className="underline">+ <Link href={`/support/new?projectRef=${ref}&category=sales`} className="underline">contact support</Link>.diff --git a/apps/studio/components/interfaces/Sidebar.tsx b/apps/studio/components/interfaces/Sidebar.tsxindex 66394b2249b..82f8bde31ad 100644--- a/apps/studio/components/interfaces/Sidebar.tsx+++ b/apps/studio/components/interfaces/Sidebar.tsx@@ -102,10 +102,7 @@ export const Sidebar = ({ className, ...props }: SidebarProps) => {{!hideSideBar && (<SidebarMotion{...props}- transition={{- delay: 0.4,- duration: 0.4,- }}+ transition={{ delay: 0.4, duration: 0.4 }}overflowing={sidebarBehaviour === 'expandable'}collapsible="icon"variant="sidebar"@@ -154,14 +151,6 @@ export const SidebarContent = ({ footer }: { footer?: ReactNode }) => {const newLayoutPreview = useIsNewLayoutEnabled()const { ref: projectRef } = useParams()- // temporary logic to show settings route in sidebar footer- // this will be removed once we move to an updated org/project nav- const router = useRouter()- const { ref } = useParams()- const { project } = useProjectContext()- const settingsRoutes = generateSettingsRoutes(ref, project)- const activeRoute = router.pathname.split('/')[3]-return (<><AnimatePresence mode="wait">diff --git a/apps/studio/components/interfaces/Support/SupportFormV2.tsx b/apps/studio/components/interfaces/Support/SupportFormV2.tsxindex 71c6976699f..b13c1502d56 100644--- a/apps/studio/components/interfaces/Support/SupportFormV2.tsx+++ b/apps/studio/components/interfaces/Support/SupportFormV2.tsx@@ -67,7 +67,7 @@ interface SupportFormV2Props {export const SupportFormV2 = ({ setSentCategory, setSelectedProject }: SupportFormV2Props) => {const { profile } = useProfile()const {- ref,+ projectRef: ref,slug,category: urlCategory,subject: urlSubject,diff --git a/apps/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx b/apps/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsxindex 9ac784dbce9..3680ff63a88 100644--- a/apps/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx+++ b/apps/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx@@ -24,7 +24,7 @@ const HelpPopover = () => {const { mutate: sendEvent } = useSendEventMutation()const projectRef = project?.parent_project_ref ?? router.query.ref- const supportUrl = `/support/new${projectRef ? `?ref=${projectRef}` : ''}`+ const supportUrl = `/support/new${projectRef ? `?projectRef=${projectRef}` : ''}`return (<Popover_Shadcn_>diff --git a/apps/studio/components/layouts/StorageLayout/StorageBucketsError.tsx b/apps/studio/components/layouts/StorageLayout/StorageBucketsError.tsxindex 247847fdae4..6105523fcca 100644--- a/apps/studio/components/layouts/StorageLayout/StorageBucketsError.tsx+++ b/apps/studio/components/layouts/StorageLayout/StorageBucketsError.tsx@@ -20,7 +20,7 @@ const StorageBucketsError = ({ error }: StorageBucketsErrorProps) => {actions={[<Button key="contact-support" asChild type="default" className="ml-4"><Link- href={`/support/new?ref=${ref}&category=dashboard_bug&subject=Unable%20to%20fetch%20storage%20buckets`}+ href={`/support/new?projectRef=${ref}&category=dashboard_bug&subject=Unable%20to%20fetch%20storage%20buckets`}>Contact support</Link>diff --git a/apps/studio/hooks/misc/useHideSidebar.ts b/apps/studio/hooks/misc/useHideSidebar.tsindex 086a7f1670f..329817cb5f5 100644--- a/apps/studio/hooks/misc/useHideSidebar.ts+++ b/apps/studio/hooks/misc/useHideSidebar.ts@@ -5,9 +5,11 @@ import { useIsNewLayoutEnabled } from 'components/interfaces/App/FeaturePreview/export function useHideSidebar() {const newLayoutPreview = useIsNewLayoutEnabled()const pathname = usePathname() ?? ''+const shouldHide =pathname.startsWith('/account') ||pathname.startsWith('/new') ||+ pathname === '/support/new' ||pathname === '/organizations' ||pathname === '/sign-in' ||(pathname === '/projects' && newLayoutPreview)diff --git a/apps/studio/pages/project/[ref]/database/backups/restore-to-new-project.tsx b/apps/studio/pages/project/[ref]/database/backups/restore-to-new-project.tsxindex 593ece22f46..3f72753850b 100644--- a/apps/studio/pages/project/[ref]/database/backups/restore-to-new-project.tsx+++ b/apps/studio/pages/project/[ref]/database/backups/restore-to-new-project.tsx@@ -8,16 +8,21 @@ import { PITRForm } from 'components/interfaces/Database/Backups/PITR/pitr-form'import { BackupsList } from 'components/interfaces/Database/Backups/RestoreToNewProject/BackupsList'import { ConfirmRestoreDialog } from 'components/interfaces/Database/Backups/RestoreToNewProject/ConfirmRestoreDialog'import { CreateNewProjectDialog } from 'components/interfaces/Database/Backups/RestoreToNewProject/CreateNewProjectDialog'+import { projectSpecToMonthlyPrice } from 'components/interfaces/Database/Backups/RestoreToNewProject/RestoreToNewProject.utils'+import { DiskType } from 'components/interfaces/DiskManagement/ui/DiskManagement.constants'import { Markdown } from 'components/interfaces/Markdown'import DatabaseLayout from 'components/layouts/DatabaseLayout/DatabaseLayout'+import DefaultLayout from 'components/layouts/DefaultLayout'import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectContext'import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold'import AlertError from 'components/ui/AlertError'import { DocsButton } from 'components/ui/DocsButton'import { FormHeader } from 'components/ui/Forms/FormHeader'import NoPermission from 'components/ui/NoPermission'+import Panel from 'components/ui/Panel'import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'import UpgradeToPro from 'components/ui/UpgradeToPro'+import { useDiskAttributesQuery } from 'data/config/disk-attributes-query'import { useCloneBackupsQuery } from 'data/projects/clone-query'import { useCloneStatusQuery } from 'data/projects/clone-status-query'import { useCheckPermissions, usePermissionsLoaded } from 'hooks/misc/useCheckPermissions'@@ -28,11 +33,6 @@ import { getDatabaseMajorVersion } from 'lib/helpers'import type { NextPageWithLayout } from 'types'import { Alert_Shadcn_, AlertDescription_Shadcn_, AlertTitle_Shadcn_, Badge, Button } from 'ui'import { Admonition, TimestampInfo } from 'ui-patterns'-import Panel from 'components/ui/Panel'-import { projectSpecToMonthlyPrice } from 'components/interfaces/Database/Backups/RestoreToNewProject/RestoreToNewProject.utils'-import { useDiskAttributesQuery } from 'data/config/disk-attributes-query'-import { DiskType } from 'components/interfaces/DiskManagement/ui/DiskManagement.constants'-import DefaultLayout from 'components/layouts/DefaultLayout'const RestoreToNewProjectPage: NextPageWithLayout = () => {return (@@ -269,7 +269,7 @@ const RestoreToNewProject = () => {<MarkdownclassName="max-w-full [&>p]:!leading-normal"content={`This is a temporary limitation whereby projects that were originally restored from another project cannot be restored to yet another project.- If you need to restore from a restored project, please reach out via [support](/support/new?ref=${project?.ref}).`}+ If you need to restore from a restored project, please reach out via [support](/support/new?projectRef=${project?.ref}).`}/><Button asChild type="default"><Link href={`/project/${(cloneStatus?.cloned_from?.source_project as any)?.ref || ''}`}>