[MGNLFE-58] Allow using dialog at area level Created: 26/Jun/20  Updated: 08/Sep/20  Resolved: 21/Jul/20

Status: Closed
Project: Magnolia Frontend Helpers
Component/s: Template Annotations
Affects Version/s: 1.0.4
Fix Version/s: 1.0.5

Type: Improvement Priority: Major
Reporter: Adrien Manzoni Assignee: Robert Šiška
Resolution: Fixed Votes: 4
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
is cloned by MGNLFE-59 Dialogs at area level are missing Closed
is cloned by MGNLFE-61 Support for user-defined area templates Closed
Problem/Incident
causes MGNLFE-56 Edit Component action is enabled even... Closed
causality
is causing PAGES-352 Provide endpoint for template annotat... Closed
dependency
is depended upon by MGNLFE-60 Release 1.0.5 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: HL & LD 7
Story Points: 3

 Description   

Many customers use the area as a single fixed component. The template definition framework allows you to assign a dialog to an area.

However, the [TemplationAnnotations|https://git.magnolia-cms.com/projects/MODULES/repos/frontend-helpers/browse/packages/template-annotations/src/service/TemplateAnnotations.js] util does not seem to allow it.

Please release frontend libraries to npm as soon as ticket is fixed.



 Comments   
Comment by Bartosz Staryga [ 29/Jun/20 ]

This feature would need the extending of area rendering script itself.

Currently area is hardcoded as looping over the all components.

We need to add the ability to have custom area scripts (like templateScript in freemarker).

It could be e.g. component passed as prop:
<EditableArea {...props} templateScript={MyCustomAreaCompontent} />

Comment by Christopher Zimmermann [ 30/Jun/20 ]

Improvement is accepted. This is commonly used as a way of improving the user experience of authoring because it provides an edit icon directly in the page where the editing will be applied. (as opposed to adding it to the page properties dialog.) And of course having it on the area makes it easily re-usable in other pages.
It is preferable to a regular component in some cases because you want to ensure that the item is present.

Comment by Christopher Zimmermann [ 30/Jun/20 ]

UPDATE:

Please also ensure that 'noComponent' behaves as expected.

Please consider if 'noComponent' needs to be supported.
bstaryga , jschulte  Can you comment on whether this is important please?

https://documentation.magnolia-cms.com/display/DOCS62/Area+definition

Comment by Bartosz Staryga [ 10/Jul/20 ]

czimmermann imho why not
In the end the adding all the support for those different features is adding them to map in const AREA_MAP so everything should be added there.
We already had to patch the lib for IKEA to support live copy...

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