diff --git a/packages/ui/src/components/layout/MainLayout.tsx b/packages/ui/src/components/layout/MainLayout.tsx index 7b39875d..40889c77 100644 --- a/packages/ui/src/components/layout/MainLayout.tsx +++ b/packages/ui/src/components/layout/MainLayout.tsx @@ -606,58 +606,54 @@ export const MainLayout: React.FC = () => {
- {isSidebarOpen ? ( - <> -
-
- - ) : null} - {isRightSidebarOpen ? ( - <> -
-
- - ) : null} +
+
+
+
{
diff --git a/packages/ui/src/components/layout/RightSidebar.tsx b/packages/ui/src/components/layout/RightSidebar.tsx index 44c59f68..d671c6ac 100644 --- a/packages/ui/src/components/layout/RightSidebar.tsx +++ b/packages/ui/src/components/layout/RightSidebar.tsx @@ -34,12 +34,13 @@ export const RightSidebar: React.FC = ({ isOpen, children, cl return; } - sidebar.style.setProperty('--oc-right-sidebar-width', `${nextWidth}px`); + sidebar.style.width = `${nextWidth}px`; + sidebar.style.minWidth = `${nextWidth}px`; + sidebar.style.maxWidth = `${nextWidth}px`; }, []); - const appliedWidth = isOpen - ? Math.min(RIGHT_SIDEBAR_MAX_WIDTH, Math.max(RIGHT_SIDEBAR_MIN_WIDTH, rightSidebarWidth || RIGHT_SIDEBAR_CONTENT_WIDTH)) - : 0; + const openWidth = Math.min(RIGHT_SIDEBAR_MAX_WIDTH, Math.max(RIGHT_SIDEBAR_MIN_WIDTH, rightSidebarWidth || RIGHT_SIDEBAR_CONTENT_WIDTH)); + const appliedWidth = isOpen ? openWidth : 0; const handlePointerDown = (event: React.PointerEvent) => { if (!isOpen) { @@ -101,22 +102,25 @@ export const RightSidebar: React.FC = ({ isOpen, children, cl } }, [isResizing]); + const currentWidth = isResizing ? (resizingWidthRef.current ?? appliedWidth) : appliedWidth; + return (