the page builder draws nothing on the page
A bar on every band, Edit / Spacing / Delete above every block, dotted outlines around blocks and columns, an add-zone at the end. Look at that and you are looking at the editor, not the page — on the screen whose whole purpose is judging the page. A click selects a block and its editor opens in the panel beside the preview, where every other control now lives. data-fofos-component stays: it is how the panel writes a draft into the page as somebody types. Adding a section, adding a block, deleting either and opening a spacing editor have no door any more. The handlers are untouched and nothing calls them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@ import { useClient } from 'hooks/useClient';
|
||||
import { readableError } from '../errors';
|
||||
import { SitePreview, useDevPort } from '../SitePreview';
|
||||
import { usePreviewable, useViewMode } from '../ViewMode';
|
||||
import { paintCanvas, type CanvasComponent, type CanvasSection } from '../canvas';
|
||||
import { paintSelection, type CanvasComponent, type CanvasSection } from '../canvas';
|
||||
|
||||
/*
|
||||
What the Spacing dialog calls a block, by kind.
|
||||
@@ -163,7 +163,7 @@ export const PageBuilderPanel = () => {
|
||||
const onDocument = useCallback(
|
||||
(frameDocument: Document) => {
|
||||
frameDoc.current = frameDocument;
|
||||
return paintCanvas(frameDocument, {
|
||||
return paintSelection(frameDocument, {
|
||||
sections,
|
||||
onAddSection: () => handlersRef.current.add(),
|
||||
onDeleteSection: (section) => handlersRef.current.remove(section.id),
|
||||
|
||||
Reference in New Issue
Block a user