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
730 stars 736 forks source link

AllowedHeadingElementsDataSourceServlet does not provide the Heading Element Text #2167

Open gquintillan opened 2 years ago

gquintillan commented 2 years ago

It is possible to choose among a list of "Allowed Heading Elements" in the Design Dialog of components like Title Component (link to the documentation). Each of the heading elements have a Text (uppercase) and a Value (lowercase):

image

However, the datasource (AllowedHeadingElementsDataSourceServlet) that is responsible to provide the list of allowed heading elements renders the value (lowercase) in both the value and the text:

image image

Expected Behaviour

image

Actual Behaviour

image

Reproduce Scenario

Steps to Reproduce

Using the design dialog, edit the policies of a Title component:

image

Open the dialog of the Title component and click on the Type / Size dropdown:

image

For each element, check that the Text is different than de value (uppercase/lowercase in this case).

Platform and Version

AEM - 6.5.12 AEM WCM Core Components - At least since 2.17.8

Sample Code that illustrates the problem

https://github.com/adobe/aem-core-wcm-components/blob/main/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/internal/servlets/AllowedHeadingElementsDataSourceServlet.java#L112

image
comanV commented 2 years ago

The requested changes were already addressed by fixing this issue with this PR. It will be part of the 2.20 release.