Closed CodeByAlex closed 3 years ago
related: https://github.com/adobe/htl-spec/blob/master/SPECIFICATION.md#211-identifiers
Top top-level identifiers are case-insensitive (because they can be set through HTML attributes which are case-insensitive), but all their properties are case-sensitive.
:tada: This issue has been resolved in version 6.2.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Example from the Adobe 6.5 Core Components Library:
In this instance, we see the variable defined as data-sly-use.icontemplate but when used later in the HTL it is called with camel case
<sly data-sly-call="${iconTemplate.icon @ icon=button.icon}"></sly>
. The htl engine cannot find the icontemplate variable so it throws the following exception:This is the case with all core components (from what I can tell) which either means that the htl engine should be picking up on the camel-cased usage or all of the core components that have multi-word variable names must be updated.
Proposal:
When checking the variable names in the htl for a match against the instantiated variable name, please run a toLowerCase() on each
Expected result:
<sly data-sly-call="${iconTemplate.icon @ icon=button.icon}"></sly>
should work properly if the variable is defined asdata-sly-use.icontemplate="icon.html"
@tripodsan and I spoke about this offline
To test all of the core components against the htl engine, pull down the following branch of storybook-aem:
https://github.com/storybookjs/aem/tree/include-support-3rd-party
then:You will then see all of the components in isolation: