[PAGES-426] Establish postMessage communication in page editor widget Created: 19/Apr/21  Updated: 16/Jul/21  Resolved: 09/Jul/21

Status: Closed
Project: Magnolia pages module
Component/s: Pages app
Affects Version/s: None
Fix Version/s: 6.2.10

Type: Task Priority: Neutral
Reporter: Robert Šiška Assignee: Robert Šiška
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 0.5d
Original Estimate: Not Specified

Issue Links:
relation
is related to PAGES-211 Investigate: Extract GWT page-editor ... Closed
is related to PAGES-475 Handle scrolling to editing position ... Open
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Epic Link: External SPA
Sprint: HL & LD 27, HL & LD 28, HL & LD 29, HL & LD 30, HL & LD 31, HL & LD 32
Story Points: 8

 Description   

Remaining: 5pts (in HL&LD 30)

The server-client separation investigated in PAGES-211 severs the Vaadin RPC communication channel.

Implement the connection using post messages.

Could use an abandoned pleku/postmessageaddon for inspiration.



 Comments   
Comment by Robert Šiška [ 29/Jun/21 ]

 

Comment by Mikaël Geljić [ 06/Jul/21 ]

We reviewed this last week and did acknowledge that there is replication of the client-side communication, especially in the PostMessageHandlerConnector vs. existing info.magnolia.ui.vaadin.gwt.client.connector.PageEditorConnector. This is fine. In fact, abstracting this layer would be a non-trivial refactoring, cause compatibility risks onto the traditional page-editor for freemarker templating. Since this is not very much exposed for customer extension, we can live with this until we eventually redesign and rewrite the page-editor experience.

Meanwhile, both client-side implementations co-exist:

  • PageEditorConnector talks to the traditional page-editor widget (embedded in Magnolia Vaadin widgetset and part of the Admincentral application). It keeps doing cross-frame DOM manipulation (bar injection) on same domain.
  • PostMessageHandlerConnector talks to the newly extracted standalone page-editor residing with the SPA in the inner frame, purely via postMessage (see PostMessageHandler), thus suitable for cross-domain communication. As a Vaadin extension, it then forwards interactions to the server-side via typical RPC.
Generated at Mon Feb 12 06:18:50 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.