Skip to content

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

Remove pixel based css classes, and use minSize and maxSize property instead (#34464)

Joshen Limc8fad3237130
diff --git a/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx b/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx
index 06b695a7534..198ef2e02c1 100644
--- a/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx
+++ b/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx
@@ -1,8 +1,8 @@
import { useParams } from 'common'
import ProjectAPIDocs from 'components/interfaces/ProjectAPIDocs/ProjectAPIDocs'
import { AIAssistantPanel } from 'components/ui/AIAssistantPanel/AIAssistantPanel'
-import { EditorPanel } from 'components/ui/EditorPanel/EditorPanel'
import AISettingsModal from 'components/ui/AISettingsModal'
+import { EditorPanel } from 'components/ui/EditorPanel/EditorPanel'
import { Loading } from 'components/ui/Loading'
import { ResourceExhaustionWarningBanner } from 'components/ui/ResourceExhaustionWarningBanner/ResourceExhaustionWarningBanner'
import { AnimatePresence, motion } from 'framer-motion'
@@ -143,7 +143,7 @@ const ProjectLayout = forwardRef<HTMLDivElement, PropsWithChildren<ProjectLayout
<meta name="description" content="Supabase Studio" />
</Head>
<div className="flex flex-row h-full w-full">
- <ResizablePanelGroup className="" direction="horizontal" autoSaveId="project-layout">
+ <ResizablePanelGroup direction="horizontal" autoSaveId="project-layout">
{showProductMenu && productMenu && (
<ResizablePanel
order={1}
@@ -190,8 +190,8 @@ const ProjectLayout = forwardRef<HTMLDivElement, PropsWithChildren<ProjectLayout
)}
<ResizablePanel order={2} id="panel-right" className="h-full flex flex-col w-full">
<ResizablePanelGroup
- className="h-full w-full overflow-x-hidden flex-1 flex flex-row gap-0"
direction="horizontal"
+ className="h-full w-full overflow-x-hidden flex-1 flex flex-row gap-0"
autoSaveId="project-layout-content"
>
<ResizablePanel
@@ -221,10 +221,11 @@ const ProjectLayout = forwardRef<HTMLDivElement, PropsWithChildren<ProjectLayout
<ResizableHandle withHandle />
<ResizablePanel
id="panel-assistant"
+ minSize={30}
+ maxSize={50}
className={cn(
'border-l xl:border-l-0 bg fixed z-40 md:absolute md:z-0 right-0 top-0 md:top-[48px] bottom-0 xl:relative xl:top-0',
- 'w-screen h-[100dvh] md:h-auto md:w-auto md:min-w-[400px] max-w-[500px]',
- '2xl:min-w-[500px] 2xl:max-w-[600px]'
+ 'w-screen h-[100dvh] md:h-auto md:w-auto'
)}
>
{aiAssistantPanel.open && <AIAssistantPanel />}