Skip to content

Migrate to Page Editor 2#10853

Merged
edloidas merged 2 commits into
masterfrom
claude/awesome-euler-lxcld1
Jul 7, 2026
Merged

Migrate to Page Editor 2#10853
edloidas merged 2 commits into
masterfrom
claude/awesome-euler-lxcld1

Conversation

@edloidas

@edloidas edloidas commented Jun 16, 2026

Copy link
Copy Markdown
Member

Migrates Content Studio's live edit and preview host onto the rewritten @enonic/page-editor protocol (2.0.0-alpha.1).

  • Rebuilt LiveEditPageProxy transport on @enonic/page-editor/protocol's createHostBus, posting initialize on editor-loaded and mapping every legacy event 1:1 to a protocol message; the keyboard relay is re-dispatched through jquery-simulate.
  • Switched to PageEditor.subscribe with string event names and destructured payloads, dropping the EditorEvent/EditorEvents wrappers.
  • Guarded the selection sync so EDITOR-sourced navigation is never echoed back into the iframe; PageComponentsView.selectItemByPath now uses the silent deselectAll(true).
  • Routed useInsertableDrag through a proxy-owned LiveEditDraggableHost accessor and moved browse preview onto a per-iframe preview-path-changed bus, replacing the IframeEventBus wiring.
  • Removed six dead editor-to-host bus.on handlers and the removed silent flag on select/deselect posts; modules/app glue reads PageEditor.getContent().id.

Closes #11034

Drafted with AI assistance

@edloidas edloidas marked this pull request as ready for review June 17, 2026 10:32
@edloidas edloidas force-pushed the claude/awesome-euler-lxcld1 branch from ae59485 to d677280 Compare July 5, 2026 19:09
Migrated Content Studio's live edit and preview host onto the rewritten `@enonic/page-editor` protocol.

Rebuilt `LiveEditPageProxy` transport on `@enonic/page-editor/protocol`'s `createHostBus`, posting `initialize` on `editor-loaded` and mapping every legacy event 1:1 to a protocol message, with the keyboard relay re-dispatched through `jquery-simulate`.
Switched to namespace imports and `PageEditor.subscribe`, reading the `component-load-request` payload directly and dropping the `EditorEvent`/`EditorEvents` wrappers.
Guarded the selection sync so `EDITOR`-sourced navigation is never echoed back into the iframe, and used the silent `deselectAll(true)` in `PageComponentsView.selectItemByPath`.
Routed `useInsertableDrag` through a proxy-owned `LiveEditDraggableHost` accessor and moved browse preview onto a per-iframe `preview-path-changed` bus, replacing the `IframeEventBus` wiring.
Removed six dead editor-to-host `bus.on` handlers and the removed `silent` flag on select/deselect posts; updated `modules/app` glue to read `PageEditor.getContent().id`.
Regenerated lockfiles against the local `@enonic/page-editor` 2.0.0-alpha.1 build.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@edloidas edloidas force-pushed the claude/awesome-euler-lxcld1 branch from acbde7c to 1116d98 Compare July 7, 2026 13:27
Replaced the legacy `...ComponentView`/`RegionView` element-id XPaths in
`live.form.panel.js` with the `data-portal-component-type` /
`data-portal-region` attributes that `@enonic/page-editor` v2 emits.
Fixed the live-edit text, image, caption and 3-column layout assertions
that started timing out after the page editor protocol migration (#11034),
since the rewritten editor no longer generates the old ItemView wrappers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U3oSXUhLJk6PGA6tTCY7GR
@edloidas edloidas merged commit db76165 into master Jul 7, 2026
12 checks passed
@edloidas edloidas deleted the claude/awesome-euler-lxcld1 branch July 7, 2026 15:08
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.

Speak the page editor protocol in live edit and preview

4 participants