[PAGES-211] Investigate: Extract GWT page-editor for standalone inclusion Created: 11/Nov/19 Updated: 17/Dec/21 Resolved: 20/Apr/21 |
|
| Status: | Closed |
| Project: | Magnolia pages module |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Neutral |
| Reporter: | Mikaël Geljić | Assignee: | Robert Šiška |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Template: |
|
||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||||||
| Task DoR: |
Empty
|
||||||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||||||
| Epic Link: | External SPA | ||||||||||||||||||||||||
| Sprint: | HL & LD 25, HL & LD 26, HL & LD 27 | ||||||||||||||||||||||||
| Story Points: | 8 | ||||||||||||||||||||||||
| Description |
|
TODO: Evaluate the extracted GWT page editor.
This proposal aims at reusing the GWT Page Editor purely from the client-side, i.e. decoupling it from the Vaadin connector and RPC communication (aka Magnolia 4.5 style). This way the current Page Editor can be shipped and included as an NPM module. Cross-domain interaction with the Pages app goes through postMessage to communicate first with Vaadin's client-side connector, itself relaying interaction to Magnolia server-side components. MotivationWe foresee external SPAs will be the most common case for editing SPAs from Magnolia, either pointing to a local development server, or a production environment. ReasoningThe proper way to move forward with cross-domain iframe communication is to leverage the postMessage mechanism. Re-implementing the whole page-editor according to this bore too much uncertainty, mostly about the logic for green bar creation/injection and focus model. So far, without this, we have a couple approaches, all of them with certain caveats:
Prototype ImplementationSuccessful PoC for the standalone page-editor part, pending implementation for communication part. |
| Comments |
| Comment by Christopher Zimmermann [ 11/Nov/19 ] |
|
Do I understand correctly that the idea is that a frontend developer could include our page-editor frontend in their SPA? And then that when the SPA runs in Magnolia pages app iframe, that it correctly triggers the dialogs and actions of Magnolia? |
| Comment by Christopher Zimmermann [ 23/Feb/21 ] |
|
mgeljicHow big in KB is the extracted editor, roughly? |
| Comment by Mikaël Geljić [ 04/Mar/21 ] |
|
M4.5 editor (technically close) was ~ 150KB, before any optimization |
| Comment by Robert Šiška [ 20/Apr/21 ] |
|
https://wiki.magnolia-cms.com/display/TH2/2021-04-19+External+SPA+-+Robert+Findings |