Skip to content

Support docking the sidebar via Alpine teleport - #30

Closed
jeffreyvr wants to merge 4 commits into
mainfrom
feature/wp-sidebar-dock
Closed

Support docking the sidebar via Alpine teleport#30
jeffreyvr wants to merge 4 commits into
mainfrom
feature/wp-sidebar-dock

Conversation

@jeffreyvr

Copy link
Copy Markdown
Owner

Summary

  • Add optional sidebarTeleport config (CSS selector) so hosts can dock the sidebar outside the canvas column
  • Alpine x-teleport keeps the same Paver root for options, inserter, and history
  • Null-safe resizer (sidebar may not be in the tree until after teleport)
  • .paver__docked styles for full-width canvas when the rail is external

Used by paver-for-wordpress to put blocks/options in the WP side meta box.

Test plan

  • Default (no teleport): editor layout unchanged
  • WordPress with path-linked packages: canvas fills main column; Blocks / Edit block live in the right meta sidebar
  • Insert block from side dock still works
  • Edit block options still bind and update the canvas
  • Non-WP / Laravel hosts unaffected

Hosts can pass sidebarTeleport with a CSS selector so the sidebar
renders outside the canvas column while staying on the same Alpine root.
Alpine x-teleport only moves one root; the backdrop and sidebar were
siblings, so only the backdrop docked and init crashed on a missing
blocks inserter ref.
Alpine runs init before x-teleport, so docked sidebar refs were missing
and Sortable never attached. Set up the inserter on the next tick.
Deferring Alpine on the parent for sidebar teleport also set
paver()->alpine false, which the frame read and never booted. Edit
actions then did nothing. The frame is a separate document and must
always start its own bundle.
@jeffreyvr

Copy link
Copy Markdown
Owner Author

Closing: docked WP sidebar worked technically but the responsive/UX tradeoff was not worth it. Sticking with the in-editor rail.

@jeffreyvr jeffreyvr closed this Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant