Open ghost opened 4 years ago
:white_check_mark: Confirmed by @engcom-Alfa
Thank you for verifying the issue. Based on the provided information internal tickets MC-37314
were created
Issue Available: @engcom-Alfa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
This issue is automatically created based on existing pull request: magento/magento2#28400: Load color picker dependencies only when it is actually used
Preconditions (*)
This is just another performance PR, which focuses on loading only the needed dependencies. This time I am optimizing color picker component and its
spectrum
andtinycolor
dependencies.Loading mentioned modules dynamically saves us 2 JavaScript requests and 123,6kB (28,3kB gzipped) from downloading and parsing.
This change is covered by unit tests that had to be adjusted to take asynchronous dependencies loading into account.
Steps to reproduce (*)
spectrum.js
andtinycolor.js
are no longer loaded by default.Actual Result: :heavy_multiplication_x:
spectrum.js
andtinycolor.js
are loaded by defaultExpected Result: :heavy_check_mark:
spectrum.js
andtinycolor.js
should no loaded by default.Questions or comments
While making sure this change doesn't break anything I found out that
colorPicker
binding is not used anywhere in Magento. The easiest way to get it is to for example add it toapp/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml
:and test it in category edit form.
Contribution checklist (*)