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

[Tab component] Optional and editable deeplink #2569

Open alotz-eggs opened 1 year ago

alotz-eggs commented 1 year ago

Feature Request

Core tab component has the ability to create deeplinks in the url by switching a tab. As far as I can see from the code it is not configurable.

Is your feature request related to a problem? Please describe.

We are using the tab core component with just an adapted ui. Since this will be used on a very prominent spot on the website and also for more complex navigation purpose, we need to prevent the component to set the deeplink in the url (like e.g. #tabcomponent-a54d909c07-item-3d6c8fd2b3-tab) and we also need to define custom values for the links that are really sharable with customers.

<li role="tab" id="${tab.id}-tab" class="cmp-tabs__tab${isActive ? ' cmp-tabs__tab--active' : ''}" aria-controls="${tab.id}-tabpanel" tabindex="${isActive ? '0' : '-1'}" data-cmp-hook-tabs="tab">${tab.title}</li>

The component uses hardcoded values to produce this links and it is not that easy to change or configure them

Describe the solution you'd like

Are there alternatives? /

Documentation

Authors just open the dialog and decide if they want to use the deeplink feature, and if yes, the dialog is extended to make it possible to maintain the custom links for each tab