[MAGNOLIA-5826] Revise node type of singletons Created: 07/Jul/14  Updated: 04/Mar/19

Status: Open
Project: Magnolia
Component/s: templating
Affects Version/s: 4.5.20, 5.2.5, 5.3
Fix Version/s: 4.5.x

Type: Bug Priority: Neutral
Reporter: Roman Kovařík Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLUI-2931 Add Component action availability 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)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

Some of singletons paragraphs has mgnl:contentNode type. We should investigate if:

A] Those should have mgnl:component type.

  • The counting of contentNodes in info.magnolia.pages.app.availability.CanAddComponentRule.isAvailableForItem(Item) should go away (Magnolia 5.x only).

B] Count contentNodes also in

  • info.magnolia.templating.elements.AreaElement.numberOfComponents(Node)
  • info.magnolia.templating.elements.AreaElement.end(Appendable)
  • info.magnolia.templating.elements.AreaElement.hasComponents(Node) should call the numberOfComponents method to prevent code duplication.

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