Skip to content

Commit

Permalink
fix(editor) Restore Toast Renderer (#6613)
Browse files Browse the repository at this point in the history
- Readded `ToastRenderer` to `CanvasFloatingToolbars`.
  • Loading branch information
seanparsons authored and liady committed Dec 13, 2024
1 parent e5d1d46 commit 84f5d56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 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,9 @@ export const CanvasFloatingToolbars = React.memo((props: { style: React.CSSPrope
<CanvasStrategyPicker />
</FlexRow>
</FlexRow>
<FlexRow style={{ marginTop: 'auto', marginBottom: '6.5px' }}>
<ToastRenderer />
</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 84f5d56

Please sign in to comment.