From c44bb6c2037a6931560d5508e2f06ce58d9efbde Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 18 Dec 2025 16:31:43 +0200 Subject: [PATCH] chore(floating_buttons): revert changes due to new layout --- apps/client/src/layouts/desktop_layout.tsx | 2 +- .../widgets/FloatingButtonsDefinitions.tsx | 27 +++++++++---------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/apps/client/src/layouts/desktop_layout.tsx b/apps/client/src/layouts/desktop_layout.tsx index 013460723..af47fd478 100644 --- a/apps/client/src/layouts/desktop_layout.tsx +++ b/apps/client/src/layouts/desktop_layout.tsx @@ -146,7 +146,7 @@ export default class DesktopLayout { .optChild(isNewLayout, )) .optChild(!isNewLayout, ) .child(new WatchedFileUpdateStatusWidget()) - .child() + .optChild(!isNewLayout, ) .child( new ScrollingContainer() .filling() diff --git a/apps/client/src/widgets/FloatingButtonsDefinitions.tsx b/apps/client/src/widgets/FloatingButtonsDefinitions.tsx index 4cd6e1c5f..35dbc92ae 100644 --- a/apps/client/src/widgets/FloatingButtonsDefinitions.tsx +++ b/apps/client/src/widgets/FloatingButtonsDefinitions.tsx @@ -78,10 +78,8 @@ export const POPUP_HIDDEN_FLOATING_BUTTONS: FloatingButtonsList = [ ToggleReadOnlyButton ]; -const isNewLayout = isExperimentalFeatureEnabled("new-layout"); - function RefreshBackendLogButton({ note, parentComponent, noteContext, isDefaultViewMode }: FloatingButtonContext) { - const isEnabled = !isNewLayout && (note.noteId === "_backendLog" || note.type === "render") && isDefaultViewMode; + const isEnabled = (note.noteId === "_backendLog" || note.type === "render") && isDefaultViewMode; return isEnabled && (null); const isEnabled = ( - !isNewLayout - && ["mermaid", "canvas", "mindMap", "image"].includes(note?.type ?? "") + ["mermaid", "canvas", "mindMap", "image"].includes(note?.type ?? "") && note?.isContentAvailable() && isDefaultViewMode ); @@ -287,7 +284,7 @@ function CopyImageReferenceButton({ note, isDefaultViewMode }: FloatingButtonCon } function ExportImageButtons({ note, triggerEvent, isDefaultViewMode }: FloatingButtonContext) { - const isEnabled = !isNewLayout && ["mermaid", "mindMap"].includes(note?.type ?? "") + const isEnabled = ["mermaid", "mindMap"].includes(note?.type ?? "") && note?.isContentAvailable() && isDefaultViewMode; return isEnabled && ( <> @@ -308,7 +305,7 @@ function ExportImageButtons({ note, triggerEvent, isDefaultViewMode }: FloatingB function InAppHelpButton({ note }: FloatingButtonContext) { const helpUrl = getHelpUrlForNote(note); - const isEnabled = !!helpUrl && !isNewLayout; + const isEnabled = !!helpUrl; return isEnabled && ( 0; + const isEnabled = isDefaultViewMode && backlinkCount > 0; return (isEnabled &&