[MAGNOLIA-4116] Render areas of type list that don't have availableComponents defined Created: 02/Mar/12  Updated: 23/Jun/14  Resolved: 03/Apr/13

Status: Closed
Project: Magnolia
Component/s: templating
Affects Version/s: 4.5.1
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Antti Hietala Assignee: Roman Kovařík
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MAGNOLIA-4939 maxComponents property causes editing... Closed
is related to MAGNOLIA-4430 "Type selection dialog" should be ski... Closed
is related to MAGNOLIA-4489 CLONE -"Type selection dialog" should... 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)
Date of First Response:

 Description   

Render the start marker, placeholder and end marker for list areas even if the area does not have any availableComponents defined yet. Today, the system treats such an area as empty and non-editable, and does not render it on the page. This is a problem for users who build their templates in the following typical order:

  1. Create a page script and a page definition. Assign to a page. See what the page looks like in the browser.
  2. Create an area script and an area definition. Reload the page. Nothing is displayed! Where's my area?
  3. Create a component script and a component definition. Make the component available in the area. Reload the page. Now the empty area is rendered.

The problem comes in step 2. If the area is of type list, it is not rendered on the page because no available components are defined. We cannot expect the user to define components before the area.

To resolve this, make an exception that renders a list area even if it doesn't have available components defined yet.



 Comments   
Comment by Jan Haderka [ 04/Jun/12 ]

Once looking into this, consider also fixing MAGNOLIA-4430

Comment by Roman Kovařík [ 03/Apr/13 ]

Fixed by MAGNOLIA-4939 (4.5, AreaBar in magnolia-templating-editor), MGNLUI-1028 (5.0, AreaProcessor in magnolia-ui-widget-editor) by change of this condition:

before:

else if (showAddButton && !availableComponents.isEmpty()) {
            return true;
}

after:

else if (showNewComponentArea) {
            return true;
}
Generated at Mon Feb 12 03:52:48 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.