diff --git a/apps/studio/components/layouts/ProjectLayout/ProductMenuBar.tsx b/apps/studio/components/layouts/ProjectLayout/ProductMenuBar.tsx index 1bf0e8b733f..dcd5ad39405 100644 --- a/apps/studio/components/layouts/ProjectLayout/ProductMenuBar.tsx +++ b/apps/studio/components/layouts/ProjectLayout/ProductMenuBar.tsx @@ -8,7 +8,7 @@ const ProductMenuBar = ({ title, children }: PropsWithChildren) => { const router = useRouter() const { ref: projectRef } = useParams() @@ -105,26 +108,46 @@ const ProjectLayout = ({ {/* Left-most navigation side bar to access products */} {!hideIconBar && } {/* Product menu bar */} - {!showPausedState && ( - - {productMenu} - - )} -
- {!navLayoutV2 && !hideHeader && IS_PLATFORM && } - {showPausedState ? ( -
-
- -
-
- ) : ( - - - {children} - + + {!showPausedState && productMenu && ( + <> + + + {productMenu} + + + + )} -
+ +
+ {!navLayoutV2 && !hideHeader && IS_PLATFORM && } + {showPausedState ? ( +
+
+ +
+
+ ) : ( + + + {children} + + )} +
+
+ diff --git a/apps/studio/components/layouts/SQLEditorLayout/SQLEditorLayout.tsx b/apps/studio/components/layouts/SQLEditorLayout/SQLEditorLayout.tsx index 3a00e1d1214..b20474dba70 100644 --- a/apps/studio/components/layouts/SQLEditorLayout/SQLEditorLayout.tsx +++ b/apps/studio/components/layouts/SQLEditorLayout/SQLEditorLayout.tsx @@ -17,6 +17,7 @@ const SQLEditorLayout = ({ title, children }: SQLEditorLayoutProps) => { product="SQL Editor" productMenu={productMenu} isBlocking={false} + resizableSidebar > {children} diff --git a/apps/studio/components/layouts/TableEditorLayout/TableEditorLayout.tsx b/apps/studio/components/layouts/TableEditorLayout/TableEditorLayout.tsx index 9ca18c1fb5d..abeb9fb5339 100644 --- a/apps/studio/components/layouts/TableEditorLayout/TableEditorLayout.tsx +++ b/apps/studio/components/layouts/TableEditorLayout/TableEditorLayout.tsx @@ -23,7 +23,12 @@ const TableEditorLayout = ({ children }: PropsWithChildren<{}>) => { } return ( - + {children} ) diff --git a/package-lock.json b/package-lock.json index b52005e5a69..fb73df93e1b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -838,7 +838,6 @@ "react-intersection-observer": "^9.5.3", "react-markdown": "^8.0.3", "react-simple-maps": "4.0.0-beta.6", - "react-split": "^2.0.13", "react-tracked": "^1.7.11", "react-virtualized-auto-sizer": "^1.0.20", "react-window": "^1.8.6", @@ -30237,9 +30236,9 @@ } }, "node_modules/react-resizable-panels": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/react-resizable-panels/-/react-resizable-panels-2.0.9.tgz", - "integrity": "sha512-ZylBvs7oG7Y/INWw3oYGolqgpFvoPW8MPeg9l1fURDeKpxrmUuCHBUmPj47BdZ11MODImu3kZYXG85rbySab7w==", + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/react-resizable-panels/-/react-resizable-panels-2.0.11.tgz", + "integrity": "sha512-tA3OvGFEK/U9rKuEg6TpXcr+i+cN5X8B4UIvs7jqr5lby629pDTGvqRjo1EJLhBpRZfkg0Zz1INJlSYigaS99g==", "peerDependencies": { "react": "^16.14.0 || ^17.0.0 || ^18.0.0", "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0" @@ -30306,17 +30305,6 @@ "react-dom": ">=15.0.0" } }, - "node_modules/react-split": { - "version": "2.0.14", - "license": "MIT", - "dependencies": { - "prop-types": "^15.5.7", - "split.js": "^1.6.0" - }, - "peerDependencies": { - "react": "*" - } - }, "node_modules/react-style-singleton": { "version": "2.2.1", "license": "MIT", @@ -32990,10 +32978,6 @@ "tiny-updater": "^3.5.1" } }, - "node_modules/split.js": { - "version": "1.6.5", - "license": "MIT" - }, "node_modules/split2": { "version": "4.2.0", "dev": true, @@ -37662,7 +37646,7 @@ "react-hook-form": "^7.45.0", "react-hot-toast": "^2.4.1", "react-markdown": "^8.0.3", - "react-resizable-panels": "^2.0.9", + "react-resizable-panels": "^2.0.11", "react-syntax-highlighter": "^15.5.0", "react-tooltip": "^4.2.17", "reactflow": "^11.10.1", diff --git a/packages/ui/package.json b/packages/ui/package.json index cbd1e654608..aaba83d932b 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -74,7 +74,7 @@ "react-hook-form": "^7.45.0", "react-hot-toast": "^2.4.1", "react-markdown": "^8.0.3", - "react-resizable-panels": "^2.0.9", + "react-resizable-panels": "^2.0.11", "react-syntax-highlighter": "^15.5.0", "react-tooltip": "^4.2.17", "reactflow": "^11.10.1", diff --git a/packages/ui/src/components/shadcn/ui/resizable.tsx b/packages/ui/src/components/shadcn/ui/resizable.tsx index 837e962ba42..9bfbfaf1721 100644 --- a/packages/ui/src/components/shadcn/ui/resizable.tsx +++ b/packages/ui/src/components/shadcn/ui/resizable.tsx @@ -1,5 +1,8 @@ +'use client' + import { GripVertical } from 'lucide-react' import * as ResizablePrimitive from 'react-resizable-panels' + import { cn } from '../../../lib/utils/cn' const ResizablePanelGroup = ({ @@ -24,16 +27,28 @@ const ResizableHandle = ({ div]:rotate-90', + 'data-[resize-handle-state=drag]:bg-border-strong', + 'group', + 'transition-colors', className )} {...props} > {withHandle && ( -
+
)} ) -export { ResizableHandle, ResizablePanel, ResizablePanelGroup } +export { ResizablePanelGroup, ResizablePanel, ResizableHandle }