[MGNLFE-181] "Preview in tab" doesn't work in minimal-headless-spa-demo Created: 10/Mar/22  Updated: 18/May/22  Resolved: 05/May/22

Status: Closed
Project: Magnolia Frontend Helpers
Component/s: React Renderer
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Liang Xin Assignee: Chuong Doan Huy
Resolution: Cannot Reproduce Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 2d 4.5h Time Spent: 2d 4.5h
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: PNG File image-2022-03-10-10-31-29-482.png     PNG File image-2022-03-10-10-32-41-670.png    
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLFE-190 Investigate issue Technical task Closed Chuong Doan Huy  
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)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Epic Link: SPA Editor Backlog
Sprint: DevX 9
Story Points: 3
Team: DeveloperX

 Description   

Timebox: 3SP

Steps to reproduce

  1. Download the demo from https://hd.magnolia-cms.com/docs/getting-started/hello-spa 
  2. Use react demo to build and deploy (use routeTemplate in template definition instead of templateScript). 
  3. Create a page using the spa template (react) 
  4. Open that page inside the Page Editor
  5. Page cannot be edited, and it doesn't work with "Preview in tab" button.


 Comments   
Comment by Chuong Doan Huy [ 29/Apr/22 ]

Hi hunter.liang,
Thank you for your information. As i checked with latest source code, the features you mentioned works properly. But there are two things can cause those problems :

  • There is a config property in .env file named REACT_APP_MGNL_APP_BASE. If this is not configured to match with your page, "Edit Page" and "Preview in tab" won't work. For example, default config value is /react-minimal, but if you create "test-page", those problems will happen.
  • Navigation between pages is currently not working for this demo feature. If you are editing react-minimal page, and click on contact page in navigation bar, the green bar for editing component will disappear, even if you back to react-minimal page.
    I hope this information is useful for you, thanks.
Comment by Canh Nguyen [ 29/Apr/22 ]

(cc: czimmermann bstaryga )

The minimal-headless-spa-demo uses REACT_APP_MGNL_APP_BASE to fetch data for the home page and navigation. If we use this demo with other root page, we need to set the new root page path to REACT_APP_MGNL_APP_BASE to make the demo work.

I think this is not an issue.

 

Comment by Christopher Zimmermann [ 02/May/22 ]

chuong.doan and canh.nguyen thank you for investigating, then I think we can close the ticket. Probably as "Cannot reproduce".

Generated at Mon Feb 12 05:45:02 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.