Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
const results = [
await assertSize('./fixtures/ssg/dist/client', 288),
await assertSize('./fixtures/webstudio-remix-netlify-functions/build/client', 376),
await assertSize('./fixtures/webstudio-remix-vercel/build/client', 904),
await assertSize('./fixtures/webstudio-remix-vercel/build/client', 908),
]
for (const result of results) {
if (result.passed) {
Expand Down
6 changes: 6 additions & 0 deletions apps/builder/app/builder/builder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,13 @@ import { migrateWebstudioDataMutable } from "~/shared/webstudio-data-migrator";
import { Loading, LoadingBackground } from "./shared/loading";
import { mergeRefs } from "@react-aria/utils";
import { CommandPanel } from "./features/command-panel";

import {
initCopyPaste,
initCopyPasteForContentEditMode,
} from "~/shared/copy-paste/init-copy-paste";
import { useInertHandlers } from "./shared/inert-handlers";
import { TextToolbar } from "./features/workspace/canvas-tools/text-toolbar";

registerContainers();

Expand Down Expand Up @@ -122,6 +124,7 @@ const Main = ({ children, css }: { children: ReactNode; css?: CSS }) => (
css={{
gridArea: "main",
position: "relative",
isolation: "isolate",
...css,
}}
>
Expand Down Expand Up @@ -416,6 +419,9 @@ export const Builder = ({
/>
}
/>
<Main css={{ pointerEvents: "none" }}>
<TextToolbar />
</Main>
{isPreviewMode === false && <Footer />}
<CloneProjectDialog
isOpen={isCloneDialogOpen}
Expand Down
1 change: 1 addition & 0 deletions apps/builder/app/builder/features/footer/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const Footer = () => {
as="footer"
align="center"
css={{
isolation: "isolate",
gridArea: "footer",
height: theme.spacing[11],
background: theme.colors.backgroundTopbar,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ import {
HoveredInstanceOutline,
SelectedInstanceOutline,
} from "./outline";
import { TextToolbar } from "./text-toolbar";

import { Label } from "./outline/label";
import { Outline } from "./outline/outline";
import { useSubscribeDragAndDropState } from "./use-subscribe-drag-drop-state";
import { ResizeHandles } from "./resize-handles";
import { MediaBadge } from "./media-badge";
import { applyScale } from "./outline";
import { $scale } from "~/builder/shared/nano-states";
import { BlockChildHoveredInstanceOutline } from "./outline/block-instance-outline";
Expand Down Expand Up @@ -73,15 +71,11 @@ export const CanvasTools = () => {

return (
<>
<MediaBadge />
<ResizeHandles />
{isPreviewMode === false && (
<>
<SelectedInstanceOutline />
<HoveredInstanceOutline />
<CollaborativeInstanceOutline />
<TextToolbar />

<BlockChildHoveredInstanceOutline />
</>
)}
Expand Down
12 changes: 11 additions & 1 deletion apps/builder/app/builder/features/workspace/workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { $textEditingInstanceSelector } from "~/shared/nano-states";
import { CanvasTools } from "./canvas-tools";
import { useSetCanvasWidth } from "../breakpoints";
import { selectInstance } from "~/shared/awareness";
import { ResizeHandles } from "./canvas-tools/resize-handles";
import { MediaBadge } from "./canvas-tools/media-badge";

const workspaceStyle = css({
flexGrow: 1,
Expand Down Expand Up @@ -101,6 +103,7 @@ export const Workspace = ({ children, onTransitionEnd }: WorkspaceProps) => {
selectInstance(undefined);
$textEditingInstanceSelector.set(undefined);
};
const outlineStyle = useOutlineStyle();

return (
<>
Expand All @@ -116,14 +119,21 @@ export const Workspace = ({ children, onTransitionEnd }: WorkspaceProps) => {
>
{children}
</div>
<div
data-name="canvas-tools-wrapper"
className={canvasContainerStyle({ css: { pointerEvents: "none" } })}
style={outlineStyle}
>
<MediaBadge />
<ResizeHandles />
</div>
</div>
</>
);
};

export const CanvasToolsContainer = () => {
const outlineStyle = useOutlineStyle();
useSetCanvasWidth();

return (
<>
Expand Down
Loading
Loading