Migrate to Page Editor 2#10853
Merged
Merged
Conversation
ae59485 to
d677280
Compare
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>
acbde7c to
1116d98
Compare
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates Content Studio's live edit and preview host onto the rewritten
@enonic/page-editorprotocol (2.0.0-alpha.1).LiveEditPageProxytransport on@enonic/page-editor/protocol'screateHostBus, postinginitializeoneditor-loadedand mapping every legacy event 1:1 to a protocol message; the keyboard relay is re-dispatched throughjquery-simulate.PageEditor.subscribewith string event names and destructured payloads, dropping theEditorEvent/EditorEventswrappers.EDITOR-sourced navigation is never echoed back into the iframe;PageComponentsView.selectItemByPathnow uses the silentdeselectAll(true).useInsertableDragthrough a proxy-ownedLiveEditDraggableHostaccessor and moved browse preview onto a per-iframepreview-path-changedbus, replacing theIframeEventBuswiring.bus.onhandlers and the removedsilentflag on select/deselect posts;modules/appglue readsPageEditor.getContent().id.Closes #11034
Drafted with AI assistance