-
Notifications
You must be signed in to change notification settings - Fork 73
Description
Preconditions (*)
- Magento 2.3.5 EE
Steps to reproduce (*)
- Create a new page
- From the page builder, add a text inside the first available row
- Save the page
- Head to the newly created page from the front-office
Expected result (*)
- The HTML markup is free from "data-" attributes that are not needed to theme the website.
Actual result (*)
- The HTML markup is populed by "data-" attributes that are needed for the back-office to function properly: data-element, data-appearance and data-content-type.
Why is it happening and why this is a flaw
This is happening because the back-office parse the front-office HTML markup to construct the UI of the Page Builder. It means that those data- attributes need to be present in the rendered HTML markup for the back-office to function. Removing these attributes from master.html template for example makes the back-office crash.
This is a design flaw. It forces the front-office markup to contain some informations that are not needed by neither the front-office content layer not the front-office style layer. Those informations should not be there since they serve no purpose. They can even be detrimental in case the front-office has styling for those attributes because they are used on some templates that are part of a custom Magento theme. Basically, they force the theme providers to consider that these 3 data- attributes are reserved to the system and should not be used to provide styling and/or behavior.
I believer that it needs to be fixed ASAP. Until then, the Page Builder is basically unusable for professionals that want reliability and have full control on the HTML markup of the front-office they provide to their customers.