adobe / aem-core-wcm-components

Standardized components to build websites with AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/introduction.html
Apache License 2.0
743 stars 750 forks source link

Generalize Panel Container components #2097

Closed cnagel closed 2 years ago

cnagel commented 2 years ago

Feature Request

Is your feature request related to a problem? Please describe. There exist 3 components using the children-editor clientlibs and PanelContainerImpl implementation: Accordion, Carousel, Tabs. Further there exists a ContainerServlet which handles the children-editor requests. This Servlet is registered to the specific resource types of the three components.

Creating new Accordions, Carousels and Tabs works fine (by delegation), but we want to use the children-editor clientlibs in other components too. Components which should not inherite from these three.

The registration of the ContainerServlet to the specific resource types doesn't allow that.

Describe the solution you'd like Add a new Panel Container component. Existing three components can use it as sling:resourceSuperType. The ContainerServlet has only to get registered on the Panel Container resource type.

This will not be a breaking change and it will be possible to remove redundant dialog definitions in the existing components.

Further it will be possible to use the children-editor clientlibs in own components.

Are there alternatives?

An own Panel Container Sling model would be helpful - but looking at the code this crashes with AbstractContainer#getDataLayerShownItems.

Documentation N/A

I will add a Pull Request.

bpauli commented 2 years ago

Hey @cnagel, Thank you very much for this useful enhancement! The PR got merged and will be part of the next release.