Error in user YAML: (<unknown>): found character that cannot start any token while scanning for the next token at line 5 column 16
---
title: Switch storefront plugin data-attribute selectors to match their -option naming
issue: NEXT-19709
author: Joshua Behrens
author_email: [email protected]
author_github: @JoshuaBehrens
---
- Deprecated several data-attribute selectors to better match their corresponding JavaScript plugin names to improve developer experience when using JavaScript plugin configurations
- Deprecated JavaScript plugin selector
data-search-form
. Usedata-search-widget
instead - Deprecated JavaScript plugin selector
data-offcanvas-cart
. Usedata-off-canvas-cart
instead - Deprecated JavaScript plugin selector
data-collapse-footer
. Usedata-collapse-footer-columns
instead - Deprecated JavaScript plugin selector
data-offcanvas-menu
. Usedata-off-canvas-menu
instead - Deprecated JavaScript plugin selector
data-offcanvas-account-menu
. Usedata-account-menu
instead - Deprecated JavaScript plugin selector
data-offcanvas-tabs
. Usedata-off-canvas-tabs
instead - Deprecated JavaScript plugin selector
data-offcanvas-filter
. Usedata-off-canvas-filter
instead - Deprecated JavaScript plugin selector
data-offcanvas-filter-content
. Usedata-off-canvas-filter-content
instead
- Deprecated JavaScript plugin selector
We want to change several data-attribute selector names to be more aligned with the JavaScript plugin name which is initialized on the data-attribute selector. When you use one of the selectors listed below inside HTML/Twig, JavaScript or CSS, please change the selector to the new selector.
<div
data-offcanvas-menu="true" {# <<< Did not match options attr #}
data-off-canvas-menu-options='{ ... }'
>
</div>
<div
data-off-canvas-menu="true" {# <<< Now matches options attr #}
data-off-canvas-menu-options='{ ... }'
>
</div>
The options attribute is automatically generated using the camelCase JavaScript plugin name.
old | new |
---|---|
data-search-form |
data-search-widget |
data-offcanvas-cart |
data-off-canvas-cart |
data-collapse-footer |
data-collapse-footer-columns |
data-offcanvas-menu |
data-off-canvas-menu |
data-offcanvas-account-menu |
data-account-menu |
data-offcanvas-tabs |
data-off-canvas-tabs |
data-offcanvas-filter |
data-off-canvas-filter |
data-offcanvas-filter-content |
data-off-canvas-filter-content |