From 2cce7fc945d95025841da677752981997a47339c Mon Sep 17 00:00:00 2001 From: ArielMn22 Date: Wed, 25 Feb 2026 13:09:56 -0300 Subject: [PATCH 1/6] ENG-1706: Removing UI buttons, except for zoom and revert --- packages/common/src/constants.ts | 1 + packages/excalidraw/components/LayerUI.tsx | 16 +++++--- packages/excalidraw/components/MobileMenu.tsx | 17 ++++++++ .../excalidraw/components/footer/Footer.tsx | 41 +++++++++++-------- packages/excalidraw/index.tsx | 1 + .../__snapshots__/excalidraw.test.tsx.snap | 10 ++--- packages/excalidraw/tests/excalidraw.test.tsx | 34 +++++++++++++++ packages/excalidraw/types.ts | 8 ++++ 8 files changed, 101 insertions(+), 27 deletions(-) diff --git a/packages/common/src/constants.ts b/packages/common/src/constants.ts index c948e441bb59..e070ff9c0ed5 100644 --- a/packages/common/src/constants.ts +++ b/packages/common/src/constants.ts @@ -330,6 +330,7 @@ export const DEFAULT_UI_OPTIONS: AppProps["UIOptions"] = { tools: { image: true, }, + uiMode: "minimal", }; export const MAX_DECIMALS_FOR_SVG_EXPORT = 2; diff --git a/packages/excalidraw/components/LayerUI.tsx b/packages/excalidraw/components/LayerUI.tsx index 4cd9c7dbbf9f..e4de766d0741 100644 --- a/packages/excalidraw/components/LayerUI.tsx +++ b/packages/excalidraw/components/LayerUI.tsx @@ -163,6 +163,7 @@ const LayerUI = ({ const editorInterface = useEditorInterface(); const stylesPanelMode = useStylesPanelMode(); const isCompactStylesPanel = stylesPanelMode === "compact"; + const isMinimalUI = UIOptions.uiMode === "minimal"; const tunnels = useInitializeTunnels(); const spacing = isCompactStylesPanel @@ -471,8 +472,8 @@ const LayerUI = ({ {/* render component fallbacks. Can be rendered anywhere as they'll be tunneled away. We only render tunneled components that actually have defaults when host do not render anything. */} - - {UIOptions.showSidebarTrigger !== false && ( + {!isMinimalUI && } + {!isMinimalUI && UIOptions.showSidebarTrigger !== false && ( )} {editorInterface.formFactor !== "phone" && ( @@ -610,15 +612,17 @@ const LayerUI = ({ : {} } > - {renderWelcomeScreen && } - {renderFixedSideContainer()} + {!isMinimalUI && + renderWelcomeScreen && } + {!isMinimalUI && renderFixedSideContainer()}