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
733 stars 741 forks source link

Unable to to customize page component tabs with Sling Resource Merger #187

Closed stefanseifert closed 6 years ago

stefanseifert commented 6 years ago

Before #114 (up to core components 2.0.0) all page properties tabs (e.g. "basic", "advanced") were defined as part of the core components project. thus it was easy to customize the page properties dialog by hiding some tabs or properties - example:

  "cq:dialog": {
    "jcr:primaryType": "nt:unstructured",
    "content": {
      "items": {
        "tabs": {
          "items": {
            /* hide some tabs from page properties dialog */
            "sling:hideChildren": ["thumbnail","socialmedia","personalization","cloudservices"],
            /* hide some properties inside the 'basic' tab of page properties dialog */
            "basic": {
              "items": {
                "column": {
                  "items": {
                    "title": {
                      "items": {
                        "sling:hideChildren": ["tags","tagsShowOnCreate"]
                      }
                    },
                    "sling:hideChildren": ["vanityurl"]
                  }
                }
              }
            },
...

staring with release 2.0.2 because of #114 this is no longer possible:

the reason is that since 2.0.2 the page component no longer declares the built-in tabs itself, but rather inherits them from it's supertype wcm/foundation/components/basicpage/v1/basicpage.

Unfortunately this basicpage component does not define the content of the tabs directly, but itself includes them via granite/ui/components/coral/foundation/include. This inclusion mechanism breaks the possibility to customize the tabs with Sling Resource Merger.

i know that the basicpage is part of AEM and not part of the core components - i still consider it as bug because the expected behavior was present in core components till 2.0.0 - and in my eyes this was a big benefit compared to the built-in page components that shipped with AEM in the past (e.g. wcm/foundation/components/page). now we are back to this problematic dialog tabs includes.

vladbailescu commented 6 years ago

This was intended, as we consider the contents of each tab private and thus not customisable. We tried to document that at https://github.com/Adobe-Marketing-Cloud/aem-core-wcm-components/wiki/Versioning-Policies#dialogs.

One can either include/hide (some of) the built-in tabs - which might change in the future to support new/changed product features - or define their own tabs. I know this feels like we're taking away some of the flexibility but it was necessary to be able to evolve the product without breaking all possible customisations later on.

stefanseifert commented 6 years ago

ah, thanks for the info - so this change was intentional.

a bit sad and more effort for application on the one side - but i understand the reasons behind it on the other side.