adobe / aem-project-archetype

Maven template to create best-practice websites on AEM.
https://experienceleague.adobe.com/docs/experience-manager-core-components/using/developing/archetype/overview.html
Apache License 2.0
544 stars 419 forks source link

Mobile emulator property cq:deviceGroups shouldn't be an absolute path #382

Closed knennigtri closed 4 years ago

knennigtri commented 4 years ago

Expected Behaviour

All Template-types, Templates, and Pages use context aware configurations for responsive emulators, allowing for custom emulators be be build under /apps. Generated pages and templates should have: jcr:content/cq:deviceGroups = mobile/groups/responsive which allows for resolution of /conf//settings, /conf/global/settings, /apps/settings, /libs/settings, /etc for responsive emulator configurations.

Actual Behaviour

cq:deviceGroups = /etc/mobile/groups/responsive is hardcoded into the template-types, templates and pages and therefor only emulators configured in /etc are actually loaded.

Reproduce Scenario (including but not limited to)

I want to create a new responsive emulator for Galaxy S11. I should create a new emulator component based on /libs/wcm/mobile/components/emulators in my project. To add my custom emulator to the responsive emulator, I need to overlay /libs/settings/mobile/groups/responsive/jcr:content in /apps and add my emulator to the emulators [] property. This Doesn't work because the archetype generates a absolute path to /etc/mobile/groups/responsive

Steps to Reproduce

Generate an archetype 23 project. Open a generated page and click on. the emulator icon. Notice all old emulators Galaxy S5, Iphone4-6, Ipad. These come from /etc/mobile/groups/responsive

By Default, it should be displaying Galaxy S7, Iphone 8, and Iphone X which comes from /libs/settings/mobile/groups/responsive/jcr:content

Observe /conf/my-project/.../templates/page-content/structure/jcr:content/cq:deviceGroups = /etc/mobile/groups/responsive /conf/my-project/.../template-types/page/structure/jcr:content/cq:deviceGroups = /etc/mobile/groups/responsive /content/my-site/jcr:content/cq:deviceGroups = /etc/mobile/groups/responsive

This has also been logged in the WKND website too since that's where it was originally found: https://github.com/adobe/aem-guides-wknd/issues/97

msagolj commented 4 years ago

This got fixed with merging PR #373 and #436