[PAGES-1514] Should only rename inherited component node to support spa access easier Created: 20/Nov/23  Updated: 13/Dec/23  Resolved: 28/Nov/23

Status: Closed
Project: Magnolia pages module
Component/s: None
Affects Version/s: None
Fix Version/s: 6.3.0, 6.2.33

Type: Improvement Priority: Neutral
Reporter: Oanh Thai Hoang Assignee: Oanh Thai Hoang
Resolution: Done Votes: 0
Labels: None
Σ Remaining Estimate: 0d Remaining Estimate: 0d
Σ Time Spent: 1d Time Spent: 0.25d
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: PNG File Screenshot 2023-11-10 at 09.24.56.png     PNG File Screenshot 2023-11-10 at 09.34.17.png     PNG File after-fix-PR.png     PNG File before-fix-PR.png     PNG File headline-component.png     PNG File rest-response.png    
Issue Links:
causality
caused by PAGES-1314 Component inheritance not working for... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
PAGES-1520 Implement Sub-task Closed Oanh Thai Hoang  
PAGES-1521 Review Sub-task Completed Canh Nguyen  
PAGES-1522 piQA Sub-task Closed Anh Vu  
PAGES-1523 QA Sub-task Completed Canh Nguyen  
PAGES-1531 DOCSub: Limitation use case of SPA Sub-task Closed Martin Drápela  
PAGES-1532 DOCSub: Document support for nodeTypes Sub-task Closed Martin Drápela  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Documentation update required:
Yes
Epic Link: Support
Sprint: DevX 51
Story Points: 3
Team: DeveloperX
Work Started:
Approved:
Yes

 Description   

There is one use case need access mgnl:contentNode created by multifield but the inheritance nodes return the node has been renamed. See below image.

Screenshot 2023-11-10 at 09.24.56.png

 

Check inheritOnWithComplexDialog demo for freemarker/spa at https://git.magnolia-cms.com/projects/DOCUMENTATION/repos/component-inheritance-examples/pull-requests/3/diff#magnolia/content-to-import/website.FM-complex.yaml

 

Expectation request: Should not rename mgnl:contentNode in their case for easier to access the name of field in spa code.

 

Discussion: 

There will be one case that if we config inheritance like below. PAGES rest can not support like freemarker is doing now.

inheritance:
  enabled: true
  components: all
  nodeTypes:
    - mgnl:component
    - mgnl:contentNode 


 Comments   
Comment by Oanh Thai Hoang [ 27/Nov/23 ]

Hi mmichlova . Your request about do not rename sub node of multi field has been merged last week.

 
Here is output response react-minimal with headline component that config multi field.

 

Set up headline with simple multi field as below:

 

label: Address
form:
  properties:
    address:
      i18n: true
      $type: jcrMultiField
      label: Address list
      field:
        $type: compositeField
        label: Address
        properties:
          street:
            $type: textField
            label: Street 

In parent pages: add headline component and fill in data for multi field:

 

Create a child pages: React: Contact-inheritance template. Execute rest with 

$type: jcrPagesDeliveryEndpoint_v2

 

The rest response does not rename "address" multi field so it will help FE to access json data easier. 

 

NOTE: There is one limitation in case user wanna inherited mgnl:contentNode under area's dialog. See detail READ ME https://git.magnolia-cms.com/projects/DOCUMENTATION/repos/component-inheritance-examples/pull-requests/3/commits/47870419ef3d975a5169dee0b3b81574c23e0f04#README.md. DOCU will be updated later 

 

 

 

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