Skip to content

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

fix: mobile issues for getLayout (#33415)

Jonathan Summers-Muir3cec304f1f76
diff --git a/apps/studio/components/layouts/DefaultLayout.tsx b/apps/studio/components/layouts/DefaultLayout.tsx
index 37537952544..1bf21f72f49 100644
--- a/apps/studio/components/layouts/DefaultLayout.tsx
+++ b/apps/studio/components/layouts/DefaultLayout.tsx
@@ -12,9 +12,10 @@ export interface DefaultLayoutProps {
hasProductMenu?: boolean
// Shows header in the top left of the page
headerTitle?: string
+ showProductMenu?: boolean
}
-const DefaultLayout = ({ children }: PropsWithChildren<DefaultLayoutProps>) => {
+const DefaultLayout = ({ children, showProductMenu }: PropsWithChildren<DefaultLayoutProps>) => {
return (
<>
<AppBannerContextProvider>
@@ -23,7 +24,7 @@ const DefaultLayout = ({ children }: PropsWithChildren<DefaultLayoutProps>) => {
<AppBannerWrapper />
<div className="flex-shrink-0">
<MobileNavigationBar />
- <LayoutHeader />
+ <LayoutHeader showProductMenu={showProductMenu} />
</div>
{/* Main Content Area */}
<div className="flex flex-1 w-full overflow-y-hidden">
diff --git a/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx b/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx
index 7dfdae53565..f4d06e49826 100644
--- a/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx
+++ b/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx
@@ -152,6 +152,7 @@ const ProjectLayout = forwardRef<HTMLDivElement, PropsWithChildren<ProjectLayout
defaultSize={1}
id="panel-left"
className={cn(
+ 'hidden md:block',
'transition-all duration-[120ms]',
sideBarIsOpen
? resizableSidebar
@@ -182,7 +183,11 @@ const ProjectLayout = forwardRef<HTMLDivElement, PropsWithChildren<ProjectLayout
</ResizablePanel>
)}
{showProductMenu && productMenu && sideBarIsOpen && (
- <ResizableHandle withHandle disabled={resizableSidebar ? false : true} />
+ <ResizableHandle
+ withHandle
+ disabled={resizableSidebar ? false : true}
+ className="hidden md:block"
+ />
)}
<ResizablePanel order={2} id="panel-right" className="h-full flex flex-col w-full">
<ResizablePanelGroup
@@ -192,7 +197,7 @@ const ProjectLayout = forwardRef<HTMLDivElement, PropsWithChildren<ProjectLayout
>
<ResizablePanel
id="panel-content"
- className={cn('w-full min-w-[600px] bg-dash-sidebar')}
+ className={cn('w-full xl:min-w-[600px] bg-dash-sidebar')}
>
<main
className="h-full flex flex-col flex-1 w-full overflow-y-auto overflow-x-hidden"
diff --git a/apps/studio/pages/project/[ref]/index.tsx b/apps/studio/pages/project/[ref]/index.tsx
index 2c5ae885c7d..2fc2c5b4ccc 100644
--- a/apps/studio/pages/project/[ref]/index.tsx
+++ b/apps/studio/pages/project/[ref]/index.tsx
@@ -143,7 +143,7 @@ const Home: NextPageWithLayout = () => {
}
Home.getLayout = (page) => (
- <DefaultLayout>
+ <DefaultLayout showProductMenu={false}>
<ProjectLayoutWithAuth>{page}</ProjectLayoutWithAuth>
</DefaultLayout>
)