Skip to content

The Blocks Workspace & Visual Studio

Blocks delivers two dedicated authoring interfaces: the central governance workspace at Setup > Blocks (ProcessBlocks, dist/ProcessBlocks.{js,css}) and the embedded page/layout editor with full-screen 3-Zone Visual Studio (InputfieldBlocks, dist/InputfieldBlocks.{js,css}).

ProcessBlocks organizes governance into seven focused sections: Overview, Layouts, Reusable Blocks, Presets, Defaults, Categories, and Block Types.

Setup > Blocks Overview tracks Template Coverage and lets you attach the Blocks field or create a Template Layout in one click.

Categories & Read-Only Block Types Catalog

Section titled “Categories & Read-Only Block Types Catalog”
  • Categories (blocks-categories): Organize Block Types, Reusable Blocks, and Presets with custom titles, handles, vector icons, and drag-and-drop sort order.
  • Block Types (BlocksCatalogProvider): Read-only catalog displaying every compiled block from ./site/blocks/*.yaml and registered module packs, complete with theme-reactive Light and Dark wireframes (WireframePreviewGenerator), field counts, placement rules, and active Preset/Default badges.
Managed Categories keep the Visual Block Picker and governance lists cleanly organized.
The Block Types catalog surfaces compiled block blueprints, theme-reactive wireframes, and active Preset or Default status.

Embedded InputfieldBlocks Editor & Full-Screen 3-Zone Visual Studio

Section titled “Embedded InputfieldBlocks Editor & Full-Screen 3-Zone Visual Studio”

On ProcessWire pages (FieldtypeBlocks) and inside delegated Setup > Blocks Layout/Reusable editors (Entries/RecordEditor), InputfieldBlocks layers governed authoring features directly on top of Entries’s block runtime (window.EntriesBlocksRuntime):

  • Visual Block Picker: Categorized picker with Light/Dark wireframes or custom previewImage / previewImageDark thumbnails, search, and tabs for Block Types, Presets, and Reusable Blocks.
  • Grid Presets Bar & Block Transforms: Switch N-column grid: ratios cleanly (gridPresets.ts) or convert compatible blocks in place via declarative YAML transforms.
  • Undo/Redo & Studio Clipboard: Full in-session history (useStudioHistory.ts) and isolated copy/paste (studioClipboard.ts).
Every FieldtypeBlocks field and Layout editor provides a one-click Visual Studio button alongside inline block editing.

Click Visual Studio to enter the full-screen 3-zone authoring environment:

  1. Left Zone (Layers Tree): WAI-ARIA TreeView (StudioLayersTree) with search filter, drag-and-drop reordering, visibility toggles, duplicate/delete actions, and dependency badges.
  2. Center Zone (Focused Inspector): Edits the selected block’s Content, custom tabs, Settings, and Advanced tabs without scrolling through unrelated blocks.
  3. Right Zone (Responsive Live Preview Canvas): Renders an ephemeral, zero-DB-write srcdoc preview (POST /_blocks/preview) across Fit, Desktop, Tablet, and Mobile viewports, language switcher, light/dark toggle, and candidate page selector (/_blocks/preview-pages). Clicking any block inside the preview selects it in the Inspector via a nonce-verified postMessage handshake.
  4. Studio Quick-Create (/_blocks/studio-create): Administrators (blocks-admin) can promote any live block straight into a Block Preset or Reusable Block (safely cloning attached media via ReusableManager::cloneBlockStreamForPersistence()) without leaving Visual Studio.
3-Zone Visual Studio synchronizes edits with an ephemeral responsive preview canvas without writing drafts to the database.

Next steps