Open nerrad opened 1 year ago
Despite authoring this PR and not having any technical concerns about the implementation (other than followups around cleaning up the CSS), I’m not sure we should actually ship Storefront with these changes.
While it would be a good example for classic themes, there are a number of considerations we’d have to make around whether this is opt-in/opt-out, do we default new stores using Storefront to use the Mini-Cart block, what happens with child themes etc. The actual code I did is trivial, the product questions and work around answering those, supporting it after release etc, makes the effort questionable.
However, I’m surfacing this so others can give their take if they disagree.
Note: this PR should not be merged as is
This is a very limited proof of concept to aid discussions about having Storefront default to using the Mini-Cart block instead of the Woo Core mini-cart widget.
The team has been working on some improvements around the use of
get_refreshed_fragments
API in Woo Core, however the mini cart widget will still enqueue this script (and the resulting ajax calls). Implementing some variation of what is suggested in this PR will accomplish a number of things:Screenshots
The Mini-Cart block in action on the frontend:![CleanShot 2023-06-09 at 14 40 54](https://github.com/woocommerce/storefront/assets/1429108/4a6bf837-27ef-40f1-b12c-e0ab2e654fe9)
The template part:![CleanShot 2023-06-09 at 15 02 53](https://github.com/woocommerce/storefront/assets/1429108/6b809613-2ca5-4684-a40d-089926dcdd8b)
How to test the changes in this Pull Request:
1. 2. 3.
Additional Notes:
theme.json
support to the theme or enqueue relevant styles in the editor context to achieve the parity.Changelog