[PAGES-205] Refresh iframe in PageEditor after triggering actions Created: 04/Nov/19  Updated: 19/Feb/20  Resolved: 21/Jan/20

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

Type: Improvement Priority: Major
Reporter: Christopher Zimmermann Assignee: Sang Ngo Huu
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 1h
Time Spent: 4d 4.5h
Original Estimate: Not Specified

Issue Links:
Cloners
is cloned by MGNLFE-17 SPA can tell if it is running in Page... Closed
causality
is causing PAGES-224 DOC: SPA can tell if it is running in... 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 12, SPA Editor 13, SPA Editor 14
Story Points: 3

 Description   

After edit component, area. The iframe is not freshed

 



 Comments   
Comment by Christopher Zimmermann [ 07/Jan/20 ]

Please support existing Pages app (M5) in order to not introduce any obstacles to adoption and testing of SPA Editor.

Comment by Sang Ngo Huu [ 07/Jan/20 ]

czimmermann Currently, we differentiate the editing mode or preview mode by checking the function mgnlRefresh on parent context:

In React

 const isInPageEditor = Boolean(window.parent && window.parent.mgnlRefresh);

In Angular

   public isEditMode(): boolean {
       return this.winRef.nativeWindow.parent.mgnlRefresh !== undefined;
   }

If you want to have it globally that user can easily use it, we can expose it to RendererContext. What do you think?

Comment by Christopher Zimmermann [ 07/Jan/20 ]

I think RendererContext makes sense.

How about standardizing on these two functions?

 

IsEditor() //Whether it is in the page editor at all

isEditorPreview() //Whether it is in the page editor 'Preview' mode.

Comment by Christopher Zimmermann [ 21/Jan/20 ]

sang.ngo So - how can SPA can tell if it is running in Pages App, in Preview, or in Production?

Is that in another ticket now?

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