adobe / aem-react-editable-components

SPA React Editable Components for Adobe Experience Manager
Apache License 2.0
61 stars 26 forks source link

[bug] Not being able to apply self-defined css classes to Layout Container #83

Open cthio opened 2 years ago

cthio commented 2 years ago

Describe the bug Layout Container not able to register the custom CSS classes defined in the Template Policy. I'm running a React SPA pages in AEM

Package version v1.1.10 with AEM 6.5.5

To Reproduce

  1. Go to any SPA Page template
  2. In an existing Layout Container component, go to its template policy
  3. Add the custom css class and go back to the template editor page
  4. Hover the layout container and add the css class with the Styles icon
  5. CSS classes are not being applied to the Layout Container

Expected behavior The CSS class(es) should be applied to the Layout Container

Screenshots 1. step-1

2. step-2

  1. Actual behavior actual-behavior

Additional context Add any other context about the problem here.

friendlymahi commented 2 years ago

@schoudry - Should your fix resolve this issue? Thanks

schoudry commented 2 years ago

are the custom classes returned in model.json request in appliedCssClassNames property?

camillalund commented 2 years ago

We have the same problem. None of the properties from the container policy are returned in model.json

friendlymahi commented 2 years ago

@camillalund @cthio - Unsure if this issue should even exist under this repo. If the model.json doesnt even return the appliedCssClassNames property, perhaps the issue is with the sling model exporters from core components, and it may make sense to log the issue in https://github.com/adobe/aem-core-wcm-components.

gabrielwalt commented 2 years ago

See comment on https://github.com/adobe/aem-core-wcm-components/issues/1889: Please open a support ticket for us to back-port this to 6.5. Thanks!