diff --git a/app/components/AuthenticatedLayout.tsx b/app/components/AuthenticatedLayout.tsx index 6499cb5b5a..f0db9eb365 100644 --- a/app/components/AuthenticatedLayout.tsx +++ b/app/components/AuthenticatedLayout.tsx @@ -107,7 +107,12 @@ const AuthenticatedLayout: React.FC = ({ children }: Props) => { - + diff --git a/app/components/Layout.tsx b/app/components/Layout.tsx index 209817d97f..3fe0531477 100644 --- a/app/components/Layout.tsx +++ b/app/components/Layout.tsx @@ -21,14 +21,17 @@ type Props = { title?: string; /** Left sidebar content. */ sidebar?: React.ReactNode; + /** Whether the sidebar can be collapsed, defaults to true. */ + sidebarCanCollapse?: boolean; }; const Layout = React.forwardRef(function Layout_( - { title, children, sidebar }: Props, + { title, children, sidebar, sidebarCanCollapse = true }: Props, ref: React.RefObject ) { const { ui } = useStores(); - const sidebarCollapsed = !sidebar || ui.sidebarIsClosed; + const sidebarCollapsed = + !sidebar || (ui.sidebarIsClosed && sidebarCanCollapse); const sidebarRight = useRightSidebarContent(); return ( diff --git a/app/scenes/Shared/index.tsx b/app/scenes/Shared/index.tsx index dd2531b920..a01cd9bb31 100644 --- a/app/scenes/Shared/index.tsx +++ b/app/scenes/Shared/index.tsx @@ -266,6 +266,7 @@ function SharedScene() { : null} + sidebarCanCollapse={false} > {model instanceof Document ? (