From 9482783a62093ffee8b402fb5e058c6ff997ae53 Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Mon, 1 Jun 2026 14:40:37 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(frontend)=20don't=20load=20left=20?= =?UTF-8?q?panel=20in=20error=20boundary=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Error boundary page is used when an error occurs in the application, this page can have states still set, causing side effects depend the component that throw the error. In this case, the left panel is still loaded and try to load the tree, but the provider is not set, causing a crash error inside the error boundary page. We don't need the left panel in the error boundary page, so we can just not load it to avoid this issue. --- CHANGELOG.md | 1 + src/frontend/apps/impress/src/layouts/PageLayout.tsx | 4 +++- src/frontend/apps/impress/src/pages/_error.tsx | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 949df96bb..e9cd99dff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ and this project adheres to - 🐛(backend) prevent admins/owners from overwriting other users comments - 🐛(y-provider) return empty output when converting empty Yjs document - 🐛(backend) use computed_link_reach in handle_onboarding_document #2305 +- 🐛(frontend) fix application crashes when using GTranslate and zoom #2372 - 🐛(frontend) fix emoji pdf not matching #2375 ### Changed diff --git a/src/frontend/apps/impress/src/layouts/PageLayout.tsx b/src/frontend/apps/impress/src/layouts/PageLayout.tsx index 4969008a4..44746e4c5 100644 --- a/src/frontend/apps/impress/src/layouts/PageLayout.tsx +++ b/src/frontend/apps/impress/src/layouts/PageLayout.tsx @@ -12,11 +12,13 @@ import { MAIN_LAYOUT_ID } from './conf'; interface PageLayoutProps { withFooter?: boolean; + withLeftPanel?: boolean; } export function PageLayout({ children, withFooter = true, + withLeftPanel = true, }: PropsWithChildren) { const { isLargeScreen } = useResponsiveStore(); const { t } = useTranslation(); @@ -45,7 +47,7 @@ export function PageLayout({ `} aria-label={t('Main content')} > - {!isLargeScreen && } + {withLeftPanel && !isLargeScreen && } {children} {withFooter &&