From 8c793bf0fe151f8b40515b0120be41821ec96a9f Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 14 Dec 2025 21:58:10 +0200 Subject: [PATCH] fix(layout): title area gets wrong note context --- apps/client/src/layouts/desktop_layout.tsx | 26 +++++++++---------- .../src/widgets/ribbon/RibbonDefinition.ts | 2 +- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/apps/client/src/layouts/desktop_layout.tsx b/apps/client/src/layouts/desktop_layout.tsx index 06e02f058..b443bd27d 100644 --- a/apps/client/src/layouts/desktop_layout.tsx +++ b/apps/client/src/layouts/desktop_layout.tsx @@ -79,19 +79,6 @@ export default class DesktopLayout { const customTitleBarButtons = !hasNativeTitleBar && !isMac && !isWindows; const isNewLayout = isExperimentalFeatureEnabled("new-layout"); - const titleRow = new FlexContainer("row") - .class("title-row") - .cssBlock(".title-row > * { margin: 5px; }") - .child() - .child() - .optChild(isNewLayout, ) - .child() - .optChild(!isNewLayout, ) - .optChild(!isNewLayout, ) - .optChild(!isNewLayout, ) - .optChild(!isNewLayout, ) - .optChild(isNewLayout, ); - const rootContainer = new RootContainer(true) .setParent(appContext) .class(`${launcherPaneIsHorizontal ? "horizontal" : "vertical" }-layout`) @@ -144,7 +131,18 @@ export default class DesktopLayout { .child( new SplitNoteContainer(() => new NoteWrapperWidget() - .child(titleRow) + .child(new FlexContainer("row") + .class("title-row") + .cssBlock(".title-row > * { margin: 5px; }") + .child() + .child() + .optChild(isNewLayout, ) + .child() + .optChild(!isNewLayout, ) + .optChild(!isNewLayout, ) + .optChild(!isNewLayout, ) + .optChild(!isNewLayout, ) + .optChild(isNewLayout, )) .optChild(!isNewLayout, ) .optChild(isNewLayout, ) .child(new WatchedFileUpdateStatusWidget()) diff --git a/apps/client/src/widgets/ribbon/RibbonDefinition.ts b/apps/client/src/widgets/ribbon/RibbonDefinition.ts index 4960c31c9..a525718fe 100644 --- a/apps/client/src/widgets/ribbon/RibbonDefinition.ts +++ b/apps/client/src/widgets/ribbon/RibbonDefinition.ts @@ -74,7 +74,7 @@ export const RIBBON_TAB_DEFINITIONS: TabConfiguration[] = [ title: t("file_properties.title"), icon: "bx bx-file", content: FilePropertiesTab, - show: ({ note }) => note?.type === "file", + show: ({ note }) => !isNewLayout && note?.type === "file", toggleCommand: "toggleRibbonTabFileProperties", activate: ({ note }) => note?.mime !== "application/pdf" },