diff --git a/components/editor/canvas-wrapper.tsx b/components/editor/canvas-wrapper.tsx index 66debc4..442c256 100644 --- a/components/editor/canvas-wrapper.tsx +++ b/components/editor/canvas-wrapper.tsx @@ -4,6 +4,7 @@ import { Component, type ReactNode } from "react"; import { LiveblocksProvider, RoomProvider, ClientSideSuspense } from "@liveblocks/react/suspense"; import { CanvasFlow } from "@/components/editor/canvas-flow"; +import { DraftlyLoader } from "@/components/ui/marketing/draftly-loader"; import type { CanvasSaveStatus } from "@/hooks/use-canvas-autosave"; // --------------------------------------------------------------------------- @@ -85,9 +86,9 @@ export function CanvasWrapper({ -

Connecting to canvas…

- + // Fixed over the whole editor: the navbar and AI sidebar render outside this boundary. + // z-45 sits above the sidebars (z-20/z-40) and below dialogs (z-50). + } > Promise; } +/** Button label that swaps to a spinner and progress text while the action runs. */ +function ActionLabel({ isLoading, idle, busy }: { isLoading: boolean; idle: string; busy: string }) { + if (!isLoading) { + return idle; + } + + return ( + <> +