fix: Settings appear behind sidebar (#12824)

This commit is contained in:
Tom Moor authored and GitHub committed 2026-06-24 21:53:20 -04:00
1 parent b8ed9be236
commit 54be0a9db3
3 files changed
+12 -3

No files matched your search

+6 -1
View File
@@ -107,7 +107,12 @@ const AuthenticatedLayout: React.FC = ({ children }: Props) => {
<RightSidebarProvider>
<PortalContext.Provider value={layoutRef.current}>
<DndProvider backend={EditorAwareHTML5Backend}>
<Layout title={team.name} sidebar={sidebar} ref={layoutRef}>
<Layout
title={team.name}
sidebar={sidebar}
sidebarCanCollapse={!isSettings}
ref={layoutRef}
>
<RegisterKeyDown trigger="n" handler={goToNewDocument} />
<RegisterKeyDown trigger="t" handler={goToSearch} />
<RegisterKeyDown trigger="/" handler={goToSearch} />
+5 -2
View File
@@ -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<HTMLDivElement>
) {
const { ui } = useStores();
const sidebarCollapsed = !sidebar || ui.sidebarIsClosed;
const sidebarCollapsed =
!sidebar || (ui.sidebarIsClosed && sidebarCanCollapse);
const sidebarRight = useRightSidebarContent();
return (
+1
View File
@@ -266,6 +266,7 @@ function SharedScene() {
<Layout
title={pageTitle}
sidebar={hasSidebar ? <Sidebar share={share} /> : null}
sidebarCanCollapse={false}
>
{model instanceof Document ? (
<DocumentScene document={model} />