[PAGES-174] Client-side API to request green Editbar creation Created: 01/Apr/19  Updated: 18/Nov/19  Resolved: 15/Oct/19

Status: Closed
Project: Magnolia pages module
Component/s: None
Affects Version/s: 5.7.1
Fix Version/s: 6.2

Type: Story Priority: Major
Reporter: Christopher Zimmermann Assignee: Robert Šiška
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 1d 6h 43m
Original Estimate: Not Specified

Issue Links:
Relates
relates to PAGES-197 Reselect previously selected componen... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Release notes required:
Yes
Documentation update required:
Yes
Date of First Response:
Epic Link: SPA Editor
Sprint: SPA Editor 3, SPA Editor 4, SPA Editor 7, SPA Editor 8
Story Points: 8

 Description   

User story:

As a SPA developer, I can signal the page editor to run its green editbar creation, so that I can create a SPA that can be edited in the Page editor.

Technical notes:

  • 7. Hooks for page init/update bar production
  • via JSNI, update handler upon state/routing, etc.?
    • see info.magnolia.ui.vaadin.gwt.client.editor.jsni.AbstractFrameEventHandler#reloadIFrame for an example
  • see package info.magnolia.ui.vaadin.gwt.client.editor.dom.processor
  • consider alternatives to model component bar input (e.g. data attributes instead of page comments)

Currently the page editor automatically runs the editbar creation code as soon as the page loads, however a SPA might not have loaded yet which means that editbars will not be properly created. Furthermore a SPA might dynamically change its DOM revealing new editing components, but they cannot be edited because there is no editbars created for them.

Acceptance criteria:

  • SPA developer can run a function or hit an endpoint to run the green editbar creation whenever it wants.
  • A re-run of the editbar creation will function properly (maybe removing any previously created editbars first.)
  • Validate two hooks:
    • explicitly plugging the bar-creation handler upon SPA init
    • provide a test SPA that has an area with one component and a "+" button (duplicating the other component), when duplicating, a state change or navigation should call the bar-creation handler


 Comments   
Comment by Bartosz Staryga [ 11/Jul/19 ]

If we assume this is only run inside magnoliaAuthor, and inside magnoliaAuthor preview is always in iframe, how about simple `parent.postMessage` to trigger the js creating the bars?

Generated at Mon Feb 12 06:16:21 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.