Commit Graph

1062 Commits

Author SHA1 Message Date
Ovidiu Liuta 9796af2fb4 changing tax_query field to term_id (https://github.com/woocommerce/woocommerce-blocks/pull/6585)
Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
2022-06-22 12:51:14 +02:00
Nadir Seghir e50b654d69 update version 2022-06-22 10:42:03 +01:00
github-actions[bot] da202ab1e0 Release: 7.9.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6604)
* Empty commit for release pull request

* update readme

* add testing notes

* update link

* Bumping version strings to new version.

* move testing docs

* remove old folder

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2022-06-22 10:40:03 +01:00
Luigi Teschio 15ee965e48 Fix crash when the user saves Mini Cart Template (https://github.com/woocommerce/woocommerce-blocks/pull/6613) 2022-06-21 18:30:26 +02:00
Tung Du aadb94c012 Fix: Display the correct title for templates from theme (https://github.com/woocommerce/woocommerce-blocks/pull/6452) 2022-06-21 22:26:09 +07:00
Daniel Dudzic 8f00447f2d Add descriptions for all WC templates and refactor Search template hierarchy loading logic (https://github.com/woocommerce/woocommerce-blocks/pull/6345)
* Refactor template title and description loading and search template hierarchy updating

* Remove an unnecessary return

* Fix template descriptions for custom templates

* Fix template description typos

* Move the template description loading logic to mirror the title's

* Remove the descriptions filter and move the search hierarchy code back to a separate file

* Restore the original order of the container registrations

* Restore the product search template slug

* Restore the Product Search Results slug as a constant

Co-authored-by: Luigi <gigitux@gmail.com>
2022-06-20 14:49:18 +01:00
Albert Juhé Lluveras fc956b7f48 Fix images hidden by default in Product grid blocks (https://github.com/woocommerce/woocommerce-blocks/pull/6599) 2022-06-20 14:13:56 +02:00
Albert Juhé Lluveras b543fa2684 Replace instances of wp_is_block_theme() with wc_current_theme_is_fse_theme() (https://github.com/woocommerce/woocommerce-blocks/pull/6590) 2022-06-17 14:51:04 +02:00
Tomasz Tunik 0dfc1ad58b provide span wrapper for category list item name (https://github.com/woocommerce/woocommerce-blocks/pull/6574)
will enable adding text overflow of other effects that user might not want to interfere with the image element
2022-06-15 11:37:21 +02:00
Albert Juhé Lluveras 680ebba7cb Fix an endless loop when using product grid blocks inside product descriptions (https://github.com/woocommerce/woocommerce-blocks/pull/6471)
* Fix an endless loop when using product grid blocks inside product descriptions

* Add array_key_exists protection

* Typo in comment

* 👌IMPROVE: Improve comments - woocommerce/woocommerce-blocks#6416

Co-authored-by: Panos (Panagiotis) Synetos <panos.synetos@automattic.com>
2022-06-14 11:24:48 +03:00
Niels Lange 15a22db4f4 Update README.md 2022-06-13 14:37:05 +02:00
Niels Lange 3208da551b Improve the structure of the WooCommerce Blocks Handbook (https://github.com/woocommerce/woocommerce-blocks/pull/6429)
* Improve the structure of the WooCommerce Blocks Handbook

Co-authored-by: Rania Lang <rania.langouretou@automattic.com>
2022-06-09 17:52:19 +02:00
Niels Lange a748f533a8 Format Markdown files using wp-scripts (https://github.com/woocommerce/woocommerce-blocks/pull/6462)
* Format Markdown files using Prettier

* Format Markdown files using wp-scripts

* Adjust MD linting
2022-06-09 14:43:17 +02:00
Alex Florisca 295184a734 Change Checkout.md to correct mistake (https://github.com/woocommerce/woocommerce-blocks/pull/6541) 2022-06-09 13:18:25 +03:00
Thomas Roberts 0aa3bcd9cb Access correct property of package destination in Store API (https://github.com/woocommerce/woocommerce-blocks/pull/6470)
* Access correct property of package destination

* Check for address_1 first then address
2022-06-09 12:45:00 +03:00
Albert Juhé Lluveras d994f06803 Fix PHP notice in Mini Cart when prices included taxes (https://github.com/woocommerce/woocommerce-blocks/pull/6537) 2022-06-09 09:57:37 +02:00
Luigi Teschio 9a80ad3f6a bump version and update tested up value for WordPress and WooCommerce (https://github.com/woocommerce/woocommerce-blocks/pull/6534) 2022-06-07 15:58:18 +02:00
github-actions[bot] 7a05f8559d Release: 7.8.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6517)
* Empty commit for release pull request

* Add changelog for the 7.8.0 release

* Add testing notes for 7.8.0 release

* move legacy payment processing to its own class (https://github.com/woocommerce/woocommerce-blocks/pull/6519)

* update changelog and testing instructions after the cherry-pick

* add link

* Featured Item: Fix colors from default palette not being applied (https://github.com/woocommerce/woocommerce-blocks/pull/6525)

Gutenberg uses two different attributes for text colors:

* `style.color.text`, and
* `textColor`

However, the second one is used only when a color from the default
palette is selected AND the post is saved and reloaded.

With this fix we use the human readable string from the default palette
as a CSS variable.

Please note that while Gutenberg correctly assigns the appropriate CSS
class to render the right color, the problem is that if the color is
handled by a class, it can be overridden for example by themes.

See woocommerce/woocommerce-blocks#6492

* upload new zip

* update changelog

* Revert "Remove Combobox patch (https://github.com/woocommerce/woocommerce-blocks/pull/6465)" (https://github.com/woocommerce/woocommerce-blocks/pull/6531)

This reverts commit 4976afad58.

* upload new zip

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-06-07 15:40:54 +02:00
Seghir Nadir 87a5e41e05 move legacy payment processing to its own class (https://github.com/woocommerce/woocommerce-blocks/pull/6519) 2022-06-06 13:44:52 +01:00
Tung Du fb84599f42 Fix: Use `register_block_type_from_metadata` function (https://github.com/woocommerce/woocommerce-blocks/pull/6511) 2022-06-03 10:10:08 +07:00
Tung Du 775e149ad7 Fix: All translations related to JS blocks are loaded even if the block is not used (https://github.com/woocommerce/woocommerce-blocks/pull/6478) 2022-05-30 23:00:40 +07:00
Daniel Dudzic b15050909e Mini Cart: Add font size and font family controls (https://github.com/woocommerce/woocommerce-blocks/pull/6396)
* Mini Cart: Add font size and family controls

* Remove redundant property from the path

* Add conditional check for isFeaturePluginBuild
2022-05-30 10:45:15 +02:00
Alba Rincón 7ab9cb214b Refactor: `Featured product` and `Featured category` classes (https://github.com/woocommerce/woocommerce-blocks/pull/6443)
* Add `Fixed/Repeated background` to the `Featured Category` block

* Reorganize `Featured Product` and `Feature Category` before unification

* Add new `FeaturedItem` class with the shared code for `Featured Product/Category`

* Remove space

* Small tweaks after review feedback
2022-05-30 09:08:53 +02:00
Seghir Nadir 3ff8440643 Respect low stock setting (https://github.com/woocommerce/woocommerce-blocks/pull/6444) 2022-05-27 20:55:46 +01:00
Daniel Dudzic 9488b9186d Post-release version bump to 7.8.0-dev 2022-05-26 11:08:20 +02:00
github-actions[bot] 7f32bc4c14 Release: 7.7.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6448)
* Empty commit for release pull request

* Add changelog for the 7.7.0 release

* Add testing notes for the 7.7.0 release

* Fix being able to remove Cart Totals block (https://github.com/woocommerce/woocommerce-blocks/pull/6449)

* Update .zip link for the 7.7.0 release

* Revert changes to webpack build output (https://github.com/woocommerce/woocommerce-blocks/pull/6456)

* revert changes to webpack file

* fix loading of chunks

* revert changes to assets api as well

* include chunks from other blocks

* bail early if there is no build folder

* check if current folder exist (https://github.com/woocommerce/woocommerce-blocks/pull/6460)

* Update the 7.7.0 release .zip file

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2022-05-26 11:03:56 +02:00
Seghir Nadir f031f8f83a check if current folder exist (https://github.com/woocommerce/woocommerce-blocks/pull/6460) 2022-05-26 10:34:29 +02:00
Seghir Nadir d3c2f638fa Revert changes to webpack build output (https://github.com/woocommerce/woocommerce-blocks/pull/6456)
* revert changes to webpack file

* fix loading of chunks

* revert changes to assets api as well

* include chunks from other blocks

* bail early if there is no build folder
2022-05-25 16:59:51 +01:00
Alba Rincón 983a13c8bf Add `Fixed/Repeated background` to the `Featured Category` block (https://github.com/woocommerce/woocommerce-blocks/pull/6440)
* Add `Fixed/Repeated background` to the `Featured Category` block

* Reorganize `Featured Product` and `Feature Category` before unification

* Fix gradient overlay
2022-05-24 16:10:16 +02:00
Seghir Nadir 238ab01ab2 Refactor webpack splitting to fix missing translation (https://github.com/woocommerce/woocommerce-blocks/pull/6420)
* don't splitChunk frontend scripts

* simplfy output folders

* reduce minimum chunk size to 10kb

* add all inner blocks for loading

* better splitChunks

* update translation code

* wait for scripts

* try sleeping

* fix loading translation

* fix tests for mini cart

* simplfy po logic

* automate loading chunks

* rename webpack group file

* rename block.json path
2022-05-23 15:58:13 +01:00
Alba Rincón a18e44e1a7 Convert `Products by Attribute` to TS (https://github.com/woocommerce/woocommerce-blocks/pull/6418)
* Convert `Products by Attribute` block to TS

* Small tweaks after review

* Extract InspectorControls and EditMode into components

* Refactor: move the edit related code to the edit.jsx file

* Remove the `editMode` attribute and control the edit mode inside the edit component

* Remove edit mode

* Change `isEditing` depending on attributes are selected or not

* Improved interfaces/props after review

* Add enum allowed values to `attrOperator` and `orderby` on the `block.json`

* Move `withSpokenMessages` to wrap the whole Edit block
2022-05-23 10:45:54 +02:00
Alba Rincón eec68ed371 Convert `Handpicked Products` block to TS (https://github.com/woocommerce/woocommerce-blocks/pull/6417)
* Convert `Handpicked Products` block to TS

* Extract InspectorControls and EditMode into components

* Refactor edit and remove the `editMode` attribute

* Change `isEditing` default depending on products selected or not

* Improve interfaces/props after review

* Move withSpokenMessages to wrap the whole Edit block
2022-05-23 10:14:51 +02:00
Alba Rincón 3b86ff6b39 Fix padding for the Featured Product block (https://github.com/woocommerce/woocommerce-blocks/pull/6435) 2022-05-20 14:20:57 +02:00
Lucio Giannotta 7fcc561db1 Refactor Featured Category and Featured Product blocks (https://github.com/woocommerce/woocommerce-blocks/pull/6406)
This PR creates a new directory called `featured-items` which includes both blocks.
All the shared code lives at the top level of that directory.

Individual blocks still have their own directories, with their `block.json` and all other relevant configuration.

All the functionalities have been refactored out into their own files, accepting configuration when relevant, but mostly de-duplicating all the code.

Styles have also been refactored using mixins and extends and they mostly live in one place.
2022-05-19 18:16:46 +02:00
Alba Rincón 22e6394d47 Implement `Fixed image` and `Repeated image` media controls for the `Featured Product` (https://github.com/woocommerce/woocommerce-blocks/pull/6344)
* Add `Fixed` and `Repeated` background controls to `Featured Product`

* Add `Repeated background` feature when the toggle is activated

* Extract `get_image_url` function

* Add the styles for rendering the repeated image on the frontend

* Add `hasParallax` and `isRepeated` to the `block.json` file

* Adjust styles

* Remove unused function, improve phpdoc

* Use alt and product name

Fix error rebasing master

* Hide alt if isRepeat is true

When isRepeated is true, the image is a background so it does not
make sense to have an alt attribute.

* Add `Fixed image` behaviour

* Remove unnecessary single quotes

* Remove duplicated const due to rebasing

* Fix focal point getting lost after enabling Fixed bg

* Fix duotone for fixed and repeated images

* Fix duotone for fixed and repeated images on the front end

* Don't allow alt if the image is a bg not an img element
2022-05-18 16:08:32 +02:00
Thomas Roberts 2bfc687093 Bump version numbers following release PR merge 2022-05-10 12:55:02 +01:00
github-actions[bot] 07b201664a Release: 7.6.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6388)
* Empty commit for release pull request

* Bump version numbers and add changelog

* Add testing notes

* Add correct list of blocks to 6302 notes

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-05-10 12:50:11 +01:00
Thomas Roberts f3dc80c6f7 Bump version numbers to 7.7.0-dev 2022-05-10 09:54:22 +01:00
Tom Cafferkey fffe7903d7 Check asset_data_registry keys do not exist before adding them for PHP templates (https://github.com/woocommerce/woocommerce-blocks/pull/6384)
* Check key does not exists before adding it

* Use third param to check if duplicate key exists instead of condition
2022-05-09 11:50:22 +01:00
Daniel Dudzic 0b3acfad27 Add the product image control for all blocks utilizing GridContentControl (https://github.com/woocommerce/woocommerce-blocks/pull/6302) 2022-05-09 12:04:33 +02:00
Tung Du 26fbb3f569 Shop page: Remove the Template panel from the Setting Sidebar (https://github.com/woocommerce/woocommerce-blocks/pull/6366) 2022-05-05 08:08:10 +07:00
Tung Du 217c822b76 Fix: Mini Cart block is not available from the Edit template screen (https://github.com/woocommerce/woocommerce-blocks/pull/6351)
* revert woocommerce/woocommerce-blocks#5653

* remove unused global variable

* fix class name
2022-05-05 07:41:35 +07:00
Daniel Dudzic cd8196fa5f Product Tag Cloud: Hide from Widgets screen in classic themes (https://github.com/woocommerce/woocommerce-blocks/pull/6327)
* Product Tag Cloud: Hide from Widgets screen in classic themes
* Fix code indentation
2022-05-04 16:57:25 +02:00
Tung Du 206672f27e Classic Template: set the default alignment to wide (https://github.com/woocommerce/woocommerce-blocks/pull/6356) 2022-05-04 18:02:42 +07:00
Alba Rincón bdfd1da4c5 Start using the `block.json` metadata file for the `Featured Category` block (https://github.com/woocommerce/woocommerce-blocks/pull/6300)
* Start using the `block.json` metadata file for the `Featured Category` block

* Get default attributes from the `block.json` file

* Remove unnecessary `get_block_metadata_defaults` function

* Add alt attribute to the block.json file

* Remove unused imports
2022-04-28 17:31:59 +02:00
Alba Rincón 0aac2c59ef Start using the `block.json` metadata file for the `Featured Product` block (https://github.com/woocommerce/woocommerce-blocks/pull/6296)
* Start using the `block.json` metadata file for the `Feature Product` block

* Get default attributes from the block.json file

* Add removed comment

* Remove unnecessary `get_block_metadata_defaults` function

* Add alt default to block.json
2022-04-28 17:04:56 +02:00
Alba Rincón 964f6e5965 Add new `alt` attribute to the `Featured Product` media settings (https://github.com/woocommerce/woocommerce-blocks/pull/6308)
* Add new `alt` attribute to Media Settings

Allow to define an alt text for the Feature Product block

* Simplify on change

* Improve alt description and use name instead of short description

Short description can contain html and images, so it's not adequate to use on the alt attribute
2022-04-28 16:28:22 +02:00
Alba Rincón ec73743d0f Add new `alt` attribute to the `Featured Category` media settings (https://github.com/woocommerce/woocommerce-blocks/pull/6341) 2022-04-28 16:28:09 +02:00
Tarun Vijwani 1d0acebfa9 Update to dev version: 7.6.0-dev (https://github.com/woocommerce/woocommerce-blocks/pull/6336)
* update to dev version: 7.6.0-dev
2022-04-27 17:54:51 +04:00
github-actions[bot] a0d7400432 Release: 7.5.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6312)
* Release: 7.5.0
2022-04-27 17:19:21 +04:00
Tom Cafferkey 6fb43ed8cb Deprecate legacy filter widgets with block alternatives (https://github.com/woocommerce/woocommerce-blocks/pull/6299)
* Transform object for woocommerce_price_filter legacy widget to be replaced with block alternative

* Filter products by price transform

* Price Filter formatting

* Set set_filterable_product_data data on the widgets screen

* Prevent rendering the Price Filter block if there are no products to filter

* Prevent Classic Price Filter Widget from being available as a widget

* Transform layered nav classic widget to attribute filter block

* Allow Filter Products by Stock block to be added as a widget

* Allow Active Filters widget to be transformed to Active Filters block

* Set showFilterButton to true and showInputFields to false in the transform of Price Filter to minic widgets more

* Change displayStyle property to be display_type instead of incorrectly using title

* mock @woocommerce/settings for has_filterable_products setting

* try: add All Products block to render that filter on the front end

* Revert "try: add All Products block to render that filter on the front end"

This reverts commit 5ad09e964b77e5c6499b4134cf58d7a6c226424d.

* try: add all product block to bypass has_filterable_products check

* fix: backend e2e test for attribute filter

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-04-27 08:36:00 +01:00
Tom Cafferkey 781de225da Only set data is_rendering_php_template in Classic Themes on WooCommerce product archive templates where filters are being used. (https://github.com/woocommerce/woocommerce-blocks/pull/6324) 2022-04-26 12:22:43 +01:00
Tung Du e0f140c7e2 Fix: Customizer fatal error for bundled woocommerce-blocks package (https://github.com/woocommerce/woocommerce-blocks/pull/6317) 2022-04-26 15:21:14 +07:00
Seghir Nadir bbd7e53598 graduate draft orders (https://github.com/woocommerce/woocommerce-blocks/pull/6288) 2022-04-25 15:08:37 +01:00
Seghir Nadir bcd490a78f udpate attributes docs (https://github.com/woocommerce/woocommerce-blocks/pull/6272) 2022-04-25 15:08:14 +01:00
Seghir Nadir 162c21a84d show attributes in simple products (https://github.com/woocommerce/woocommerce-blocks/pull/6274) 2022-04-25 15:07:47 +01:00
Harris Papazoglou f46d912cc9 Product Query: pass any product taxonomies existing in the URL parameters. (https://github.com/woocommerce/woocommerce-blocks/pull/6152)
* Product Query: pass any product taxonomies existing in the URL parameters.

* Products API: add custom product taxonomy in docs.

* Docs: fixes type.

* Linting the docs.

* Product Query: add [product-taxonomy]_operator docs.

* Product Query: fixes the taxonomies merge order.

* Product Query: make sure that tax keys are unique and sanitized.

* Product Query: adds `tax_` prefix to docs.

* Product Query: fixes not_in for categories, taxonomies, and tags.

* Product Query: updates attribute operator enum.

* Product query: uses `_unstable_tax_` instead of `tax_` prefix for custom taxonomies.

Co-authored-by: cpap <papazoglou.charalampos@gmail.com>
2022-04-21 15:00:11 +03:00
Luigi Teschio 881c202717 Make Filter Products by Stock block compatible with PHP rendered Classic Template block (https://github.com/woocommerce/woocommerce-blocks/pull/6261)
* Enable Attribute Filter block to work with the PHP rendered Classic Template block

* Check for presence of option before rendering it

* improve filter product by attribute

* fix pagination problem

* fix check when two filter block with same attribute are used

* fix filter by stock for PHP templates

* fix naming and comment

* Update filter key in ClassicTemplate

* Update stock filter block for PHP templates when the filter button is enabled

* Remove unused useEffect and fix ESLint error

* Set active stock filter and track using local state

* ESLint fix

* Remove unncessary dependencies from useEffect

Co-authored-by: tjcafferkey <tjcafferkey@gmail.com>
2022-04-21 08:28:41 +01:00
Lucio Giannotta 268d6e1a34 Enable more style options for the Featured Category block (https://github.com/woocommerce/woocommerce-blocks/pull/6276)
* Enable more options for the Featured Category block

* Fix the focal point picker
* Fix the resizeable handle
* Fix the overlay and move to own section
* Enable gradient and duotone
* Add padding and fix min height

* Export ConstrainedResizeable from Featured Product

* Wrap duotone in feature plugin flag

* Add support for `border-radius`

* Change prop order

* Add SSR for new options on Featured Category block

* Optional chaining on border radius

Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>

* Add default to overlay and height

* Optional chaining on border radius for Featured Product block

* Fix gradient persistence and default overlay discrepacies

* Explicitly add box-sizing to the featured-product/category wrapper

Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
2022-04-21 08:20:10 +01:00
Lucio Giannotta 9b6d0e0e0f Fix Featured Product block frontend mismatch (https://github.com/woocommerce/woocommerce-blocks/pull/6263)
If the Featured Product block was added but not modified at all,
the block would not match the editor on the front end.

This was due to the fact that, on the frontend, the
block is SSR and was missing some defaults which
were present in JS.
2022-04-19 15:57:05 +02:00
Tom Cafferkey 0d9348f618 Provide product filter blocks a method to know when to display. (https://github.com/woocommerce/woocommerce-blocks/pull/6270)
* Add has_filterable_products data to the AllProducts block to be used by product filter blocks

* Add has_filterable_products data to the ClassicTemplate block to be used by product filter blocks

* Add ClassicTemplatesCompatibility class which will add necessary data to the front-end of core PHP templates of Classic Themes for filter blocks being used as widgets.

* Update comment of set_php_template_data method on ClassicTemplatesCompatibility class

* Move conditional checking if the current theme is a block theme in ClassicTemplatesCompatibility class
2022-04-19 08:14:09 +01:00
Shendy 19dfae3dcc Call plugin_dir_url() in Package::get_url() instead of from its constructor. (https://github.com/woocommerce/woocommerce-blocks/pull/6260) 2022-04-14 17:28:32 +01:00
Tom Cafferkey 4d3c609a3c Make Attribute Filter block compatible with PHP rendered Classic Template block (https://github.com/woocommerce/woocommerce-blocks/pull/6204)
* Enable Attribute Filter block to work with the PHP rendered Classic Template block

* Check for presence of option before rendering it

* improve filter product by attribute

* fix pagination problem

* fix check when two filter block with same attribute are used

Co-authored-by: Luigi <gigitux@gmail.com>
2022-04-14 14:38:23 +02:00
Saad Tarhi 91ec25424a Post release version bump (7.5.0-dev) 2022-04-14 13:23:29 +00:00
github-actions[bot] 7d96272cf0 Release: 7.4.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6225)
* Empty commit for release pull request

* Add Changelog to readme.txt

* Update WC tested and required versions

* Add testing notes

* Register missing C&C inner blocks and update fallback template for older C& C versions (https://github.com/woocommerce/woocommerce-blocks/pull/6195)

* Register missing C & C inner blocks and update fallback template for older C & C versions

This will fix the issues with missing order summary inner blocks: Coupons (both in C & C blocks) and the Cart header. The issue was happening because, for example, for Cart the coupons were registred on the on frontend, but it just wasn't forced in the attributes. Because it also wasn't added to the PHP fallback layout, the render function didn't include it. For the Checkout block the coupons inner block wasn't registered at all.

* Revert changes to Checkout.php, we don't need to test for inner blocks

* Revert "Revert changes to Checkout.php, we don't need to test for inner blocks"

This reverts commit fc39535f8476d02e35353374d9434a8723458cfa.

* Fix the returned template for older Checkout block iterations

* Fix Cart and Checkout templates to accommodate the Summary order inner blocks

* Hide coupon form div from inner blocks if coubons are not enabled

* Fix checkout coupon tests in checkout

They have been written for logged in user

* Fix Order Summary Heading inner block's default text

* Update comments with better wording

* Revert "Hide coupon form div from inner blocks if coubons are not enabled"

This reverts commit ab09021b923fad4218b3016e47760ad07f6bc960.

(cherry picked from commit 0b18ff59bd)

* Update the zip file link

* Update testing instructions

* Remove experimental build related PR from testing notes

* Fix/order summary sidebar css (https://github.com/woocommerce/woocommerce-blocks/pull/6231)

* Add box sizing to Totals item

* Add some unit tests for Order summary blocks

* Fix Proceed to checkout button size

(cherry picked from commit d22ce7cd0b)

* Update the WC required/tested versions

* Mini Cart Contents: Use block pattern to make the empty cart message translatable (https://github.com/woocommerce/woocommerce-blocks/pull/6248)

* try: use block pattern to make empty cart message translatable

* Update src/BlockTypes/MiniCart.php

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

* rename function

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Luigi <gigitux@gmail.com>
(cherry picked from commit 93ad72f6ff)

* Update the release's ZIP file

* Update testing notes

In woocommerce/woocommerce-blocks#6065, for Cart only Order Summary Heading & Coupon form can
be removed, and for Checkout only the Coupon form.

* Update the testing notes

Remove woocommerce/woocommerce-blocks#5870 testing notes because they can't be tested as a user

* Update Testing notes

Add screenshots to the woocommerce/woocommerce-blocks#5967 testing notes

* Remove woocommerce/woocommerce-blocks#6166 testing instructions

We reverted this PR

* Revert (https://github.com/woocommerce/woocommerce-blocks/pull/6166) (https://github.com/woocommerce/woocommerce-blocks/pull/6253)

Revert "Prevent Featured Product block from breaking when product is out of stock + hidden
from catalog (https://github.com/woocommerce/woocommerce-blocks/pull/6166)"

This reverts commit 92387e2

(cherry picked from commit c586b1a5f3)

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
Co-authored-by: Raluca Stan <ralucastn@gmail.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-04-14 11:55:33 +00:00
Luigi Teschio bac2c59daa Add Product Search Results Template (https://github.com/woocommerce/woocommerce-blocks/pull/6219)
* Add Search Result Product Template woocommerce/woocommerce-blocks#6218

Add Search Result Product Template

* update title

* add E2E test for Product Search Results template

* renaming class

* update E2E tests
2022-04-14 11:45:00 +02:00
Tung Du 93ad72f6ff Mini Cart Contents: Use block pattern to make the empty cart message translatable (https://github.com/woocommerce/woocommerce-blocks/pull/6248)
* try: use block pattern to make empty cart message translatable

* Update src/BlockTypes/MiniCart.php

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

* rename function

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Luigi <gigitux@gmail.com>
2022-04-13 17:15:48 +02:00
Lucio Giannotta ebd8774ae6 Enable more style options for the Featured Product block (https://github.com/woocommerce/woocommerce-blocks/pull/6181)
* Add support for overlay color and duotone
* Add support for custom inner padding
* Wrap all block experimental features in `isFeaturePluginBuild`
* Fix resizable container min height

The container now resizes if, e.g., padding is increased, and can't be resized down
with the handle to a height lower than it's minimum size determined by content and
padding box.

* Fix resizable handle not being fully visible

Previously, `overflow: hidden` was needed because the height constraint and
padding could push the content out of the container. Now this should not be
possible.

* Add an option to the block to decide how is the image fitted to the container
2022-04-12 17:16:00 +02:00
Raluca Stan 0b18ff59bd Register missing C&C inner blocks and update fallback template for older C& C versions (https://github.com/woocommerce/woocommerce-blocks/pull/6195)
* Register missing C & C inner blocks and update fallback template for older C & C versions

This will fix the issues with missing order summary inner blocks: Coupons (both in C & C blocks) and the Cart header. The issue was happening because, for example, for Cart the coupons were registred on the on frontend, but it just wasn't forced in the attributes. Because it also wasn't added to the PHP fallback layout, the render function didn't include it. For the Checkout block the coupons inner block wasn't registered at all.

* Revert changes to Checkout.php, we don't need to test for inner blocks

* Revert "Revert changes to Checkout.php, we don't need to test for inner blocks"

This reverts commit fc39535f8476d02e35353374d9434a8723458cfa.

* Fix the returned template for older Checkout block iterations

* Fix Cart and Checkout templates to accommodate the Summary order inner blocks

* Hide coupon form div from inner blocks if coubons are not enabled

* Fix checkout coupon tests in checkout

They have been written for logged in user

* Fix Order Summary Heading inner block's default text

* Update comments with better wording

* Revert "Hide coupon form div from inner blocks if coubons are not enabled"

This reverts commit ab09021b923fad4218b3016e47760ad07f6bc960.
2022-04-12 12:20:22 +01:00
Thomas Roberts ab71adcd4b Pass correct number of arguments to woocommerce_blocks_checkout_update_order_from_request (https://github.com/woocommerce/woocommerce-blocks/pull/6224) 2022-04-12 10:30:27 +01:00
Jamel Noel Reid 64fcdda420 Add Product endpoint to ExtendSchema (https://github.com/woocommerce/woocommerce-blocks/pull/6122)
* Added ProductSchema Identifier

* Updated get_extended_schema & get_item_response

* Test for extensions field on products

* Updated endpoint extend Readme
2022-04-11 17:40:26 +01:00
Tung Du d5503b6e46 Fix: Mini Cart block isn't available in the Customizer > Widget (https://github.com/woocommerce/woocommerce-blocks/pull/6201) 2022-04-08 17:14:25 +07:00
Tung Du 5415c22251 Prepare the Mini Cart block for WC Core release (https://github.com/woocommerce/woocommerce-blocks/pull/6209) 2022-04-08 15:51:21 +07:00
Tarun Vijwani d85e9766a7 Increased Cart product quantity limit to 9999 (https://github.com/woocommerce/woocommerce-blocks/pull/6202)
Increased per item cart limit to 9999
2022-04-08 12:46:48 +04:00
AndrewJDawes fc20c8363e Fix Actions and Filters documentation with broken links woocommerce/woocommerce-blocks#5808 (https://github.com/woocommerce/woocommerce-blocks/pull/6128)
* Fix docs paths for actions and filters source links woocommerce/woocommerce-blocks#5824

* Build docs after fixes for woocommerce/woocommerce-blocks#5824 - see 0c79cb7f4e75fc5c48c9b054cbac6f0344b4048a
2022-04-05 16:22:56 +02:00
Albert Juhé Lluveras 58c649e971 Update Filter Products by Price block to work with PHP templates (https://github.com/woocommerce/woocommerce-blocks/pull/6146)
* Update Filter Products by Price block to work with PHP templates

* Reformat param formatting

* Add check for PHP template

* window guards and comments for context

* Add comment to page reload

* Addressed code review feedback

* Fix setMinPriceQuery and setMaxPriceQuery values

* Remove unnecessary snake_case comment and update newUrl to assign to window.location.href.

* package-lock.json update

Co-authored-by: tjcafferkey <tjcafferkey@gmail.com>
2022-04-05 11:52:35 +01:00
Luigi Teschio 54b52c62ca Mini Cart block - fix translations handling woocommerce/woocommerce-blocks#6153 (https://github.com/woocommerce/woocommerce-blocks/pull/6158)
* Mini Cart block - fix translations handling woocommerce/woocommerce-blocks#6153

Mini Cart block - fix translations handling

* Mini Cart block - fix translations handling (https://github.com/woocommerce/woocommerce-blocks/pull/6164)

* loads translations for deps

Co-authored-by: Tung Du <dinhtungdu@gmail.com>

* address code review. load translations close to associated scripts

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-04-01 10:54:01 +02:00
Tung Du f4d4bed2c1 Mini Cart Contents: Refactor inner blocks styling using `currentColor` (https://github.com/woocommerce/woocommerce-blocks/pull/6130) 2022-03-29 20:48:59 +07:00
tjcafferkey beaefc0bc6 Version bump to 7.4.0-dev 2022-03-28 16:01:04 +01:00
github-actions[bot] b60a7418f1 Release: 7.3.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6129)
* Empty commit for release pull request

* Updated changelog

* Prepare the Mini Cart block for Feature Plugin (https://github.com/woocommerce/woocommerce-blocks/pull/6127)

* Release notes

* Update plugin url

* Add 730 to README testing

* Remove PR from testing notes and changelog

* Remove PR from testing notes

* Allow memoized filters to re-run if `defaultArg` changes (https://github.com/woocommerce/woocommerce-blocks/pull/6102)

* Check the last defaultArg to decide whether we re-run filters

* Fake commit to make CI run

* Revert change to .gitignore to make CI run

* Update testing instructions

* Update testing instructions

* Update download link

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: tjcafferkey <tjcafferkey@gmail.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-03-28 15:58:41 +01:00
Tung Du 3b8d790efe Prepare the Mini Cart block for Feature Plugin (https://github.com/woocommerce/woocommerce-blocks/pull/6127) 2022-03-28 15:42:07 +07:00
Tung Du 6e375408f7 Mini Cart: Fix footer buttons hover style (https://github.com/woocommerce/woocommerce-blocks/pull/6086)
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-03-24 22:34:36 +07:00
Tom Cafferkey b3fca9a1b9 Add static keyword to function (https://github.com/woocommerce/woocommerce-blocks/pull/6112) 2022-03-24 09:55:46 +00:00
Tom Cafferkey 7d0c2847f5 Refactor BlockTemplateUtils (https://github.com/woocommerce/woocommerce-blocks/pull/6019)
* Refactor BlockTemplateUtils.php

* Update comments

* Code review feedback

Co-authored-by: Tom Cafferkey <tom@Toms-MBP-2.broadband>
2022-03-23 09:16:07 +00:00
Alba Rincón 13311e7bee Rename Legacy Template block to Classic Template block (https://github.com/woocommerce/woocommerce-blocks/pull/6021)
The internal ID has been kept after a comment by @tjcafferkey. This causes a
bit of inconsistency in the internal code, but it was deemed that it would have
been better as users who have customized templates using this
blocks ID will have saved this in their database, and it would result
in a corrupt block when loaded, and we didn't want to support both IDs at the
moment.

Otherwise, most other references to the legacy template, are now using the word
“classic”.

Co-authored-by: Alba Rincón <alba@albasauatticmbp.home>
2022-03-22 23:34:43 +01:00
Mike Jolley 89e86b4999 Create deprecated_dependency wrapper to log errors conditionally (https://github.com/woocommerce/woocommerce-blocks/pull/6074)
Store Editing  E2E tests are failing because of an upstream regression, not related to this PR
2022-03-22 15:06:14 +01:00
Mike Jolley f68890170a 7.2.0 changelog 2022-03-15 11:33:20 +00:00
Mike Jolley f926b24480 Checkout: Missing country error for virtual orders (edge case) (https://github.com/woocommerce/woocommerce-blocks/pull/6050)
* Make shipping address field optional on checkout routes

* Make update_customer_from_request use billing for shipping if omitted

* making shipping optional when needed

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2022-03-14 13:53:08 +00:00
Daniel Dudzic 5a8e94d86e Product Ratings: Add Global Styles font size and spacing support (https://github.com/woocommerce/woocommerce-blocks/pull/5927)
* Product Ratings: Add font size and spacing support

* Fix useTypographyProps hook

* Set SkipSerialization for Ratings block props

* Add additional hasSpacingStyleSupport check for the spacing

Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Tomasz Tunik <tomasztunik@gmail.com>
2022-03-11 16:52:00 +01:00
Mike Jolley 011c4cb6fd Add missing chunk to register_block_type_assets 2022-03-11 15:34:25 +00:00
Mike Jolley 8e057a03f5 Remove X- Prefixes from custom headers (https://github.com/woocommerce/woocommerce-blocks/pull/6020)
* Remove X- Prefixes from custom headers

* Fix docs

* Handle deprecated X-WC-Store-API-Nonce header if received

* Send old nonce until future version removes this

* Add todo and cut off date

* wc_deprecated_argument

* Update todo name

* typo

* Back compat in batch

* Flip Nonce logic to make it easier to support both in client bw compat logic
2022-03-11 12:07:08 +00:00
Luigi Teschio f78b2d8619 Remove not used attributes (https://github.com/woocommerce/woocommerce-blocks/pull/5974)
* Remove not used attributes woocommerce/woocommerce-blocks#5952

remove not used attributes

* remove not necessary jsdoc comments

Co-authored-by: Tomasz Tunik <tomasztunik@gmail.com>
2022-03-11 12:44:51 +01:00
Luigi Teschio 807720a28d Remove not necessary todo woocommerce/woocommerce-blocks#5827 (https://github.com/woocommerce/woocommerce-blocks/pull/6039)
Remove not necessary todo
2022-03-10 14:53:42 +01:00
Christos Lilitsas 28d647d02c Clear notices session after handling (https://github.com/woocommerce/woocommerce-blocks/pull/5983) 2022-03-10 12:29:58 +00:00
Tomasz Tunik f15d628610 Fix 404 and 500 errors in E2E test logs, editor and front-end. (https://github.com/woocommerce/woocommerce-blocks/pull/5989)
* Change atomic blocks to not use custom webpack build paths

we want to always load lazy loaded components from their default paths
to avoid having to handle importing components in different ways for
regular and atomic component packages

* Add footer parts to test themes

The Site Editor is expecting the footer parts to be there or it will try to
load them anyways and throw a 404. It's not breaking, but it's polluting
the console.

* Use REST API to tear down the templates

Previously, we used a util called `trashAllPosts` which navigated to the post UI
and deleted all the posts to tear down any side-effects of template editing tests.

However, with a [recent change](14e20f72b5),
WP Core removed the UI for those and that made our tests meet a 500 error.

Using the REST API should also make everything faster.

* Remove deprecated pupeteer waitFor usage

was still present in attribute-filter.test.js

* Update package-lock.json

* pin package versions

* Unify all atomic blocks to register on php side

* Remove Atomic Blcoks chunk_translation handling from AllBlocks

Before it was responsible for enabling translations for all the atomic blocks

* Add per atomic block chunk_translation registration

* update @wordpress/e2e-test-utils to 6.0.2

* add optional puppeteer

* pin workflows node version to 16.13.2

* upgrade package-lock

* upgrade package-lock

* set react and react-dom as peerDeps

* remove atomic block registration

Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com>
Co-authored-by: Luigi <gigitux@gmail.com>
2022-03-10 11:00:23 +01:00
Mike Jolley c3bf23fd4e Prefetch cart and checkout block assets when cart has contents (https://github.com/woocommerce/woocommerce-blocks/pull/5553)
* Prefetch block resources when cart has contents

* Fix error when cart is undefined
2022-03-09 12:25:36 +00:00
Mike Jolley 22e206d00a Remove `internal` comments from Store API file comments (https://github.com/woocommerce/woocommerce-blocks/pull/6005)
* Remove internal comments

* Remove line break

* Notices
2022-03-09 10:20:47 +00:00
Tung Du e735ffe5c2 Refactor: Use an alternative mini cart icon to fix the Mini Cart styling issues (https://github.com/woocommerce/woocommerce-blocks/pull/5985) 2022-03-09 16:13:52 +07:00
Luigi Teschio fc01576a38 Additional classes are visible on frontend page woocommerce/woocommerce-blocks#5881 (https://github.com/woocommerce/woocommerce-blocks/pull/5991)
Additional classes are visible on frontend page
2022-03-08 14:24:52 +01:00
Luigi Teschio 299f5e1bfa Hide Mini Cart Block on Cart and Checkout page (https://github.com/woocommerce/woocommerce-blocks/pull/5996)
* Hide Mini Cart Block on cart and checkout page woocommerce/woocommerce-blocks#5931

hide Mini Cart Block on cart and checkout page

* instead to not render nothing, use visibility hidden
2022-03-07 17:29:06 +01:00
Mike Jolley eae1d75c86 Store API: Consistent error code and hook naming (https://github.com/woocommerce/woocommerce-blocks/pull/5992)
* Update error codes with `woocommerce_rest_` prefixes.

* Update action and filter hooks with woocommerce_store_api_ prefix

* Update hook docs

* Update error code mismatches

* Update hook name in tests

* update hook name in tests

* phpcs
2022-03-07 13:51:07 +00:00
Mike Jolley fd03b79995 StoreAPI: Rename namespace to remove `\Blocks` (https://github.com/woocommerce/woocommerce-blocks/pull/5982)
* Composer config

* Update namespace in deprecated.php

* Bulk update namespace

* Revert rename in deprecated class

* bw compat

* Store API: Add dedicated container and make Store API code self-contained (https://github.com/woocommerce/woocommerce-blocks/pull/5986)

* Move ArrayUtils to StoreApi

* Move PaymentContext/PaymentResult

* Move create account functionality to checkout endpoint. Update tests.

* Move get_routes_from_namespace to blocks

* Move RestApi logic within StoreApi namespace/directory

* StoreAPI Container

* Update functions

* Update extend docs

* Run Doc build script

* Missing container calls for 3rd party extensions

* Fix doc toc
2022-03-04 13:28:37 +00:00
colinleroy 6f8a3b14af Avoid crash in InboxNotifications if woocommerce-admin is entirely disabled. (https://github.com/woocommerce/woocommerce-blocks/pull/5954)
* Avoid calling plugin_dir_url a lot

* Fix crash if woocommerce admin is disabled

With Woocommerce's PR
https://github.com/woocommerce/woocommerce/pull/31991 applied, if
woocommerce admin is disabled via the woocommerce_admin_disabled
filter, the InboxNotifications block could crash.

* Fix coding style

* Simplify code path

* Remove unused initialization
2022-03-02 12:28:18 +00:00
Christos Lilitsas c35bf8ee67 Store API: Refactored validation handling and introduced `woocommerce_store_api_cart_errors` hook (https://github.com/woocommerce/woocommerce-blocks/pull/5904)
* Introduce 'wooocommerce_store_api_validate_cart' action

This action can be used by third party developers to add extra 'errors' in cart route responses. This is meant to function as a replacement of the legacy 'woocommerce_check_cart_items' hook.

* Introduce a new 'wooocommerce_blocks_draft_order_updated' action

The new action can be used to modify the finalized draft order object.
Additionally, developers can use it to throw a RouteException in order to prevent access to the checkout block.

The PR also shuffles some existing code that checks the order instance and sets the draft order ID before the 'woocommerce_blocks_checkout_update_order_meta' gets fired.

* Fix PHPCS

* Revert changes to Checkout route

* Add some extra content to the 'woocommerce_blocks_checkout_update_order_meta' docblock on the effect of exceptions thrown from callbacks

* Add __experimental prefix to 'wooocommerce_store_api_validate_cart' action

* Remove long ooo

* Add example

* Refactor cart error getters as wrappers to the validate functions

* Refactor stock_exceptions_to_wp_errors to return a single wp error.

* Add type hint in custom exception

* Fix namespace versioning and some minor improvements

* Move InvalidCartException catcher from AbstractCartRoute to AbstractRoute

* Introduce the __experimental_woocommerce_store_api_cart_errors filter

* Handle all notices and group them into a single WP_Error instance

* Cleanup doc and update example

* Cleanup NoticeHandler

* Fix doc

* Fix WP_Error namespace

* Update NoticeHandler unit tests

* Fix Unit tests typo

* Add docs to tests to bypass precommit scripts

* Refactor wp error grouping with merge_from

* Remove previous cart getters and refactor the get_cart_errors

* Fix CartSchema error getter and minor fixes

* Revert NoticeHandler exception namespace

* Unit test fix for get_cart_errors

* Switch back to do_action

* Update the example doc

* Duplicate use statement

* Update docblock in validate_cart() method for validation hooks

* Update action docs

* Remove __experimental prefix

Co-authored-by: Manos Psychogyiopoulos <psyx@somewherewarm.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2022-03-02 12:21:31 +00:00
Luigi Teschio 0f52c23eb4 Add font-style and font-weight support for ProductCategory List woocommerce/woocommerce-blocks#5670 (https://github.com/woocommerce/woocommerce-blocks/pull/5928)
Add font-style and font-weight support for ProductCategory List
2022-03-01 15:50:56 +01:00
Michael P. Pfeiffer cabf4e7db6 Update to dev version 2022-03-01 12:15:30 +01:00
github-actions[bot] 537e0a3536 Release: 7.1.0 (https://github.com/woocommerce/woocommerce-blocks/pull/5959)
* Empty commit for release pull request

* Add Changelog to readme.txt

* Update allow-plugins list as release build doesnt work otherwise

* Add testing instructions

* Update testing instructions

* Update version number in README.md

Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com>

* Add phpcodesniffer to Composer allow-plugins

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Michael P. Pfeiffer <michael@cssconf.eu>
Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>
Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com>
2022-03-01 12:10:42 +01:00
Mike Jolley 49b65c7bcf Refactor ExtendRestApi as ExtendSchema and expose `register_endpoint_data` as a public function (https://github.com/woocommerce/woocommerce-blocks/pull/5941)
* Create Extend class under schema namespace

* ExtendRestApi -> ExtendSchema

* ExtendSchema helper functions

* Move tests

* Fix tests

* Fix docs

* Typos

* Remove invalid param

* phpcs formatting

* Update docs/contributors/documentation-guidelines.md

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Update docs/extensibility/filtering-payment-methods.md

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Update docs/extensibility/README.md

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Update docs/extensibility/available-slot-fills.md

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Asserttrue comment

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-03-01 10:34:05 +00:00
Luigi Teschio 6fbb97f043 Add margin support on the Product Image block (https://github.com/woocommerce/woocommerce-blocks/pull/5925)
* Add margin support on the Product Image block woocommerce/woocommerce-blocks#5671

Add margin support on the Product Image block

* fix tests

* more specific selector

* update mixin
2022-02-28 18:41:10 +01:00
Tomasz Tunik 475b50573d Global Styles support for Product Price block (https://github.com/woocommerce/woocommerce-blocks/pull/5950)
* Add Global Styles support to product price block

- This comes sat a cost of losing control over regular vs sale price
- This includes refactor of attribute from align to textAlign
   which is a reserved supports feature attribute and textAlign is
   used across the Gutenberg project

* Add experimentalSelector and register as PHP block

This is required to make the GlobalStyles work inside of
the InnerContent block. Ie. All Products block.

* move sharedConfig supports outside of isFeaturePluginBuild check

* restore regularPriceClassName

* remove douplicated block registration on php side
2022-02-28 12:36:55 +01:00
Lucio Giannotta 8ad1dff1f4 Rename templates to more e-commerce friendly names (https://github.com/woocommerce/woocommerce-blocks/pull/5935) 2022-02-28 08:00:01 +01:00
Tom Cafferkey c1bba93a20 Determine if we need to load the mini-cart from the theme (https://github.com/woocommerce/woocommerce-blocks/pull/5946) 2022-02-25 16:49:25 +00:00
Marko Kaznovac 4a32932469 Change `curl` example calls to use `sh` code block (https://github.com/woocommerce/woocommerce-blocks/pull/5944) 2022-02-25 13:21:50 +00:00
Mike Jolley 528137c3b0 Fix spelling of two action hooks in Store API (https://github.com/woocommerce/woocommerce-blocks/pull/5926)
* Deprecate and rename hooks with incorrect spelling

* Update docs
2022-02-24 15:25:40 +00:00
Luigi Teschio 8caaeec998 Add Global Styles support for the Add To Cart Button block woocommerce/woocommerce-blocks#5666 (https://github.com/woocommerce/woocommerce-blocks/pull/5816)
* Add Global Styles support for the Add To Cart Button block woocommerce/woocommerce-blocks#5666

Add Global Styles support for the Add To Cart Button block

* remove support to font size

* try: fix the style override issue for add to cart button (https://github.com/woocommerce/woocommerce-blocks/pull/5843)

* restore typography support

* fix font weight

* add support for font weight

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-02-24 15:35:23 +01:00
colinleroy 7cb936bb10 Avoid calling plugin_dir_url a lot (https://github.com/woocommerce/woocommerce-blocks/pull/5915) 2022-02-23 12:20:32 +00:00
Mike Jolley a58b2d0ac4 Store API: Introduce API Versioning System (https://github.com/woocommerce/woocommerce-blocks/pull/5911)
* Fix missing dependency

* Min version exceeds required 5.6

* Move exceptions

* Move schemas under V1 namespace

* Move routes to v1

* Move RouteException

* Route versioning

* Update route and schema identifiers/init

* Rework route init to support multiple versions and multiple schema

* Tests for cart routes

* Cart coupons tests

* Batch

* extensions

* Update docs

* Update remaining tests

* woocommerce_store_api_route_version was unused

* Revert unrelated change

* Fix phpcs

* Update src/StoreApi/docs/guiding-principles.md

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Update src/StoreApi/docs/cart-items.md

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Update src/StoreApi/RoutesController.php

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Note about v1 unversioned endpoints

* Remove unused get_route_version

* 409 comment in tests

* Remove copy pasted comments

* Update all usage to v1

* Correct namespace

* More v1 namespaces

* More missing v1

* fix mocks

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-02-23 12:00:45 +00:00
Luigi Teschio a02e79ea38 Fix Global Styles for Product Image, Product Category List and Product Tag List Blocks (https://github.com/woocommerce/woocommerce-blocks/pull/5852)
* fix Global Styles for Product Image, Product Category List and Product Tag List blocks

fix Global Styles for Product Image, Product Category List and Product Tag List blocks

* Block style font-size was applying wrong value for fontSize

* Add missing __experimentalSkipSerialization to Category List

Co-authored-by: Tomasz Tunik <tomasztunik@gmail.com>
2022-02-22 18:06:33 +01:00
Tom Cafferkey 94b2d95693 Change tempalte ID when loading the mini cart template part (https://github.com/woocommerce/woocommerce-blocks/pull/5916) 2022-02-22 10:24:50 +00:00
mrleemon fcaf683fdc Fix typo (https://github.com/woocommerce/woocommerce-blocks/pull/5903) 2022-02-21 14:48:58 +00:00
Luigi Teschio 71bd69ad07 Pre-hydrate Mini Cart Block woocommerce/woocommerce-blocks#5882 (https://github.com/woocommerce/woocommerce-blocks/pull/5892)
* Pre-hydrate Mini Cart Block woocommerce/woocommerce-blocks#5882

Pre-hydrate Mini Cart Block

* try to fix test

* fix wrong behaviour
2022-02-18 14:44:10 +01:00
Raluca Stan 888d3d85b2 Update info about /checkout get endpoint data (https://github.com/woocommerce/woocommerce-blocks/pull/5807) 2022-02-17 10:13:41 +01:00
Lucio Giannotta a9fd133c26 Post release version bump (7.1.0-dev) 2022-02-16 12:23:02 +01:00
github-actions[bot] beb0188116 Release: 7.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/5842)
* Fix All Products block pagination not showing up (https://github.com/woocommerce/woocommerce-blocks/pull/5850)
* Fix regression for Twenty Twenty-Two theme with sale prices being underlined (https://github.com/woocommerce/woocommerce-blocks/pull/5851)

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Tomasz Tunik <tomasztunik@gmail.com>
2022-02-16 12:18:36 +01:00
Luigi Teschio 30e10295c1 Rating Product block: Add support for global style (https://github.com/woocommerce/woocommerce-blocks/pull/5521)
* Product title: add support global style woocommerce/woocommerce-blocks#4965

* add specific type

* add custom save function

* Rating Product block: add support for global style woocommerce/woocommerce-blocks#4965

Rating Product block: add support for global style

* add feature flag

* fix import after merge

* fix global style css generation

* restore css for classic product rating html element

* don't apply the global style to PHP blocks

* remove registration
2022-02-15 15:48:45 +01:00
Luigi Teschio 481f4c8e8e Sale Product Block: Enable global style (https://github.com/woocommerce/woocommerce-blocks/pull/5565)
* Product title: add support global style woocommerce/woocommerce-blocks#4965

* add specific type

* add custom save function

* move hooks in a specific folder

* fix crash on WP 5.8

* Featured Category block: Add support for global style woocommerce/woocommerce-blocks#4965

Featured Category block: Add support for global style

* fix border color

* Sale Product block: enable global style woocommerce/woocommerce-blocks#4965

Sale Product block: enable global style woocommerce/woocommerce-blocks#4965

* add comment
2022-02-14 11:32:13 +01:00
Tom Cafferkey d178761252 Fix reverting customisations by refactoring pre_get_block_file_template (https://github.com/woocommerce/woocommerce-blocks/pull/5746)
* Refactor maybe_return_blocks_template to get_woocommerce_block_file_template

* Remove unused method and rename get_woocommerce_block_file_template to get_block_file_template

* Account for product-archive template fallbacks

* Fix bug with clearing customizations of templates using the deprecated plugin ID
2022-02-10 14:15:09 +00:00
Luigi Teschio a594ea5ef5 Fix Mini Cart doesn't update data (https://github.com/woocommerce/woocommerce-blocks/pull/5741)
* Remove api hydration for the Mini Cart Block woocommerce/woocommerce-blocks#5729

Remove api hydration for the Mini Cart Block

* fix PHP error

* send event when the button is clicked

* fix import order
2022-02-10 10:26:09 +01:00
Tomasz Tunik ee6d1b5ae3 Add to cart button ignored redirect to cart setting (https://github.com/woocommerce/woocommerce-blocks/pull/5708)
* Expose products settings in wcSettings

For the time being we expose only what is used by the blocks
which is `cartRedirectAfterAdd`. In the future more can be added
as needed. Setting is accessible via `getSetting( 'productsSettings' )`.

We namespace the settings under productsSettigns to reflect
the domain and how settings are organised in Woo admin and to
inform that this is an object with more settings within.

This setting normally was available **only** if AJAX add to cart was set
as a js global `wc_add_to_cart_params.cart_redirect_after_add`.
By accessing the option directly we ensure it’s exposed
to blocks regardless of if AJAX option is enabled.

* update AddToCartButton to respect cartRedirectAfterAdd

This adds the redirect directly on the AddToCartButton after succesful
add to cart action. This follows convention that redirects or other side
effects shouldn’t happen as part of the action but rather be part of the
control that triggers such flow.
2022-02-09 09:26:25 +01:00
Mike Jolley e85e610b2a Free order handling (https://github.com/woocommerce/woocommerce-blocks/pull/5720) 2022-02-07 11:21:14 +00:00
Tung Du 4dab187dbe Fix: only allow Mini Cart block in Widgets and Site Editor (https://github.com/woocommerce/woocommerce-blocks/pull/5653)
* fix: exclude Mini Cart from the blocks editor

* fix: explicitly register Mini Cart blocks for Site Editor and Widgets

* add check to loading the block on frontend

* add e2e tests for widget area

* improve test title

Co-authored-by: Luigi <gigitux@gmail.com>
2022-02-07 11:29:22 +01:00
Mike Jolley 81bb982c5e Include issue submission link in the footer of all documention (.md files) (https://github.com/woocommerce/woocommerce-blocks/pull/5655)
* Add links to single routes in main index woocommerce/woocommerce-blocks#4473

* Footer

* Feedback template

* Remove footer from existing MD files

* Add doc footer script

* Apply script to all docs

* Fix examples
2022-02-02 14:27:46 +00:00
Alex Florisca 072115ee75 Update version to 7.0.0-dev (https://github.com/woocommerce/woocommerce-blocks/pull/5705) 2022-02-02 11:57:48 +00:00
github-actions[bot] 8ce88ad3c4 Release: 6.9.0 (https://github.com/woocommerce/woocommerce-blocks/pull/5680)
* Empty commit for release pull request

* Empty commit for release pull request

* Update readme.txt

* Update versions

* Update testing notes and changelog

* Empty commit for release pull request

* Empty commit for release pull request

* Update readme.txt

* Update versions

* Update testing notes and changelog

* Empty commit for release pull request

* Empty commit for release pull request

* Update readme.txt

* Update versions

* Update testing notes and changelog

* Empty commit for release pull request

* Empty commit for release pull request

* REadme.txt update

* new zip for testing

* update zip file

* Add `CopyWebpackPlugin` to ensure `block.json` is copied to `build` (https://github.com/woocommerce/woocommerce-blocks/pull/5692)

* Add CopyWebpackPlugin and add block metadata to build

* Check build directory for block.json

* New zip file

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-02-02 11:40:45 +00:00
Luigi Teschio accce8e024 Fix 404 HTTP error for Product Title, Product Summary, and Product Stock indicator blocks woocommerce/woocommerce-blocks#5468 (https://github.com/woocommerce/woocommerce-blocks/pull/5649)
Fix 404 HTTP error for Product Title, Product Summary, and Product Stock indicator blocks
2022-02-02 10:20:17 +01:00
Thomas Roberts 5e32fb0576 Add `CopyWebpackPlugin` to ensure `block.json` is copied to `build` (https://github.com/woocommerce/woocommerce-blocks/pull/5692)
* Add CopyWebpackPlugin and add block metadata to build

* Check build directory for block.json
2022-02-01 16:42:15 +00:00
Luigi Teschio 9d1464baf3 Featured Product: Enable global style (https://github.com/woocommerce/woocommerce-blocks/pull/5555)
* Product title: add support global style woocommerce/woocommerce-blocks#4965

* add specific type

* add custom save function

* move hooks in a specific folder

* fix crash on WP 5.8

* Featured Category block: Add support for global style woocommerce/woocommerce-blocks#4965

Featured Category block: Add support for global style

* fix border color

* Featured Product block: enable global style woocommerce/woocommerce-blocks#4965

Featured Product block: enable global style

* fix border color

* fix eslint error

* fix opacity

* fix border radius

* fix opacity

* disable font-size support

* restore height for featured product and featured category
2022-02-01 15:01:31 +01:00
Thomas Roberts a46f13c6c5 Move Checkout block attributes into metadata (`block.json`) (https://github.com/woocommerce/woocommerce-blocks/pull/5594)
* Add block title to AbstractBlock class

* Add block title to Checkout block

* Include all block.json files in tsconfig

* Add get_block_title method to Checkout.php

* Remove redundant block_title field

* Add block.json and remove static attributes from attributes.ts

* Register block using attributes from block.json

* Add metadata_path to AbstractBlock

* Add function to AssetsApi to get the metadata path from the plugin root

* Register the block using metadata if it's set in the block's class

* Remove get_block_title method

* Only add supports and attributes to the block when not registering with metadata

* Change get_block_metadata to get_block_metadata_path

* Change indentation to tabs in block.json

* Update comment to clarify why attributes and supports are set later

* Check if path to metadata is not empty instead of set and not empty

* Move checkout block out of cart-checkout directory

* Update get_block_metadata_path function to find block.json automatically

* Remove metadata path from AbstractBlock

* Check if there's a metadata file and register blocks with metadata if so

* Move deprecated attributes out of metadata and into attributes.ts

* Re-add deprecated attributes to checkout index

* Move order notes test

* Move test for checkout phone number in edito

* Fix indentation in checkout/block.json

* Move checkout terms tests

* Try forcing storefront theme in e2e tests

* Revert "Try forcing storefront theme in e2e tests"

This reverts commit 5b0fd47a2c39aadb0141a4ed28cbc0e6baa89625.

* Try capturing screenshot on test failures

* Try uploading error in try catch

* Try uploading artefacts on error

* Test uploading artefacts

* Screenshot just before looking for edit post layout

* Revert "Screenshot just before looking for edit post layout"

This reverts commit 61dff027789ce13a0d84e7b6f11e431637c5a450.

* Revert "Test uploading artefacts"

This reverts commit adf5cc55bcdb677f889bf5a62803b4150d98e665.

* Revert "Try uploading artefacts on error"

This reverts commit 7441a832a113a95fef89cc1b8db6dc79271be516.

* Revert "Try uploading error in try catch"

This reverts commit ca412ce505d56286b164f588a201a451f6bceeb6.

* Revert "Try capturing screenshot on test failures"

This reverts commit 0de6e97df19b116091a7bb3b8652713867d2d80f.

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2022-01-28 16:37:06 +00:00
Tung Du d6e6470937 Fix Mini Cart Edit template link (https://github.com/woocommerce/woocommerce-blocks/pull/5615) 2022-01-27 20:47:35 +07:00
Tung Du 7e67bf62ca Fix: Mini Cart global style is not applied (https://github.com/woocommerce/woocommerce-blocks/pull/5618) 2022-01-27 08:38:49 +07:00
Luigi Teschio 2370ce4378 Featured Category block: add support for global style (https://github.com/woocommerce/woocommerce-blocks/pull/5542)
* Product title: add support global style woocommerce/woocommerce-blocks#4965

* add specific type

* add custom save function

* move hooks in a specific folder

* fix crash on WP 5.8

* Featured Category block: Add support for global style woocommerce/woocommerce-blocks#4965

Featured Category block: Add support for global style

* fix border color

* fix opacity

* fix border radius

* fix order rules css
2022-01-26 18:16:50 +01:00
Luigi Teschio e52549208e Enable Mini Cart template-parts only for experimental builds woocommerce/woocommerce-blocks#5598 (https://github.com/woocommerce/woocommerce-blocks/pull/5606)
Enable Mini Cart template-parts only for experimental builds
2022-01-24 09:41:34 +01:00
Tung Du 718f2dbc6f Mini Cart Contents: Support link and text colors (https://github.com/woocommerce/woocommerce-blocks/pull/5566) 2022-01-22 00:39:04 +07:00
Luigi fc9e623079 update version plugin 2022-01-20 14:39:19 +01:00
github-actions[bot] 79f4d10310 Release: 6.8.0 (https://github.com/woocommerce/woocommerce-blocks/pull/5570)
* Empty commit for release pull request

* Update readme.txt with 6.8.0 changelog

* initialize_session if it does not yet exist before calling the session class (https://github.com/woocommerce/woocommerce-blocks/pull/5577)

* Add testing notes for 6.8.0

* update testing release notes

* update testing notes

* Fix default `stockStatusOptions` in tag and attribute blocks (https://github.com/woocommerce/woocommerce-blocks/pull/5590)

* Fix default stockStatusOptions in tag and attribute blocks

These should be an array of keys, not objects.

* Fix stockStatus definition on PHP side

* Swap state to debounce.

* Improve presentation of stock filters

* Remove state usage for display options

* Remove debounce

* Consistent panel titles

* Fix global style for Product Summary block, Product Stock Indicator block, and Product Title block (https://github.com/woocommerce/woocommerce-blocks/pull/5595)

* Fix global style for Product Summary block, Product Stock Indicator block, and ProductTitle block

Fix global style for Product Summary block, Product Stock Indicator block, and ProductTitle block

* add feature flag

* fix lint errors

* fix global style bugs on Product Title block

* update testing release notes

* update new build with fixes

* Restore correct font style when the block is loaded in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/5600)

* Restore correct font style when the block is loaded in the editor

Restore correct font style when the block is loaded in the editor

* fix style on Twenty Twenty theme

* update link for download the zip of the new release

* update readme.txt

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2022-01-20 14:35:47 +01:00
Luigi Teschio 5f37425c90 Fix global style for Product Summary block, Product Stock Indicator block, and Product Title block (https://github.com/woocommerce/woocommerce-blocks/pull/5595)
* Fix global style for Product Summary block, Product Stock Indicator block, and ProductTitle block

Fix global style for Product Summary block, Product Stock Indicator block, and ProductTitle block

* add feature flag

* fix lint errors

* fix global style bugs on Product Title block
2022-01-19 15:02:30 +01:00
Mike Jolley c492a97d83 Fix default `stockStatusOptions` in tag and attribute blocks (https://github.com/woocommerce/woocommerce-blocks/pull/5590)
* Fix default stockStatusOptions in tag and attribute blocks

These should be an array of keys, not objects.

* Fix stockStatus definition on PHP side

* Swap state to debounce.

* Improve presentation of stock filters

* Remove state usage for display options

* Remove debounce

* Consistent panel titles
2022-01-19 11:42:21 +00:00
Mike Jolley 0040f2fd0c initialize_session if it does not yet exist before calling the session class (https://github.com/woocommerce/woocommerce-blocks/pull/5577) 2022-01-17 15:20:15 +00:00
Mike Jolley 37bf7a8067 When processing payments, use the woocommerce_hold_stock_minutes option (https://github.com/woocommerce/woocommerce-blocks/pull/5546) 2022-01-17 10:42:27 +01:00
Tung Du 61afd2b6ce Fix: fatal error when page contains edited template or template part (https://github.com/woocommerce/woocommerce-blocks/pull/5558) 2022-01-13 17:52:42 +07:00
Mike Jolley d47c82ed61 remove prepare statement (https://github.com/woocommerce/woocommerce-blocks/pull/5471) 2022-01-11 15:36:43 +00:00
Mike Jolley a1695861f2 Add minimum quantity, maximum quantity, and step (multiple_of) to the Cart Block and Store API (https://github.com/woocommerce/woocommerce-blocks/pull/5406)
* add min and step to Store API

* add min and step support

* typo

* Update assets/js/base/components/quantity-selector/index.tsx

* Update assets/js/base/components/quantity-selector/index.tsx

* Fix debounce callback

* Style qty input to show steps

* Implement quantity_limits in API

* Quantity validation

* Update product API

* Normalize on + -

* Separate add to cart events from cart item events in regards to limits

* Prevent qty change for editable line items

* Unify filters

* Remove step number indicator from buttons ¯\_(ツ)_/¯

* Normalize on mount

* Update docs

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2022-01-11 11:09:59 +00:00
Mike Jolley e19abbc0c2 Remove Built-in Stripe Integration in favour of Stripe Extension (https://github.com/woocommerce/woocommerce-blocks/pull/5449)
* Remove Stripe from PHP side

* Remove stripe from client

* fix const name in tests

* Update docs
2022-01-11 10:53:38 +00:00
jonny-bull 87cb033cbd Add stock level filter to product blocks (https://github.com/woocommerce/woocommerce-blocks/pull/4943) 2022-01-10 13:39:24 +00:00
Raluca Stan a574e12863 Add back 6.8.0-dev version after 6.7.1 patch 2022-01-07 18:13:49 +01:00
Raluca Stan 9759ccbf0a Merge branch 'release/6.7.0' with 6.7.1 details into trunk 2022-01-07 18:11:25 +01:00
github-actions[bot] b60afb534b Release: 6.7.1 (https://github.com/woocommerce/woocommerce-blocks/pull/5536)
* Force a string token property for the activePaymentMethod

* Empty commit for release pull request

* Update readme.txt with 6.7.1 info

* Add testing notes for 6.7.1

* Bumping version strings to new version.

Co-authored-by: Raluca Stan <ralucastn@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
2022-01-07 18:00:35 +01:00
Tom Cafferkey 8bee57378b Query legacy and correct plugin slug for WooCommerce block templates (https://github.com/woocommerce/woocommerce-blocks/pull/5519) 2022-01-07 10:17:08 +00:00
Luigi Teschio c54440d0e1 Add wide and full alignment support for legacy template block (https://github.com/woocommerce/woocommerce-blocks/pull/5433)
* add align wide and full support for legacy template block

* fix PHP warning

* add a comment on get_markup_with_classes_by_attributes

* rename function

* add align wide and full support for legacy template block

* fix PHP warning

* add a comment on get_markup_with_classes_by_attributes

* rename function

* fix regex

* update regex

* update regex

* fix code styling
2022-01-07 10:47:48 +01:00
Lucio Giannotta 168984edc2 Move Woo Blocks template directories to latest Gutenberg convention (https://github.com/woocommerce/woocommerce-blocks/pull/5464)
* Align Woo Block template locations with the newest convention

While we now support both the old and new conventions for the templates
paths, our own repo should be aligned with the latest convention.

See: woocommerce/woocommerce-blocks#5455
Fixes: woocommerce/woocommerce-blocks#5343

* Simplify `generate_template_slug_from_path` function
* Change `BlockTemplatesController` constructor to get correct dir names
* Update Mini Cart template path
2022-01-05 19:28:51 +01:00
Luigi Teschio 64696e06df Mini Cart Contents: Fix missing custom background (https://github.com/woocommerce/woocommerce-blocks/pull/5448)
* fix missing custom background mini cart contents

* fix naming
2022-01-05 13:53:12 +01:00
Mike Jolley 7f2af8c1a6 Validate available payment methods before attempting payment or updating order statuses (https://github.com/woocommerce/woocommerce-blocks/pull/5440)
* Make payment method required

* removed unused imports

* Remove PUT method

* Validate available method when updating order

* Enable bacs for tests
2022-01-04 18:04:08 +00:00
Mike Jolley 7cb46eb092 Prevent duplicate hooks in hook docs (https://github.com/woocommerce/woocommerce-blocks/pull/5472)
* Update wp-hooks-generator

* Update inline hook documentation into consistent format

1. Hook docs for the same hook should be identical
2. Prefix with `Hook: ` so the case of the hook is not changed.
3. Use `@see` instead of `@hooked`. Hooked is not a standard PHP Doc tag.

cc @Aljullu

* Update hook doc script to support duplicate hooks across files

* Remove unused variables in function

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2022-01-04 14:12:08 +00:00
Raluca Stan 3fd22f385d Update 6.8.0-dev tag 2022-01-04 12:33:01 +01:00
github-actions[bot] afcd224e73 Release: 6.7.0 (https://github.com/woocommerce/woocommerce-blocks/pull/5478)
* Empty commit for release pull request

* Update readme.txt with 6.7.0 changelog

* Add testing notes for the 6.7.0 release

* Fix typo in testing notes

* Update Testing Notes

* Remove item from testing notes for 6.7.0

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Raluca Stan <ralucastn@gmail.com>
2022-01-04 12:23:10 +01:00
Raluca Stan a07146f501 Bumping version strings to new version. 2022-01-04 11:47:59 +01:00
Luigi Teschio 723eabee80 Add global style for Active Filters block (https://github.com/woocommerce/woocommerce-blocks/pull/5465)
* Enable global style for active filters block

* show blacklisted blocks in full site editing side

* fix test

* --amend

* fix check
2022-01-03 10:41:19 +01:00
Raluca Stan 6eb3f9e17a Account for products without variations in the On Sale Products block (https://github.com/woocommerce/woocommerce-blocks/pull/5470)
* Account for products without variations in the prime_product_variations function

* Update src/BlockTypes/AbstractProductGrid.php

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Fix whitespace

* Remove unnecessary variable declaration

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2021-12-30 14:53:56 +01:00
Niels Lange 17a0325b72 Correct name of lazy loaded translation file (https://github.com/woocommerce/woocommerce-blocks/pull/5453) 2021-12-30 12:23:02 +00:00
Lucio Giannotta 0367117d15 Move block templates and parts directories to the Gutenberg 12.1.0 convention (https://github.com/woocommerce/woocommerce-blocks/pull/5455)
Gutenberg 12.1.0 has changed the convention for the directory paths from
`block-templates` and `block-template-parts` to `templates` and `parts` respectively.

Allow compatibility with themes which follow both conventions and also make sure that
we remain backwards-compatible.

Fixes woocommerce/woocommerce-blocks#5450

Some of this fix has a dependency on WooCore

See: WooCommerce/woocommercewoocommerce/woocommerce-blocks#31522
2021-12-28 23:32:15 +01:00
Lucio Giannotta 4d616d7a76 Fix custom templates with fallback being incorrectly attributed (https://github.com/woocommerce/woocommerce-blocks/pull/5447)
* Fix custom templates with fallback being incorrectly attributed

Category and tags templates can fallback to the generic archive if, e.g., the theme
provides one for the latter but not for the former. However, since Gutenberg is not
aware of this fallback mechanism, it would incorrectly attribute the custom template
to the user instead of the theme.

Here we are explicitly setting the `has_theme_file` to make sure Gutenberg knows
we do, in fact, have a theme fail (if not what it expects).

Also skip the loop if template is duplicate but has no fallback

Fixes woocommerce/woocommerce-blocks#5441
2021-12-24 16:15:19 +01:00
Lucio Giannotta ba9c602006 Remove “Page” suffix from template titles (https://github.com/woocommerce/woocommerce-blocks/pull/5434) 2021-12-23 17:20:52 +01:00
Mike Jolley c1ca93aa0a 6.7.0-dev 2021-12-21 13:59:01 +00:00
github-actions[bot] 5d807a52e1 Release: 6.6.0 (https://github.com/woocommerce/woocommerce-blocks/pull/5422)
* Empty commit for release pull request

* Add changelog and version info

* 6.6.0 testing notes

* Remove mini cart from testing instructions

* Clarify testing instructions

* Remove experimental feature from changelog

* fix not found template for the template editor

* update zip

* Remove test instructions for icon

* Testing steps for 5425

* Link order controller to cart routes

* Remove order controller from checkout route

* Fix PHP warnings in abstract schema

* Fix PHP warnings in abstract route

* Update shipping phone handling

* Includes are handled in core now

* Remove maybe_update_order_from_customer

* Add cart_updated routine to all cart routes

* Remove abstract method

* Remove test for woocommerce_blocks_cart_update_order_from_customer_request

* Remove do_order_callback

* Update readme

* Update tests

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Luigi <gigitux@gmail.com>
2021-12-21 13:57:01 +00:00
Mike Jolley ecc80e5cff Sync order data with cart data when cart is updated from any route (https://github.com/woocommerce/woocommerce-blocks/pull/5379)
* Link order controller to cart routes

* Remove order controller from checkout route

* Fix PHP warnings in abstract schema

* Fix PHP warnings in abstract route

* Update shipping phone handling

* Includes are handled in core now

* Remove maybe_update_order_from_customer

* Add cart_updated routine to all cart routes

* Remove abstract method

* Remove test for woocommerce_blocks_cart_update_order_from_customer_request

* Remove do_order_callback
2021-12-21 13:11:51 +00:00
Luigi Teschio 14a45a4380 fix not found template for the template editor (https://github.com/woocommerce/woocommerce-blocks/pull/5425) 2021-12-21 11:55:51 +01:00
Tom Cafferkey 13d151fe2a Check for woocommerce as the theme before rendering with a more user friendly plugin name (https://github.com/woocommerce/woocommerce-blocks/pull/5420) 2021-12-20 14:36:26 +00:00
Tom Cafferkey d8dac8bb0a Check if the current theme has a product-archive block template in the absence of a product taxonomy block template. (https://github.com/woocommerce/woocommerce-blocks/pull/5380)
* Add archive-product template into block template hieachy

* Add archive-product condition to product tag block template render method

* Move taxonomy hierarchy filter to WC core

* Undo template amends

* Duplicate the themes archive-product template if it has one for taxonomy block templates

* Review feedback

* Use TextDomain instead of Name

* use correct if/else syntax

* Remove unncessary boolean syntax
2021-12-20 12:53:57 +00:00
Albert Juhé Lluveras 976b158e6f Make it so WooCommerce template names are not editable (https://github.com/woocommerce/woocommerce-blocks/pull/5385)
* Make it so WooCommerce template names is not editable

* Remove source='plugin' from templates
2021-12-20 10:46:41 +00:00
Albert Juhé Lluveras ab061782f2 Fix saving WooCommerce templates in WP 5.9 beta 3 (https://github.com/woocommerce/woocommerce-blocks/pull/5408) 2021-12-20 10:58:11 +01:00
Tung Du 50066455c0 Fix: Mini Cart block: divide contents into three inner blocks (https://github.com/woocommerce/woocommerce-blocks/pull/5386)
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2021-12-20 14:57:55 +07:00
Luigi Teschio 4524799b5e Revert theme name woocommerce/woocommerce-blocks#5411 (https://github.com/woocommerce/woocommerce-blocks/pull/5412)
Revert theme name woocommerce/woocommerce-blocks#5411
2021-12-17 16:58:56 +01:00
Mike Jolley 7d8c184603 Remove the unused get_skeleton_inline_script method (https://github.com/woocommerce/woocommerce-blocks/pull/5361) 2021-12-16 17:32:35 +00:00
Albert Juhé Lluveras 8030e278db Set the origin of custom templates to 'plugin' and fix plugin name on REST requests (https://github.com/woocommerce/woocommerce-blocks/pull/5375)
* Set the origin of custom WC templates to 'plugin'

* Fix plugin name
2021-12-15 11:56:41 +01:00
Tung Du b0623a8b52 Mini Cart: only display the editing link to users with site editing permission (https://github.com/woocommerce/woocommerce-blocks/pull/5372) 2021-12-14 07:54:23 +07:00
Mike Jolley 59c8c88438 Introduce 2 new hooks in Customer Update Route (https://github.com/woocommerce/woocommerce-blocks/pull/5345)
* Introduce woocommerce_blocks_cart_update_customer_from_request hook

* Introduce woocommerce_blocks_cart_update_order_from_customer_request

* Test actions fire

* Update hook docs
2021-12-13 13:57:45 +00:00
Luigi Teschio 13deb1b09e Mini Cart Block: render the empty state set on template parts (https://github.com/woocommerce/woocommerce-blocks/pull/5338)
* add view switcher for mini cart contents block

* editor view switcher

* update mini cart template file

* render the empty state template parts for the Mini Cart Block woocommerce/woocommerce-blocks#4674

render the empty state template parts for the Mini Cart Block woocommerce/woocommerce-blocks#4674

* update selector

* allow empty mini cart block to add all blocks

* fix tests; improve code style

* install @wordpress/block-editor package

* fix warning on frontend side

* block-editor package is not necessary

* merge attributes object

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2021-12-10 12:11:59 +01:00
Tom Cafferkey 34ba6ab937 Load required scripts in LegacyTemplate.php render method (https://github.com/woocommerce/woocommerce-blocks/pull/5346) 2021-12-10 10:51:35 +00:00
Mike Jolley b0f9e524a3 Move Draft Order Handling to Shared Trait (DraftOrderTrait) (https://github.com/woocommerce/woocommerce-blocks/pull/5323)
* Introduce shared trait for draft order handling (DraftOrderTrait)

* Use trait where needed for maybe_release_stock

* Introduce woocommerce_blocks_cart_update_customer_from_request

This hook gets the request data and customer object, and from there, 3rd parties could grab a draft order and manually update it if needed (if the use cases requires this).

* Revert "Introduce woocommerce_blocks_cart_update_customer_from_request"

This reverts commit 6620818eb1e03b87c6eca0d757ec8b78802e3c57.
2021-12-10 10:49:04 +00:00
Albert Juhé Lluveras 29fa0a61e6 Fix Mini Cart template part link on WP 5.9 (https://github.com/woocommerce/woocommerce-blocks/pull/5348)
* Fix link to edit the Mini Cart template part in WP 5.9

* Use wp_is_block_theme() function

* Add protection against overwriting isSiteEditorAvailable setting

* Rename isSiteEditorAvailable to isBlockTheme
2021-12-10 11:23:16 +01:00
Tung Du b3ba90e7e9 Fix: Mini Cart block: Edit template part link doesn't work for themes don't have mini cart template part. (https://github.com/woocommerce/woocommerce-blocks/pull/5347) 2021-12-09 20:58:03 +07:00
Albert Juhé Lluveras 6cbff66977 Fix reverting WC templates (https://github.com/woocommerce/woocommerce-blocks/pull/5342) 2021-12-09 10:35:32 +01:00
Mike Jolley f1b85c6bcb Removes legacy shipping_phone handling (https://github.com/woocommerce/woocommerce-blocks/pull/5326) 2021-12-08 15:05:00 +00:00
Tom Cafferkey 30abe6f3bc Update block theme conditionals in BlockTemplateController (https://github.com/woocommerce/woocommerce-blocks/pull/5335) 2021-12-08 11:21:57 +00:00
Mike Jolley de068d2fc3 Rest API - Namespace error handling (https://github.com/woocommerce/woocommerce-blocks/pull/5319)
* get_routes_from_namespace needs to handle WP_Error responses

* is_request_to_store_api is not static
2021-12-07 15:03:58 +00:00
Mike Jolley 587e3b98d4 Add missing Exception use statement in RoutesController (https://github.com/woocommerce/woocommerce-blocks/pull/5330) 2021-12-07 13:13:48 +00:00
Tom Cafferkey 44aaf67caa Updated version numbers for the next release 2021-12-07 11:51:42 +00:00
github-actions[bot] 212085bbd8 Release: 6.5.0 (https://github.com/woocommerce/woocommerce-blocks/pull/5321)
* Empty commit for release pull request

* Update readme.txt and add 6.5.0 testing notes

* Update build link

* Update CSV link

* Testing instruction titles.

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
2021-12-07 11:47:28 +00:00
Tung Du 66a3ac1d33 Refactor: use StyleAttributesUtils to generate classes and styles (https://github.com/woocommerce/woocommerce-blocks/pull/5307) 2021-12-07 12:21:40 +07:00
Tung Du e3620307df Fix: Mini Cart: don't allow users to create extra template parts in the Mini Cart template part area (https://github.com/woocommerce/woocommerce-blocks/pull/5306) 2021-12-07 12:20:37 +07:00
Luigi Teschio 4a134c7fb5 Set WooCommerce like source of WC templates woocommerce/woocommerce-blocks#5271 (https://github.com/woocommerce/woocommerce-blocks/pull/5320)
Set WooCommerce like source of WC templates woocommerce/woocommerce-blocks#5271
2021-12-06 15:41:00 +01:00
Luigi Teschio 2358c0c90b Mini Cart block: Add label for tax when it should be visible in accordance with WC settings (https://github.com/woocommerce/woocommerce-blocks/pull/5184)
* Mini Cart block: Add label for tax when it should be visible in accordance with WC settings woocommerce/woocommerce-blocks#4849

Mini Cart block: Add label for tax when it should be visible in accordance with WC settings

* improve the tax label handling

* fix code after conflict

* fix tax label handling when it is added the first product

* add another check for avoid PHP error

* rename variables; add test for the function getSettingWithCoercion

* add margin-right for tax-label; add test to check if type guard works correctly
2021-12-03 10:45:06 +01:00
Tom Cafferkey d3f4223510 Refactor BlockTemplateController (https://github.com/woocommerce/woocommerce-blocks/pull/5200)
* Move template slug creation to utility method

* Move theme_has_template to BlockTemplateUtils method
2021-12-02 10:35:39 +00:00
Néstor Soriano 79722aec00 Fix code that causes PHP 8.1 deprecation in BlockTypesController (https://github.com/woocommerce/woocommerce-blocks/pull/5287) 2021-12-01 12:58:56 +00:00
Luigi Teschio dfef363e15 Add global style for Product Categories List block (https://github.com/woocommerce/woocommerce-blocks/pull/5133)
* Add global style for product categories list block woocommerce/woocommerce-blocks#4965

Add global style for product categories list block

* add support for link color

* add feature flag

* fix code style and PHP warning

* update doc comment

* remove empty space

* refactor StyleAttributesUtils (https://github.com/woocommerce/woocommerce-blocks/pull/5277)

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2021-11-30 16:28:45 +01:00
Luigi Teschio 67ad9e4f27 Mini Cart Block: add link to edit template part from sidebar (https://github.com/woocommerce/woocommerce-blocks/pull/5201)
* Mini Cart Block: add link to edit template part from sidebar woocommerce/woocommerce-blocks#5186

Mini Cart Block: add link to edit template part from sidebar

* fix e2e tests
2021-11-30 10:42:07 +01:00
Albert Juhé Lluveras 98d9dbdcf0 Don't run enqueue_assets on REST requests (https://github.com/woocommerce/woocommerce-blocks/pull/5260) 2021-11-29 10:45:53 +01:00
Tom Cafferkey cbdbc6c7a1 Change source value on WooCommerce block templates to be plugin instead of woocommerce (https://github.com/woocommerce/woocommerce-blocks/pull/5215) 2021-11-26 12:40:41 +00:00
Tung Du 0875884304 Fix: When creating a template part for the Mini Cart area, it should be created already containing the Mini Cart Contents block (https://github.com/woocommerce/woocommerce-blocks/pull/5231)
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2021-11-25 00:33:57 +07:00
Tung Du cdddf48184 Add: Mini Cart template part area (https://github.com/woocommerce/woocommerce-blocks/pull/5221) 2021-11-24 17:36:39 +07:00
Albert Juhé Lluveras 2778e62812 Fix Mini Cart block when Gutenberg is not enabled (https://github.com/woocommerce/woocommerce-blocks/pull/5220)
* Fix Mini Cart block when Gutenberg is not enabled

* Escape Mini Cart template part

* Avoid creating $part variable

Co-authored-by: Tung Du <dinhtungdu@gmail.com>

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2021-11-24 11:08:59 +01:00
Albert Juhé Lluveras ddc8fcccd1 Bump version to 6.5.0-dev 2021-11-23 09:03:08 +01:00
github-actions[bot] e7bb6fef28 Release: 6.4.0 (https://github.com/woocommerce/woocommerce-blocks/pull/5211)
* Empty commit for release pull request

* Add 6.4.0 changelog

* Update supported WC versions

* Add 6.4.0 testing steps

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2021-11-23 09:00:23 +01:00
Tung Du 1225b2680b Mini Cart block: allow left, right and center alignment (https://github.com/woocommerce/woocommerce-blocks/pull/5171) 2021-11-23 06:40:24 +07:00
Tom Cafferkey 91008a6492 Gate block templates feature for WC 6.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/5210) 2021-11-22 11:25:53 +00:00
Niels Lange 62e88757ed Lazy load missing translation files (https://github.com/woocommerce/woocommerce-blocks/pull/5112)
* Lazo load missing translation files

* Lazy load cart translation files
2021-11-22 16:43:13 +07:00
Albert Juhé Lluveras bbaa4d8798 Mini Cart as template part (https://github.com/woocommerce/woocommerce-blocks/pull/5025)
* Fix wrong event prefix in doc comment

* Make className prop in CartLineItemsTableProps optional

* Mini Cart as template part

* Remove BlockTemplatePartsController and instead use BlockTemplatesController

* Remove old code

* Clean up frontend rendering

* Update tests

* Improve if clause

* Fix wrong tests title

* Fix wrong variable name

* Make sure Mini Cart contents block is unmounted whem mini cart closes or unmounts

* Remove unnecessary waitFor

* Fix PaymentMethodDataProvider wrong children type

* TypeScript fixes

* Make comment shorter

* Remove test code

* Fix contant unmounts of Mini Cart contents block

* Fix wrong template_type passed

* Set Template part area to 'uncategorized'

* Set Template part area to the correct value

* Move template dir check outside loop
2021-11-19 12:47:48 +01:00
Seghir Nadir 65233c4e86 Move Checkout i1 -> i2 migration code to registerBlockType (https://github.com/woocommerce/woocommerce-blocks/pull/5140)
* move migration code to registerBlockType

* fix name and account for default value

* check for isset
2021-11-19 11:49:33 +01:00
Mike Jolley 947927eded Add version to doing it wrong calls (https://github.com/woocommerce/woocommerce-blocks/pull/5134) 2021-11-19 10:27:14 +01:00
Tom Cafferkey 51b61552cf Check that functions gutenberg_supports_block_templates and gutenberg_get_block_template exist before usages (https://github.com/woocommerce/woocommerce-blocks/pull/5183) 2021-11-19 08:33:53 +00:00
Tung Du 2b7d906133 Add global style support to Mini Cart (button) (https://github.com/woocommerce/woocommerce-blocks/pull/5100) 2021-11-17 22:39:07 +07:00
Niels Lange af8f5e857c Bump version numbers to 6.4.0-dev 2021-11-17 21:55:48 +07:00
Tom Cafferkey 3adfdd4d3b Hide WooCommmerce block templates from Edit Post template dropdown (https://github.com/woocommerce/woocommerce-blocks/pull/5167)
* Hide WooCommmerce block templates from Edit Post template dropdown

* Add empty post_types value to template and update comments.
2021-11-17 14:40:15 +00:00
github-actions[bot] e891cab38b Release: 6.3.0 (https://github.com/woocommerce/woocommerce-blocks/pull/5146)
* Empty commit for release pull request

* Update readme.txt with release changelog

* Add testing instructions for 6.3.0 release

* Update testing instructions as MD tables didn't work

* Update testing instructions

* Update testing instructions

* Update testing instructions

* Update readme.txt

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

* Update docs/testing/releases/630.md

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

* Update readme.txt

* Update release zip in testing note

* Update testing instructions

* Remove feature gate condition for Legacy Template block (https://github.com/woocommerce/woocommerce-blocks/pull/5158)

* Update testing instructions

* Update testing instructions

* Update testing instructions

* Update readme.txt

* Update testing instructions

* Update testing instructions

* Update release zip in testing note

* Update testing instructions for SE templates

* Update testing instructions for SE templates II

* Update testing instructions

* Bumping version strings to new version.

* Release: 6.3.1 (https://github.com/woocommerce/woocommerce-blocks/pull/5169)

* Empty commit for release pull request

* Fix state validation to compare state codes, and only validate if a country is given (https://github.com/woocommerce/woocommerce-blocks/pull/5132)

* Only get valid states from wc if there is a country

* Shared validation logic which uses keys

* Fix 'Country is required' error on the Cart block when updating shipping address (https://github.com/woocommerce/woocommerce-blocks/pull/5129)

* Fix  error on the Cart block

* Created a cartIsHydrated variable in useStoreCart hook and used this to update the billing address in the internal state of the useCustomerData hook

* Fix the country is required error on the Cart page using refs

* Separate api calls to update shipping and billingUpdate billing and shipping addresses only when needed in API calls

* Remove redundant check for customerDataToUpdate

* remove use of refs in initial values

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>

* Make order note block removable (https://github.com/woocommerce/woocommerce-blocks/pull/5139)

* unforce order note

* show block in inserter

* Mini Cart block fatal error caused by append_script_and_deps_src (https://github.com/woocommerce/woocommerce-blocks/pull/5142)

* Remove unused use statements

* Fix types for $script

* `get_script_from_handle` might return null so handle this case to prevent errors

* Missing escaping

* Replace do_action_deprecated with the WC equivalent (https://github.com/woocommerce/woocommerce-blocks/pull/5151)

* Remove feature gate condition for Legacy Template block (https://github.com/woocommerce/woocommerce-blocks/pull/5158)

* Update readme.txt

* Update testing instructions

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Alex Florisca <alexflorisca@gmail.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Niels Lange <info@nielslange.de>

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Michael P. Pfeiffer <michael@cssconf.eu>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Alex Florisca <alexflorisca@gmail.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2021-11-17 21:39:02 +07:00
Thomas Roberts 480acdaaac Replace do_action_deprecated with the WC equivalent (https://github.com/woocommerce/woocommerce-blocks/pull/5151) 2021-11-16 20:22:29 +07:00
Mike Jolley 857802aaf3 Mini Cart block fatal error caused by append_script_and_deps_src (https://github.com/woocommerce/woocommerce-blocks/pull/5142)
* Remove unused use statements

* Fix types for $script

* `get_script_from_handle` might return null so handle this case to prevent errors

* Missing escaping
2021-11-16 20:14:00 +07:00
Mike Jolley f9c458b090 Fix state validation to compare state codes, and only validate if a country is given (https://github.com/woocommerce/woocommerce-blocks/pull/5132)
* Only get valid states from wc if there is a country

* Shared validation logic which uses keys
2021-11-16 12:19:56 +01:00
Tom Cafferkey ac317c70eb Remove conditionals around BlockTemplatesController class (https://github.com/woocommerce/woocommerce-blocks/pull/5128) 2021-11-11 14:48:24 +01:00
Tung Du 3d5971ad93 Fix: loading WC Blocks templates content (https://github.com/woocommerce/woocommerce-blocks/pull/5111) 2021-11-11 15:50:29 +07:00
Luigi Teschio b6b275bc26 Add hydration for product data for Single Product block (https://github.com/woocommerce/woocommerce-blocks/pull/5107)
* Add hydration for product data for single product block woocommerce/woocommerce-blocks#2698

Add hydration for product data for single product block

* cast product_id variable

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2021-11-09 13:58:15 +01:00
Albert Juhé Lluveras 3137d60b24 Fix PHP fatal error on Product tag pages (https://github.com/woocommerce/woocommerce-blocks/pull/5104) 2021-11-09 12:03:41 +01:00
Tom Cafferkey 8662368f32 Remove woocommerce_sidebar (https://github.com/woocommerce/woocommerce-blocks/pull/5097) 2021-11-08 16:33:04 +00:00
Thomas Roberts 5f0ab9e94c Allow block templates to be customised and saved (https://github.com/woocommerce/woocommerce-blocks/pull/5062)
* Ensure $template is object before accessing properties

This is necessary because the gutenberg helper functions sometimes turn it into a WP_Block_Template object, and other times it's an array. Because of this it's safer to normalise them both as objects.

* Add Gutenberg utils for processing templates based on a post from the db

When a template is saved it gets saved to the database, we need to handle processing these WooCommerce templates that have been saved in the db and we need to use the gutenberg utils that are private, this is why they've been copied over.

* Force theme to always be WooCommerce

This is because the templates we're dealing with here should always belong to WooCommerce, not the currently selected theme

* Add maybe_return_blocks_template and get_single_block_template funcs

These are needed to get the template from either the DB or the filesystem when saving/retrieving the template.

* Set theme to always be woocommerce when making templates from files

This will ensure the correct slug is used in the gutenberg editor.

* Check if template has been customised and saved in the database first

* Prevent filesystem templates being used if a custom database one exists

* Fix syntax error from rebase

* Remove unnecessary code from BlockTemplateUtils

* Ensure template item is an object containing correct properties

* Prevent warnings from appearing

* Ensure title is added to the template when saving

* Filter templates that don't match the queried slug.

* Remove unused code

* Check if a saved version of the template exists when trying to render

* Rename default_block_template_is_available to block_template_is_available

* Re-hook pre_get_block_template before returning from maybe_return_blocks_template

* Make comment easier to read

* Look for template in woocommerce theme or real theme taxonomy

* Remove duplicated title assignment

* Prevent template being added twice when loading from the db

* Filter templates before returning if slugs are supplied

* Simplify `get_block_templates` function into two functions

* Add function to stop theme templates that are added after db ones showing

* Fix typographical errors
2021-11-05 19:07:34 +00:00
Seghir Nadir ea1e17fc81 Fix sanitization callback (https://github.com/woocommerce/woocommerce-blocks/pull/5060)
* Fix sanitization callback

* Add test case to confirm sanitization callbacks work for nested properties

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2021-11-05 15:39:08 +00:00
Seghir Nadir 29e3d4ec58 Fix wc-settings not loading when a script that depend on it is in the header (https://github.com/woocommerce/woocommerce-blocks/pull/5059)
* Enqueue in header if required.

* revert scripts change

* Dirty fix for settings dependency

* Also implement in admin

* add console warn

* grammar issues

* increase priority

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2021-11-05 14:44:57 +01:00
Mike Jolley 53be583cec Fix Duplicate Queries in Product Grids woocommerce/woocommerce-blocks#4695 (https://github.com/woocommerce/woocommerce-blocks/pull/5002)
* Cache variation_meta_data to prevent duplicate queries with multiple grids

* Prime the cache

* Improve existing cache detection

* Expand comment
2021-11-04 11:39:16 +00:00
Mike Jolley 72cf5eade8 Remove hydration hocs in favour of apiFetch Middlewares (https://github.com/woocommerce/woocommerce-blocks/pull/5022)
* Remove withRestApiHydration

* Preload checkout data via setting - server data is required for this block

* Handle cart hydration using createPreloadingMiddleware which removes the need for HOCs

* Rename variable

* Remove withStoreCartApiHydration and timestamp checking

* Empty test file
2021-11-04 11:05:58 +00:00
Michael P. Pfeiffer fa58d34da4 Store Editing Templates v1: add basic taxonomy block templates (https://github.com/woocommerce/woocommerce-blocks/pull/5063)
* Add taxonomy block templates

* Change Category template display name

* Check for product category/tag taxonomy explicitely

* Group archive templates in LegacyTemplate
2021-11-03 17:55:52 +01:00
Tom Cafferkey 2267e21351 Set is_custom property on template and remove redundant code (https://github.com/woocommerce/woocommerce-blocks/pull/5067) 2021-11-03 15:13:39 +00:00
Tom Cafferkey 927af6ea26 Add Single Product Block Template (https://github.com/woocommerce/woocommerce-blocks/pull/5054)
* Add single-product.html template to render core PHP template

* Update placeholder SVG
2021-11-03 09:31:47 +00:00
Michael P. Pfeiffer 5cc32dbfae Store Editing Templates v1: add a basic Product Archive block template (https://github.com/woocommerce/woocommerce-blocks/pull/5049)
* Add the Archive Product block template

* Use template slug if no template title is set

* Add page icon as per design

* Add the basic archive product block template
2021-11-02 15:42:07 +01:00
Tom Cafferkey 17b4363daf Fix Block Templates being rendered correctly (https://github.com/woocommerce/woocommerce-blocks/pull/5048)
* Copy logic from Gutenberg to ensure the correct templates are being included in the get_block_templates query

* Utility function to convert template slugs to template titles

* i18n strings for template names
2021-11-02 12:15:41 +00:00
Thomas Roberts abfa36634c Graduate `__experimental_woocommerce_blocks_checkout_update_order_meta` action to stable (https://github.com/woocommerce/woocommerce-blocks/pull/5017)
* Deprecate __experimental_woocommerce_blocks_checkout_update_order_meta

* Update docs to show new action and remove deprecated one

* Amend deprecated tag and add version numbers

* Resolve conflict where old hook name was included in example docs
2021-11-02 10:15:12 +00:00
Thomas Roberts b0795c8502 Graduate `__experimental_woocommerce_blocks_checkout_update_order_from_request` action to stable (https://github.com/woocommerce/woocommerce-blocks/pull/5015)
* Deprecate __experimental_woocommerce_blocks_checkout_update_order_from_request

* Update docs to show new action and remove deprecated one

* Ensure correct args are passed to deprecated hook and update message

* Amend deprecated tag and add version numbers

* Remove incorrectly updated file from this PR
2021-11-02 09:21:51 +00:00
Thomas Roberts 12045c731a Graduate `__experimental_woocommerce_blocks_checkout_order_processed` action to stable (https://github.com/woocommerce/woocommerce-blocks/pull/5014)
* Deprecate __experimental_woocommerce_blocks_checkout_order_processed

* Update docs to reflect new hook name

I also mentioned this hook is deprecated in the experimental interfaces doc.

* Update deprecated tag in docblock

* Fix typo in deprecated docblock

* Send args to do_action_deprecated in an array

* Amend deprecated tag and add version numbers
2021-11-02 08:46:54 +00:00
Tom Cafferkey 204143c7ec Updated hook (https://github.com/woocommerce/woocommerce-blocks/pull/5038) 2021-10-29 13:29:42 +01:00
Tom Cafferkey 66cc0178eb Add Render Logic to BlockTemplateController (https://github.com/woocommerce/woocommerce-blocks/pull/4984)
* Add render logic to BlockTemplatesController

* Comment out action to test e2e tests

* Add add_action back into initialise render method

* Check function exists before using it

* Change hook from wp to template_redirect

* Update src/BlockTemplatesController.php

Co-authored-by: Tung Du <dinhtungdu@gmail.com>

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2021-10-29 12:44:29 +01:00
Tom Cafferkey be3ce8423e Abstract LegacyTemplate block (https://github.com/woocommerce/woocommerce-blocks/pull/4991)
* Legacy Template block

* Return render_single_product value

* Make placeholder text translatable

* Don't allow removing the block

* Update block title

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2021-10-29 08:31:50 +01:00
Tung Du 587a7018da Fix: Mini Cart block: update button style (https://github.com/woocommerce/woocommerce-blocks/pull/4907)
Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>
2021-10-29 09:35:17 +07:00
Tung Du e60405689d Mini Cart block: add footer (subtotal, cart & checkout buttons and payment method icons) (https://github.com/woocommerce/woocommerce-blocks/pull/4982)
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2021-10-28 22:48:39 +07:00
Albert Juhé Lluveras edaf0f094d Run BlockTemplatesController filter only on templates (https://github.com/woocommerce/woocommerce-blocks/pull/5027) 2021-10-28 15:33:42 +02:00
Ovidiu Liuta 5b2d24da36 Fix: Adding a visual border to products image placeholder (https://github.com/woocommerce/woocommerce-blocks/pull/4950)
* fixing all products image placeholder border

* fixing grid placeholder image border

* fixing cart checkout product image placeholder border

* order summary product image placeholder border fix

* revert fixing cart checkout product image placeholder border

* fixing product elements atomic block placeholder border

* fixing failing tests for cart-checkout test and class rename

* adding border style mixin

* newline addon

* linting fix and esc_attr addon

* adding border color to _colors.scss abstracts

* fixing cart-checkout block scss color

* removing class names from product-elements atomic block placeholder images

* css linting fix

* css linting fix

* css linting fix

* fixing empty className in cart-checkout

* adding cart-checkout fallback alt text to product name and css changes empty alt placeholder

* adding image fallback alt to AbstractProductGrid

* updating checkout snapshot to include alt

* code style changes

* removing unused scss code

* adding img alt style fix to prevent global changes
2021-10-28 13:57:20 +01:00
Michael P. Pfeiffer b5bb42e799 Update version following release 2021-10-28 09:10:37 +02:00
github-actions[bot] 5454667fa6 Release: 6.2.0 (https://github.com/woocommerce/woocommerce-blocks/pull/4990)
* Empty commit for release pull request

* Update readme.txt with release changelog

* Add testing instructions for 6.2.0 release

* Return an element instead of a component in useViewSwitcher (https://github.com/woocommerce/woocommerce-blocks/pull/5016)

* return element instead of component in viewSwitcher

* use ToolbarGroup instead of Toolbar

(cherry picked from commit ad133ba901)

* Update release zip in testing note

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Michael P. Pfeiffer <michael@cssconf.eu>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2021-10-28 09:04:30 +02:00
Seghir Nadir b6c314f0d4 Use Cart's needs payment check instead of Order's (https://github.com/woocommerce/woocommerce-blocks/pull/4955)
* Revert "Fix free orders missing payment method (https://github.com/woocommerce/woocommerce-blocks/pull/4854)"

This reverts commit 60f82537f1.

* use Cart needs payment instead of Order needs payment

* switch to nullish coalescing

* remove extra line
2021-10-26 10:42:39 +01:00
Seghir Nadir 2408e34faa Migrate Cart i1 to Cart i2 (https://github.com/woocommerce/woocommerce-blocks/pull/4973)
* move empty cart

* remove Cart and rename Cart i2 to Cart

* graduate blocks

* setup template migration from Cart i1 to Cart i2

* back to js so we have a good diff

* add migration

* fix bug in empty cart template

* add useForceLayout hook to edit

* migrate from old block to new block

* migrate styles

* respect align

* add tests

* Include latest cart line item improvements from cart-i1

* Missing changes from cart-i1

* Line items table should be disabled

* Fix e2e tests for cart i2

* update tests to adapt for inner blocks

* update select to resolveSelect to remove warning checker

* rename test/block to test/index

* move blocks to their own file

* undo rename to keep diff clean

* remove .tsx and update jest config

* Revert "update select to resolveSelect to remove warning checker"

This reverts commit 79d55de30edcfe36bbdfe7506df7a09460824f03.

* revert resolveControl

* Fix empty cart editor E2E test by scrolling to the view switch

* parse attributes for order summary block

* migrate attributes when resaving

* Update documentation

Automatic update after running npm run build:docs

* add align options to filled cart and empty cart

* append instead of replcae

* import style.scss in frontend

Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Raluca Stan <ralucastn@gmail.com>
2021-10-25 15:46:34 +01:00
Tom Cafferkey 35d49f1583 BlockTemplateController (https://github.com/woocommerce/woocommerce-blocks/pull/4981)
* BlockTemplateController

* Check if theme already has template

* ThemeUtils file to check for FSE enabled themes

* Use Gutenberg global gutenberg_supports_block_templates

* Remove ThemeUtils reference

* Update with code review comments

* Delete ThemeUtils and move supports_block_templates check

* Duplicate functions from Gutenberg into Utils file

* Remove template file

* Check template directory and stylesheet directory for template
2021-10-25 10:45:50 +01:00
Mike Jolley 4b0f975707 Force array type for valid states (https://github.com/woocommerce/woocommerce-blocks/pull/4975) 2021-10-20 16:29:21 +01:00
Mike Jolley 2e0d0faa84 Enforce valid states from the API (https://github.com/woocommerce/woocommerce-blocks/pull/4844)
* Enforce valid states from the API

* Remove paypal from test
2021-10-19 14:30:02 +01:00
Mike Jolley 901a78979e Fix positioning of default locked blocks in the editor and frontend (https://github.com/woocommerce/woocommerce-blocks/pull/4937)
* Update default empty template on server side

* template->registeredBlocks wording

* useForcedLayout: insert in correct place

* Remove test div

* Clarify inline docs

* Apply changes to cart block
2021-10-15 10:48:57 +01:00
Mike Jolley 749c0d2dfc Remove duplicate data attributes (https://github.com/woocommerce/woocommerce-blocks/pull/4941)
* Remove inject_html_data_attributes

* Exclude class/align attributes from injection
2021-10-14 13:36:03 +01:00
Thomas Roberts db34f28c4f Version bump following release 2021-10-13 15:41:47 +01:00
Mike Jolley cf7d5d8d53 Add hook documentation and build script (https://github.com/woocommerce/woocommerce-blocks/pull/4927)
* Script to generate hook docs

* Inline docs for action and filter hooks

* __experimental_woocommerce_blocks_checkout_order_processed example

* Update doc generation

* Document exceptions

* examples

* Fix a typo

* Remove unused dependency

* add platform override for phpunit tests
2021-10-13 10:45:59 +01:00
github-actions[bot] a6607cd94f Release: 6.1.0 (https://github.com/woocommerce/woocommerce-blocks/pull/4924)
* Empty commit for release pull request

* Update readme.txt with release changelog

* Add testing instructions for 6.1.0 release

* Update readme.txt with release changelog

* woocommerce/woocommerce-blocks#4625 product categories list block hierarchy display fix (https://github.com/woocommerce/woocommerce-blocks/pull/4920)

* Update link to testing zip

* Remove mini cart testing from instructions

This is because mini-cart is only in experimental builds.

* Update changelog and testing notes

* Correct typo in testing instructions

* Update testing instructions

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Ovidiu Liuta <ovidiu.liuta@automattic.com>
2021-10-12 15:09:46 +01:00
Ovidiu Liuta d6e0729c79 woocommerce/woocommerce-blocks#4625 product categories list block hierarchy display fix (https://github.com/woocommerce/woocommerce-blocks/pull/4920) 2021-10-12 11:36:35 +01:00
Seghir Nadir eb9b8ab233 Revert "Display the notices registered by the payment gateway's process_payment() method (https://github.com/woocommerce/woocommerce-blocks/pull/4871)" (https://github.com/woocommerce/woocommerce-blocks/pull/4923)
This reverts commit 494df12859.
2021-10-11 17:00:47 +01:00
Mike Jolley caaa4f5ac4 Handle translations in lazy loaded files by injecting them into the page (https://github.com/woocommerce/woocommerce-blocks/pull/4897)
* Formalise chunk names

* register_chunk_translations()

* Rename handle

* Include fileSuffix

* Remove .chunk prefix- it broke the vendors chunk
2021-10-11 16:32:29 +01:00
Thomas Roberts 9fbfb5a594 Update percent of users who will see inbox notification (https://github.com/woocommerce/woocommerce-blocks/pull/4922) 2021-10-11 15:22:18 +01:00
Danae Millan 494df12859 Display the notices registered by the payment gateway's process_payment() method (https://github.com/woocommerce/woocommerce-blocks/pull/4871)
We were displaying a generic error and clearing the notices before. Now we convert them to exceptions so they're actually displayed.
2021-10-09 11:46:35 -03:00
Chouby ea4fecaa31 Prefix the input id with wc- instead of wp- (https://github.com/woocommerce/woocommerce-blocks/pull/4882) 2021-10-08 10:27:03 +01:00
Tom Cafferkey ee84901ab8 AttributePicker: Set default values if they exist (https://github.com/woocommerce/woocommerce-blocks/pull/4815)
* Update API to add default boolean to attribute values and use this within the component to set the default attributes.

* Modify and add unit tests for isObject and getDefaultAttributes

* Sanitize attribute name to accommodate for custom attributes being default values.

* Comments for sanitized_attribute_name variable

* Remove second argument from getAttributes
2021-10-06 09:48:13 +01:00
Tung Du edce72e2fb Mini Cart block: improve button accessibility (https://github.com/woocommerce/woocommerce-blocks/pull/4852) 2021-10-04 10:54:28 +07:00
Seghir Nadir 1bdb9b51c8 Don't fire woocommerce_blocks_loaded if WC version is not met (https://github.com/woocommerce/woocommerce-blocks/pull/4873) 2021-09-30 12:42:07 +01:00
Nadir Seghir db66734fd4 update versions and fix changelog date, closes woocommerce/woocommerce-blocks#4869 2021-09-29 14:57:32 +01:00
Seghir Nadir 77e3da81b2 Checkout i2: support odd classes when transforming from Checkout i1 to Checkout i2 (https://github.com/woocommerce/woocommerce-blocks/pull/4866)
* support odd classes for Checkout

* support classNames at start of string

* keep classNames and aligment on frontend
2021-09-29 11:54:50 +01:00
Ricardo Metring 60f82537f1 Fix free orders missing payment method (https://github.com/woocommerce/woocommerce-blocks/pull/4854) 2021-09-28 12:30:48 -03:00
Seghir Nadir b6167bc179 Cart i2: Render filled and empty Carts on frontend (https://github.com/woocommerce/woocommerce-blocks/pull/4802)
* WIP getting to work on frontend

* restore frontend.tsx

* fix layout

* remove unit tests living where they shouldn't be living

* remove skeleton

* support emtpy cart in frontend

* remove extra todo

* use fragment instead of div

* Add empty cart event

* Remove extra fragment
2021-09-23 16:38:30 +01:00
Tom Cafferkey 445f8175a1 Throw an exception if there is no selected shipping method on an item… (https://github.com/woocommerce/woocommerce-blocks/pull/4784)
* Throw an exception if there is no selected shipping method on an item that needs shipping

* Update src/StoreApi/Utilities/OrderController.php for ensure error message ends with a period.

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2021-09-21 10:31:52 +01:00
Seghir Nadir f44784ffca Create Cart i2 block (https://github.com/woocommerce/woocommerce-blocks/pull/4718) 2021-09-17 16:29:58 +01:00
Albert Juhé Lluveras c07fef9e57 Make All Reviews block honor 'ratings enabled' and 'show avatars' preferences (https://github.com/woocommerce/woocommerce-blocks/pull/4764)
* Make All Reviews block honor 'ratings enabled' and 'show avatars' preferences

* Only add space for image if image is rendered
2021-09-17 11:19:22 +02:00
Mike Jolley 5c08c75612 Update Checkout to Checkout i2 (https://github.com/woocommerce/woocommerce-blocks/pull/4745)
* Remove i2 from build

* Remove i2 php registration

* Rename old checkout dir

* Rename i2 dir

* Migrate i1 to i2 code

* Register block metadata to fix frontend rendering when migrating to i2

* Register in correct order

* Missing styles

* add register-components to side effectful list

* wrong block class in e2e test

* wp prefix missing on selector

* Fix top level block test

* Reselect labels to work around rerendering

* missing empty cart styles

* Consolodate duplicate styles

* remove init code

* update selectBlockByName

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2021-09-16 13:16:21 +01:00
Thomas Roberts 51d15b3d19 Bump version numbers
I did not update all the version numbers in all of the correct places during the release.
2021-09-16 10:41:20 +01:00
Albert Juhé Lluveras e216a7c90c Fix calculation of number of reviews in Reviews by Category block (https://github.com/woocommerce/woocommerce-blocks/pull/4729)
* Remove unused code

* Fix incorrect number of reviews in Reviews by Category block

* Add error handling around get_term_children()
2021-09-15 11:58:00 +02:00
github-actions[bot] 99b55a2382 Release: 5.9.0 (https://github.com/woocommerce/woocommerce-blocks/pull/4731)
* Empty commit for release pull request

* Update changelog in readme

* Update testing instructions for 5.9.0

* Update testing instructions for 5.9.0 to include screenshots and smoke test

* Remove 4545 from testing notes and changelog

* Update testing instructions for 5.9.0 to include new test plugin zip

* Update testing instructions from postcode to city

* Rename usages of className to class in ProductSearch.php (https://github.com/woocommerce/woocommerce-blocks/pull/4740)

* Update zip file

* Update changelog in readme.txt

* Update testing instructions

* Update testing instructions

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2021-09-14 15:01:29 +01:00
Thomas Roberts 8d0d031381 Rename usages of className to class in ProductSearch.php (https://github.com/woocommerce/woocommerce-blocks/pull/4740) 2021-09-14 12:37:24 +01:00
Thomas Roberts 6e141e6b62 Add inbox notification to surface cart and checkout blocks to select merchants (https://github.com/woocommerce/woocommerce-blocks/pull/4518)
* Add InboxNotifications class

This will be used to handle displaying the inbox notification to select merchants

* Show inbox notifications on load

* Update copy in inbox notification

* Update URL and percent chance for a user to be chosen

* Add apostrophe to notification content

* Only register notifications when woocommerce_init is done

* Wait for admin to load before adding note

* Add further disallowed plugins

* Allow notification to be shown when using WC Points and Rewards

* Remove timestamp and content data from the note

This isn't necessary and was only added for testing.

* Check for existence of note based on name instead of content_data

* Create delete note function

We'll be deleting notes in the case that an ineligible plugin becomes active.

* Reorder the eligible plugin and % targeting check

This will let us target a truer % of users, and also will let us delete the note if a user activates an ineligible plugin.

* Remove code which was added for testing purposes

The code to return if the feature plugin was active was enabled, woocommerce-gutenberg-products-block was added as an ineligible plugin.
2021-09-13 12:36:51 +01:00
Albert Juhé Lluveras decfe6c501 Open Mini Cart block when adding a product to cart via an AJAX call (https://github.com/woocommerce/woocommerce-blocks/pull/4666) 2021-09-07 10:27:16 +02:00
Albert Juhé Lluveras c99a4e4ace Don't allow opening the Mini Cart in the Cart and Checkout pages (https://github.com/woocommerce/woocommerce-blocks/pull/4680) 2021-09-06 13:56:33 +02:00
Mike Jolley b385d4005c Refactor Checkout Inner Block Registration and Render frontend forced blocks (https://github.com/woocommerce/woocommerce-blocks/pull/4671)
* Append forced blocks

* Fix child detection

* Improve render logic to remove clone element

* Areas instead of block names

* Revert "Areas instead of block names"

This reverts commit c8d68e6424313ed15ca1eb1f91a3edfc24d06a8d.

* revert area change

* Registration system

* Refactor block registration to handle components + forcing

* Remove need for atomic block registration

* add attributes to namespaced blocks only

* Update area names to new format

* Avoid passing custom props to DOM

* Put back usage of cloneelement for DOM elements

* correct case of innerBlockAreas

* Inline documentation for renderParentBlock

* Play nice with other attributes when registering forced blocks
2021-09-03 14:25:09 +01:00
Mike Jolley 7e7cf87dc0 Enqueue frontend assets on frontend only (https://github.com/woocommerce/woocommerce-blocks/pull/4675) 2021-09-03 10:04:21 +01:00
Albert Juhé Lluveras f3ec10a89c Add Drawer component (https://github.com/woocommerce/woocommerce-blocks/pull/4608)
* Add Drawer component

* Use element dataset instead of a window global

* Rename miniCartOverlay to miniCartDrawerPlaceholder

* Refactor styles so screen overlay covers the entire screen

* Use rem instead of em for the drawer title size to keep it consistent between renders

* Keep focus when replacing the mini cart button

* Match overlay colors from designs

* Use is-loading class like several other blocks

* Add more doc comments

* Don't listen to clicks on Mini Cart button when it's open

* Update Drawer component styles
2021-09-02 11:44:25 +02:00
Darren Ethier 36fd4c1684 Update versions after release 2021-08-31 14:42:14 -04:00
github-actions[bot] a436c7bfe6 Release: 5.8.0 (https://github.com/woocommerce/woocommerce-blocks/pull/4656)
* Empty commit for release pull request

* Add changelog to readme.

* Update metadata for release

* Testing notes for release

* Apply suggestions from code review

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Apply suggestions from code review

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2021-08-31 14:37:57 -04:00
Thomas Roberts 4655bcf3d2 Remove checkout-newsletter-subscription-block from get_atomic_blocks (https://github.com/woocommerce/woocommerce-blocks/pull/4660) 2021-08-31 16:49:20 +01:00
Seghir Nadir a269dd882c Checkout i2: Handle forced blocks in editor (https://github.com/woocommerce/woocommerce-blocks/pull/4606)
* force insert blocks

* add force attribute

* delete console.log

* make sure we don't override move

* polish force system in editor

* get sample block to show on frontend

* add force to frontend

* remove force on blocks

* move ref to function

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2021-08-31 13:38:51 +01:00
Mike Jolley 64fffd7051 Experimental newsletter subscription checkbox block POC and Store API supporting changes (https://github.com/woocommerce/woocommerce-blocks/pull/4607)
* remove todo from sample block

* Add newsletter block

* Block registration

* Move provider/processor so separate them from context providers

* customData implementation for setting customData for requests

* Make data and schema callbacks optional in extendrestapi class

* schema_type should be data_type

* Allow checkout endpoint to be extended

* Support validation, sanitization, and defaults on nested REST properties

* Experimental endpoint data for newsletter field

* Add extension data to requests

* SET_EXTENSION_DATA

* Update types

* Add todo

* move check within hook function

* Remove newsletter block

This is because we're testing with the integration being done in a separate extension

* Delete newsletter subscription block

* Pass the result of hooks down to the children blocks

We need to do this to allow extension blocks to modify the extensionData (so they can send custom input to the REST api when submitting the checkout form).

* Remove newsletter signup block

* remove checkoutSubmitData

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2021-08-30 15:35:20 +01:00
Albert Juhé Lluveras 912a1704e0 Disable Cart, Checkout, All Products & filters blocks from the widgets screen (https://github.com/woocommerce/woocommerce-blocks/pull/4646) 2021-08-30 09:10:55 +02:00
Albert Juhé Lluveras 2b2631d7ab Add Mini Cart block in experimental builds (https://github.com/woocommerce/woocommerce-blocks/pull/4510)
* Create MiniCart block prototype

* Use window.onload instead of DOMContentLoaded

* Don't load translations for scripts without localized strings

* Don't try to load cart instance in API requests

* Remove PHP pre-rendering

* Fix some typos

* Move Mini Cart block files under 'cart-checkout' directory

* Update selectors to follow guidelines

* Only enable the MiniCart block in experimental builds

* Fix wrong translations element selector

* Improve lazyLoadScript and preloadScript documentation

* Move lazy-load-script and preload-script to base-utils

* Add function to check if script tag is already in the DOM
2021-08-25 17:42:55 +02:00
Mike Jolley 581769886a Update checkout route hooks to support extensions (https://github.com/woocommerce/woocommerce-blocks/pull/4610)
* Remove account creation gating

* Unneccessary use statements

* Tidy up with null coalescing operators

* Add __experimental_woocommerce_blocks_checkout_update_order_from_request action

* Default to 200 status

* add docs in feature flag file

* align docs with hook

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2021-08-25 11:29:45 +01:00
grogou 32d76543cf Add "Filter Products by Stock" block (https://github.com/woocommerce/woocommerce-blocks/pull/4145)
* Added Stock Status filter

* Pre pull request clean up code

* Reverted package-lock.json ( downgraded node version to 12 )

* Coped package-lock.json from trunk

* Fix label includ path

* Created new component for Filters elements labels

* Removed hideOutOfStock from AllProducts and realized hide out of stock functionality from SQL query

* Linter fix

* Review suggestion changes

* Update index.js

* Fixed preview part for stock and attribute filters

* Update assets/js/blocks/stock-filter/block.js

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Bring back removed css

* Allow custom stock statuses

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Escape statuses for sql query

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

Co-authored-by: aaron <aaron.yor@gmail.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2021-08-20 16:56:14 +01:00
Thomas Roberts c04aced323 Revert "Add "Filter Products by Stock" block (https://github.com/woocommerce/woocommerce-blocks/pull/4145)"
This reverts commit 3542b3907e.
2021-08-20 16:14:59 +01:00
Thomas Roberts 3542b3907e Add "Filter Products by Stock" block (https://github.com/woocommerce/woocommerce-blocks/pull/4145)
commit 4a14c226b739f3d88f99647206627ff351ef01ad
Merge: 8f2bc114 4fccfd88
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Fri Aug 20 16:06:19 2021 +0100

    Merge branch 'add/stock-filter' of git://github.com/NovemBit/woocommerce-gutenberg-products-block-fork into NovemBit-add/stock-filter

commit 4fccfd88998fde20b603d99d9866d3cb08cf7bf4
Merge: 8012b2b4 e7bd0e6e
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 13:17:42 2021 +0000

    Merge from trunk

commit 8012b2b40e95b90e507698de677fba059ca9ef0a
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 16:53:56 2021 +0400

    Escape statuses for sql query

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit 304348aeb5448153ad3365ff09ca37f265af87cc
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 16:53:18 2021 +0400

    Allow custom stock statuses

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit b2f01e4ed6738ef3091afbac7d4131c984b33bc7
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 28 06:22:04 2021 +0000

    Bring back removed css

commit caafffda5de6d3f31b817ab4886847958f693e24
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Tue Jul 27 23:35:15 2021 +0400

    Update assets/js/blocks/stock-filter/block.js

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit ae381de8aa49d0b16d2dabff7b6ecffedc511460
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Thu Jul 15 06:50:06 2021 +0000

    Fixed preview part for stock and attribute filters

commit 7df5feab0a33f93786a29a625c1f27a4737c25bc
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 20:15:05 2021 +0400

    Update index.js

commit af0294ce6a21a0032c7eeb00fe986eddda188574
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:43:06 2021 +0000

    Review suggestion changes

commit 16da25340fd7438e0fedd62b3e8b52bc33b80852
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:40:52 2021 +0000

    Linter fix

commit 594125a68c5c0d854418d5f3e76fb0e18c23b0a4
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:37:41 2021 +0000

    Removed hideOutOfStock from AllProducts and realized hide out of stock functionality from SQL query

commit 94a54e3c7c8cb94323d41a11c6bb603d0648792e
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:21:51 2021 +0000

    Created new component for Filters elements labels

commit e3d7fb2aad4b123693f0104c2ffd9af2a1273900
Author: aaron <aaron.yor@gmail.com>
Date:   Wed Jun 2 11:57:06 2021 +0400

    Fix label includ path

commit c9e3d02d5bf03614cbfd2d17ec1558dacc3252f1
Author: Seghir Nadir <nadir.seghir@gmail.com>
Date:   Tue Jun 1 09:46:02 2021 +0100

    remove usage of mustBeString (https://github.com/woocommerce/woocommerce-blocks/pull/4294)

commit b8923390e5d5433ef2c8a14891684b907051cd7e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon May 31 16:07:59 2021 +0100

    Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/4290)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 6de68e41e2053a79cdce3e9d820c9b5656072685
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Thu May 27 12:57:49 2021 +0100

    Check if product can be added to cart before adding ajax class to button (https://github.com/woocommerce/woocommerce-blocks/pull/4265)

commit a1ccaf4143dd9cd86f0f88ce956bcf7edb5e419a
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Wed May 26 16:10:43 2021 +0100

    Update version for next release

commit 24f882f5d53776abe2ee6440d68485083b5a8340
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Wed May 26 15:42:21 2021 +0100

    Bumping version strings to new version.

commit e1fd0825b72d7cc87c6f26329359cc39278cc760
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Wed May 26 15:31:37 2021 +0100

    Update link to testing zip

commit 35521e54b756bf265cf6d61437cd5f55629fc2d4
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Wed May 26 14:04:42 2021 +0100

    Fix display of itemised taxes (https://github.com/woocommerce/woocommerce-blocks/pull/4279)

    * Add price to itemised tax rates & hide Total when itemised taxes are on

    * Update snapshots for taxes in sidebar

commit 7f3a1e629f04dcb71d3fb4313b3012aef13feb5f
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 26 08:52:31 2021 +0000

    Update dependency downshift to v6.1.3 (https://github.com/woocommerce/woocommerce-blocks/pull/4272)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 593ef2b07f71341b3d0fc143876c24a4d50a64fb
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 26 05:04:55 2021 +0000

    Update dependency @types/react to v16.14.8 (https://github.com/woocommerce/woocommerce-blocks/pull/4270)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 21f16d6d4ef10ada3f1631f72b4fb7dec1f4af72
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 26 03:47:54 2021 +0000

    Update dependency @woocommerce/e2e-utils to v0.1.5 (https://github.com/woocommerce/woocommerce-blocks/pull/4271)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 444256ea70c8b9ac89b4f4d5913396da9f4334cd
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 26 02:30:17 2021 +0000

    Update dependency @types/lodash to v4.14.170 (https://github.com/woocommerce/woocommerce-blocks/pull/4269)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 5f9df572aed0b07606c7a4e5b684122a48862f94
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Tue May 25 15:31:03 2021 +0100

    Create 5.2.0 testing notes

commit 45abda651a668ddc4b1d36e8c76cf19d365d94c8
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Tue May 25 14:52:37 2021 +0100

    Update package.json

    npm ci was not working correctly this will fix it.

commit c3daa6ce4c71b956e08200442626a0e29a3e5daf
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Tue May 25 14:26:32 2021 +0100

    Update changelog and WC tested up to

commit 61283092b32425450f4450d5224e156d24aa38ba
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Thu May 20 17:56:56 2021 +0100

    Revert "Move `TextInput` to checkout package and allow it to be used for input type=number (https://github.com/woocommerce/woocommerce-blocks/pull/4238)"

    This reverts commit ee9b2d20e0.

commit 193267b041e8e0fb9fe89bb68ad972b1f5b4b941
Author: Mike Jolley <mike.jolley@me.com>
Date:   Tue May 25 12:49:13 2021 +0100

    Add key to each `CartTotalItem` (https://github.com/woocommerce/woocommerce-blocks/pull/4240)

    * Move type defs

    * Move type guards

    * Fix imports

    * Extract prepareTotalItems to TS file

    * usePaymentMethodInterface as TS file

    * Fix TS props

    * Fix currency type defs

    * Add return type to usePaymentMethodInterface

    * Add key prop to CartTotalItem

    * Fixed up js tests

    * Move SymbolPosition into type-defs package

    Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>

commit c15e5123e47952f445fe159522f72cef290c9276
Author: Seghir Nadir <nadir.seghir@gmail.com>
Date:   Tue May 25 10:46:28 2021 +0100

    Fix duplicate plugins by using wp.components global in the editor. (https://github.com/woocommerce/woocommerce-blocks/pull/4211)

    * fix duplicate slotProvider

    * load file on demand

    * add comment and load components in blocks as well

    * add todo block

commit e2cf0baad0ee91f892a1cb1919ad0edbab0122c3
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Tue May 25 08:43:46 2021 +0100

    Hide "including X in taxes" when the amount of tax is 0 (https://github.com/woocommerce/woocommerce-blocks/pull/4262)

    * Hide "including x in taxes" if tax amount is 0

    * Add jest types to tsconfig

    * Move SHOW_TAXES into component body

    This is to make the code more testable and allows us to change values. There's no significant performance impact because of this change.

    * Add tests and snapshots for TotalsFooterItem

commit 9b44c884fc68d81d6211f40f13409fac8503c2e3
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon May 24 18:14:37 2021 +0100

    Update dependency @octokit/graphql to v4.6.2 (https://github.com/woocommerce/woocommerce-blocks/pull/4230)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 4973132a90ddc88e075d6d421c8677cf032c3264
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon May 24 16:40:05 2021 +0100

    Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/4253)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit b7eabf54bad4b7e08c7f4ef1484f7fea7ab64f20
Author: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>
Date:   Fri May 21 09:53:46 2021 +0200

    Block Widgets: hide legacy widgets with a feature-complete block equivalent (https://github.com/woocommerce/woocommerce-blocks/pull/4237)

    * Block Widgets: hide legacy widgets with block equivalent

    * Unhide Products and Products by Rating widgets

commit 47556b9a39125423409dea8a3ae8c8ac34396fc0
Author: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>
Date:   Fri May 21 09:52:27 2021 +0200

    Block Widgets: hide All Products and Filter blocks in the Customizer (https://github.com/woocommerce/woocommerce-blocks/pull/4225)

commit 208b21281763652bdcddb7390dfe955bddff4728
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Thu May 20 17:56:56 2021 +0100

    Move `TextInput` to checkout package and allow it to be used for input type=number (https://github.com/woocommerce/woocommerce-blocks/pull/4238)

    * Move text-input to checkout package

    * Pass validation props directly to ValidatedTextInput

    * Import label relatively instead of from package

    * Pass validation functions to ValidatedTextInput

    This is so it doesn't need to get them from useValidationContext.

    * Add InputProps to ValidatedTextInput

    This will be used to control additional props on the input element of TextInput

    * Spread inputProps onto <input> element of TextInput

    * Export TextInput from @woocommerce/blocks-checkout

    * Add @woocommerce/blocks-checkout package to tsconfig

    * Allow styling to be applied to number inputs and when value is 0

    * Make style order consistent

    * Remove inputProps to rely on rest in TextInput

    * Add specific prop for the inputErrorComponent

    * Only disallow active state if value is 0 AND type is number

    * Change all uses of ValidatedTextInput to also pass inputErrorComponent

    * Revert "Change all uses of ValidatedTextInput to also pass inputErrorComponent"

    This reverts commit ec734b99c20c4d29fcf778714246fc406ee37eaf.

    * Revert "Remove inputProps to rely on rest in TextInput"

    This reverts commit 1fc64cca4002206423d1fa443ff2d60130ba1ea0.

    * Revert "Revert "Change all uses of ValidatedTextInput to also pass inputErrorComponent""

    This reverts commit 110e3606a996668be5a32698b634b7706d16cddc.

    * Revert "Revert "Remove inputProps to rely on rest in TextInput""

    This reverts commit aeb03526c44b3fcc97a719a18930d08157a80baf.

    * Don't pass errorMessage to ValidatedTextInput

commit 55f5bfd8cd720022380de1e811e8d1abb622209b
Author: Mike Jolley <mike.jolley@me.com>
Date:   Thu May 20 15:07:12 2021 +0100

    Create LICENSE (https://github.com/woocommerce/woocommerce-blocks/pull/4235)

commit 0b10f75ddf3d01c837f466f9d3f85dbc760b3d7b
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date:   Thu May 20 10:58:59 2021 +0200

    Update @woocommerce/components (https://github.com/woocommerce/woocommerce-blocks/pull/4100)

    * Add isCompact prop to components using SearchListControl

    * Update @woocommerce/components to 6.1.2

    * Remove legacy CSS code

    * Add some CSS rules to override conflicting editor styles

    * Replace showCount prop with has-count class name

    * Create ExpandableSearchListItem component

    * Refactor ProductControl so it uses ExpandableSearchListItem

    * Update @woocommerce/components to 6.2.0

    * Fix @woocommerce/components builds breaking

    * Fix a11y of expandable item list children

    * Set categories to an empty array by default

    * Render compact control in Attribute filter sidebar

    * Add countLabel to ProductAttributeTermControl

    * Fix ProductTagControl selected items

    * Use sentence case for countLabel

    * Fix wrong margins in block editor

    * Fix checkbox alignment

    * Update package-lock.json

    * Fix withCategories test

    * Fix JS error in Filter Products by Attribute block

    * Make input ids unique

commit 587be17d62db7b956c980fac4766456511243e10
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Wed May 19 10:55:15 2021 +0100

    Convert TextInput and ValidatedTextInput to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/4226)

    * Change index file from base/context to .ts

    This is to stop TS complaining when importing things from here.

    * Convert ValidatedTextInput to TypeScript

    * Convert TextInput to TypeScript

    * Ensure Label accepts correct HTML Attributes Props

    * Remove PropTypes from TextInput and ValidatedTextInput

    No longer needed because of TypeScript

    * Use correct error id to show validation message

    * Use HTMLElement instead of a specific element type for LabelProps

    * Update assets/js/base/components/text-input/validated-text-input.tsx

    Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

    * Update assets/js/base/components/text-input/validated-text-input.tsx

    * Use correct formatting in ValidatedTextInput

    Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

commit 731c75e03100695131b4ec6afa8994e6cf9f4c00
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 07:36:46 2021 +0000

    Update dependency @testing-library/react-hooks to v5.1.3 (https://github.com/woocommerce/woocommerce-blocks/pull/4233)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit ef6ad8882310dff6d1aa4ae847289acddc0dfebb
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 04:36:44 2021 +0000

    Update dependency @types/lodash to v4.14.169 (https://github.com/woocommerce/woocommerce-blocks/pull/4234)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 096463ea4bf1bddc7d61e1b04320886ee2f21770
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 03:46:21 2021 +0000

    Update dependency @testing-library/react to v11.2.7 (https://github.com/woocommerce/woocommerce-blocks/pull/4232)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 8722839350e6725ea80da994bb8387966b75061c
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 02:48:45 2021 +0000

    Update dependency @stripe/react-stripe-js to v1.4.1 (https://github.com/woocommerce/woocommerce-blocks/pull/4231)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 2f7e8edfebff59eeeeeb18d65fd658d5f432419e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 01:32:34 2021 +0000

    Pin dependency @types/wordpress__deprecated to 2.4.2 (https://github.com/woocommerce/woocommerce-blocks/pull/4229)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 72e851a28c88653204ed8e4eff10c6bb2cb40c68
Author: Raluca Stan <raluca.stan@automattic.com>
Date:   Tue May 18 15:09:30 2021 +0200

    Fix e2e checkout tests and adjust jest setup (https://github.com/woocommerce/woocommerce-blocks/pull/4216)

    * Fix checkout test
    - make tests independent & test also for empty cart case
    - make sure the Order summary is expanded with a better selector
    * Remove unnecessary localStorage operations from tests
    * Go to cart page before removing an item from cart
    * Remove logging observing before tests
    This removes unnecessary console.log interception. A big part of the logic was done for Puppeteer 1.6.1, but since 3.0.0 message.text() returns string. We allow console.error messages to surface in our tests. Although they don't cause the test to fail it might be a good addition for debugging purposes.

commit 7b7119cfb0cfce5e1718804ca590a6b161d555f2
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue May 18 11:27:27 2021 +0100

    Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/4212)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 5f84e7dabbc788b769646a9bcba5a15a57b03e33
Author: Mike Jolley <mike.jolley@me.com>
Date:   Tue May 18 10:37:31 2021 +0100

    Convert checkout state context provider to Typescript (https://github.com/woocommerce/woocommerce-blocks/pull/4200)

    * git move to ts files

    * Type the checkout state provider

    * Restore for loop for error handling

    * Types not needed

    * Consolodate response handling

    * Unused import

    * Fix defaults for onCheckoutAfterProcessingWithSuccess etc

    * Type useEmitResponse and remove isObject checks

    * useEmitResponse as const

    * Check that redirectUrl is string

    * Define actions as const

    * data.redirectUrl should be truthy

    * Add redirectURL todo item as followup

    * remove null fallback

commit fccc72bedb0f320995f62ee5d91b1c8e2e9c2fa1
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Tue May 18 09:10:31 2021 +0100

    Move Button and Label components to `@woocommerce/blocks-checkout` package (https://github.com/woocommerce/woocommerce-blocks/pull/4222)

    * Move Button to checkout package

    * Move Label to Components Package

commit 0b91fbeac282f729dbc8e8056d2e934392f401c0
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Mon May 17 15:00:57 2021 +0100

    Update design of cart and checkout sidebars (https://github.com/woocommerce/woocommerce-blocks/pull/4180)

    * Update cart/coupon/shipping design

    * Add order summary heading

    * Move and style discounts on checkout sidebar

    * Add rate to tax lines

    * Ensure the option to display taxes itemised is available to Cart block

    * Output individual tax items below the total & add styles for this

    * Add success notice under coupon input on successful coupon addition

    * Add border to bottom of Totals footer

    * Show success message when adding coupon

    * Add padding to cart item rows

    * Add preview data to cart for when taxes are enabled

    * Add rate to cart response type

    * Add showRateAfterTaxName attribute to Cart block

    * Add control to cart block to show rate percentage after rate name

    * Add rate % in cart totals only if option is toggled on

    * Pass showRateAfterTaxName attribute down to TotalsTaxes

    * Add showRateAfterTaxName to Checkout block

    * Add control to block editor for showRateAfterTaxName on Checkout

    * Pass showRateAfterTaxName down to TotalsTaxes in Checkout

    * Change label for showing tax rates in cart and checkout blocks

    * Add test to ensure Taxes section shows in Cart block

    * Add tests for cart sidebar and rate percentages

    * Remove order summary title from checkout sidebar

    * Check if taxes are enabled before rendering the option to show rate %s

    * Add ShippingVia component to show the selected rate in sidebar

    * Remove value from individual tax rates

    * Remove bold from Shipping via label

    * Remove coupon added successfully message

    * Ensure panel headings that are h2s are the same colour as others

    * Clean up eslint warnings

    * Show rate %s by default

    * Update snapshots following design changes

    Co-authored-by: Mike Jolley <mike.jolley@me.com>

commit 0464883ec668332db5a6399569880e7b3fa3ab3f
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date:   Sun May 16 20:00:06 2021 +0200

    Don't default to fallback in getSetting if value is falsy (https://github.com/woocommerce/woocommerce-blocks/pull/4202)

commit f95f12d3215caf30f1f49e1d29c5826156914a33
Author: Mike Jolley <mike.jolley@me.com>
Date:   Sun May 16 18:59:32 2021 +0100

    Fix es lint warnings (https://github.com/woocommerce/woocommerce-blocks/pull/4206)

    * Un-used PropTypes import

    * Avoid global and use ownerDocument

    * receiveCart return type

    * ignoreRestSiblings when destructuring for @typescript-eslint/no-unused-vars

    * Replace lodash find

    * Use global rather than window

    * Remove lodash map

    * move rule to overrides

commit db589e7e7f4809504b1aa83144116506a50bdd38
Author: Raluca Stan <raluca.stan@automattic.com>
Date:   Sun May 16 19:41:34 2021 +0200

    Fix cart and checkout frontend e2e tests (https://github.com/woocommerce/woocommerce-blocks/pull/4199)

    * Wip: fix e2e fe tests

    * Test that navigation ends

    * Fix waitForNavigation

    * comment out failing php test

    * click the dom element

    * Ensure navigation happens by waiting for it. Test page title.

    * remove skip and update docs

    * Revert "comment out failing php test"

    This reverts commit 7c40e8caf3aa32e35e3b70eb32051251b06e0613.

    * Fix USD from merge conflict

    * Add missing check for page title

    * Try page.waitForFunction for text search

    * test to see checkout page title is correct

    * test checkout page url on CI

    * unde jest config change

    * Fix assertion for checkout page

    * remove extra localStorage item remove call

    Co-authored-by: Mike Jolley <mike.jolley@me.com>
    Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>

commit b9b66f93adb5b0fdc22fc4ed9560eb6e2c1c72d9
Author: Mike Jolley <mike.jolley@me.com>
Date:   Thu May 13 11:49:39 2021 +0100

    Set order status to pending when no payment is needed (https://github.com/woocommerce/woocommerce-blocks/pull/4186)

commit 8ed63f765418ae8e7b2ee58004b4a9b1306eaeef
Author: Mike Jolley <mike.jolley@me.com>
Date:   Thu May 13 11:21:21 2021 +0100

    Remove the need for the `canMakePayment` callback in the editor context (https://github.com/woocommerce/woocommerce-blocks/pull/4188)

    * Force can pay true in editor context

    * Update docs

commit 90499cb3191137264ffde07cf082db8c4d6f77de
Author: Mike Jolley <mike.jolley@me.com>
Date:   Thu May 13 11:20:37 2021 +0100

    Sync customer data during checkout with draft orders. (https://github.com/woocommerce/woocommerce-blocks/pull/4197)

    * Update store when email changes

    * Add pluckEmail helper and convert to TS

    * improve guard

    * sync draft order with customer data

commit a813c931bb5f85f139429aa3bf094b2327a7f8cd
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date:   Thu May 13 12:14:15 2021 +0200

    Set default store currency to USD in tests (https://github.com/woocommerce/woocommerce-blocks/pull/4203)

commit b1408933f75ca47dc39335984bfc1fe570a72aaa
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Thu May 13 10:16:04 2021 +0200

    Update dependency config to v3.3.6 (https://github.com/woocommerce/woocommerce-blocks/pull/4195)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit d68bb11bb56d882f8755162ae6657cad76dfd16f
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Thu May 13 10:15:35 2021 +0200

    Update dependency cssnano to v4.1.11 (https://github.com/woocommerce/woocommerce-blocks/pull/4196)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit beadbab90fe0813c0f36cc25a9e0b14a8f8e96d2
Author: Seghir Nadir <nadir.seghir@gmail.com>
Date:   Wed May 12 13:32:05 2021 +0100

    Add cart data to filters (https://github.com/woocommerce/woocommerce-blocks/pull/4164)

    * add cart data to filters

    * add extensions back to footer filter

commit c10fdf26bc37b1efb6b22d045e3aed72f5541a2a
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 12 13:04:44 2021 +0100

    Pin dependency lodash to 4.17.21 (https://github.com/woocommerce/woocommerce-blocks/pull/4193)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit f92aac55f1a6fd67fba3885311ec74bcdb41034e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 12 13:04:13 2021 +0100

    Update dependency chalk to v4.1.1 (https://github.com/woocommerce/woocommerce-blocks/pull/4194)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 27cff5109889c0abca24124c1dabcb0b78da4929
Author: Mike Jolley <mike.jolley@me.com>
Date:   Wed May 12 13:02:26 2021 +0100

    Should be using value rather than name (https://github.com/woocommerce/woocommerce-blocks/pull/4187)

commit 560972a7eb306b6a27c298b7e3218df92a848e79
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Tue May 11 13:57:02 2021 +0100

    Add checkout filter for coupon names (https://github.com/woocommerce/woocommerce-blocks/pull/4166)

    * Make extensions optional, not all filters will need to pass this through

    For example the CartCouponSchema has no option for extensibility (and I don't think it's needed at any rate) so extensions will always be an empty object. Rather than explicitly specifying this when running the filter, we can let it default to an empty object.

    * Add filter for coupon code

commit 556ceb4b8a222466a73aae1ee0eac545e00802b4
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Tue May 11 11:45:02 2021 +0100

    Check if variation data is iterable before formatting (https://github.com/woocommerce/woocommerce-blocks/pull/4182)

commit 4279db88057e83eff8af077a96eeb19dd247a8d2
Author: Darren Ethier <darren@roughsmootheng.in>
Date:   Mon May 10 11:21:01 2021 -0400

    update package-lock (version change mostly)

commit f71b24ad0f634c2cb8aeac8ae80e0ccd139a4fcd
Author: Darren Ethier <darren@roughsmootheng.in>
Date:   Mon May 10 11:16:58 2021 -0400

    update version string to dev version

commit 7f9c1b2913f9c06f4d755519ef2689c56703a2c0
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Mon May 10 11:14:05 2021 -0400

    Release: 5.1.0 (https://github.com/woocommerce/woocommerce-blocks/pull/4185)

    * Empty commit for release pull request

    * Add changelog

    * update testing notes

    * Bumping version strings to new version.

    Co-authored-by: github-actions <github-actions@github.com>
    Co-authored-by: Darren Ethier <darren@roughsmootheng.in>

commit 80c27354e1eb83d027eb9670aed59885c2097d3d
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon May 10 14:38:04 2021 +0200

    Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/4184)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 90074cf871d8691d0adf5808e59a75b9ace98fa7
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Mon May 10 10:03:30 2021 +0100

    Convert shipping components to typescript (https://github.com/woocommerce/woocommerce-blocks/pull/4135)

    * Add type defs for customer

    Taken from 194ecccf78/assets/js/type-defs/customer.ts

    * Convert ShippingCalculatorAddress to TypeScript

    * Convert ShippingCalculator to TypeScript

    * Convert ShippingLocation to TypeScript

    * Allow packageId to be a number or string in useSelectShippingRate(s)

    * Convert ShippingRatesControl to TypeScript

    * Convert ShippingOptionsStep to TypeScript

    * Allow package_id to be a string or number

    This is because of Subscriptions using strings for package IDs

    * Change to use CartShippingRateItemShippingRate instead of Rate

    * Add extra props to PackageProps type

    * Make ShippingAddress have the correct type

    * Use CartShippingRateItemShippingRate instead of Rate

    * Remove Rate type

    * Set return types to JSX.Element

    * Change type of props.renderOption in ShippingRatesControl

    * Remove customer type defs and relocate aliases to default-address-fields

    * Add EnteredAddress type

    * Import EnteredAddress from new location

    * Remove unnecessary eslint ignore

    * Remove unused variable

    * Remove confusing use of word Item in Shipping types

    * Remove confusing use of word Item in Shipping types

commit 3f1be394d076bdc2a407c05d1fbf290a17c55c43
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date:   Mon May 10 10:00:14 2021 +0200

    Feature gate PaymentApi (https://github.com/woocommerce/woocommerce-blocks/pull/4176)

    * Feature gate PaymentApi

    * Improve payment method missing dependencies error message so it's clear it only affects blocks

    * Add PaymentApi feature flags to list of feature flags in docs

commit ed7eded4d7134d1b69d0fd206cd1315fd9d2d40f
Author: Darren Ethier <darren@roughsmootheng.in>
Date:   Fri May 7 16:39:28 2021 -0400

    Improvements to `emitEventWithAbort`. (https://github.com/woocommerce/woocommerce-blocks/pull/4158)

    * modify emitEventWithAbort to change return value

    `emitEventWithAbort` now returns an array of responses up to the first response that triggered an error or fail response instead of aborting on success responses too.

    * update add to cart form context provider

    * update checkout state context provider

    * update payment method data context provider

    * update tests and fix thrown error handling.

commit 2be9a4ea4405d5df427f4e97025aa5433019b72f
Author: Raluca Stan <raluca.stan@automattic.com>
Date:   Fri May 7 15:50:55 2021 +0200

    Add lodash as a devDependency (https://github.com/woocommerce/woocommerce-blocks/pull/4179)

commit 69b3679a7e585abc8a5068df3bd2457714149939
Author: Seghir Nadir <nadir.seghir@gmail.com>
Date:   Wed May 5 12:59:30 2021 +0100

    Don't clear email and phone fields when using separate billing address. (https://github.com/woocommerce/woocommerce-blocks/pull/4162)

    * preseve-billing-data

    * pluck empty email and phone

    * add issue number

commit 214014750c0a1414e89ce47d84754d278e5a164f
Author: Raluca Stan <raluca.stan@automattic.com>
Date:   Wed May 5 13:52:27 2021 +0200

    Fix/cart backend test (https://github.com/woocommerce/woocommerce-blocks/pull/4153)

    * Fix backend cart e2e test

    * Adjust test structure

    * Fix e2e checkout backend test.

    Make sure the confirmation window is closed

commit f8d9b9084c091f97b281f58a64f98622765a80e3
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 5 10:08:45 2021 +0000

    Update dependency @stripe/stripe-js to v1.14.0 (https://github.com/woocommerce/woocommerce-blocks/pull/4170)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 2391a40ab24439b14f56d1d6416beaf0c2d94c53
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Wed May 5 10:41:48 2021 +0100

    Add documentation for filters (https://github.com/woocommerce/woocommerce-blocks/pull/4167)

    * Rename the argument in the CheckoutFilterFunction type

    This only exists as an extra descriptive hint to anyone using this type, the value `label` was never used by anything so it does not need to be changed anywhere else.

    * Create Available Filters document

    * Add available filters to the extensibility README

    * Update docs/extensibility/available-filters.md to fix typographical error

    Co-authored-by: Mike Jolley <mike.jolley@me.com>

    Co-authored-by: Mike Jolley <mike.jolley@me.com>

commit f4af89b2fce203c4f173845244724f58669a04f9
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 5 08:10:24 2021 +0000

    Update dependency @woocommerce/e2e-utils to v0.1.4 (https://github.com/woocommerce/woocommerce-blocks/pull/4172)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 6c9e786c407fd1bd6861bde3b435cec0663b8399
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 5 03:31:52 2021 +0000

    Update dependency @types/react to v16.14.6 (https://github.com/woocommerce/woocommerce-blocks/pull/4171)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 3ba4d9ed6a46f3700a7190d09eff2ba53d1bcb60
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 5 02:23:13 2021 +0000

    Update babel monorepo (https://github.com/woocommerce/woocommerce-blocks/pull/4169)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 35f71df36f92028cfb880e314623b33c077a384d
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue May 4 14:07:05 2021 +0100

    Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/4163)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 4c65211b375e40691aeea7273eec34f3f54a0b3b
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 14:09:28 2021 +0000

    Coped package-lock.json from trunk

commit 703cb65efb8fd4ced58234d5174dc198e225e07a
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 14:00:32 2021 +0000

    Reverted package-lock.json ( downgraded node version to 12 )

commit 41dfd79715d4b4f1e5cebd0e7dccfc1573ba4d36
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 11:12:45 2021 +0000

    Pre pull request clean up code

commit 75fc62e99ed63389c158352b73ae898c986d92bd
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Tue Apr 27 13:03:24 2021 +0000

    Added Stock Status filter

commit e7bd0e6e1e171a041ac17b8b11abc812585f7645
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 16:53:56 2021 +0400

    Escape statuses for sql query

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit 29c8493aaeb6dca6b3cf5e1954a39564ea304d87
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 16:53:18 2021 +0400

    Allow custom stock statuses

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit 63ecd04bf09a53049bdb10d3919acf6ced7ead8a
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 28 06:22:04 2021 +0000

    Bring back removed css

commit 27e0233cb67f60f650856455a0ff32c6d73c35e3
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Tue Jul 27 23:35:15 2021 +0400

    Update assets/js/blocks/stock-filter/block.js

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit 136c32ddd3f485be5aeab274c675743a235a8c25
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Thu Jul 15 06:50:06 2021 +0000

    Fixed preview part for stock and attribute filters

commit ef89751b634bf223f065067f47f726b662d75ef3
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 20:15:05 2021 +0400

    Update index.js

commit a63dbcef7058ffd858a71931b6fc2ead0583ae03
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:43:06 2021 +0000

    Review suggestion changes

commit 6b0f5d2206d010c1822ab7eaf4edea9a0b79526d
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:40:52 2021 +0000

    Linter fix

commit 791b38b31782367864e1bb8f26716b7fef0e63a8
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:37:41 2021 +0000

    Removed hideOutOfStock from AllProducts and realized hide out of stock functionality from SQL query

commit 1a7a002d5eac271c6f2331e3e66411f3127282b1
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:21:51 2021 +0000

    Created new component for Filters elements labels

commit d9b7fae24d4235a0f8f424e7e74cd250e62bc897
Author: aaron <aaron.yor@gmail.com>
Date:   Wed Jun 2 11:57:06 2021 +0400

    Fix label includ path

commit 5311584362dca4c6e5a91de5fdfbff29297799ea
Merge: 92a0da3f 1b87589f
Author: aaron <aaron.yor@gmail.com>
Date:   Wed Jun 2 11:52:48 2021 +0400

    Merge remote-tracking branch 'core/trunk' into add/stock-filter

    # Conflicts:
    #	package-lock.json

commit d8e6dabaa3282855c6c91c908d6a1443ea9732f1
Merge: 583113e3 2b695215
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Apr 30 12:28:09 2021 +0400

    Merge pull request woocommerce/woocommerce-blocks#1 from woocommerce/trunk

    Fork update

commit 92a0da3f8c37aa46ce2330cb8095ab7077d01555
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 14:09:28 2021 +0000

    Coped package-lock.json from trunk

commit ae0d12b57a5be6f1a39577404c017174489345f8
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 14:00:32 2021 +0000

    Reverted package-lock.json ( downgraded node version to 12 )

commit 5e0c7f9fe36bc9358743b7af7d9e47ce66f8ac08
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 11:12:45 2021 +0000

    Pre pull request clean up code

commit 105b3f75a2b42f12f6924091f51bfa91c84b4984
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Tue Apr 27 13:03:24 2021 +0000

    Added Stock Status filter
2021-08-20 16:07:14 +01:00
Thomas Roberts 8f2bc114a4 Revert "Add "Filter Products by Stock" block (https://github.com/woocommerce/woocommerce-blocks/pull/4145)"
This reverts commit 44db8317a7.
2021-08-20 16:05:38 +01:00
Thomas Roberts 44db8317a7 Add "Filter Products by Stock" block (https://github.com/woocommerce/woocommerce-blocks/pull/4145)
commit 4fccfd88998fde20b603d99d9866d3cb08cf7bf4
Merge: 8012b2b4 e7bd0e6e
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 13:17:42 2021 +0000

    Merge from trunk

commit 8012b2b40e95b90e507698de677fba059ca9ef0a
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 16:53:56 2021 +0400

    Escape statuses for sql query

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit 304348aeb5448153ad3365ff09ca37f265af87cc
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 16:53:18 2021 +0400

    Allow custom stock statuses

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit b2f01e4ed6738ef3091afbac7d4131c984b33bc7
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 28 06:22:04 2021 +0000

    Bring back removed css

commit caafffda5de6d3f31b817ab4886847958f693e24
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Tue Jul 27 23:35:15 2021 +0400

    Update assets/js/blocks/stock-filter/block.js

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit ae381de8aa49d0b16d2dabff7b6ecffedc511460
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Thu Jul 15 06:50:06 2021 +0000

    Fixed preview part for stock and attribute filters

commit 7df5feab0a33f93786a29a625c1f27a4737c25bc
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 20:15:05 2021 +0400

    Update index.js

commit af0294ce6a21a0032c7eeb00fe986eddda188574
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:43:06 2021 +0000

    Review suggestion changes

commit 16da25340fd7438e0fedd62b3e8b52bc33b80852
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:40:52 2021 +0000

    Linter fix

commit 594125a68c5c0d854418d5f3e76fb0e18c23b0a4
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:37:41 2021 +0000

    Removed hideOutOfStock from AllProducts and realized hide out of stock functionality from SQL query

commit 94a54e3c7c8cb94323d41a11c6bb603d0648792e
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:21:51 2021 +0000

    Created new component for Filters elements labels

commit e3d7fb2aad4b123693f0104c2ffd9af2a1273900
Author: aaron <aaron.yor@gmail.com>
Date:   Wed Jun 2 11:57:06 2021 +0400

    Fix label includ path

commit c9e3d02d5bf03614cbfd2d17ec1558dacc3252f1
Author: Seghir Nadir <nadir.seghir@gmail.com>
Date:   Tue Jun 1 09:46:02 2021 +0100

    remove usage of mustBeString (https://github.com/woocommerce/woocommerce-blocks/pull/4294)

commit b8923390e5d5433ef2c8a14891684b907051cd7e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon May 31 16:07:59 2021 +0100

    Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/4290)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 6de68e41e2053a79cdce3e9d820c9b5656072685
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Thu May 27 12:57:49 2021 +0100

    Check if product can be added to cart before adding ajax class to button (https://github.com/woocommerce/woocommerce-blocks/pull/4265)

commit a1ccaf4143dd9cd86f0f88ce956bcf7edb5e419a
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Wed May 26 16:10:43 2021 +0100

    Update version for next release

commit 24f882f5d53776abe2ee6440d68485083b5a8340
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Wed May 26 15:42:21 2021 +0100

    Bumping version strings to new version.

commit e1fd0825b72d7cc87c6f26329359cc39278cc760
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Wed May 26 15:31:37 2021 +0100

    Update link to testing zip

commit 35521e54b756bf265cf6d61437cd5f55629fc2d4
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Wed May 26 14:04:42 2021 +0100

    Fix display of itemised taxes (https://github.com/woocommerce/woocommerce-blocks/pull/4279)

    * Add price to itemised tax rates & hide Total when itemised taxes are on

    * Update snapshots for taxes in sidebar

commit 7f3a1e629f04dcb71d3fb4313b3012aef13feb5f
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 26 08:52:31 2021 +0000

    Update dependency downshift to v6.1.3 (https://github.com/woocommerce/woocommerce-blocks/pull/4272)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 593ef2b07f71341b3d0fc143876c24a4d50a64fb
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 26 05:04:55 2021 +0000

    Update dependency @types/react to v16.14.8 (https://github.com/woocommerce/woocommerce-blocks/pull/4270)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 21f16d6d4ef10ada3f1631f72b4fb7dec1f4af72
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 26 03:47:54 2021 +0000

    Update dependency @woocommerce/e2e-utils to v0.1.5 (https://github.com/woocommerce/woocommerce-blocks/pull/4271)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 444256ea70c8b9ac89b4f4d5913396da9f4334cd
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 26 02:30:17 2021 +0000

    Update dependency @types/lodash to v4.14.170 (https://github.com/woocommerce/woocommerce-blocks/pull/4269)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 5f9df572aed0b07606c7a4e5b684122a48862f94
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Tue May 25 15:31:03 2021 +0100

    Create 5.2.0 testing notes

commit 45abda651a668ddc4b1d36e8c76cf19d365d94c8
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Tue May 25 14:52:37 2021 +0100

    Update package.json

    npm ci was not working correctly this will fix it.

commit c3daa6ce4c71b956e08200442626a0e29a3e5daf
Author: Thomas Roberts <thomas.roberts@automattic.com>
Date:   Tue May 25 14:26:32 2021 +0100

    Update changelog and WC tested up to

commit 61283092b32425450f4450d5224e156d24aa38ba
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Thu May 20 17:56:56 2021 +0100

    Revert "Move `TextInput` to checkout package and allow it to be used for input type=number (https://github.com/woocommerce/woocommerce-blocks/pull/4238)"

    This reverts commit ee9b2d20e0.

commit 193267b041e8e0fb9fe89bb68ad972b1f5b4b941
Author: Mike Jolley <mike.jolley@me.com>
Date:   Tue May 25 12:49:13 2021 +0100

    Add key to each `CartTotalItem` (https://github.com/woocommerce/woocommerce-blocks/pull/4240)

    * Move type defs

    * Move type guards

    * Fix imports

    * Extract prepareTotalItems to TS file

    * usePaymentMethodInterface as TS file

    * Fix TS props

    * Fix currency type defs

    * Add return type to usePaymentMethodInterface

    * Add key prop to CartTotalItem

    * Fixed up js tests

    * Move SymbolPosition into type-defs package

    Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>

commit c15e5123e47952f445fe159522f72cef290c9276
Author: Seghir Nadir <nadir.seghir@gmail.com>
Date:   Tue May 25 10:46:28 2021 +0100

    Fix duplicate plugins by using wp.components global in the editor. (https://github.com/woocommerce/woocommerce-blocks/pull/4211)

    * fix duplicate slotProvider

    * load file on demand

    * add comment and load components in blocks as well

    * add todo block

commit e2cf0baad0ee91f892a1cb1919ad0edbab0122c3
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Tue May 25 08:43:46 2021 +0100

    Hide "including X in taxes" when the amount of tax is 0 (https://github.com/woocommerce/woocommerce-blocks/pull/4262)

    * Hide "including x in taxes" if tax amount is 0

    * Add jest types to tsconfig

    * Move SHOW_TAXES into component body

    This is to make the code more testable and allows us to change values. There's no significant performance impact because of this change.

    * Add tests and snapshots for TotalsFooterItem

commit 9b44c884fc68d81d6211f40f13409fac8503c2e3
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon May 24 18:14:37 2021 +0100

    Update dependency @octokit/graphql to v4.6.2 (https://github.com/woocommerce/woocommerce-blocks/pull/4230)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 4973132a90ddc88e075d6d421c8677cf032c3264
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon May 24 16:40:05 2021 +0100

    Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/4253)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit b7eabf54bad4b7e08c7f4ef1484f7fea7ab64f20
Author: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>
Date:   Fri May 21 09:53:46 2021 +0200

    Block Widgets: hide legacy widgets with a feature-complete block equivalent (https://github.com/woocommerce/woocommerce-blocks/pull/4237)

    * Block Widgets: hide legacy widgets with block equivalent

    * Unhide Products and Products by Rating widgets

commit 47556b9a39125423409dea8a3ae8c8ac34396fc0
Author: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>
Date:   Fri May 21 09:52:27 2021 +0200

    Block Widgets: hide All Products and Filter blocks in the Customizer (https://github.com/woocommerce/woocommerce-blocks/pull/4225)

commit 208b21281763652bdcddb7390dfe955bddff4728
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Thu May 20 17:56:56 2021 +0100

    Move `TextInput` to checkout package and allow it to be used for input type=number (https://github.com/woocommerce/woocommerce-blocks/pull/4238)

    * Move text-input to checkout package

    * Pass validation props directly to ValidatedTextInput

    * Import label relatively instead of from package

    * Pass validation functions to ValidatedTextInput

    This is so it doesn't need to get them from useValidationContext.

    * Add InputProps to ValidatedTextInput

    This will be used to control additional props on the input element of TextInput

    * Spread inputProps onto <input> element of TextInput

    * Export TextInput from @woocommerce/blocks-checkout

    * Add @woocommerce/blocks-checkout package to tsconfig

    * Allow styling to be applied to number inputs and when value is 0

    * Make style order consistent

    * Remove inputProps to rely on rest in TextInput

    * Add specific prop for the inputErrorComponent

    * Only disallow active state if value is 0 AND type is number

    * Change all uses of ValidatedTextInput to also pass inputErrorComponent

    * Revert "Change all uses of ValidatedTextInput to also pass inputErrorComponent"

    This reverts commit ec734b99c20c4d29fcf778714246fc406ee37eaf.

    * Revert "Remove inputProps to rely on rest in TextInput"

    This reverts commit 1fc64cca4002206423d1fa443ff2d60130ba1ea0.

    * Revert "Revert "Change all uses of ValidatedTextInput to also pass inputErrorComponent""

    This reverts commit 110e3606a996668be5a32698b634b7706d16cddc.

    * Revert "Revert "Remove inputProps to rely on rest in TextInput""

    This reverts commit aeb03526c44b3fcc97a719a18930d08157a80baf.

    * Don't pass errorMessage to ValidatedTextInput

commit 55f5bfd8cd720022380de1e811e8d1abb622209b
Author: Mike Jolley <mike.jolley@me.com>
Date:   Thu May 20 15:07:12 2021 +0100

    Create LICENSE (https://github.com/woocommerce/woocommerce-blocks/pull/4235)

commit 0b10f75ddf3d01c837f466f9d3f85dbc760b3d7b
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date:   Thu May 20 10:58:59 2021 +0200

    Update @woocommerce/components (https://github.com/woocommerce/woocommerce-blocks/pull/4100)

    * Add isCompact prop to components using SearchListControl

    * Update @woocommerce/components to 6.1.2

    * Remove legacy CSS code

    * Add some CSS rules to override conflicting editor styles

    * Replace showCount prop with has-count class name

    * Create ExpandableSearchListItem component

    * Refactor ProductControl so it uses ExpandableSearchListItem

    * Update @woocommerce/components to 6.2.0

    * Fix @woocommerce/components builds breaking

    * Fix a11y of expandable item list children

    * Set categories to an empty array by default

    * Render compact control in Attribute filter sidebar

    * Add countLabel to ProductAttributeTermControl

    * Fix ProductTagControl selected items

    * Use sentence case for countLabel

    * Fix wrong margins in block editor

    * Fix checkbox alignment

    * Update package-lock.json

    * Fix withCategories test

    * Fix JS error in Filter Products by Attribute block

    * Make input ids unique

commit 587be17d62db7b956c980fac4766456511243e10
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Wed May 19 10:55:15 2021 +0100

    Convert TextInput and ValidatedTextInput to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/4226)

    * Change index file from base/context to .ts

    This is to stop TS complaining when importing things from here.

    * Convert ValidatedTextInput to TypeScript

    * Convert TextInput to TypeScript

    * Ensure Label accepts correct HTML Attributes Props

    * Remove PropTypes from TextInput and ValidatedTextInput

    No longer needed because of TypeScript

    * Use correct error id to show validation message

    * Use HTMLElement instead of a specific element type for LabelProps

    * Update assets/js/base/components/text-input/validated-text-input.tsx

    Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

    * Update assets/js/base/components/text-input/validated-text-input.tsx

    * Use correct formatting in ValidatedTextInput

    Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

commit 731c75e03100695131b4ec6afa8994e6cf9f4c00
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 07:36:46 2021 +0000

    Update dependency @testing-library/react-hooks to v5.1.3 (https://github.com/woocommerce/woocommerce-blocks/pull/4233)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit ef6ad8882310dff6d1aa4ae847289acddc0dfebb
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 04:36:44 2021 +0000

    Update dependency @types/lodash to v4.14.169 (https://github.com/woocommerce/woocommerce-blocks/pull/4234)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 096463ea4bf1bddc7d61e1b04320886ee2f21770
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 03:46:21 2021 +0000

    Update dependency @testing-library/react to v11.2.7 (https://github.com/woocommerce/woocommerce-blocks/pull/4232)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 8722839350e6725ea80da994bb8387966b75061c
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 02:48:45 2021 +0000

    Update dependency @stripe/react-stripe-js to v1.4.1 (https://github.com/woocommerce/woocommerce-blocks/pull/4231)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 2f7e8edfebff59eeeeeb18d65fd658d5f432419e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 19 01:32:34 2021 +0000

    Pin dependency @types/wordpress__deprecated to 2.4.2 (https://github.com/woocommerce/woocommerce-blocks/pull/4229)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 72e851a28c88653204ed8e4eff10c6bb2cb40c68
Author: Raluca Stan <raluca.stan@automattic.com>
Date:   Tue May 18 15:09:30 2021 +0200

    Fix e2e checkout tests and adjust jest setup (https://github.com/woocommerce/woocommerce-blocks/pull/4216)

    * Fix checkout test
    - make tests independent & test also for empty cart case
    - make sure the Order summary is expanded with a better selector
    * Remove unnecessary localStorage operations from tests
    * Go to cart page before removing an item from cart
    * Remove logging observing before tests
    This removes unnecessary console.log interception. A big part of the logic was done for Puppeteer 1.6.1, but since 3.0.0 message.text() returns string. We allow console.error messages to surface in our tests. Although they don't cause the test to fail it might be a good addition for debugging purposes.

commit 7b7119cfb0cfce5e1718804ca590a6b161d555f2
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue May 18 11:27:27 2021 +0100

    Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/4212)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 5f84e7dabbc788b769646a9bcba5a15a57b03e33
Author: Mike Jolley <mike.jolley@me.com>
Date:   Tue May 18 10:37:31 2021 +0100

    Convert checkout state context provider to Typescript (https://github.com/woocommerce/woocommerce-blocks/pull/4200)

    * git move to ts files

    * Type the checkout state provider

    * Restore for loop for error handling

    * Types not needed

    * Consolodate response handling

    * Unused import

    * Fix defaults for onCheckoutAfterProcessingWithSuccess etc

    * Type useEmitResponse and remove isObject checks

    * useEmitResponse as const

    * Check that redirectUrl is string

    * Define actions as const

    * data.redirectUrl should be truthy

    * Add redirectURL todo item as followup

    * remove null fallback

commit fccc72bedb0f320995f62ee5d91b1c8e2e9c2fa1
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Tue May 18 09:10:31 2021 +0100

    Move Button and Label components to `@woocommerce/blocks-checkout` package (https://github.com/woocommerce/woocommerce-blocks/pull/4222)

    * Move Button to checkout package

    * Move Label to Components Package

commit 0b91fbeac282f729dbc8e8056d2e934392f401c0
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Mon May 17 15:00:57 2021 +0100

    Update design of cart and checkout sidebars (https://github.com/woocommerce/woocommerce-blocks/pull/4180)

    * Update cart/coupon/shipping design

    * Add order summary heading

    * Move and style discounts on checkout sidebar

    * Add rate to tax lines

    * Ensure the option to display taxes itemised is available to Cart block

    * Output individual tax items below the total & add styles for this

    * Add success notice under coupon input on successful coupon addition

    * Add border to bottom of Totals footer

    * Show success message when adding coupon

    * Add padding to cart item rows

    * Add preview data to cart for when taxes are enabled

    * Add rate to cart response type

    * Add showRateAfterTaxName attribute to Cart block

    * Add control to cart block to show rate percentage after rate name

    * Add rate % in cart totals only if option is toggled on

    * Pass showRateAfterTaxName attribute down to TotalsTaxes

    * Add showRateAfterTaxName to Checkout block

    * Add control to block editor for showRateAfterTaxName on Checkout

    * Pass showRateAfterTaxName down to TotalsTaxes in Checkout

    * Change label for showing tax rates in cart and checkout blocks

    * Add test to ensure Taxes section shows in Cart block

    * Add tests for cart sidebar and rate percentages

    * Remove order summary title from checkout sidebar

    * Check if taxes are enabled before rendering the option to show rate %s

    * Add ShippingVia component to show the selected rate in sidebar

    * Remove value from individual tax rates

    * Remove bold from Shipping via label

    * Remove coupon added successfully message

    * Ensure panel headings that are h2s are the same colour as others

    * Clean up eslint warnings

    * Show rate %s by default

    * Update snapshots following design changes

    Co-authored-by: Mike Jolley <mike.jolley@me.com>

commit 0464883ec668332db5a6399569880e7b3fa3ab3f
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date:   Sun May 16 20:00:06 2021 +0200

    Don't default to fallback in getSetting if value is falsy (https://github.com/woocommerce/woocommerce-blocks/pull/4202)

commit f95f12d3215caf30f1f49e1d29c5826156914a33
Author: Mike Jolley <mike.jolley@me.com>
Date:   Sun May 16 18:59:32 2021 +0100

    Fix es lint warnings (https://github.com/woocommerce/woocommerce-blocks/pull/4206)

    * Un-used PropTypes import

    * Avoid global and use ownerDocument

    * receiveCart return type

    * ignoreRestSiblings when destructuring for @typescript-eslint/no-unused-vars

    * Replace lodash find

    * Use global rather than window

    * Remove lodash map

    * move rule to overrides

commit db589e7e7f4809504b1aa83144116506a50bdd38
Author: Raluca Stan <raluca.stan@automattic.com>
Date:   Sun May 16 19:41:34 2021 +0200

    Fix cart and checkout frontend e2e tests (https://github.com/woocommerce/woocommerce-blocks/pull/4199)

    * Wip: fix e2e fe tests

    * Test that navigation ends

    * Fix waitForNavigation

    * comment out failing php test

    * click the dom element

    * Ensure navigation happens by waiting for it. Test page title.

    * remove skip and update docs

    * Revert "comment out failing php test"

    This reverts commit 7c40e8caf3aa32e35e3b70eb32051251b06e0613.

    * Fix USD from merge conflict

    * Add missing check for page title

    * Try page.waitForFunction for text search

    * test to see checkout page title is correct

    * test checkout page url on CI

    * unde jest config change

    * Fix assertion for checkout page

    * remove extra localStorage item remove call

    Co-authored-by: Mike Jolley <mike.jolley@me.com>
    Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>

commit b9b66f93adb5b0fdc22fc4ed9560eb6e2c1c72d9
Author: Mike Jolley <mike.jolley@me.com>
Date:   Thu May 13 11:49:39 2021 +0100

    Set order status to pending when no payment is needed (https://github.com/woocommerce/woocommerce-blocks/pull/4186)

commit 8ed63f765418ae8e7b2ee58004b4a9b1306eaeef
Author: Mike Jolley <mike.jolley@me.com>
Date:   Thu May 13 11:21:21 2021 +0100

    Remove the need for the `canMakePayment` callback in the editor context (https://github.com/woocommerce/woocommerce-blocks/pull/4188)

    * Force can pay true in editor context

    * Update docs

commit 90499cb3191137264ffde07cf082db8c4d6f77de
Author: Mike Jolley <mike.jolley@me.com>
Date:   Thu May 13 11:20:37 2021 +0100

    Sync customer data during checkout with draft orders. (https://github.com/woocommerce/woocommerce-blocks/pull/4197)

    * Update store when email changes

    * Add pluckEmail helper and convert to TS

    * improve guard

    * sync draft order with customer data

commit a813c931bb5f85f139429aa3bf094b2327a7f8cd
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date:   Thu May 13 12:14:15 2021 +0200

    Set default store currency to USD in tests (https://github.com/woocommerce/woocommerce-blocks/pull/4203)

commit b1408933f75ca47dc39335984bfc1fe570a72aaa
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Thu May 13 10:16:04 2021 +0200

    Update dependency config to v3.3.6 (https://github.com/woocommerce/woocommerce-blocks/pull/4195)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit d68bb11bb56d882f8755162ae6657cad76dfd16f
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Thu May 13 10:15:35 2021 +0200

    Update dependency cssnano to v4.1.11 (https://github.com/woocommerce/woocommerce-blocks/pull/4196)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit beadbab90fe0813c0f36cc25a9e0b14a8f8e96d2
Author: Seghir Nadir <nadir.seghir@gmail.com>
Date:   Wed May 12 13:32:05 2021 +0100

    Add cart data to filters (https://github.com/woocommerce/woocommerce-blocks/pull/4164)

    * add cart data to filters

    * add extensions back to footer filter

commit c10fdf26bc37b1efb6b22d045e3aed72f5541a2a
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 12 13:04:44 2021 +0100

    Pin dependency lodash to 4.17.21 (https://github.com/woocommerce/woocommerce-blocks/pull/4193)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit f92aac55f1a6fd67fba3885311ec74bcdb41034e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 12 13:04:13 2021 +0100

    Update dependency chalk to v4.1.1 (https://github.com/woocommerce/woocommerce-blocks/pull/4194)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 27cff5109889c0abca24124c1dabcb0b78da4929
Author: Mike Jolley <mike.jolley@me.com>
Date:   Wed May 12 13:02:26 2021 +0100

    Should be using value rather than name (https://github.com/woocommerce/woocommerce-blocks/pull/4187)

commit 560972a7eb306b6a27c298b7e3218df92a848e79
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Tue May 11 13:57:02 2021 +0100

    Add checkout filter for coupon names (https://github.com/woocommerce/woocommerce-blocks/pull/4166)

    * Make extensions optional, not all filters will need to pass this through

    For example the CartCouponSchema has no option for extensibility (and I don't think it's needed at any rate) so extensions will always be an empty object. Rather than explicitly specifying this when running the filter, we can let it default to an empty object.

    * Add filter for coupon code

commit 556ceb4b8a222466a73aae1ee0eac545e00802b4
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Tue May 11 11:45:02 2021 +0100

    Check if variation data is iterable before formatting (https://github.com/woocommerce/woocommerce-blocks/pull/4182)

commit 4279db88057e83eff8af077a96eeb19dd247a8d2
Author: Darren Ethier <darren@roughsmootheng.in>
Date:   Mon May 10 11:21:01 2021 -0400

    update package-lock (version change mostly)

commit f71b24ad0f634c2cb8aeac8ae80e0ccd139a4fcd
Author: Darren Ethier <darren@roughsmootheng.in>
Date:   Mon May 10 11:16:58 2021 -0400

    update version string to dev version

commit 7f9c1b2913f9c06f4d755519ef2689c56703a2c0
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Mon May 10 11:14:05 2021 -0400

    Release: 5.1.0 (https://github.com/woocommerce/woocommerce-blocks/pull/4185)

    * Empty commit for release pull request

    * Add changelog

    * update testing notes

    * Bumping version strings to new version.

    Co-authored-by: github-actions <github-actions@github.com>
    Co-authored-by: Darren Ethier <darren@roughsmootheng.in>

commit 80c27354e1eb83d027eb9670aed59885c2097d3d
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon May 10 14:38:04 2021 +0200

    Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/4184)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 90074cf871d8691d0adf5808e59a75b9ace98fa7
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Mon May 10 10:03:30 2021 +0100

    Convert shipping components to typescript (https://github.com/woocommerce/woocommerce-blocks/pull/4135)

    * Add type defs for customer

    Taken from 194ecccf78/assets/js/type-defs/customer.ts

    * Convert ShippingCalculatorAddress to TypeScript

    * Convert ShippingCalculator to TypeScript

    * Convert ShippingLocation to TypeScript

    * Allow packageId to be a number or string in useSelectShippingRate(s)

    * Convert ShippingRatesControl to TypeScript

    * Convert ShippingOptionsStep to TypeScript

    * Allow package_id to be a string or number

    This is because of Subscriptions using strings for package IDs

    * Change to use CartShippingRateItemShippingRate instead of Rate

    * Add extra props to PackageProps type

    * Make ShippingAddress have the correct type

    * Use CartShippingRateItemShippingRate instead of Rate

    * Remove Rate type

    * Set return types to JSX.Element

    * Change type of props.renderOption in ShippingRatesControl

    * Remove customer type defs and relocate aliases to default-address-fields

    * Add EnteredAddress type

    * Import EnteredAddress from new location

    * Remove unnecessary eslint ignore

    * Remove unused variable

    * Remove confusing use of word Item in Shipping types

    * Remove confusing use of word Item in Shipping types

commit 3f1be394d076bdc2a407c05d1fbf290a17c55c43
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date:   Mon May 10 10:00:14 2021 +0200

    Feature gate PaymentApi (https://github.com/woocommerce/woocommerce-blocks/pull/4176)

    * Feature gate PaymentApi

    * Improve payment method missing dependencies error message so it's clear it only affects blocks

    * Add PaymentApi feature flags to list of feature flags in docs

commit ed7eded4d7134d1b69d0fd206cd1315fd9d2d40f
Author: Darren Ethier <darren@roughsmootheng.in>
Date:   Fri May 7 16:39:28 2021 -0400

    Improvements to `emitEventWithAbort`. (https://github.com/woocommerce/woocommerce-blocks/pull/4158)

    * modify emitEventWithAbort to change return value

    `emitEventWithAbort` now returns an array of responses up to the first response that triggered an error or fail response instead of aborting on success responses too.

    * update add to cart form context provider

    * update checkout state context provider

    * update payment method data context provider

    * update tests and fix thrown error handling.

commit 2be9a4ea4405d5df427f4e97025aa5433019b72f
Author: Raluca Stan <raluca.stan@automattic.com>
Date:   Fri May 7 15:50:55 2021 +0200

    Add lodash as a devDependency (https://github.com/woocommerce/woocommerce-blocks/pull/4179)

commit 69b3679a7e585abc8a5068df3bd2457714149939
Author: Seghir Nadir <nadir.seghir@gmail.com>
Date:   Wed May 5 12:59:30 2021 +0100

    Don't clear email and phone fields when using separate billing address. (https://github.com/woocommerce/woocommerce-blocks/pull/4162)

    * preseve-billing-data

    * pluck empty email and phone

    * add issue number

commit 214014750c0a1414e89ce47d84754d278e5a164f
Author: Raluca Stan <raluca.stan@automattic.com>
Date:   Wed May 5 13:52:27 2021 +0200

    Fix/cart backend test (https://github.com/woocommerce/woocommerce-blocks/pull/4153)

    * Fix backend cart e2e test

    * Adjust test structure

    * Fix e2e checkout backend test.

    Make sure the confirmation window is closed

commit f8d9b9084c091f97b281f58a64f98622765a80e3
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 5 10:08:45 2021 +0000

    Update dependency @stripe/stripe-js to v1.14.0 (https://github.com/woocommerce/woocommerce-blocks/pull/4170)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 2391a40ab24439b14f56d1d6416beaf0c2d94c53
Author: Thomas Roberts <5656702+opr@users.noreply.github.com>
Date:   Wed May 5 10:41:48 2021 +0100

    Add documentation for filters (https://github.com/woocommerce/woocommerce-blocks/pull/4167)

    * Rename the argument in the CheckoutFilterFunction type

    This only exists as an extra descriptive hint to anyone using this type, the value `label` was never used by anything so it does not need to be changed anywhere else.

    * Create Available Filters document

    * Add available filters to the extensibility README

    * Update docs/extensibility/available-filters.md to fix typographical error

    Co-authored-by: Mike Jolley <mike.jolley@me.com>

    Co-authored-by: Mike Jolley <mike.jolley@me.com>

commit f4af89b2fce203c4f173845244724f58669a04f9
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 5 08:10:24 2021 +0000

    Update dependency @woocommerce/e2e-utils to v0.1.4 (https://github.com/woocommerce/woocommerce-blocks/pull/4172)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 6c9e786c407fd1bd6861bde3b435cec0663b8399
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 5 03:31:52 2021 +0000

    Update dependency @types/react to v16.14.6 (https://github.com/woocommerce/woocommerce-blocks/pull/4171)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 3ba4d9ed6a46f3700a7190d09eff2ba53d1bcb60
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed May 5 02:23:13 2021 +0000

    Update babel monorepo (https://github.com/woocommerce/woocommerce-blocks/pull/4169)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 35f71df36f92028cfb880e314623b33c077a384d
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue May 4 14:07:05 2021 +0100

    Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/4163)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 4c65211b375e40691aeea7273eec34f3f54a0b3b
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 14:09:28 2021 +0000

    Coped package-lock.json from trunk

commit 703cb65efb8fd4ced58234d5174dc198e225e07a
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 14:00:32 2021 +0000

    Reverted package-lock.json ( downgraded node version to 12 )

commit 41dfd79715d4b4f1e5cebd0e7dccfc1573ba4d36
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 11:12:45 2021 +0000

    Pre pull request clean up code

commit 75fc62e99ed63389c158352b73ae898c986d92bd
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Tue Apr 27 13:03:24 2021 +0000

    Added Stock Status filter

commit e7bd0e6e1e171a041ac17b8b11abc812585f7645
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 16:53:56 2021 +0400

    Escape statuses for sql query

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit 29c8493aaeb6dca6b3cf5e1954a39564ea304d87
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Aug 20 16:53:18 2021 +0400

    Allow custom stock statuses

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit 63ecd04bf09a53049bdb10d3919acf6ced7ead8a
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 28 06:22:04 2021 +0000

    Bring back removed css

commit 27e0233cb67f60f650856455a0ff32c6d73c35e3
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Tue Jul 27 23:35:15 2021 +0400

    Update assets/js/blocks/stock-filter/block.js

    Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

commit 136c32ddd3f485be5aeab274c675743a235a8c25
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Thu Jul 15 06:50:06 2021 +0000

    Fixed preview part for stock and attribute filters

commit ef89751b634bf223f065067f47f726b662d75ef3
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 20:15:05 2021 +0400

    Update index.js

commit a63dbcef7058ffd858a71931b6fc2ead0583ae03
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:43:06 2021 +0000

    Review suggestion changes

commit 6b0f5d2206d010c1822ab7eaf4edea9a0b79526d
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:40:52 2021 +0000

    Linter fix

commit 791b38b31782367864e1bb8f26716b7fef0e63a8
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:37:41 2021 +0000

    Removed hideOutOfStock from AllProducts and realized hide out of stock functionality from SQL query

commit 1a7a002d5eac271c6f2331e3e66411f3127282b1
Author: groguo <eriktadevosyan07@gmail.com>
Date:   Wed Jul 14 15:21:51 2021 +0000

    Created new component for Filters elements labels

commit d9b7fae24d4235a0f8f424e7e74cd250e62bc897
Author: aaron <aaron.yor@gmail.com>
Date:   Wed Jun 2 11:57:06 2021 +0400

    Fix label includ path

commit 5311584362dca4c6e5a91de5fdfbff29297799ea
Merge: 92a0da3f 1b87589f
Author: aaron <aaron.yor@gmail.com>
Date:   Wed Jun 2 11:52:48 2021 +0400

    Merge remote-tracking branch 'core/trunk' into add/stock-filter

    # Conflicts:
    #	package-lock.json

commit d8e6dabaa3282855c6c91c908d6a1443ea9732f1
Merge: 583113e3 2b695215
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Fri Apr 30 12:28:09 2021 +0400

    Merge pull request woocommerce/woocommerce-blocks#1 from woocommerce/trunk

    Fork update

commit 92a0da3f8c37aa46ce2330cb8095ab7077d01555
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 14:09:28 2021 +0000

    Coped package-lock.json from trunk

commit ae0d12b57a5be6f1a39577404c017174489345f8
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 14:00:32 2021 +0000

    Reverted package-lock.json ( downgraded node version to 12 )

commit 5e0c7f9fe36bc9358743b7af7d9e47ce66f8ac08
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Wed Apr 28 11:12:45 2021 +0000

    Pre pull request clean up code

commit 105b3f75a2b42f12f6924091f51bfa91c84b4984
Author: grogou <eriktadevosyan07@gmail.com>
Date:   Tue Apr 27 13:03:24 2021 +0000

    Added Stock Status filter
2021-08-20 15:49:11 +01:00
Mike Jolley 1d79bb6365 PHPUnit Tests running on wp-env (https://github.com/woocommerce/woocommerce-blocks/pull/4567)
* Tidy up bootstap so it uses autoloaders and works with the known plugin paths

* eslint ignore woocommerce bin

* Use WC from bin in wp-env

* Git ignore woocommerce in bin

* Remove reliance on core framework across phpunit tests

* Simplify bootstrap - since test framework is no longer required, there is no need to pull in woo from github

* Remove unused configs

* Update CI

* Implement PHPunit Polyfill

* Abstract the test case

* Update lock

* remove chown

* experiment: try sudo

* move phpversion to first run

* Remove 7.0 tests :(

* test plugin override for 5.5 test

* Use dev version

* Fix formatting

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2021-08-20 14:58:32 +01:00
Raluca Stan 7805ea63db Add Extensibility info to Store API readme (https://github.com/woocommerce/woocommerce-blocks/pull/4605)
* Add Extensibility info to Store API readme

* Update src/StoreApi/README.md

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2021-08-20 07:58:44 -04:00
Thomas Roberts b403872300 Replace new lines with empty strings when outputting catgeory list (https://github.com/woocommerce/woocommerce-blocks/pull/4587)
* Replace new lines with empty strings when outputting catgeory list

This is because br tags are being added because of linebreaks in the string. If we replace the linebreaks with empty strings they won't be converted into br elements.

* Add parentheses around product count

* Remove spaces from around title

* Remove parentheses from product count
2021-08-20 07:57:58 -04:00
Mike Jolley 22e1560c89 update to dev version 2021-08-17 14:17:27 +01:00
github-actions[bot] 04d54915fd Release: 5.7.0 (https://github.com/woocommerce/woocommerce-blocks/pull/4584)
* Empty commit for release pull request

* Update changelog

* Supported versions

* Add testing notes

* Add padding in 2020 and 2021

* add todo

* Combobox patch

* Update a package to invalidate CI cache

* Update cache handling

* revert eslint package change

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2021-08-17 14:10:09 +01:00
Albert Juhé Lluveras ff9c73bec5 Implement memoization in several selectors and hooks (https://github.com/woocommerce/woocommerce-blocks/pull/4548)
* Memoize cartErrors from useStoreCart

* Implement memoization to other selectors

* Use EMPTY_ARRAY in more cases

* Create getArrayOrEmptyConstant function

* Remove DEFAULT_EMPTY_ARRAY constant and use EMPTY_ARRAY instead

* Wrap removeItem into useCallback

* Fix tests

* Do not default to empty array/object for values that should exist and use different constant for empty values

* Type two empty array constants from default-states.ts
2021-08-13 15:28:41 +02:00
NekoJonez 162739d4f7 Delete unneeded double spaces in text strings (https://github.com/woocommerce/woocommerce-blocks/pull/4569)
Deleted an unneeded double space in a string on line 271.
2021-08-13 12:10:44 +02:00
Mike Jolley a7d7ea32bb Fix unfiltered html usage of blocks (https://github.com/woocommerce/woocommerce-blocks/pull/4551)
* SSR search

* deprecation handling for search

* Update snaps

* Fix duplicate class and align class property
2021-08-12 17:39:38 +01:00
Albert Juhé Lluveras 1103716389 Bump version to 5.7.0-dev 2021-08-02 16:50:40 +02:00
github-actions[bot] 23bf14ea3a Release: 5.6.0 (https://github.com/woocommerce/woocommerce-blocks/pull/4529)
* Empty commit for release pull request

* Add 5.6.0 changelog

* Add 5.6.0 testing notes

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2021-08-02 16:48:10 +02:00
Darren Ethier 5ebbd41220 Update relevant files due to L2->L0 policy change for minimum required versions. (https://github.com/woocommerce/woocommerce-blocks/pull/4484)
* update README files with version requirements

* update phpcs config

* update default environment for tests locally

* update workflows to only test against versions matching new policy

* update plugin header for new version policy

* restore older WP version support in E2E tests and PHPCS

I realized that we might still want to test against L2 WP versions in our E2E tests until those tests can be moved to WC core. While the feature plugin is L0, we still need to support L2 for existing features that are already surfaced in the WooCommerce plugin package.

Also with PHPCS if there are fixes to older things in the codebase, we will need to preserve the usage of L2 friendly (back-compat) code.

* add detection of Woo Core version to bootstrap

* update version used in phpunit tests

* add links to version policy update post

* restore 5.5.1 for Woo Core version

Getting errors with 5.5.2 - not sure what's going on but might be the tag isn't available as expected for 5.5.2 maybe?

* switch to hardcoded version header reference

PHPUNIT was tripping on this for some reason.

* remove older WP version e2e test workflows

* fix phpunit tests for new woo test suite

Woo Core now uses a container and has some mocks that are used in some legacy test helpers.

* remove explicit set WOO_VERSION for phpunit tests.

This should default to latest for the GH workflow runs.

* Update release PR template.

Add some explicit instructions around updating required WP and WC versions at time of release.

* use latest WOO_VERSION in .env

* some improvements to reduce the things needing updated

* remove extraneous code

* Add some more checklist items to release PR templates

* remove unnecessary conditional

* remove is-dismissible css classes

* Improve clarity of error messaging

* Update README.md

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

* remove checklist items about versions for patch releases

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2021-07-29 10:52:34 -04:00
Albert Juhé Lluveras 6afe5a8600 Add missing class to Cart skeleton title (https://github.com/woocommerce/woocommerce-blocks/pull/4498) 2021-07-27 12:47:20 +02:00
Raluca Stan 8781266573 Fix Store api cart links (https://github.com/woocommerce/woocommerce-blocks/pull/4460) 2021-07-27 10:15:36 +02:00
Mike Jolley 14e9a33e97 initialize checkout alongside checkout-i2 (https://github.com/woocommerce/woocommerce-blocks/pull/4503) 2021-07-23 15:08:15 +01:00
Mike Jolley f78da3c355 WIP - Checkout i2 Feature Branch Tracking (https://github.com/woocommerce/woocommerce-blocks/pull/4268)
* Duplicate checkout block

* Contact information block

* form step block

* shipping address block

* Setup atomic blocks

* Container structure

* More formal steps rather than generic form step

* Add billing and shipping forms

* add checkout actions block

* add order note block

* Add order summary

* add payment block

* Add inspector controls for address fields

* frontend WIP

* move attributes

* wrap shipping with form step

* PhoneNumber to typescript

* Remove column block

* form steps

* move payment logic to frontend

* Express block

* inline payment block

* Add shipping method block

* Render inner blocks (not standalone blocks) and add classes to Atomic Block list on php side

* lazy again

* Add more wrappers from old frontend file

* add layout

* Checkout wrappers were missing

* Enqueue payment methods for new block

* Add missing classnames

* Move shipping as billing state to context provider

* express payments rendering

* try/block-registry

* Remove atomic components (unused)

* Fix attribute persistance due to template locking

* Fix shipping display when not needed

* Set correct parent blocks for inner blocks

* pass data to blocks

* demo/newsletter

* Skeleton styling

* only apply styles to loading state for now

* shipping method block frontend

* rename express block

* lock template

* fix ts warning for __webpack_public_path__

* Refactor to avoid duplicating atomic block logic

* remove changes in save method

* Add zones and shipping methods to the sidebar for the shipping inner block

Closes woocommerce/woocommerce-blocks#4320

* Fix script handles

* Fix method display when there are none

* Add shipping phone

* Add phone to api and sync with billing correctly

* Clear hidden fields on load

* fix requirePhoneField property

* Enable shipping and billing phone fields

* readonly field support

* Handle context attributes

* Fix createInterpolateElement usage

* add totalswrapper

* Implement Terms and Conditions block for Checkout i2  (https://github.com/woocommerce/woocommerce-blocks/pull/4436)

* Setup atomic blocks

* frontend WIP

* Express block

* try/block-registry

* Set correct parent blocks for inner blocks

* Skeleton styling

* Refactor to avoid duplicating atomic block logic

* add block locking

* add terms and conditions block

* hardcore settings image

* lock blocks from being deleted

* hide original checkout block

* mark blocks as side effectful

* move variations to block register function

* prevent core checkout blocks from needlessly showing in the inserter

* enable checkout i1

* fix broken rebase

* move save back

* Localise default text

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Add add-hoc Block locking from WooCommerce Blocks side. (https://github.com/woocommerce/woocommerce-blocks/pull/4454)

* add locking

* use subscribe instead

* fix condition

* add locking to blocks

* check if the item is not a text field

* Tidy up hacks CSS class handling

* Fix error if node is undefined

* Hide menu when move is disabled

* update package lock

* Add todo and fix issue where selector returns null

* split todos

* move todo

* edit comment

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Un-disable the billing checkbox in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/4457)

* Add missing Slot fill provider on frontend

Fixes woocommerce/woocommerce-blocks#4441 by adding the slot fill provider to the checkout-i2 block.

* Use column style appender

* Add padding/styles to actions

* Add/update icon library

* Multiline checkbox alignment

* Icons and copy changes for i2 blocks

* Add terms by default

* Add notice if text is missing links (https://github.com/woocommerce/woocommerce-blocks/pull/4466)

* Swap variations for toggle

* Add payment settings to inspector

* Update package lock

* Add inline docs to block registry

* Add inner block areas below each form step.

This does not include the form step contents, just adds inner blocks after existing content. Moving content within the inner block area is a separate discussion.

This closes woocommerce/woocommerce-blocks#4306

* Sample block registration + docs

* Add tests for registerCheckoutBlock

* Fix lazy component detection in tests

* Add basic transform between i1 and i2

* remove template lock todo

* Update scroll to top hoc

* Move shared settings to new context providers

Closes woocommerce/woocommerce-blocks#4472

* Remove readonly field support (unused)

* Remove context code

* Experimental

* remove invalid typedef

* FIx scrolling on validation due to misplaced context provider

* Update assets/js/base/context/providers/cart-checkout/checkout-state/index.tsx

Co-authored-by: Darren Ethier <darren@roughsmootheng.in>

* Update comment to remove reference to phone

* Update packages/checkout/blocks-registry/README.md

Co-authored-by: Darren Ethier <darren@roughsmootheng.in>

* Rename ScrollToTopComponent

* Add explicit list of expectedType in TypeScript definition

* Add todo to remove custom shipping phone handling

* Remove dangerouslySetInnerHTML in External Link Card Component

* Add ExternalLinkCard to storybook

* update todo wording

* Refactor withScrollToTop to remove useCallback and use typescript

* Support children on CheckboxControl, with added Typescript

* Spread getRegisteredBlocks return value

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
2021-07-22 12:03:00 +01:00
Mike Jolley 844975fcd0 Fix SKU search in the Store API (https://github.com/woocommerce/woocommerce-blocks/pull/4469)
* Fix Product Search (by SKU) functionality. This was not being executed.

* Add unit test to confirm searching by SKU is functional
2021-07-20 16:31:18 +01:00
Darren Ethier e0053afd6a Merge pull request from GHSA-6hq4-w6wv-8wrp 2021-07-14 16:55:12 -04:00
Seghir Nadir 2f440bbe20 Move SlotFillProvider to frontend only (https://github.com/woocommerce/woocommerce-blocks/pull/4437)
* Move SlotFillProvider to frontend only

* remove extra config for editor scripts

* update tests
2021-07-08 16:04:13 +01:00
Michael P. Pfeiffer ae1bde3481 Update version to 5.6.0-dev 2021-07-06 10:19:21 +02:00
github-actions[bot] c454c3f759 Release: 5.5.0 (https://github.com/woocommerce/woocommerce-blocks/pull/4425)
* Empty commit for release pull request

* Update readme.txt with the changelog for 5.5.0

* Add testing notes

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Michael P. Pfeiffer <michael@cssconf.eu>
2021-07-06 10:04:46 +02:00
VoHoTv f3e798d7dd Fix filtering by product type on Store API (https://github.com/woocommerce/woocommerce-blocks/pull/4422)
* Fixed $tax_query being set to an empty array

* Remove whitespace causing PHP coding standards test to fail

* Cleanup: add line break

Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>
2021-07-05 09:48:34 +01:00
Mike Jolley 686a6f4ece Audit and Move Image Assets, update error state (https://github.com/woocommerce/woocommerce-blocks/pull/4389)
* Remove avatar.jpg

* Inline grid block preview svg

* Replace spilled icecream error icon with generic icon

* Inline single product block preview

* Improve block error styling and icon

* Move payment method icons

* Replace WC_BLOCKS_ASSET_URL usage

* Remove unused images

* update snaps
2021-06-29 15:04:24 +01:00
Nadir Seghir 875b164327 udpate version 2021-06-25 12:11:43 +01:00
github-actions[bot] 6f05e45622 Release: 5.4.0 (https://github.com/woocommerce/woocommerce-blocks/pull/4381)
* add changelog

* add testing notes

* Bumping version strings to new version.

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2021-06-25 12:08:53 +01:00
Seghir Nadir e033cb0aea Add ExtendRestAPI and SlotFills docs (https://github.com/woocommerce/woocommerce-blocks/pull/4208)
* add extend docs

* add slotFill docs

* Update docs/extensibility/available-endpoints-to-extend.md

Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>

* Update docs/extensibility/available-endpoints-to-extend.md

Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>

* Update docs/extensibility/available-endpoints-to-extend.md

Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Allen Smith <loranallensmith@gmail.com>

* Apply suggestions from code review

Co-authored-by: Darren Ethier <darren@roughsmootheng.in>

* add feedback to extend-rest-api-add

* Fix naming

* add disclaimer about feature gating

* add links to readme

Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>
Co-authored-by: Allen Smith <loranallensmith@gmail.com>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
2021-06-18 23:32:19 +01:00
Albert Juhé Lluveras 4918bc40c0 Update version to 5.4.0-dev 2021-06-15 11:48:17 +02:00
Albert Juhé Lluveras 370c888700 Load woocommerce.css in Site editor (https://github.com/woocommerce/woocommerce-blocks/pull/4345) 2021-06-15 07:33:31 +02:00
Mike Jolley 44b2003ec5 Document and update naming of Block Asset Handles (https://github.com/woocommerce/woocommerce-blocks/pull/4324)
* Document the rules

* Document rules inline

* Typescript support in webpack

* Update webpack config

* Update existing handles

* Name stylesheets same as handles

* prefix vendors and blocks

* Fix script filename
2021-06-09 15:09:42 +01:00
Raluca Stan 39b1ac9e18 Update version to 5.3.0-dev 2021-06-08 12:20:07 +03:00
github-actions[bot] 8c066b6fa3 Release: 5.3.0 (https://github.com/woocommerce/woocommerce-blocks/pull/4318) 2021-06-08 12:07:57 +03:00
Sebastian Volland eac83ffed4 Add an early return to prevent running an invalid SQL query. (https://github.com/woocommerce/woocommerce-blocks/pull/4317) 2021-06-07 13:40:48 +01:00
Thomas Roberts a20f3425b1 Add cart/extensions endpoint to allow third party extensions to process server-side and get a new cart (https://github.com/woocommerce/woocommerce-blocks/pull/4298)
* Move text-input to checkout package

* Add support to TextInput for inputs with type number

* Add ExperimentalDiscountsMeta.Slot to Cart sidebar

* Add extra styles for Button and Panel components

* Add updateCartFromApi util to @woocommerce/blocks-checkout

* Change updateCartFromApi to TypeScript

* Stop passing contexts through the discounts slot fill

* Add CartExtensionsSchema class

* Add CartExtensions Route

* Add register_update_callback and get_update_callback fns

* Add extensionCartUpdate function

* Add applyExtensionCartUpdate action

* Make extensionCartUpdate use batching

* Add ExtensionCartUpdateArgs type definition

* Execute a success/error function after request in extensionCartUpdate

* Remove success and error functions

* Avoid including all schemas in CartExtensionsSchema instantiation

This is achieved by inheriting AbstractSchema and slightly modifying the way in which the latest cart data is returned from this endpoint.

* Update docs for extensionCartUpdate

* Handle errors from extension callbacks

* Throw better errors when incorrect namespace/functions are used

* Add tests for CartExtensions route,  ExtendRestApi update callback registration

* Add dummy get_properties method to CartExtensionsSchema
2021-06-07 12:16:47 +03:00
Albert Juhé Lluveras 3f1caedb9e Hide Cart and Checkout blocks from the widget editor (https://github.com/woocommerce/woocommerce-blocks/pull/4303) 2021-06-03 09:50:12 +02:00
Seghir Nadir cd3242900e add i18n to wcSettings (https://github.com/woocommerce/woocommerce-blocks/pull/4295) 2021-06-02 14:52:15 +01:00
Thomas Roberts 36e8b1e44f Check if product can be added to cart before adding ajax class to button (https://github.com/woocommerce/woocommerce-blocks/pull/4265) 2021-05-27 12:57:49 +01:00
Thomas Roberts 30aff545a2 Bumping version strings to new version. 2021-05-26 15:42:21 +01:00
Seghir Nadir 3b69179cbe Fix duplicate plugins by using wp.components global in the editor. (https://github.com/woocommerce/woocommerce-blocks/pull/4211)
* fix duplicate slotProvider

* load file on demand

* add comment and load components in blocks as well

* add todo block
2021-05-25 10:46:28 +01:00
Michael P. Pfeiffer 297254eaf7 Block Widgets: hide legacy widgets with a feature-complete block equivalent (https://github.com/woocommerce/woocommerce-blocks/pull/4237)
* Block Widgets: hide legacy widgets with block equivalent

* Unhide Products and Products by Rating widgets
2021-05-21 09:53:46 +02:00
Michael P. Pfeiffer cfad13f3a2 Block Widgets: hide All Products and Filter blocks in the Customizer (https://github.com/woocommerce/woocommerce-blocks/pull/4225) 2021-05-21 09:52:27 +02:00
Thomas Roberts 57c5b0c532 Update design of cart and checkout sidebars (https://github.com/woocommerce/woocommerce-blocks/pull/4180)
* Update cart/coupon/shipping design

* Add order summary heading

* Move and style discounts on checkout sidebar

* Add rate to tax lines

* Ensure the option to display taxes itemised is available to Cart block

* Output individual tax items below the total & add styles for this

* Add success notice under coupon input on successful coupon addition

* Add border to bottom of Totals footer

* Show success message when adding coupon

* Add padding to cart item rows

* Add preview data to cart for when taxes are enabled

* Add rate to cart response type

* Add showRateAfterTaxName attribute to Cart block

* Add control to cart block to show rate percentage after rate name

* Add rate % in cart totals only if option is toggled on

* Pass showRateAfterTaxName attribute down to TotalsTaxes

* Add showRateAfterTaxName to Checkout block

* Add control to block editor for showRateAfterTaxName on Checkout

* Pass showRateAfterTaxName down to TotalsTaxes in Checkout

* Change label for showing tax rates in cart and checkout blocks

* Add test to ensure Taxes section shows in Cart block

* Add tests for cart sidebar and rate percentages

* Remove order summary title from checkout sidebar

* Check if taxes are enabled before rendering the option to show rate %s

* Add ShippingVia component to show the selected rate in sidebar

* Remove value from individual tax rates

* Remove bold from Shipping via label

* Remove coupon added successfully message

* Ensure panel headings that are h2s are the same colour as others

* Clean up eslint warnings

* Show rate %s by default

* Update snapshots following design changes

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2021-05-17 15:00:57 +01:00
Mike Jolley d1f55724e6 Set order status to pending when no payment is needed (https://github.com/woocommerce/woocommerce-blocks/pull/4186) 2021-05-13 11:49:39 +01:00
Mike Jolley 87bb095f1f Sync customer data during checkout with draft orders. (https://github.com/woocommerce/woocommerce-blocks/pull/4197)
* Update store when email changes

* Add pluckEmail helper and convert to TS

* improve guard

* sync draft order with customer data
2021-05-13 11:20:37 +01:00
Thomas Roberts f97ee971af Check if variation data is iterable before formatting (https://github.com/woocommerce/woocommerce-blocks/pull/4182) 2021-05-11 11:45:02 +01:00
Darren Ethier fb70016d45 update version string to dev version 2021-05-10 11:16:58 -04:00
github-actions[bot] e3568aa275 Release: 5.1.0 (https://github.com/woocommerce/woocommerce-blocks/pull/4185)
* Empty commit for release pull request

* Add changelog

* update testing notes

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
2021-05-10 11:14:05 -04:00
Albert Juhé Lluveras a25eba0232 Feature gate PaymentApi (https://github.com/woocommerce/woocommerce-blocks/pull/4176)
* Feature gate PaymentApi

* Improve payment method missing dependencies error message so it's clear it only affects blocks

* Add PaymentApi feature flags to list of feature flags in docs
2021-05-10 10:00:14 +02:00