From 665d9a4c9a91d18fd09d5b17bb6a678b65da0fe7 Mon Sep 17 00:00:00 2001 From: Sean Parsons Date: Fri, 1 Nov 2024 14:56:32 +0000 Subject: [PATCH 1/2] fix(editor) Restore Toast Renderer - Readded `ToastRenderer` to `CanvasFloatingToolbars`. --- editor/src/components/canvas/canvas-floating-toolbars.tsx | 6 ++++++ editor/src/components/editor/editor-component.tsx | 1 + 2 files changed, 7 insertions(+) diff --git a/editor/src/components/canvas/canvas-floating-toolbars.tsx b/editor/src/components/canvas/canvas-floating-toolbars.tsx index 87e1e7041f26..7c84e91a7ddb 100644 --- a/editor/src/components/canvas/canvas-floating-toolbars.tsx +++ b/editor/src/components/canvas/canvas-floating-toolbars.tsx @@ -6,6 +6,7 @@ import { ErrorOverlayComponent } from './canvas-error-overlay' import { SafeModeErrorOverlay } from './canvas-wrapper-component' import { CanvasStrategyPicker } from './controls/select-mode/canvas-strategy-picker' import { TestMenu } from '../titlebar/test-menu' +import { ToastRenderer } from '../editor/editor-component' export const CanvasFloatingToolbars = React.memo((props: { style: React.CSSProperties }) => { const safeMode = useEditorState( @@ -43,6 +44,11 @@ export const CanvasFloatingToolbars = React.memo((props: { style: React.CSSPrope + + + + + {/* The error overlays are deliberately the last here so they hide other canvas UI, except the test menu */} {safeMode ? : } diff --git a/editor/src/components/editor/editor-component.tsx b/editor/src/components/editor/editor-component.tsx index c7bcd6d1cbe1..a712edca6ee0 100644 --- a/editor/src/components/editor/editor-component.tsx +++ b/editor/src/components/editor/editor-component.tsx @@ -645,6 +645,7 @@ export const ToastRenderer = React.memo(() => { return ( Date: Fri, 1 Nov 2024 18:10:25 +0000 Subject: [PATCH 2/2] refactor(editor) Simplified HTML. --- editor/src/components/canvas/canvas-floating-toolbars.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/editor/src/components/canvas/canvas-floating-toolbars.tsx b/editor/src/components/canvas/canvas-floating-toolbars.tsx index 7c84e91a7ddb..938290b89427 100644 --- a/editor/src/components/canvas/canvas-floating-toolbars.tsx +++ b/editor/src/components/canvas/canvas-floating-toolbars.tsx @@ -44,10 +44,8 @@ export const CanvasFloatingToolbars = React.memo((props: { style: React.CSSPrope - - - - + + {/* The error overlays are deliberately the last here so they hide other canvas UI, except the test menu */} {safeMode ? : }