Skip to content

Commit

Permalink
fix(editor) Restore Toast Renderer
Browse files Browse the repository at this point in the history
- Readded `ToastRenderer` to `CanvasFloatingToolbars`.
  • Loading branch information
seanparsons committed Nov 1, 2024
1 parent 07c6bd8 commit 665d9a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions editor/src/components/canvas/canvas-floating-toolbars.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -43,6 +44,11 @@ export const CanvasFloatingToolbars = React.memo((props: { style: React.CSSPrope
<CanvasStrategyPicker />
</FlexRow>
</FlexRow>
<FlexRow style={{ marginTop: `auto` }}>
<FlexRow style={{ marginBottom: '6.5px' }}>
<ToastRenderer />
</FlexRow>
</FlexRow>
{/* The error overlays are deliberately the last here so they hide other canvas UI, except the test menu */}
{safeMode ? <SafeModeErrorOverlay /> : <ErrorOverlayComponent />}
<TestMenu />
Expand Down
1 change: 1 addition & 0 deletions editor/src/components/editor/editor-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,7 @@ export const ToastRenderer = React.memo(() => {
return (
<FlexColumn
key={'toast-stack'}
data-testid={'toast-stack'}
style={{
zIndex: 100,
gap: 10,
Expand Down

0 comments on commit 665d9a4

Please sign in to comment.