Commit Graph

597 Commits

Author SHA1 Message Date
github-actions[bot] 371f5980bb Release: 8.9.0 (https://github.com/woocommerce/woocommerce-blocks/pull/7596)
* Empty commit for release pull request

* Update readme changelog

* Bump versions

* Bump versions

* Fix the minimum_supported_wp_version

* Update readme.txt

* Add testing instructions

* Change Filter Wrapper to Filter Block

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

* Remove Light from test instructions

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

* Fix version

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

* Remove experimental section

* Improve formatting of instructions

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-11-08 13:30:03 +01:00
Luigi Teschio 190ab45d26 fix markdown linter (https://github.com/woocommerce/woocommerce-blocks/pull/7597) 2022-11-08 10:26:47 +01:00
Alba Rincón bf8ad6e592 Improve formatting of instructions 2022-11-08 09:54:27 +01:00
Alba Rincón 0e5cb3efdd Remove experimental section 2022-11-08 08:42:09 +01:00
Alba Rincón 2770520bb2 Fix version
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-11-08 08:41:32 +01:00
Alba Rincón 9941a26aa0 Remove Light from test instructions
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-11-08 08:41:15 +01:00
Alba Rincón d6d3793c6d Change Filter Wrapper to Filter Block
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-11-08 08:40:56 +01:00
Alba Rincón b3abf6bcd0 Add testing instructions 2022-11-07 16:42:46 +01:00
Thomas Roberts f0405c9ffc Update notices documentation (https://github.com/woocommerce/woocommerce-blocks/pull/7539)
* Update notices docs

* Remove reference to Notices Context

* Remove manual linebreaks
2022-11-07 02:49:15 -08:00
Mike Jolley 3c6a365697 Store API: Add missing documentation for reviews, categories, and tags (https://github.com/woocommerce/woocommerce-blocks/pull/7519)
* Update index

* Add missing docs
2022-11-07 10:37:00 +00:00
Daniel Dudzic ca1e65cbef Filter by Rating: Remove the Feature Plugin flag (https://github.com/woocommerce/woocommerce-blocks/pull/7580)
* Filter by Rating: Remove the Feature Plugin flag
2022-11-04 15:53:16 +01:00
Luigi c01b00dd8f Merge branch 'release/8.8.0' of https://github.com/woocommerce/woocommerce-blocks into trunk 2022-10-31 16:15:07 +01:00
Luigi 36cdd426d8 Merge branch 'release/8.5.0' of https://github.com/woocommerce/woocommerce-blocks into trunk 2022-10-31 16:13:20 +01:00
github-actions[bot] 1d71da7162 Release: 8.5.2 (https://github.com/woocommerce/woocommerce-blocks/pull/7535)
* use full link for WordPress resources (https://github.com/woocommerce/woocommerce-blocks/pull/7211)

Co-authored-by: Niels Lange <info@nielslange.de>

* Empty commit for release pull request

* update readme

* add testing instructions

* add zip file link

* update testing instructions and changelog entry

* Bumping version strings to new version.

* Empty commit for release pull request

* Update styles of the Filter by Attribute dropdown so it looks good in TT3 (https://github.com/woocommerce/woocommerce-blocks/pull/7506)

* Use theme's body background color as the mini cart contents default background color (https://github.com/woocommerce/woocommerce-blocks/pull/7510)

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

* Price Slider: use `currentColor` for the slider (https://github.com/woocommerce/woocommerce-blocks/pull/7527)

* Fixed Price Slider Issue

Located where the price slider was hard coded and replaced it.

* fix CSS lint

* use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce/woocommerce-blocks#7130

use currentColor instead of hard-coded color for the slider of the Filte By Price block

* use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce/woocommerce-blocks#7130

use currentColor instead of hard-coded color for the slider of the Filte By Price block

* remove background-color

Co-authored-by: EmptySet-Exe <46509186+EmptySet-Exe@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>

* Make price slider 'inactive' range half transparent so it looks better in dark themes (https://github.com/woocommerce/woocommerce-blocks/pull/7525)

* Fix inconsistent button styling with TT3 (https://github.com/woocommerce/woocommerce-blocks/pull/7516)

* fix inconsistent button styling with TT3

* use wc_wp_theme_get_element_class_name

* add check to be sure that wc_wp_theme_get_element_class_name function exists

* Fix Mini Cart Block global styles woocommerce/woocommerce-blocks#7379 (https://github.com/woocommerce/woocommerce-blocks/pull/7515)

* Fix Mini Cart Block global styles woocommerce/woocommerce-blocks#7379

Fix Mini Cart Block global styles

* add font_size

* Empty commit for release pull request

* add changelog and testing instructions

* add zip link for testing

* Bumping version strings to new version.

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: EmptySet-Exe <46509186+EmptySet-Exe@users.noreply.github.com>
2022-10-31 16:10:27 +01:00
github-actions[bot] 7be0994ed6 Release: 8.8.2 (https://github.com/woocommerce/woocommerce-blocks/pull/7542)
* Empty commit for release pull request

* Calculate cart totals after running extensions (https://github.com/woocommerce/woocommerce-blocks/pull/7490)

* calculate cart totals afer running extensions

* update totlas call in CartUpdateCustomer

* test that cart is recalcing

* Update changelog in readme

* Add release testing notes

* Update release date in readme

* Bumping version strings to new version.

* update readme

* Update styles of the Filter by Attribute dropdown so it looks good in TT3 (https://github.com/woocommerce/woocommerce-blocks/pull/7506)

* Use theme's body background color as the mini cart contents default background color (https://github.com/woocommerce/woocommerce-blocks/pull/7510)

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

* Price Slider: use `currentColor` for the slider (https://github.com/woocommerce/woocommerce-blocks/pull/7527)

* Fixed Price Slider Issue

Located where the price slider was hard coded and replaced it.

* fix CSS lint

* use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce/woocommerce-blocks#7130

use currentColor instead of hard-coded color for the slider of the Filte By Price block

* use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce/woocommerce-blocks#7130

use currentColor instead of hard-coded color for the slider of the Filte By Price block

* remove background-color

Co-authored-by: EmptySet-Exe <46509186+EmptySet-Exe@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>

* Make price slider 'inactive' range half transparent so it looks better in dark themes (https://github.com/woocommerce/woocommerce-blocks/pull/7525)

* Fix inconsistent button styling with TT3 (https://github.com/woocommerce/woocommerce-blocks/pull/7516)

* fix inconsistent button styling with TT3

* use wc_wp_theme_get_element_class_name

* add check to be sure that wc_wp_theme_get_element_class_name function exists

* Fix Mini Cart Block global styles woocommerce/woocommerce-blocks#7379 (https://github.com/woocommerce/woocommerce-blocks/pull/7515)

* Fix Mini Cart Block global styles woocommerce/woocommerce-blocks#7379

Fix Mini Cart Block global styles

* add font_size

* upload a new build

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: EmptySet-Exe <46509186+EmptySet-Exe@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
2022-10-31 16:07:17 +01:00
Luigi c922c99538 Merge branch 'release/8.7.0' of https://github.com/woocommerce/woocommerce-blocks into trunk 2022-10-31 15:59:14 +01:00
github-actions[bot] 5d3bd76eb3 Release: 8.7.5 (https://github.com/woocommerce/woocommerce-blocks/pull/7541)
* Empty commit for release pull request

* Added readme.txt changelog entry

* Update HPOS compatibility snippet (https://github.com/woocommerce/woocommerce-blocks/pull/7395)

* 8.7.2 Testing notes

* Update testing notes

* Update testing notes

* Bumped version

* Refactor force billing: remove forcedBillingAddress from conditions for showBillingFields (https://github.com/woocommerce/woocommerce-blocks/pull/7393)

Co-authored-by: Niels Lange <info@nielslange.de>

* Updated testing instructions and changelog to include woocommerce/woocommerce-blocks#7393

* Updated testing zip

* Bumping version strings to new version.

* Empty commit for release pull request

* Fix wrong keys being sent in `canMakePayment` and customer data showing in the Checkout block in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/7434)

* Construct args for canMakePayment with correct keys

* When the CheckoutEventsContext mounts, initialize payment store

* Destructure useSelect correctly

* Dispatch __internalInitializePaymentStore in selector tests

* Update selector name to __internalUpdateAvailablePaymentMethods

* Remove check for editor when registering checkout store

* Add check for when express payment methods have updated too

* Ensure billingAddress key exists in canMakePayment arg

* Use editor context to know if we're in editor

* Updated readme.txt

* Reverted stable tag change on readme.txt

* Testing instructions

* Cleaned out testing instructions

* Bumping version strings to new version.

* Empty commit for release pull request

* Testing instructions

* package-lock.json version bump

* Revert "Fix `useForcedLayout` to re-select inner blocks after we manually insert one (https://github.com/woocommerce/woocommerce-blocks/pull/6676)" (https://github.com/woocommerce/woocommerce-blocks/pull/7447)

This reverts commit 25e24708b5.

* Testing zip

* Bumping version strings to new version.

* add testing instructions

* upload a new zip file

* Update styles of the Filter by Attribute dropdown so it looks good in TT3 (https://github.com/woocommerce/woocommerce-blocks/pull/7506)

* Use theme's body background color as the mini cart contents default background color (https://github.com/woocommerce/woocommerce-blocks/pull/7510)

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

* Price Slider: use `currentColor` for the slider (https://github.com/woocommerce/woocommerce-blocks/pull/7527)

* Fixed Price Slider Issue

Located where the price slider was hard coded and replaced it.

* fix CSS lint

* use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce/woocommerce-blocks#7130

use currentColor instead of hard-coded color for the slider of the Filte By Price block

* use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce/woocommerce-blocks#7130

use currentColor instead of hard-coded color for the slider of the Filte By Price block

* remove background-color

Co-authored-by: EmptySet-Exe <46509186+EmptySet-Exe@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>

* Make price slider 'inactive' range half transparent so it looks better in dark themes (https://github.com/woocommerce/woocommerce-blocks/pull/7525)

* Fix inconsistent button styling with TT3 (https://github.com/woocommerce/woocommerce-blocks/pull/7516)

* fix inconsistent button styling with TT3

* use wc_wp_theme_get_element_class_name

* add check to be sure that wc_wp_theme_get_element_class_name function exists

* Fix Mini Cart Block global styles woocommerce/woocommerce-blocks#7379 (https://github.com/woocommerce/woocommerce-blocks/pull/7515)

* Fix Mini Cart Block global styles woocommerce/woocommerce-blocks#7379

Fix Mini Cart Block global styles

* add font_size

* upload a new build

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: EmptySet-Exe <46509186+EmptySet-Exe@users.noreply.github.com>
2022-10-31 15:55:28 +01:00
Thomas Roberts 3a6b91b5e6 Merge branch 'release/8.8.0' into trunk 2022-10-28 12:16:45 +01:00
Thomas Roberts 14f5c597f6 Add release testing notes 2022-10-27 16:08:49 +01:00
Raluca Stan 77e62c0edf Update README.md 2022-10-27 15:21:29 +02:00
Thomas Roberts 3269f662a9 Update testing zip for release 2022-10-25 12:38:38 +01:00
Thomas Roberts d645de0b34 Add testing instructions for release 2022-10-24 13:10:46 +01:00
Paulo Arromba f3a31a07b3 8.7.4 Testing instructions and changelog (https://github.com/woocommerce/woocommerce-blocks/pull/7450)
* Empty commit for release pull request

* Updated changelog.

* Minor lint fix.

* 8.7.0 Testing instructions

* Updated and tidy docs/internal-developers/testing/releases/README.md

* Add filter-link-button mixin (https://github.com/woocommerce/woocommerce-blocks/pull/7357)

* Set default style to link-button mixin

It was identified that we currently have 3 different behaviors for links used in the application. In issue woocommerce/woocommerce-blocks#1778, it was discussed a set of good practices that we should follow in order to obtain consistency between links.

Currently, the link-button mixin is already used by the 'Clear all' button in the Active Filters block, so the idea was to increment it with a common pattern (font size small, font-weight normal, underlined by default and not underlined when on hover) that can be reused by other components (for example FilterResetButton).

* Change link-button mixin to make it attend the expected default style for links

* Replace text-button with link-button mixin in FilterResetButton component

* Add new mixin for links in filter blocks

* Revert change to link-button mixin to prevent it to affect link buttons on Checkout page

* Add filter-link-button mixin that can be used in filter blocks

* Remove link-button styles that were moved to filter-link-button mixin

By default, link-button mixin styles should have only styles from the text-button mixin and also be underlined.

The styles for link button in filter blocks should reside in filter-link-button mixin.

* Cherry picked Add filter-link-button mixin woocommerce/woocommerce-blocks#7357 and updated testing instructions

* Re-added woocommerce/woocommerce-blocks#7273 to changelog

* Correct block name and description (https://github.com/woocommerce/woocommerce-blocks/pull/7354)

* Correct block name and description

* remove duplicated description for controls blocks

* remove duplicated title and desc

* Revert "remove duplicated description for controls blocks"

This reverts commit ed5417eb0e5191ed2f1def2a04c9e724fe70856a.

* removed woocommerce/woocommerce-blocks#7338 from testing instructions and changelog

* Updated testing zip package.

* Minor formatting fix on the release instructions

* change any to or below the express payment method on cart (https://github.com/woocommerce/woocommerce-blocks/pull/7369)

* Updated zip.

* Add temporary workaround to fix inserting Cart block in WordPress.com (https://github.com/woocommerce/woocommerce-blocks/pull/7367)

* remove problematic actions as deps

* add inline docs

* add todo comment

* Cherry picked: Fix a problem that causes an infinite loop when inserting Cart block in wordpress.com (7367)

* Updated testing zip.

* Bumping version strings to new version.

* Empty commit for release pull request

* Release: 8.7.1 (https://github.com/woocommerce/woocommerce-blocks/pull/7371)

* Empty commit for release pull request

* Updated changelog.

* Minor lint fix.

* 8.7.0 Testing instructions

* Updated and tidy docs/internal-developers/testing/releases/README.md

* Add filter-link-button mixin (https://github.com/woocommerce/woocommerce-blocks/pull/7357)

* Set default style to link-button mixin

It was identified that we currently have 3 different behaviors for links used in the application. In issue woocommerce/woocommerce-blocks#1778, it was discussed a set of good practices that we should follow in order to obtain consistency between links.

Currently, the link-button mixin is already used by the 'Clear all' button in the Active Filters block, so the idea was to increment it with a common pattern (font size small, font-weight normal, underlined by default and not underlined when on hover) that can be reused by other components (for example FilterResetButton).

* Change link-button mixin to make it attend the expected default style for links

* Replace text-button with link-button mixin in FilterResetButton component

* Add new mixin for links in filter blocks

* Revert change to link-button mixin to prevent it to affect link buttons on Checkout page

* Add filter-link-button mixin that can be used in filter blocks

* Remove link-button styles that were moved to filter-link-button mixin

By default, link-button mixin styles should have only styles from the text-button mixin and also be underlined.

The styles for link button in filter blocks should reside in filter-link-button mixin.

* Cherry picked Add filter-link-button mixin woocommerce/woocommerce-blocks#7357 and updated testing instructions

* Re-added woocommerce/woocommerce-blocks#7273 to changelog

* Correct block name and description (https://github.com/woocommerce/woocommerce-blocks/pull/7354)

* Correct block name and description

* remove duplicated description for controls blocks

* remove duplicated title and desc

* Revert "remove duplicated description for controls blocks"

This reverts commit ed5417eb0e5191ed2f1def2a04c9e724fe70856a.

* removed woocommerce/woocommerce-blocks#7338 from testing instructions and changelog

* Updated testing zip package.

* Minor formatting fix on the release instructions

* change any to or below the express payment method on cart (https://github.com/woocommerce/woocommerce-blocks/pull/7369)

* Updated zip.

* Add temporary workaround to fix inserting Cart block in WordPress.com (https://github.com/woocommerce/woocommerce-blocks/pull/7367)

* remove problematic actions as deps

* add inline docs

* add todo comment

* Cherry picked: Fix a problem that causes an infinite loop when inserting Cart block in wordpress.com (7367)

* Updated testing zip.

* Bumping version strings to new version.

* Empty commit for release pull request

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>

* Release: 8.7.2 (https://github.com/woocommerce/woocommerce-blocks/pull/7396)

* Empty commit for release pull request

* Added readme.txt changelog entry

* Update HPOS compatibility snippet (https://github.com/woocommerce/woocommerce-blocks/pull/7395)

* 8.7.2 Testing notes

* Update testing notes

* Update testing notes

* Bumped version

* Refactor force billing: remove forcedBillingAddress from conditions for showBillingFields (https://github.com/woocommerce/woocommerce-blocks/pull/7393)

Co-authored-by: Niels Lange <info@nielslange.de>

* Updated testing instructions and changelog to include woocommerce/woocommerce-blocks#7393

* Updated testing zip

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>

* Release: 8.7.3 (https://github.com/woocommerce/woocommerce-blocks/pull/7439)

* Empty commit for release pull request

* Added readme.txt changelog entry

* Update HPOS compatibility snippet (https://github.com/woocommerce/woocommerce-blocks/pull/7395)

* 8.7.2 Testing notes

* Update testing notes

* Update testing notes

* Bumped version

* Refactor force billing: remove forcedBillingAddress from conditions for showBillingFields (https://github.com/woocommerce/woocommerce-blocks/pull/7393)

Co-authored-by: Niels Lange <info@nielslange.de>

* Updated testing instructions and changelog to include woocommerce/woocommerce-blocks#7393

* Updated testing zip

* Bumping version strings to new version.

* Empty commit for release pull request

* Fix wrong keys being sent in `canMakePayment` and customer data showing in the Checkout block in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/7434)

* Construct args for canMakePayment with correct keys

* When the CheckoutEventsContext mounts, initialize payment store

* Destructure useSelect correctly

* Dispatch __internalInitializePaymentStore in selector tests

* Update selector name to __internalUpdateAvailablePaymentMethods

* Remove check for editor when registering checkout store

* Add check for when express payment methods have updated too

* Ensure billingAddress key exists in canMakePayment arg

* Use editor context to know if we're in editor

* Updated readme.txt

* Reverted stable tag change on readme.txt

* Testing instructions

* Cleaned out testing instructions

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Release: 8.7.4 (https://github.com/woocommerce/woocommerce-blocks/pull/7449)

* Empty commit for release pull request

* Added readme.txt changelog entry

* Update HPOS compatibility snippet (https://github.com/woocommerce/woocommerce-blocks/pull/7395)

* 8.7.2 Testing notes

* Update testing notes

* Update testing notes

* Bumped version

* Refactor force billing: remove forcedBillingAddress from conditions for showBillingFields (https://github.com/woocommerce/woocommerce-blocks/pull/7393)

Co-authored-by: Niels Lange <info@nielslange.de>

* Updated testing instructions and changelog to include woocommerce/woocommerce-blocks#7393

* Updated testing zip

* Bumping version strings to new version.

* Empty commit for release pull request

* Fix wrong keys being sent in `canMakePayment` and customer data showing in the Checkout block in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/7434)

* Construct args for canMakePayment with correct keys

* When the CheckoutEventsContext mounts, initialize payment store

* Destructure useSelect correctly

* Dispatch __internalInitializePaymentStore in selector tests

* Update selector name to __internalUpdateAvailablePaymentMethods

* Remove check for editor when registering checkout store

* Add check for when express payment methods have updated too

* Ensure billingAddress key exists in canMakePayment arg

* Use editor context to know if we're in editor

* Updated readme.txt

* Reverted stable tag change on readme.txt

* Testing instructions

* Cleaned out testing instructions

* Bumping version strings to new version.

* Empty commit for release pull request

* Testing instructions

* package-lock.json version bump

* Revert "Fix `useForcedLayout` to re-select inner blocks after we manually insert one (https://github.com/woocommerce/woocommerce-blocks/pull/6676)" (https://github.com/woocommerce/woocommerce-blocks/pull/7447)

This reverts commit 25e24708b5.

* Testing zip

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-10-21 17:14:37 +01:00
github-actions[bot] 88b3fca9b5 Release: 8.7.4 (https://github.com/woocommerce/woocommerce-blocks/pull/7449)
* Empty commit for release pull request

* Added readme.txt changelog entry

* Update HPOS compatibility snippet (https://github.com/woocommerce/woocommerce-blocks/pull/7395)

* 8.7.2 Testing notes

* Update testing notes

* Update testing notes

* Bumped version

* Refactor force billing: remove forcedBillingAddress from conditions for showBillingFields (https://github.com/woocommerce/woocommerce-blocks/pull/7393)

Co-authored-by: Niels Lange <info@nielslange.de>

* Updated testing instructions and changelog to include woocommerce/woocommerce-blocks#7393

* Updated testing zip

* Bumping version strings to new version.

* Empty commit for release pull request

* Fix wrong keys being sent in `canMakePayment` and customer data showing in the Checkout block in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/7434)

* Construct args for canMakePayment with correct keys

* When the CheckoutEventsContext mounts, initialize payment store

* Destructure useSelect correctly

* Dispatch __internalInitializePaymentStore in selector tests

* Update selector name to __internalUpdateAvailablePaymentMethods

* Remove check for editor when registering checkout store

* Add check for when express payment methods have updated too

* Ensure billingAddress key exists in canMakePayment arg

* Use editor context to know if we're in editor

* Updated readme.txt

* Reverted stable tag change on readme.txt

* Testing instructions

* Cleaned out testing instructions

* Bumping version strings to new version.

* Empty commit for release pull request

* Testing instructions

* package-lock.json version bump

* Revert "Fix `useForcedLayout` to re-select inner blocks after we manually insert one (https://github.com/woocommerce/woocommerce-blocks/pull/6676)" (https://github.com/woocommerce/woocommerce-blocks/pull/7447)

This reverts commit 25e24708b5.

* Testing zip

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-10-21 17:06:48 +01:00
Paulo Arromba 229c7a5f4a Release: 8.7.3 (https://github.com/woocommerce/woocommerce-blocks/pull/7439) (https://github.com/woocommerce/woocommerce-blocks/pull/7443)
* Empty commit for release pull request

* Added readme.txt changelog entry

* Update HPOS compatibility snippet (https://github.com/woocommerce/woocommerce-blocks/pull/7395)

* 8.7.2 Testing notes

* Update testing notes

* Update testing notes

* Bumped version

* Refactor force billing: remove forcedBillingAddress from conditions for showBillingFields (https://github.com/woocommerce/woocommerce-blocks/pull/7393)

Co-authored-by: Niels Lange <info@nielslange.de>

* Updated testing instructions and changelog to include woocommerce/woocommerce-blocks#7393

* Updated testing zip

* Bumping version strings to new version.

* Empty commit for release pull request

* Fix wrong keys being sent in `canMakePayment` and customer data showing in the Checkout block in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/7434)

* Construct args for canMakePayment with correct keys

* When the CheckoutEventsContext mounts, initialize payment store

* Destructure useSelect correctly

* Dispatch __internalInitializePaymentStore in selector tests

* Update selector name to __internalUpdateAvailablePaymentMethods

* Remove check for editor when registering checkout store

* Add check for when express payment methods have updated too

* Ensure billingAddress key exists in canMakePayment arg

* Use editor context to know if we're in editor

* Updated readme.txt

* Reverted stable tag change on readme.txt

* Testing instructions

* Cleaned out testing instructions

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-10-21 12:02:21 +01:00
github-actions[bot] d779ccaf31 Release: 8.7.3 (https://github.com/woocommerce/woocommerce-blocks/pull/7439)
* Empty commit for release pull request

* Added readme.txt changelog entry

* Update HPOS compatibility snippet (https://github.com/woocommerce/woocommerce-blocks/pull/7395)

* 8.7.2 Testing notes

* Update testing notes

* Update testing notes

* Bumped version

* Refactor force billing: remove forcedBillingAddress from conditions for showBillingFields (https://github.com/woocommerce/woocommerce-blocks/pull/7393)

Co-authored-by: Niels Lange <info@nielslange.de>

* Updated testing instructions and changelog to include woocommerce/woocommerce-blocks#7393

* Updated testing zip

* Bumping version strings to new version.

* Empty commit for release pull request

* Fix wrong keys being sent in `canMakePayment` and customer data showing in the Checkout block in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/7434)

* Construct args for canMakePayment with correct keys

* When the CheckoutEventsContext mounts, initialize payment store

* Destructure useSelect correctly

* Dispatch __internalInitializePaymentStore in selector tests

* Update selector name to __internalUpdateAvailablePaymentMethods

* Remove check for editor when registering checkout store

* Add check for when express payment methods have updated too

* Ensure billingAddress key exists in canMakePayment arg

* Use editor context to know if we're in editor

* Updated readme.txt

* Reverted stable tag change on readme.txt

* Testing instructions

* Cleaned out testing instructions

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-10-21 10:59:32 +01:00
Paulo Arromba 53aabe91dd Update/8.7.0-2 changelog and testing instructions (https://github.com/woocommerce/woocommerce-blocks/pull/7406)
* Empty commit for release pull request

* Updated changelog.

* Minor lint fix.

* 8.7.0 Testing instructions

* Updated and tidy docs/internal-developers/testing/releases/README.md

* Add filter-link-button mixin (https://github.com/woocommerce/woocommerce-blocks/pull/7357)

* Set default style to link-button mixin

It was identified that we currently have 3 different behaviors for links used in the application. In issue woocommerce/woocommerce-blocks#1778, it was discussed a set of good practices that we should follow in order to obtain consistency between links.

Currently, the link-button mixin is already used by the 'Clear all' button in the Active Filters block, so the idea was to increment it with a common pattern (font size small, font-weight normal, underlined by default and not underlined when on hover) that can be reused by other components (for example FilterResetButton).

* Change link-button mixin to make it attend the expected default style for links

* Replace text-button with link-button mixin in FilterResetButton component

* Add new mixin for links in filter blocks

* Revert change to link-button mixin to prevent it to affect link buttons on Checkout page

* Add filter-link-button mixin that can be used in filter blocks

* Remove link-button styles that were moved to filter-link-button mixin

By default, link-button mixin styles should have only styles from the text-button mixin and also be underlined.

The styles for link button in filter blocks should reside in filter-link-button mixin.

* Cherry picked Add filter-link-button mixin woocommerce/woocommerce-blocks#7357 and updated testing instructions

* Re-added woocommerce/woocommerce-blocks#7273 to changelog

* Correct block name and description (https://github.com/woocommerce/woocommerce-blocks/pull/7354)

* Correct block name and description

* remove duplicated description for controls blocks

* remove duplicated title and desc

* Revert "remove duplicated description for controls blocks"

This reverts commit ed5417eb0e5191ed2f1def2a04c9e724fe70856a.

* removed woocommerce/woocommerce-blocks#7338 from testing instructions and changelog

* Updated testing zip package.

* Minor formatting fix on the release instructions

* change any to or below the express payment method on cart (https://github.com/woocommerce/woocommerce-blocks/pull/7369)

* Updated zip.

* Add temporary workaround to fix inserting Cart block in WordPress.com (https://github.com/woocommerce/woocommerce-blocks/pull/7367)

* remove problematic actions as deps

* add inline docs

* add todo comment

* Cherry picked: Fix a problem that causes an infinite loop when inserting Cart block in wordpress.com (7367)

* Updated testing zip.

* Bumping version strings to new version.

* Empty commit for release pull request

* Release: 8.7.1 (https://github.com/woocommerce/woocommerce-blocks/pull/7371)

* Empty commit for release pull request

* Updated changelog.

* Minor lint fix.

* 8.7.0 Testing instructions

* Updated and tidy docs/internal-developers/testing/releases/README.md

* Add filter-link-button mixin (https://github.com/woocommerce/woocommerce-blocks/pull/7357)

* Set default style to link-button mixin

It was identified that we currently have 3 different behaviors for links used in the application. In issue woocommerce/woocommerce-blocks#1778, it was discussed a set of good practices that we should follow in order to obtain consistency between links.

Currently, the link-button mixin is already used by the 'Clear all' button in the Active Filters block, so the idea was to increment it with a common pattern (font size small, font-weight normal, underlined by default and not underlined when on hover) that can be reused by other components (for example FilterResetButton).

* Change link-button mixin to make it attend the expected default style for links

* Replace text-button with link-button mixin in FilterResetButton component

* Add new mixin for links in filter blocks

* Revert change to link-button mixin to prevent it to affect link buttons on Checkout page

* Add filter-link-button mixin that can be used in filter blocks

* Remove link-button styles that were moved to filter-link-button mixin

By default, link-button mixin styles should have only styles from the text-button mixin and also be underlined.

The styles for link button in filter blocks should reside in filter-link-button mixin.

* Cherry picked Add filter-link-button mixin woocommerce/woocommerce-blocks#7357 and updated testing instructions

* Re-added woocommerce/woocommerce-blocks#7273 to changelog

* Correct block name and description (https://github.com/woocommerce/woocommerce-blocks/pull/7354)

* Correct block name and description

* remove duplicated description for controls blocks

* remove duplicated title and desc

* Revert "remove duplicated description for controls blocks"

This reverts commit ed5417eb0e5191ed2f1def2a04c9e724fe70856a.

* removed woocommerce/woocommerce-blocks#7338 from testing instructions and changelog

* Updated testing zip package.

* Minor formatting fix on the release instructions

* change any to or below the express payment method on cart (https://github.com/woocommerce/woocommerce-blocks/pull/7369)

* Updated zip.

* Add temporary workaround to fix inserting Cart block in WordPress.com (https://github.com/woocommerce/woocommerce-blocks/pull/7367)

* remove problematic actions as deps

* add inline docs

* add todo comment

* Cherry picked: Fix a problem that causes an infinite loop when inserting Cart block in wordpress.com (7367)

* Updated testing zip.

* Bumping version strings to new version.

* Empty commit for release pull request

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>

* Release: 8.7.2 (https://github.com/woocommerce/woocommerce-blocks/pull/7396)

* Empty commit for release pull request

* Added readme.txt changelog entry

* Update HPOS compatibility snippet (https://github.com/woocommerce/woocommerce-blocks/pull/7395)

* 8.7.2 Testing notes

* Update testing notes

* Update testing notes

* Bumped version

* Refactor force billing: remove forcedBillingAddress from conditions for showBillingFields (https://github.com/woocommerce/woocommerce-blocks/pull/7393)

Co-authored-by: Niels Lange <info@nielslange.de>

* Updated testing instructions and changelog to include woocommerce/woocommerce-blocks#7393

* Updated testing zip

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>

* README.md formatting

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
2022-10-14 15:17:54 +01:00
github-actions[bot] f6b025e894 Release: 8.7.2 (https://github.com/woocommerce/woocommerce-blocks/pull/7396)
* Empty commit for release pull request

* Added readme.txt changelog entry

* Update HPOS compatibility snippet (https://github.com/woocommerce/woocommerce-blocks/pull/7395)

* 8.7.2 Testing notes

* Update testing notes

* Update testing notes

* Bumped version

* Refactor force billing: remove forcedBillingAddress from conditions for showBillingFields (https://github.com/woocommerce/woocommerce-blocks/pull/7393)

Co-authored-by: Niels Lange <info@nielslange.de>

* Updated testing instructions and changelog to include woocommerce/woocommerce-blocks#7393

* Updated testing zip

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
2022-10-14 13:32:51 +01:00
Daniel Dudzic d6fecf28a3 Products by Rating: Add Filter by Rating to the Feature Plugin (https://github.com/woocommerce/woocommerce-blocks/pull/7384)
* Products by Rating: Move the Filter by Ratings block to the feature plugin build

* Products by Rating: Update the internal doc

* Products by Rating: Include a Feature Plugin check before loading the Rating filter variation
2022-10-13 17:27:26 +02:00
Thomas Roberts 1d25169932 Add payment data store selectors documentation (https://github.com/woocommerce/woocommerce-blocks/pull/7353)
* Add overview to payment data store docs

* Add documentation for isExpressPaymentMethodActive

* Add documentation for getActiveSavedToken

* Remove _ from Example heading

* Add documentation for getActivePaymentMethod

* Add documentation for getAvailablePaymentMethods

* Add documentation for getAvailableExpressPaymentMethods

* Add documentation for getPaymentMethodData

* Add documentation for getSavedPaymentMethods

* Add documentation for getActiveSavedPaymentMethods

* Add documentation for shouldSavePaymentMethod

* Add documentation for getCurrentStatus

* Change docs for shouldSavePaymentMethod to getShouldSavePaymentMethod

* Add documentation for normal/express paymentMethodsInitialized

* Add table of contents for payment method documentation
2022-10-12 09:04:31 -07:00
github-actions[bot] de6157cbfc Release: 8.7.1 (https://github.com/woocommerce/woocommerce-blocks/pull/7371)
* Empty commit for release pull request

* Updated changelog.

* Minor lint fix.

* 8.7.0 Testing instructions

* Updated and tidy docs/internal-developers/testing/releases/README.md

* Add filter-link-button mixin (https://github.com/woocommerce/woocommerce-blocks/pull/7357)

* Set default style to link-button mixin

It was identified that we currently have 3 different behaviors for links used in the application. In issue woocommerce/woocommerce-blocks#1778, it was discussed a set of good practices that we should follow in order to obtain consistency between links.

Currently, the link-button mixin is already used by the 'Clear all' button in the Active Filters block, so the idea was to increment it with a common pattern (font size small, font-weight normal, underlined by default and not underlined when on hover) that can be reused by other components (for example FilterResetButton).

* Change link-button mixin to make it attend the expected default style for links

* Replace text-button with link-button mixin in FilterResetButton component

* Add new mixin for links in filter blocks

* Revert change to link-button mixin to prevent it to affect link buttons on Checkout page

* Add filter-link-button mixin that can be used in filter blocks

* Remove link-button styles that were moved to filter-link-button mixin

By default, link-button mixin styles should have only styles from the text-button mixin and also be underlined.

The styles for link button in filter blocks should reside in filter-link-button mixin.

* Cherry picked Add filter-link-button mixin woocommerce/woocommerce-blocks#7357 and updated testing instructions

* Re-added woocommerce/woocommerce-blocks#7273 to changelog

* Correct block name and description (https://github.com/woocommerce/woocommerce-blocks/pull/7354)

* Correct block name and description

* remove duplicated description for controls blocks

* remove duplicated title and desc

* Revert "remove duplicated description for controls blocks"

This reverts commit ed5417eb0e5191ed2f1def2a04c9e724fe70856a.

* removed woocommerce/woocommerce-blocks#7338 from testing instructions and changelog

* Updated testing zip package.

* Minor formatting fix on the release instructions

* change any to or below the express payment method on cart (https://github.com/woocommerce/woocommerce-blocks/pull/7369)

* Updated zip.

* Add temporary workaround to fix inserting Cart block in WordPress.com (https://github.com/woocommerce/woocommerce-blocks/pull/7367)

* remove problematic actions as deps

* add inline docs

* add todo comment

* Cherry picked: Fix a problem that causes an infinite loop when inserting Cart block in wordpress.com (7367)

* Updated testing zip.

* Bumping version strings to new version.

* Empty commit for release pull request

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2022-10-12 16:35:25 +01:00
Luigi Teschio 34d9ba22a3 Update Feature Flags and Experimental Interfaces doc adding the Product Query block and its variations and Filter By Rating block (https://github.com/woocommerce/woocommerce-blocks/pull/7375) 2022-10-12 12:50:43 +02:00
github-actions[bot] c5fcc339d1 Release: 8.7.0 (https://github.com/woocommerce/woocommerce-blocks/pull/7355)
* Empty commit for release pull request

* Updated changelog.

* Minor lint fix.

* 8.7.0 Testing instructions

* Updated and tidy docs/internal-developers/testing/releases/README.md

* Add filter-link-button mixin (https://github.com/woocommerce/woocommerce-blocks/pull/7357)

* Set default style to link-button mixin

It was identified that we currently have 3 different behaviors for links used in the application. In issue woocommerce/woocommerce-blocks#1778, it was discussed a set of good practices that we should follow in order to obtain consistency between links.

Currently, the link-button mixin is already used by the 'Clear all' button in the Active Filters block, so the idea was to increment it with a common pattern (font size small, font-weight normal, underlined by default and not underlined when on hover) that can be reused by other components (for example FilterResetButton).

* Change link-button mixin to make it attend the expected default style for links

* Replace text-button with link-button mixin in FilterResetButton component

* Add new mixin for links in filter blocks

* Revert change to link-button mixin to prevent it to affect link buttons on Checkout page

* Add filter-link-button mixin that can be used in filter blocks

* Remove link-button styles that were moved to filter-link-button mixin

By default, link-button mixin styles should have only styles from the text-button mixin and also be underlined.

The styles for link button in filter blocks should reside in filter-link-button mixin.

* Cherry picked Add filter-link-button mixin woocommerce/woocommerce-blocks#7357 and updated testing instructions

* Re-added woocommerce/woocommerce-blocks#7273 to changelog

* Correct block name and description (https://github.com/woocommerce/woocommerce-blocks/pull/7354)

* Correct block name and description

* remove duplicated description for controls blocks

* remove duplicated title and desc

* Revert "remove duplicated description for controls blocks"

This reverts commit ed5417eb0e5191ed2f1def2a04c9e724fe70856a.

* removed woocommerce/woocommerce-blocks#7338 from testing instructions and changelog

* Updated testing zip package.

* Minor formatting fix on the release instructions

* change any to or below the express payment method on cart (https://github.com/woocommerce/woocommerce-blocks/pull/7369)

* Updated zip.

* Add temporary workaround to fix inserting Cart block in WordPress.com (https://github.com/woocommerce/woocommerce-blocks/pull/7367)

* remove problematic actions as deps

* add inline docs

* add todo comment

* Cherry picked: Fix a problem that causes an infinite loop when inserting Cart block in wordpress.com (7367)

* Updated testing zip.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2022-10-12 11:03:38 +01:00
Paulo Arromba 1c6f83e881 Updated testing zip. 2022-10-11 18:11:56 +01:00
Paulo Arromba 93305c1bf8 Cherry picked: Fix a problem that causes an infinite loop when inserting Cart block in wordpress.com (7367) 2022-10-11 18:09:45 +01:00
Paulo Arromba 81e642ae49 Updated zip. 2022-10-11 17:10:57 +01:00
Paulo Arromba 936d5eb470 Minor formatting fix on the release instructions 2022-10-11 15:59:27 +01:00
Paulo Arromba da74586a13 Updated testing zip package. 2022-10-11 13:57:06 +01:00
Paulo Arromba 67abfd011a removed woocommerce/woocommerce-blocks#7338 from testing instructions and changelog 2022-10-11 11:42:49 +01:00
Paulo Arromba 1d999e908f Cherry picked Add filter-link-button mixin woocommerce/woocommerce-blocks#7357 and updated testing instructions 2022-10-10 18:38:13 +01:00
Paulo Arromba 4f30d53d99 Updated and tidy docs/internal-developers/testing/releases/README.md 2022-10-10 18:09:52 +01:00
Paulo Arromba c21a39c2ad 8.7.0 Testing instructions 2022-10-10 18:06:01 +01:00
Niels Lange 2732d354ed Document the selectors for the wc/store/validation data store (https://github.com/woocommerce/woocommerce-blocks/pull/7086)
* Add documentation for validation data store

Co-authored-by: Niels Lange <info@nielslange.de>

* Use correct file path for validation data store docs

* Fix typo in hasValidationErrors documentation

* Add parameters and example of getValidationError

* Improve description of getValidationErrorId

* Fix typo in hasValidationErrors

* Document clearValidationErrors

* Add documentation and example for setValidationErrors

* Add documentation for clearAllValidationErrors

* Add documentation for hideValidationError

* Add documentation for showValidationError

* Add overview section

* Update hideValidationError documentation

* Add showValidationErrors documentation

* Update table of contents

* Fix typo in action name and add example

* Fix typo in hasValidationErrors

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2022-10-07 04:24:54 -07:00
Alex Florisca 7bf79f33d9 Rename payment-method-data-context to payment-events-context and PAYMENT_METHOD_DATA_STORE_KEY to PAYMENT_STORE_KEY (https://github.com/woocommerce/woocommerce-blocks/pull/7304)
* Rename payment-method-data-context to payment-event-context and tidy up types and things

* Rename uses of PAYMENT_METHOD_DATA_STORE_KEY to PAYMENT_STORE_KEY

* Rename __internalInitializePaymentMethodDataStore and unsubscribeInitializePaymentMethodDataStore

* Rename unsubscribeInitializePaymentMethodDataStore
2022-10-06 13:46:46 +01:00
Alex Florisca eace72a31f Prefix all actions in the checkout and payment-method stores with `__internal` (https://github.com/woocommerce/woocommerce-blocks/pull/7266)
* Rename setProcessingResponse to setPaymentResult and remove setOrderId from the checkout data store actions

* Fix accidentally changing data exposed to the observers

* Rename all checkout actions with the __internal prefix

* Prefix all payment method data store actions with __internal

* Pedantic spacing

* Fix ts error
2022-10-05 11:04:16 +01:00
Thomas Roberts 2e13856173 Add `showRemoveItemLink` filter to `CartLineItemRow` (https://github.com/woocommerce/woocommerce-blocks/pull/7242)
* Add showRemoveItemLink filter

This is a filter that will allow developers to set whether the link to remove a cartItem is visible

* Add test for showRemoveItemLink filter

* Remove unnecessary quantity override

* Move definition of cart to avoid hardcoding id value in filter

* Updated documentation for `showRemoveItemLink` filter

* available-filters.md tweak

* available-filters.md tweak

* Add example to filters for showRemoveItemLink

* Remove whitespace

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
2022-10-04 13:51:07 +01:00
Alex Florisca 33910f316f Document the actions in the checkout and payment-method stores (https://github.com/woocommerce/woocommerce-blocks/pull/7255)
* Remove setPristine as it's not used

* Comment checkout actions

* Rename setProcessingResponse to setPaymentResult and remove setOrderId from the checkout data store actions

* Add comments to payment actions

* Update documentation with data stores

* Fix accidentally changing data exposed to the observers

* Document missing parameters for actions
2022-09-30 15:34:14 +01:00
Niels Lange c360c5654a Add filter for place order button label (https://github.com/woocommerce/woocommerce-blocks/pull/7154)
* WIP add filter for place order button label

* Solve TS issue

* Add display priority

* Refactor display priority

* WIP Implement useMemo()

* Try using a global cache

* Add docs for placeOrderLabel filter

* Update docs/third-party-developers/extensibility/checkout-block/available-filters.md

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

* Adjust docs

* Rename “placeOrderLabel” to “placeOrderButtonLabel”

* Update assets/js/types/type-defs/payments.ts

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com>
2022-09-29 15:46:10 +07:00
Niels Lange 0e1eb2d597 Document the selectors for the wc/store/checkout data store (https://github.com/woocommerce/woocommerce-blocks/pull/7085) 2022-09-28 13:45:42 +01:00
Thomas Roberts dcffe242dd Fix docs linting errors 2022-09-28 13:45:42 +01:00
Thomas Roberts 28659ee653 Refactor registration of payment methods and update unit tests for payment data store (https://github.com/woocommerce/woocommerce-blocks/pull/6669)
* Mock getCartTotals

* Change test to use data store instead of context

* Move payment method context test to data store selectors

* Change description of test suite

* Bump commit to trigger tests

* Fix path in test

* update package lock

* Set correct state payment method reducer tests/use correct actions

* Get saved payment methods from store not context

* Mock stores and update tests to allow switching payment methods

* Update tests to get onSubmit from checkoutEventsContext

* Remove cartTotalsLoaded check from payment method initialize check

* Make PaymentMethods test wait until payments initialized

* initialize payment method data store when cart is loaded

* Remove unneeded actions and add initializePaymentMethodDataStore

* Remove check for cart totals loaded in checkPaymentMethods

* Remove updateAvilablePaymentMethods from registry

* Remove unneeded mock

* Remove unused import

* Rename imports to fix eslint errors

* Remove unused imports

* Remove return false from checkPaymentMethods

* Remove unnecessary setPaymentMethodsInitialized call

* Add todo comment to track refactoring opportunity

* Remove savedpayment methods from payment method context and rename it

* Rename payment method data context to payment method events context

* Add tests for setDefaultPaymentMethods

* Optimize the availablePaymentMethods state data

Store only the "name" attribute for now.

* Get list of payment methods from the registry instead of the store

We are using this hook to get some React elements in the payment method
object. So, we are getting the raw data directly from the registry instead
of the store.

* Fix payment state not loading on the Checkout edit page

* Handle checkout edit page case

* Fix infinite loop error on C&C Blocks

* Include @wordpress/redux-routine in transformIgnorePatterns jest config

Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
2022-09-28 13:45:42 +01:00
Alex Florisca d13d5b3fdd Feature: Data Store Migration - Payments (https://github.com/woocommerce/woocommerce-blocks/pull/6619)
* Move paymentMethodDataProvider into a data store (https://github.com/woocommerce/woocommerce-blocks/pull/6208)

* Fix typographical error on LegacyRegisterExpressPaymentMethodFunction type

* Add default state for PaymentMethod data store

* Add preliminary action types

* Add preliminary action dispatchers

* Create payment method data store

* Add preliminary reducers for payment method data store

* Add preliminary selectors for payment method data store

* Add reducers/actions for registering payment methods

* Export payment method data store key

* Add test for payment method data reducers

* Add shouldSavePaymentMethod selector

* Add store key as constant

* Add more action types for registering and initializing payment methods

* Get active payment method from data store instead of from context

* Add registered methods to default state of payment method data store

* Dispatch name of registered payment method to payment method data store

* Remove setShouldSavePayment from payment method dispatcher and types

* Get payment methods from registry instead of payment context

* Add available payment methods to store

* Add function to check whether payment methods are allowed to be used

* Add selector to check if payments are initialised

* Remove resolvers and add controls to payment method data store

* Change type of payment requirements to string[]

* Turn addRegistered and addRegisteredExpress into generators

This is so we can check each payment method's validity before adding it to the list of available payment methods

* Add action type for setting express payments as initialized

* Only select from available methods in payment method options

* Remove argument from addRegisteredPaymentMethod in payment method registry

* Rename folder and store name to not contain the word data

* Add selectors for express payment methods and their initialisation

* Delete controls again in favour of thunks

* Rename payment-method-data to payment-methdods

* Create new setDefaultPaymentMethod function

This will set the payment method when the cart loads.

* Add CustomerPaymentMethodConfiguration type

* Make getAvailableExpressPaymentMethods return correct data

* Check express methods and normal methods when cart changes

* Add action for setting active express payment methods

* Handle express methods in checkPaymentMethodCanPay

* Hide express payments area if none are available

* Add selector for paymentMethodData

* Add customer data to default state and add selector for it

* Add setPaymentStatus action and reducer case

* Set the default payment method when one isn't selected

* Correct types on getCustomerPaymentMethods

* Set status in data store alongside context status

* Comment out active gateway selection - remove later

* Set status in express payment methods in data store

* Use correct key in payment method data context

* Directly check payment methods from the list in blocks-registry

* Add semicolon to import statement

* Fix payment method data state call

* Get paymentMethodData from store not context

* Fix linting issues

Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>

* Rebase on the update/checkout-data-store branch & Fix failed payments (https://github.com/woocommerce/woocommerce-blocks/pull/6587)

* Add checkout data store

* wip on checkout data store

* CheckoutContext now uses the checkout store

* Investigated and removed setting the redirectUrl on the default state

* update extension and address hooks to use checkout data store

* use checkout data store in checkout-processor and use-checkout-button

* trim useCheckoutContext from use-payment-method-interface && use-store-cart-item-quantity

* Remove useCheckoutContext from shipping provider

* Remove isCalculating from state

* Removed useCheckoutContext from lots of places

* Remove useCheckoutContext from checkout-payment-block

* Remove useCheckoutContext in checkout-shipping-methods-block and checkout-shipping-address-block

* add isCart selector and action and update the checkoutstate context

* Fixed redirectUrl bug by using thunks

* Remove dispatchActions from checkout-state

* Change SET_HAS_ERROR action to be neater

* Thomas' feedback

* Tidy up

* Oops, deleted things I shouldn't have

* Typescript

* Fix types

* Fix tests

* Remove isCart

* Update docs and remove unecessary getRedirectUrl() selector

* set correct type for preloadedCheckoutData

* Remove duplicate Address type

* Fix missing addresses from type-defs index

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Update docs

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Revert feedback changes

* REvert feedback formatting

* Update docs formatting

* Fix typographical error on LegacyRegisterExpressPaymentMethodFunction type

* Add default state for PaymentMethod data store

* Add preliminary action types

* Add preliminary action dispatchers

* Create payment method data store

* Add preliminary reducers for payment method data store

* Add preliminary selectors for payment method data store

* Add reducers/actions for registering payment methods

* Export payment method data store key

* Add test for payment method data reducers

* Add shouldSavePaymentMethod selector

* Add store key as constant

* Add more action types for registering and initializing payment methods

* Get active payment method from data store instead of from context

* Add registered methods to default state of payment method data store

* Dispatch name of registered payment method to payment method data store

* Remove setShouldSavePayment from payment method dispatcher and types

* Get payment methods from registry instead of payment context

* Add available payment methods to store

* Add function to check whether payment methods are allowed to be used

* Add selector to check if payments are initialised

* Remove resolvers and add controls to payment method data store

* Change type of payment requirements to string[]

* Turn addRegistered and addRegisteredExpress into generators

This is so we can check each payment method's validity before adding it to the list of available payment methods

* Add action type for setting express payments as initialized

* Only select from available methods in payment method options

* Remove argument from addRegisteredPaymentMethod in payment method registry

* Rename folder and store name to not contain the word data

* Add selectors for express payment methods and their initialisation

* Delete controls again in favour of thunks

* Rename payment-method-data to payment-methdods

* Create new setDefaultPaymentMethod function

This will set the payment method when the cart loads.

* Add CustomerPaymentMethodConfiguration type

* Make getAvailableExpressPaymentMethods return correct data

* Check express methods and normal methods when cart changes

* Add action for setting active express payment methods

* Handle express methods in checkPaymentMethodCanPay

* Hide express payments area if none are available

* Add selector for paymentMethodData

* Add customer data to default state and add selector for it

* Add setPaymentStatus action and reducer case

* Set the default payment method when one isn't selected

* Correct types on getCustomerPaymentMethods

* Set status in data store alongside context status

* Comment out active gateway selection - remove later

* Set status in express payment methods in data store

* Directly check payment methods from the list in blocks-registry

* Add semicolon to import statement

* Fix payment method data state call

* Get paymentMethodData from store not context

* Add addPaymentMethodData action/reducer case

* Update payment method on payment success

* Add 'getCurrentStatus' selector

* Remove the temporary solution

For getting payment method data into the data store

* Prevent the 'success' context action from being dispatched

* Update the "setPaymentStatus" data store action

Accept status as an object instead of string

* Fix the "currentStatus" reducer state update value

* Get payment data into data store

* Set the correct payment status to data store

* Get the success status of payment from data store

* Use store data in the payment dispatchers

Replace the React useReducers action in the payment dispatchers file with
the payment method data store

* Get payment status from data store

* Use data store for the payment error status

* Use payment data store failed status

* Use payment data store for the isFinished status

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>

* Fix merge conflict error

* Set & get the provider's state from our data store instead of React's useReducer (https://github.com/woocommerce/woocommerce-blocks/pull/6588)

* Add checkout data store

* wip on checkout data store

* CheckoutContext now uses the checkout store

* Investigated and removed setting the redirectUrl on the default state

* update extension and address hooks to use checkout data store

* use checkout data store in checkout-processor and use-checkout-button

* trim useCheckoutContext from use-payment-method-interface && use-store-cart-item-quantity

* Remove useCheckoutContext from shipping provider

* Remove isCalculating from state

* Removed useCheckoutContext from lots of places

* Remove useCheckoutContext from checkout-payment-block

* Remove useCheckoutContext in checkout-shipping-methods-block and checkout-shipping-address-block

* add isCart selector and action and update the checkoutstate context

* Fixed redirectUrl bug by using thunks

* Remove dispatchActions from checkout-state

* Change SET_HAS_ERROR action to be neater

* Thomas' feedback

* Tidy up

* Oops, deleted things I shouldn't have

* Typescript

* Fix types

* Fix tests

* Remove isCart

* Update docs and remove unecessary getRedirectUrl() selector

* set correct type for preloadedCheckoutData

* Remove duplicate Address type

* Fix missing addresses from type-defs index

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Update docs

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Revert feedback changes

* REvert feedback formatting

* Update docs formatting

* Fix typographical error on LegacyRegisterExpressPaymentMethodFunction type

* Add default state for PaymentMethod data store

* Add preliminary action types

* Add preliminary action dispatchers

* Create payment method data store

* Add preliminary reducers for payment method data store

* Add preliminary selectors for payment method data store

* Add reducers/actions for registering payment methods

* Export payment method data store key

* Add test for payment method data reducers

* Add shouldSavePaymentMethod selector

* Add store key as constant

* Add more action types for registering and initializing payment methods

* Get active payment method from data store instead of from context

* Add registered methods to default state of payment method data store

* Dispatch name of registered payment method to payment method data store

* Remove setShouldSavePayment from payment method dispatcher and types

* Get payment methods from registry instead of payment context

* Add available payment methods to store

* Add function to check whether payment methods are allowed to be used

* Add selector to check if payments are initialised

* Remove resolvers and add controls to payment method data store

* Change type of payment requirements to string[]

* Turn addRegistered and addRegisteredExpress into generators

This is so we can check each payment method's validity before adding it to the list of available payment methods

* Add action type for setting express payments as initialized

* Only select from available methods in payment method options

* Remove argument from addRegisteredPaymentMethod in payment method registry

* Rename folder and store name to not contain the word data

* Add selectors for express payment methods and their initialisation

* Delete controls again in favour of thunks

* Rename payment-method-data to payment-methdods

* Create new setDefaultPaymentMethod function

This will set the payment method when the cart loads.

* Add CustomerPaymentMethodConfiguration type

* Make getAvailableExpressPaymentMethods return correct data

* Check express methods and normal methods when cart changes

* Add action for setting active express payment methods

* Handle express methods in checkPaymentMethodCanPay

* Hide express payments area if none are available

* Add selector for paymentMethodData

* Add customer data to default state and add selector for it

* Add setPaymentStatus action and reducer case

* Set the default payment method when one isn't selected

* Correct types on getCustomerPaymentMethods

* Set status in data store alongside context status

* Comment out active gateway selection - remove later

* Set status in express payment methods in data store

* Directly check payment methods from the list in blocks-registry

* Add semicolon to import statement

* Fix payment method data state call

* Get paymentMethodData from store not context

* Add addPaymentMethodData action/reducer case

* Update payment method on payment success

* Add 'getCurrentStatus' selector

* Remove the temporary solution

For getting payment method data into the data store

* Prevent the 'success' context action from being dispatched

* Update the "setPaymentStatus" data store action

Accept status as an object instead of string

* Fix the "currentStatus" reducer state update value

* Get payment data into data store

* Set the correct payment status to data store

* Get the success status of payment from data store

* Use store data in the payment dispatchers

Replace the React useReducers action in the payment dispatchers file with
the payment method data store

* Get payment status from data store

* Use data store for the payment error status

* Use payment data store failed status

* Use payment data store for the isFinished status

* Update the setPaymentStatus argument

* Set up setRegisteredPaymentMethods in data store

* Use the data store version of the registeredPaymentMethods

* Fix the default state type of the registeredPaymentMethods

* Set up setRegisteredExpressPaymentMethod in data store

* Use the data version of the registred express payment methods

* Set the correct action type for removing payment methods

* Fix default state express payment methods type

* Use the store data version of activePaymentMethod

* Use setActivePaymentMethod in the dispatchers file

And refactor code

* Update payment status arguments for express payment methods

* Use paymentMethodData from the data store

* Use payment method's errorMessage from data store

* Update paymentMethods list in data store reducer

* Replace remaining payment context data with data store

* Clean up payment method context file

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>

* Get payment method data directly from the data store instead of the usePaymentMethodDataContext hook (https://github.com/woocommerce/woocommerce-blocks/pull/6589)

* Add checkout data store

* wip on checkout data store

* CheckoutContext now uses the checkout store

* Investigated and removed setting the redirectUrl on the default state

* update extension and address hooks to use checkout data store

* use checkout data store in checkout-processor and use-checkout-button

* trim useCheckoutContext from use-payment-method-interface && use-store-cart-item-quantity

* Remove useCheckoutContext from shipping provider

* Remove isCalculating from state

* Removed useCheckoutContext from lots of places

* Remove useCheckoutContext from checkout-payment-block

* Remove useCheckoutContext in checkout-shipping-methods-block and checkout-shipping-address-block

* add isCart selector and action and update the checkoutstate context

* Fixed redirectUrl bug by using thunks

* Remove dispatchActions from checkout-state

* Change SET_HAS_ERROR action to be neater

* Thomas' feedback

* Tidy up

* Oops, deleted things I shouldn't have

* Typescript

* Fix types

* Fix tests

* Remove isCart

* Update docs and remove unecessary getRedirectUrl() selector

* set correct type for preloadedCheckoutData

* Remove duplicate Address type

* Fix missing addresses from type-defs index

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Update docs

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Revert feedback changes

* REvert feedback formatting

* Update docs formatting

* Fix typographical error on LegacyRegisterExpressPaymentMethodFunction type

* Add default state for PaymentMethod data store

* Add preliminary action types

* Add preliminary action dispatchers

* Create payment method data store

* Add preliminary reducers for payment method data store

* Add preliminary selectors for payment method data store

* Add reducers/actions for registering payment methods

* Export payment method data store key

* Add test for payment method data reducers

* Add shouldSavePaymentMethod selector

* Add store key as constant

* Add more action types for registering and initializing payment methods

* Get active payment method from data store instead of from context

* Add registered methods to default state of payment method data store

* Dispatch name of registered payment method to payment method data store

* Remove setShouldSavePayment from payment method dispatcher and types

* Get payment methods from registry instead of payment context

* Add available payment methods to store

* Add function to check whether payment methods are allowed to be used

* Add selector to check if payments are initialised

* Remove resolvers and add controls to payment method data store

* Change type of payment requirements to string[]

* Turn addRegistered and addRegisteredExpress into generators

This is so we can check each payment method's validity before adding it to the list of available payment methods

* Add action type for setting express payments as initialized

* Only select from available methods in payment method options

* Remove argument from addRegisteredPaymentMethod in payment method registry

* Rename folder and store name to not contain the word data

* Add selectors for express payment methods and their initialisation

* Delete controls again in favour of thunks

* Rename payment-method-data to payment-methdods

* Create new setDefaultPaymentMethod function

This will set the payment method when the cart loads.

* Add CustomerPaymentMethodConfiguration type

* Make getAvailableExpressPaymentMethods return correct data

* Check express methods and normal methods when cart changes

* Add action for setting active express payment methods

* Handle express methods in checkPaymentMethodCanPay

* Hide express payments area if none are available

* Add selector for paymentMethodData

* Add customer data to default state and add selector for it

* Add setPaymentStatus action and reducer case

* Set the default payment method when one isn't selected

* Correct types on getCustomerPaymentMethods

* Set status in data store alongside context status

* Comment out active gateway selection - remove later

* Set status in express payment methods in data store

* Directly check payment methods from the list in blocks-registry

* Add semicolon to import statement

* Fix payment method data state call

* Get paymentMethodData from store not context

* Add addPaymentMethodData action/reducer case

* Update payment method on payment success

* Add 'getCurrentStatus' selector

* Remove the temporary solution

For getting payment method data into the data store

* Prevent the 'success' context action from being dispatched

* Update the "setPaymentStatus" data store action

Accept status as an object instead of string

* Fix the "currentStatus" reducer state update value

* Get payment data into data store

* Set the correct payment status to data store

* Get the success status of payment from data store

* Use store data in the payment dispatchers

Replace the React useReducers action in the payment dispatchers file with
the payment method data store

* Get payment status from data store

* Use data store for the payment error status

* Use payment data store failed status

* Use payment data store for the isFinished status

* Update the setPaymentStatus argument

* Set up setRegisteredPaymentMethods in data store

* Use the data store version of the registeredPaymentMethods

* Fix the default state type of the registeredPaymentMethods

* Set up setRegisteredExpressPaymentMethod in data store

* Use the data version of the registred express payment methods

* Set the correct action type for removing payment methods

* Fix default state express payment methods type

* Use the store data version of activePaymentMethod

* Use setActivePaymentMethod in the dispatchers file

And refactor code

* Update payment status arguments for express payment methods

* Use paymentMethodData from the data store

* Use payment method's errorMessage from data store

* Update paymentMethods list in data store reducer

* Replace remaining payment context data with data store

* Clean up payment method context file

* Get payment method state from data store in the checkout submit hook

* Copy types.ts file into the payment data store folder

* Fix isExpressPaymentMethodActive selector

* Move the entire currentStatus into the data store

* Replace the payment context state with the data store

* Fix getActiveSavedToken & clean up the context file

* Use the accutrate name of the "createErrorNotice"

* Update the payment method data store key import

* Diable unused state from the context

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>

* Refactor the payment method data store & context (https://github.com/woocommerce/woocommerce-blocks/pull/6607)

* Add checkout data store

* wip on checkout data store

* CheckoutContext now uses the checkout store

* Investigated and removed setting the redirectUrl on the default state

* update extension and address hooks to use checkout data store

* use checkout data store in checkout-processor and use-checkout-button

* trim useCheckoutContext from use-payment-method-interface && use-store-cart-item-quantity

* Remove useCheckoutContext from shipping provider

* Remove isCalculating from state

* Removed useCheckoutContext from lots of places

* Remove useCheckoutContext from checkout-payment-block

* Remove useCheckoutContext in checkout-shipping-methods-block and checkout-shipping-address-block

* add isCart selector and action and update the checkoutstate context

* Fixed redirectUrl bug by using thunks

* Remove dispatchActions from checkout-state

* Change SET_HAS_ERROR action to be neater

* Thomas' feedback

* Tidy up

* Oops, deleted things I shouldn't have

* Typescript

* Fix types

* Fix tests

* Remove isCart

* Update docs and remove unecessary getRedirectUrl() selector

* set correct type for preloadedCheckoutData

* Remove duplicate Address type

* Fix missing addresses from type-defs index

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Update docs

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Revert feedback changes

* REvert feedback formatting

* Update docs formatting

* Fix typographical error on LegacyRegisterExpressPaymentMethodFunction type

* Add default state for PaymentMethod data store

* Add preliminary action types

* Add preliminary action dispatchers

* Create payment method data store

* Add preliminary reducers for payment method data store

* Add preliminary selectors for payment method data store

* Add reducers/actions for registering payment methods

* Export payment method data store key

* Add test for payment method data reducers

* Add shouldSavePaymentMethod selector

* Add store key as constant

* Add more action types for registering and initializing payment methods

* Get active payment method from data store instead of from context

* Add registered methods to default state of payment method data store

* Dispatch name of registered payment method to payment method data store

* Remove setShouldSavePayment from payment method dispatcher and types

* Get payment methods from registry instead of payment context

* Add available payment methods to store

* Add function to check whether payment methods are allowed to be used

* Add selector to check if payments are initialised

* Remove resolvers and add controls to payment method data store

* Change type of payment requirements to string[]

* Turn addRegistered and addRegisteredExpress into generators

This is so we can check each payment method's validity before adding it to the list of available payment methods

* Add action type for setting express payments as initialized

* Only select from available methods in payment method options

* Remove argument from addRegisteredPaymentMethod in payment method registry

* Rename folder and store name to not contain the word data

* Add selectors for express payment methods and their initialisation

* Delete controls again in favour of thunks

* Rename payment-method-data to payment-methdods

* Create new setDefaultPaymentMethod function

This will set the payment method when the cart loads.

* Add CustomerPaymentMethodConfiguration type

* Make getAvailableExpressPaymentMethods return correct data

* Check express methods and normal methods when cart changes

* Add action for setting active express payment methods

* Handle express methods in checkPaymentMethodCanPay

* Hide express payments area if none are available

* Add selector for paymentMethodData

* Add customer data to default state and add selector for it

* Add setPaymentStatus action and reducer case

* Set the default payment method when one isn't selected

* Correct types on getCustomerPaymentMethods

* Set status in data store alongside context status

* Comment out active gateway selection - remove later

* Set status in express payment methods in data store

* Directly check payment methods from the list in blocks-registry

* Add semicolon to import statement

* Fix payment method data state call

* Get paymentMethodData from store not context

* Add addPaymentMethodData action/reducer case

* Update payment method on payment success

* Add 'getCurrentStatus' selector

* Remove the temporary solution

For getting payment method data into the data store

* Prevent the 'success' context action from being dispatched

* Update the "setPaymentStatus" data store action

Accept status as an object instead of string

* Fix the "currentStatus" reducer state update value

* Get payment data into data store

* Set the correct payment status to data store

* Get the success status of payment from data store

* Use store data in the payment dispatchers

Replace the React useReducers action in the payment dispatchers file with
the payment method data store

* Get payment status from data store

* Use data store for the payment error status

* Use payment data store failed status

* Use payment data store for the isFinished status

* Update the setPaymentStatus argument

* Set up setRegisteredPaymentMethods in data store

* Use the data store version of the registeredPaymentMethods

* Fix the default state type of the registeredPaymentMethods

* Set up setRegisteredExpressPaymentMethod in data store

* Use the data version of the registred express payment methods

* Set the correct action type for removing payment methods

* Fix default state express payment methods type

* Use the store data version of activePaymentMethod

* Use setActivePaymentMethod in the dispatchers file

And refactor code

* Update payment status arguments for express payment methods

* Use paymentMethodData from the data store

* Use payment method's errorMessage from data store

* Update paymentMethods list in data store reducer

* Replace remaining payment context data with data store

* Clean up payment method context file

* Get payment method state from data store in the checkout submit hook

* Copy types.ts file into the payment data store folder

* Fix isExpressPaymentMethodActive selector

* Move the entire currentStatus into the data store

* Replace the payment context state with the data store

* Fix getActiveSavedToken & clean up the context file

* Use the accutrate name of the "createErrorNotice"

* Update the payment method data store key import

* Diable unused state from the context

* Get enabled customer payment methods using data store selector

* Remove remaining useReducer action from the dispatchers file

* Update types and remove unused vars

* Remove the payment method dispatchers hook

* Refactor & clean up (remove unused files)

* Remove commented line from payment methods types

* Move event emitter into thunks

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>

* Remove checkout-state after merge conflicts

* Fix linting errors

* Move types to types.ts

* Move default states into respective store folders

* Fix types and add comment

* Move setExpressPaymentError to payment-methods store

* fix express payment methods not showing up

* Check if payment method is active from the state

* Add comments

* Remove commented out code in payment method data context

* Display an error in the check-payment-methods directly from data store

* Remove use-emit-response hook and move utils in event-emit/utils.ts

* Use correct action property to remove payment methods

* Fix formatting

* Only try to initialize payment methods when cart is done loading

* Add function to order payment methods from server

* Add payment methods in the correct order

* Prevent adding registered payment methods before cart is ready

* Ensure payment methods get removed from state when deregistered

* Reorder setting default payment methods to add customer methods first

* Get customer methods from store not context

* Remove error from payment-method state and associated selectors

* Remove use-payment-method-registration and update the payment method state to remove the duplicated registeredPaymentMethods

* Remove errorMessage from payment-methods store

* Rename customerPaymentMethods -> savedPaymentMethods

* Order payment methods when validating

* Refactor payment-methods.js

* Fix "Payment methods not set in editor" woocommerce/woocommerce-blocks#6655 bug

We never get to load the payment methods object in the editor mode
because there are no cart totals to load.

* Initialize payment methods when available payments are loaded

* Remove duplicate code

* Fix data store state mutation anti-pattern

A Redux rule is to never mutate the state in a reducer to avoid any unexpected results

* Set availablePaymentMethods to the paymentMethods object

Instead of its keys. We can get the keys using "Object.keys".

* Use the available ordered payment methods

The `getPaymentMethods` & `getExpressPaymentMethods` may include unordored
& unavailable payment methods.

* Get the correct value from the emit event response

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2022-09-28 13:45:42 +01:00
Alex Florisca 015291ccf3 Move checkout state code into thunks and rename `CheckoutState` context to `CheckoutEvents` (https://github.com/woocommerce/woocommerce-blocks/pull/6455)
* Add checkout data store

* wip on checkout data store

* CheckoutContext now uses the checkout store

* Investigated and removed setting the redirectUrl on the default state

* update extension and address hooks to use checkout data store

* use checkout data store in checkout-processor and use-checkout-button

* trim useCheckoutContext from use-payment-method-interface && use-store-cart-item-quantity

* Remove useCheckoutContext from shipping provider

* Remove isCalculating from state

* Removed useCheckoutContext from lots of places

* Remove useCheckoutContext from checkout-payment-block

* Remove useCheckoutContext in checkout-shipping-methods-block and checkout-shipping-address-block

* add isCart selector and action and update the checkoutstate context

* Fixed redirectUrl bug by using thunks

* Remove dispatchActions from checkout-state

* Change SET_HAS_ERROR action to be neater

* Thomas' feedback

* Tidy up

* Oops, deleted things I shouldn't have

* Typescript

* Fix types

* Fix tests

* Remove isCart

* Update docs and remove unecessary getRedirectUrl() selector

* validate event emitter button

* Added thunks in a separate file

* Call thunks from checkout-state

* Checkout logic tested and working

* Remove dependency injection as much as poss, tidy up and fix some TS errors

* Fix types in thunks.ts

* Fixed some ts errors

* WIP

* Fixed bug

* Shift side effects from checkout-state to checkout-processor

* Revert "Shift side effects from checkout-state to checkout-processor"

This reverts commit 059533da4eb34f9982f66cd4adacc7b2c24f939f.

* Rename CheckoutState to CheckoutEvents

* Move status check outside the thunk

* remove duplicate EVENTS constant

* remove temp buttons

* Remove console logs

* Augment @wordpress/data package with our new store types

* Add correct type for CheckoutAction

* Remove createErrorNotice arg from runCheckoutAfterProcessingWithErrorObservers

* Remove createErrorNotice from emit event types

* Use type keyword when importing types

* Add correct types for dispatch and select in thunks

* Update wordpress/data types

* Replace store creation with new preferred method

* Set correct action type on reducer

* Remove unnecessary async from thunk

* add CHECKOUT_ prefix to checkout events again

* export EVENTS with eveything else in checkout0-events/event-emit

* Remove duplicate SelectFromMap and TailParameters

* Updated type for paymentStatus

* TODO remove wp/data experimental thunks

* Remove `setCustomerId` from events and `processCheckoutResponseHeaders` (https://github.com/woocommerce/woocommerce-blocks/pull/6586)

* Prevent passing dispatch, instead get actions direct from store

* Get setCustomerId from the store instead of passing it to processCheckoutResponseHeaders

* Revert "Prevent passing dispatch, instead get actions direct from store"

This reverts commit 4479a2ef5599d9c8d99c3629616b3d662210fc08.

* Auto stash before revert of "Prevent passing dispatch, instead get actions direct from store"

* Remove duplicate dispatch

* Fix unit tests

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-09-28 13:45:42 +01:00
Alex Florisca 3630b7b03e Convert checkout context to data store - part 1 (https://github.com/woocommerce/woocommerce-blocks/pull/6232)
* Add checkout data store

* wip on checkout data store

* CheckoutContext now uses the checkout store

* Investigated and removed setting the redirectUrl on the default state

* update extension and address hooks to use checkout data store

* use checkout data store in checkout-processor and use-checkout-button

* trim useCheckoutContext from use-payment-method-interface && use-store-cart-item-quantity

* Remove useCheckoutContext from shipping provider

* Remove isCalculating from state

* Removed useCheckoutContext from lots of places

* Remove useCheckoutContext from checkout-payment-block

* Remove useCheckoutContext in checkout-shipping-methods-block and checkout-shipping-address-block

* add isCart selector and action and update the checkoutstate context

* Fixed redirectUrl bug by using thunks

* Remove dispatchActions from checkout-state

* Change SET_HAS_ERROR action to be neater

* Thomas' feedback

* Tidy up

* Oops, deleted things I shouldn't have

* Typescript

* Fix types

* Fix tests

* Remove isCart

* Update docs and remove unecessary getRedirectUrl() selector

* set correct type for preloadedCheckoutData

* Remove duplicate Address type

* Fix missing addresses from type-defs index

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Update docs

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Update docs/block-client-apis/checkout/checkout-api.md

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

* Revert feedback changes

* REvert feedback formatting

* Update docs formatting

* Delete empty types.ts file

* remove merge conflict from docs

* Correct linting in docs

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-09-28 13:45:42 +01:00
github-actions[bot] 78b02ce741 Release: 8.6.0 (https://github.com/woocommerce/woocommerce-blocks/pull/7228)
Co-authored-by: Daniel W. Robert <danielwrobert@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com>
Co-authored-by: Niels Lange <info@nielslange.de>
2022-09-27 17:56:29 +02:00
Luigi c3e3b29c6b Merge branch 'release/8.5.0' of https://github.com/woocommerce/woocommerce-blocks into trunk 2022-09-23 14:33:05 +02:00
github-actions[bot] 0ea0985a22 Release: 8.5.1 (https://github.com/woocommerce/woocommerce-blocks/pull/7212)
* use full link for WordPress resources (https://github.com/woocommerce/woocommerce-blocks/pull/7211)

Co-authored-by: Niels Lange <info@nielslange.de>

* Empty commit for release pull request

* update readme

* add testing instructions

* add zip file link

* update testing instructions and changelog entry

* Bumping version strings to new version.

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
2022-09-23 14:29:20 +02:00
Niels Lange 690ccb5191 Remove experimental flag from Cross-Sells block (https://github.com/woocommerce/woocommerce-blocks/pull/7188)
* Remove experimental flag from Cross-Sells block

* Remove experimental flag from Cross-Sells block

* Remove experimental flag from woocommerce/cart-cross-sells-products-block
2022-09-22 12:28:55 +07:00
Niels Lange 3d55668983 Create Cross-Sells product list (https://github.com/woocommerce/woocommerce-blocks/pull/6645)
* Create Cross-Sells product list

* Show “Read more” button for out-of-stock cross-sells products

* Update assets/js/blocks/cart/inner-blocks/cart-cross-sells-products/block.tsx

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

* Update assets/js/blocks/cart/cart-cross-sells-product-list/index.tsx

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

* Remove obsolete isLoading and placeholderRows

* Fix TS errors

* Rename crossSellsProduct to product

* Fix critical error

* Lock “Cart Cross-Sells products” inner block

* Update assets/js/blocks/cart/inner-blocks/cart-cross-sells-products/block.json

Co-authored-by: Saad Tarhi <saad.trh@gmail.com>

* Prevent moving of the Cross-Sells block

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
2022-09-21 13:04:15 +07:00
Raluca Stan 713fcd0b4d Update checkout-flow-and-events.md (https://github.com/woocommerce/woocommerce-blocks/pull/7071) 2022-09-20 11:16:53 +02:00
Thomas Roberts 2e245fdf10 Fix indentation on payment method integration documentation (https://github.com/woocommerce/woocommerce-blocks/pull/7156) 2022-09-16 08:10:24 -07:00
Luigi Teschio d1e19fc61b Add Dependabot documentation (https://github.com/woocommerce/woocommerce-blocks/pull/7141)
* Add Dependabot documentation

* fix typos

* Update docs/internal-developers/automations/dependabot.md

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

Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com>
2022-09-15 15:54:47 +02:00
Niels Lange eee72c822d Fix broken tables in available-filters.md 2022-09-14 14:47:08 +07:00
github-actions[bot] 4ab8f9c768 Release: 8.5.0 (https://github.com/woocommerce/woocommerce-blocks/pull/7110)
* Empty commit for release pull request

* add changelog - 8.5.0 version

* Add testing instructions

* add missing screenshot

* Fix pills in the Filter by Attribute block dropdown overlapping with the chevron (second attempt) (https://github.com/woocommerce/woocommerce-blocks/pull/7112)

* Fix invisible Reset filter button in some themes (https://github.com/woocommerce/woocommerce-blocks/pull/7111)

* update link zip file

* 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: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-09-13 14:29:51 +02:00
Luigi be9ab04e2f update link zip file 2022-09-13 10:29:25 +02:00
Luigi 763d921d83 add missing screenshot 2022-09-12 16:26:39 +02:00
Luigi a1899fdf53 Add testing instructions 2022-09-12 14:51:39 +02:00
Lucio Giannotta 5dd05d7ab2 Improve public-facing texts and labels (https://github.com/woocommerce/woocommerce-blocks/pull/7045)
We noticed that oftentimes our labels and text tend to be overly
technical or unclear. We decided to do a bulk pass to improve
the readability to non-technical users.
2022-09-12 10:39:26 +02:00
Niels Lange 2f52565c75 Correct broken *.md links (https://github.com/woocommerce/woocommerce-blocks/pull/7108) 2022-09-12 11:29:24 +07:00
Niels Lange 4e0f50b3e5 Fix broken table 2022-09-09 15:17:00 +07:00
Daniel W. Robert 207354fb4e Move experimental item under Feature Plugin group
The addition of the font-weight controls is an experimental feature and should be added under the Feature Plugin section so it does not get rolled into Core.
2022-09-07 12:49:57 -04:00
Niels Lange 25eb9f4950 Update checkout-flow-and-events.md 2022-09-06 16:23:58 +07:00
github-actions[bot] db69fd92fc Release: 8.4.0 (https://github.com/woocommerce/woocommerce-blocks/pull/7001)
* Empty commit for release pull request

* Add the changelog to `readme.txt`

* Add testing instructions & release zip

* Fix video tags

* Update feedback document path

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
2022-09-02 18:20:01 +01:00
Saad Tarhi d64cb9f4b2 Fix a broken link in "available-filters.md" (https://github.com/woocommerce/woocommerce-blocks/pull/6971) 2022-08-26 18:21:50 +01:00
Niels Lange 6ca73386f6 Update folder-structure.md 2022-08-25 14:39:34 +02:00
Seghir Nadir 58e3b33439 support mdlint in husky (https://github.com/woocommerce/woocommerce-blocks/pull/6968) 2022-08-24 14:26:14 +01:00
Seghir Nadir d059d98379 document add rest schema (https://github.com/woocommerce/woocommerce-blocks/pull/6960) 2022-08-22 22:24:49 +01:00
github-actions[bot] d827e8176e Release: 8.3.1 (https://github.com/woocommerce/woocommerce-blocks/pull/6910)
* Add global styles to Product Categories List block in WC core (https://github.com/woocommerce/woocommerce-blocks/pull/6906)

* add side effect to package (https://github.com/woocommerce/woocommerce-blocks/pull/6904)

* Add _blank to terms link (https://github.com/woocommerce/woocommerce-blocks/pull/6908)

* Only show items if there are multiple packages in the cart (https://github.com/woocommerce/woocommerce-blocks/pull/6899)

* Price Filter Block Design update (https://github.com/woocommerce/woocommerce-blocks/pull/6877)

* make toggle control full width

* add inlineInput attribute

* add inlineInput sidebar setting

* add inlineInput help text

* style the filter button

* style price input

* wip: reset button

* clicking on reset button will reset the price query

* support inline input fields

* price text styling update

* fix reset button font size

* add loading placeholder to all elements

* fix filter button style

* update range slider thumb and track style

* fix loading placeholder for non empty query

* move reset button into FilterSubmitButton component

* try: render placeholder serverside

* update filter button label

* Revert "try: render placeholder serverside"

This reverts commit 98f08efdb8048b8f78c7476b774d1128c1d31295.

* remove LoadingPlaceholder component

* remove Price: prefix from the current displayed price range

* update labels

* extract reset button as a dedicated component

* update price text section

* update reset button behavior

* avoid breaking filter submit button style for other filter blocks

* rename block to Filter by Price

* fix e2e test

* remove border support

* adjust padding for elments

* rename panel title

* Make the inline option enabled by default and fix frontend rendering

* Make the `Price Range Selector` uppercase

* Show `Reset` button only when a selection has been made

* Revert the `save` change to avoid the 'Block Recovery Prompt'

Co-authored-by: Alba Rincón <alba.rincon@automattic.com>

* Release: 8.3.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6897)

* Empty commit for release pull request

* Bump version numbers and add changelog

* Add testing notes

* Add global styles to Product Categories List block in WC core

* add side effect to package

* Update testing instructions

* Empty commit

* Fix linting

* Update zip file with latest changes

* Fix linting

* Update changelog entries

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>

* Update version to 8.4.0-dev

* Empty commit for release pull request

* Add change log

* Add testing instructions

* Fix the version number in testing instructions

* Bumping version strings to new version.

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
2022-08-17 17:32:49 +05:30
Tarun Vijwani cb7bc46223 Fix linting 2022-08-16 17:05:23 +05:30
Tarun Vijwani 8c2a277234 Update zip file with latest changes 2022-08-16 16:45:34 +05:30
Tarun Vijwani 0b30f0fcd5 Fix linting 2022-08-16 16:33:24 +05:30
Tarun Vijwani 7042ada23f Empty commit 2022-08-16 16:26:51 +05:30
Tarun Vijwani 7584e43354 Update testing instructions 2022-08-16 16:23:28 +05:30
Tarun Vijwani 356cebda63 Add testing notes 2022-08-15 18:56:33 +05:30
Thomas Roberts 2285d1d4e2 Include Cart and Checkout Blocks when included in WC Core (https://github.com/woocommerce/woocommerce-blocks/pull/6805)
* Remove all inbox notifications about cart and checkout blocks

* Remove feature flag check from CreateAccount class

* Remove feature plugin check to register PaymentsApi class

* Comment out is_feature_plugin_build function

We might need this later, so keeping it around seems useful.

* Remove feature plugin check when adding resource hints

* Import registerBlockType and use it over registerFeaturePLuginBlockType

* Ensure Cart and Checkout inner blocks register even if not feature plugin

* Comment out registerFeaturePluginBlockType

* Remove duplicate import

* Revert "Comment out registerFeaturePluginBlockType"

This reverts commit bec6ed899b68e26e836bde1c573d6066fb2bcc47.

* Align PHPDoc correctly

* Update feature flag doc to remove Cart and Checkout blocks + PaymentApi
2022-08-15 11:15:15 +05:30
Wojtek Naruniec 4a377ef729 Fix broken contributing links (https://github.com/woocommerce/woocommerce-blocks/pull/6876)
* Fix contributing docs links as some of them point to incorrect locations

* Fix typo
2022-08-12 06:38:17 -07:00
Luigi Teschio 88027a5e00 fix markdownlint violation (https://github.com/woocommerce/woocommerce-blocks/pull/6853) 2022-08-04 16:05:14 +02:00
github-actions[bot] f48ae038fa Release: 8.2.1 (https://github.com/woocommerce/woocommerce-blocks/pull/6826)
* Empty commit for release pull request

* Update 8.2.1 changelog

* Ensure onChange is set for radio buttons in SavedPaymentMethodOptions (https://github.com/woocommerce/woocommerce-blocks/pull/6825)

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

* Add 8.2.1 testing steps

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2022-08-04 12:32:12 +01:00
Albert Juhé Lluveras 3a4c123026 Update 8.2.0 testing zip 2022-08-02 15:53:46 +02:00
Albert Juhé Lluveras fbb0e1e6ee Fix typo in 8.2.0 testing steps 2022-08-02 11:15:54 +02:00
Albert Juhé Lluveras a0938e5ee4 Add 8.2.0 testing steps 2022-08-01 19:45:52 +02:00
Seghir Nadir 2ebb166b41 add new action for customer updates (https://github.com/woocommerce/woocommerce-blocks/pull/6792) 2022-08-01 09:56:28 +01:00
Saad Tarhi 3e6503a0d3 Fix typo & code error in the translation docs (https://github.com/woocommerce/woocommerce-blocks/pull/6726) 2022-07-21 20:40:33 +01:00
github-actions[bot] 8ae71628a1 Release: 8.1.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6693)
* Empty commit for release pull request

* Update readme.txt

* Update versions

* Update WC versions

* Add testing notes and release zip file

* Update testing instructions

* Fix typo in testing instructions

* Remove fix from the testing instructions

* Update readme

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
2022-07-19 10:51:50 +02:00
Raluca Stan cb9ec18f7f Update README.md 2022-07-11 16:21:46 +03:00
github-actions[bot] 4e6da0b80d Release: 8.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6652)
* Empty commit for release pull request

* Empty commit for release pull request

* Update readme.txt

* Update phpcs.xml

* Add testing notes and ZIP for release 8.0.0

* Update testing notes

* Update testing notes

* Revert woocommerce/woocommerce-blocks#6591

* Update testing notes

* Update readme.txt

* Update ZIP for release 8.0.0

* Change version from 8.0.0-dev to 8.0.0

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
2022-07-05 18:41:05 +02:00
Niels Lange 1ab1e17205 Update README.md 2022-07-04 12:39:17 +02:00
Luigi Teschio 16c11c2c50 Fix Markdown errors (https://github.com/woocommerce/woocommerce-blocks/pull/6616)
* Fix Markdown lint errors

* fix markdown
2022-06-22 17:02:15 +02: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
Albert Juhé Lluveras f1e20172b3 Add Cart & Checkout testing steps to Feature plugin only section in 7.7.0 testing instructions (https://github.com/woocommerce/woocommerce-blocks/pull/6615) 2022-06-22 11:36:27 +02:00
Luigi Teschio 97dbbc5520 Move testing release instructions in the right folder after refactor (https://github.com/woocommerce/woocommerce-blocks/pull/6614) 2022-06-22 11:09:48 +02:00
Raluca Stan 1fd41e39f4 Fix list indentation for the Blocks Handbook 2022-06-21 14:43:23 +01:00
Raluca Stan f0952fa4c4 Update the WooCommerce Blocks Handbook (https://github.com/woocommerce/woocommerce-blocks/pull/6601)
* Update the WooCommerce Blocks Handbook

Add 3 subsections to the Developer resources section and add the new tools we have availble

* Grammar fixes
2022-06-21 14:41:30 +01:00
Niels Lange e38d429f70 Clean up docs (https://github.com/woocommerce/woocommerce-blocks/pull/6550)
* Link translation section to docs file

* Delete duplicated docs

* Move internal developer docs into corresponding folder

* Correct merge conflict

* Change ‘docs/testing/’ to ‘docs/internal-developers/testing’

* Fix visible \ and missing bulletpoint

* Add missing testing notes
2022-06-20 19:04:41 +02:00
Luigi Teschio 72599384f5 Fix MD lint errors and fix conflicts (https://github.com/woocommerce/woocommerce-blocks/pull/6598)
* 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.

* Fix MD lint errors and fix conflicts

* Empty commit for release pull request

* Release: 7.8.3 (https://github.com/woocommerce/woocommerce-blocks/pull/6602)

* Fix PHP notice in Mini Cart when prices included taxes (https://github.com/woocommerce/woocommerce-blocks/pull/6537)

* Empty commit for release pull request

* Add changelog to readme.txt

* Update versions

* Add Testing steps for version 7.8.1

* Bumping version strings to new version.

* Empty commit for release pull request

* Empty commit for release pull request

* Replace instances of wp_is_block_theme() with wc_current_theme_is_fse_theme() (https://github.com/woocommerce/woocommerce-blocks/pull/6590)

* update changelog and testing instructions

* Empty commit for release pull request

* upload zip

* Bumping version strings to new version.

* Fix images hidden by default in Product grid blocks (https://github.com/woocommerce/woocommerce-blocks/pull/6599)

* update changelog and testing instructons

* Bumping version strings to new version.

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi <gigitux@gmail.com>

* fix MD lint errors

* fix sort deps

Co-authored-by: github-actions <github-actions@github.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>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-20 16:27:11 +02:00
Luigi 4d9780269f Merge branch 'release/7.6.0' of https://github.com/woocommerce/woocommerce-blocks into trunk 2022-06-20 15:00:25 +02:00
github-actions[bot] a35b67cd0f Release: 7.6.2 (https://github.com/woocommerce/woocommerce-blocks/pull/6600)
* Fix PHP notice in Mini Cart when prices included taxes (https://github.com/woocommerce/woocommerce-blocks/pull/6537)

* Replace instances of wp_is_block_theme() with wc_current_theme_is_fse_theme() (https://github.com/woocommerce/woocommerce-blocks/pull/6590)

* Empty commit for release pull request

* Add 7.6.1 changelog to readme.txt

* Add Testing steps for version 7.6.1

* Bump versions to 7.6.1-dev

* Update testing ZIP

* Remove wrong testing step

* Bumping version strings to new version.

* Fix images hidden by default in Product grid blocks (https://github.com/woocommerce/woocommerce-blocks/pull/6599)

* update changelog and testing instructons

* Empty commit for release pull request

* upload zip

* update readme

* Bumping version strings to new version.

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
2022-06-20 14:57:08 +02:00
Albert Juhé Lluveras 9ce6cd6117 Add link to WC Blocks 7.6.1 testing steps 2022-06-17 16:43:18 +02:00
Albert Juhé Lluveras 1b39de4af0 Add back missing release testing steps after update 2022-06-17 16:42:29 +02:00
Albert Juhé Lluveras 7520c26065 Add WooCommerce 7.6.1 changelog and testing notes 2022-06-17 16:39:08 +02:00
Albert Juhé Lluveras 027ee07b57 Fix linting errors in WC Blocks 7.8.1 testing instructions (https://github.com/woocommerce/woocommerce-blocks/pull/6564) 2022-06-14 10:56:07 +02:00
Albert Juhé Lluveras bfd62a3f78 Add Testing steps for version 7.8.1 2022-06-13 15:50:02 +02:00
Niels Lange d348db4779 Add docs about translation handling (https://github.com/woocommerce/woocommerce-blocks/pull/6405)
* Create translation handling files

* Add docs about “Translation basics”

* Update docs for “Translation basics”

* Add docs about “Translations in PHP files”

* Add docs about “Translations in JS/TS files”

* Update docs for “Translation basics”

* Add docs for “Translation management”

* Add docs for “Translations in FSE templates”

* Add “Translations” to “WooCommerce Blocks Handbook”

* Add docs for “Lazy-load translations”

* Rewrite first paragraph of “Translations in FSE templates”

* Fix typo

* Update repo URL

* Remove obsolete space and comma

* Update repo URL

* Rename lazy-load file

* Add section about “sprintf()” to “Translations in JS/TS files”

* Remove reference to “npm install @wordpress/i18n”

* Add docs for “Translation files and loading”

* Rename readme.md to README.md

* Remove double file extension

* Remove self-explaining explenations

* Update docs/README.md

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

* Update docs/translations/translation-basics.md

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

* Update docs/translations/translation-basics.md

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

* Update docs/translations/translation-loading.md

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

* Update docs/translations/translation-loading.md

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

* Update docs/translations/translation-loading.md

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

* Update docs/translations/translation-loading.md

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

* Update docs/translations/translation-loading.md

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

* Update docs/translations/translation-loading.md

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

* Update docs/translations/translation-management.md

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

* Update docs/translations/translations-in-FSE-templates.md

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

* Clarify how to use variables in translations

* Change “i18n” to “internationalization (i18n)”

* Link translation functions to the WordPress reference

* Add Translation management to Translation management

* Update “Translations in FSE templates”

* Lint Markdown files

* Update chunk translation register functions

* Update function that loads the translation file

* Update information about lazy-loading

* Adjust lazy-loading docs title and file name

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-06-10 17:40: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
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
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
Saad Tarhi 25cb047483 Remove `useStoreSnackbarNotices` and interact directly with data store instead (https://github.com/woocommerce/woocommerce-blocks/pull/6411)
* Use wp store directly instead of React Context

We are using now actions directly from wp store in 'useStoreCartCoupons'
hook to apply and remove coupon.

* Remove unused "useStoreSnackbarNotices" related
files

* Add NoticeContext TS definition

* Remove the Provider references and refactor code

* Fix snackbar notice creation bug

* Fix "clear out snackbar coupon notice" bug

* Update "notices" API documentation

Remove snackbar hooks mentions since it's not used anymore
2022-05-25 22:00:47 +01:00
Saad Tarhi 8a702ab50f Fix broken link 2022-05-25 08:12:54 +01:00
Niels Lange c6d22b9471 Rename readme.md to README.md 2022-05-16 09:29:38 +07:00
Niels Lange 98063e454a Rename readme.md to README.md 2022-05-16 09:28:50 +07:00
Thomas Roberts f3dc80c6f7 Bump version numbers to 7.7.0-dev 2022-05-10 09:54:22 +01:00
Thomas Roberts 88f921eb0d Add correct list of blocks to 6302 notes 2022-05-09 16:12:45 +01:00
Thomas Roberts e6d1341980 Add testing notes 2022-05-09 12:20:22 +01: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
Albert Juhé Lluveras 48e415b39b Remove Mini Cart block from the list of experimental flags (https://github.com/woocommerce/woocommerce-blocks/pull/6291) 2022-04-26 17:04:29 +02:00
Seghir Nadir bbd7e53598 graduate draft orders (https://github.com/woocommerce/woocommerce-blocks/pull/6288) 2022-04-25 15:08:37 +01:00
Nadir Seghir 3021cc8de6 add releases to doc page 2022-04-15 15:03:31 +01:00
Nadir Seghir a06b2b5dcc add testing steps and readme from previous releases 2022-04-15 14:59:15 +01: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
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
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
Alex Florisca e15d516163 Revert "Move cart and mini-cart blocks into their own folders (https://github.com/woocommerce/woocommerce-blocks/pull/6126)" (https://github.com/woocommerce/woocommerce-blocks/pull/6190)
This reverts commit d005dbd2cf.
2022-04-05 11:14:32 +01:00
Alex Florisca d005dbd2cf Move cart and mini-cart blocks into their own folders (https://github.com/woocommerce/woocommerce-blocks/pull/6126)
* Move cart and mini-cart into their own folders

* Update other references of cart-checkout
2022-04-04 12:34:29 +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
Niels Lange e4088cc398 Update documentation-guidelines.md 2022-03-23 12:22:06 +01: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 c299411e28 7.2 testing notes 2022-03-15 11:53:56 +00:00
Thomas Roberts a6bff7e6e8 Change `shippingRatesLoading` to `isLoadingRates` (https://github.com/woocommerce/woocommerce-blocks/pull/5999)
* Change `shippingRatesLoading` to `isLoadingRates`

* Revert isLoadingRates back to old name in payment method interface

* Update docs with correct names returned by usePaymentMethodInterface

* Update TS to name the selectShippingRate method correctly

* Change method name on usePaymentMethodInterface back
2022-03-14 11:29: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
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
Alex Florisca e14448e151 Update testing instructions for 6.8.0 and 6.9.0 releases (https://github.com/woocommerce/woocommerce-blocks/pull/5855)
* Update testing instructions for 6.9.0 release

* Edit 6.8.0 testing notes

* Update 6.8.0 testing docs
2022-03-07 12:06:50 +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
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
Tom Cafferkey e8855a5af3 Full Store Editing: Technical documentation (https://github.com/woocommerce/woocommerce-blocks/pull/5939)
* templates README and block-template-controller README

* Add execution scenario to block template controller readme

* Amend return value to block template controller readme

* Add source file link to block template controller docs

* LegacyTemplate.php overview

* Legacy Template JavaScript block README

* Update requirements of templates feature

* Doc updates based on feedback, and change Legacy Template references to Classic Template in anticipation of naming convention updates

* Update classic-template.md README

* Reword part of the add_block_templates section

* Update assets/js/blocks/legacy-template/README.md

Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>

* Update docs/readme.md

Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>

* Update docs/templates/README.md

Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>

* Update docs/templates/README.md

Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>

* Update README for blocktemplatecontroller

* Review feedback for Woo FSE technical documentation

Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>
2022-03-02 08:57:53 +00: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
Tarun Vijwani 55c3ec201f Add Testing Details In Contributors Guide (https://github.com/woocommerce/woocommerce-blocks/pull/5879)
* Add testing details in contributors guide
2022-02-25 18:51:58 +04: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
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
Raluca Stan 858fffd697 Pass context information about parent block to the existing Slots (https://github.com/woocommerce/woocommerce-blocks/pull/5885)
* Pass context information about containing block to the existing Slots

* Fix images added to the Slots docs

* Use the parent's block name for the context prop passed to Slot fills
2022-02-22 10:33:52 +01:00
Albert Juhé Lluveras 0008e8b7f1 Update some Cart and Checkout extensibility docs to include the Mini Cart block (https://github.com/woocommerce/woocommerce-blocks/pull/5815)
* Update some Cart and Checkout extensibility docs to include the Mini Cart block

* Add Mini Cart to blocks-registry docs
2022-02-21 16:29:29 +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
Tomasz Tunik 729de5ea05 Revert "fix: accessibility of search products block (https://github.com/woocommerce/woocommerce-blocks/pull/5691)" (https://github.com/woocommerce/woocommerce-blocks/pull/5717)
This reverts commit d4d3f18453.
2022-02-04 11:26:34 +01:00
Tomasz Tunik d4d3f18453 fix: accessibility of search products block (https://github.com/woocommerce/woocommerce-blocks/pull/5691)
When output with php the block had correct accessibility on
the frontend but in the editor or when rendered as block
the correct aria label was missing because of misspelled
aria-label attribute.

Also fixed wrong value type provided for tabIndex in editor
while at it.
2022-02-02 19:56:56 +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
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 fe0dfa81b1 update readme and add testing instructions for release 6.7.2 and 6.7.3 2022-01-24 15:08:59 +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
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
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
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
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 f1e7c7d706 Remove item from testing notes for 6.7.0 2022-01-04 10:07:44 +01:00
Raluca Stan 695fb19f62 Update Testing Notes 2022-01-03 17:52:36 +01:00
Raluca Stan 70f8bc9500 Fix typo in testing notes 2022-01-03 15:59:35 +01:00
Raluca Stan 5c0f3bfd33 Add testing notes for the 6.7.0 release 2022-01-03 15:58:09 +01:00
Thomas Roberts 5036c69638 Add E2E tests for Filter blocks (Price, Attribute, and Active Filters) (https://github.com/woocommerce/woocommerce-blocks/pull/4562)
* Add clear and fill input test util

* Add tests for Filter Products by Price

* Add class name to filter products by price block in editor

* Update wp-env

* Fix formatting

* Update lock

* Revert "Update lock"

This reverts commit f4e809e000430eea3972c94fd2aea0a19ba6961b.

* Create product attributes during setup

* Remove product attributes during teardown

* Add attributes in fixture-data

* Add two new products, for attribute testing

* Load attributes into store and apply them to products

* Add class to Filter by Attribute when editing

This is so it can be targeted in E2E tests more easily.

* Add tests for Filter Product by Attribute

* Fix formatting in attribute-filter.test.js

* Add tests for active filters block

* Add doc block for ensuteCleanAttributes

* Update wording of title test in all filter block E2E

* Update test wording to read better

* Update snapshots

* Use pptr-testing-library selectors to click elements

This makes the tests easier to reason with, and lets us take a step back from the implementation details (classnames etc.)

* Add saveOrPublish test util

* Use pptr-testing-library selectors to click elements in attribute filter

* Use pptr-testing-library selectors to click elements in price filter

* Add `puppeteer-testing-library`

* Use puppeteer-testing-library API to look for H6 button

* Use correct argument in jest-puppeteer.dev.config

* Update package.json & package-lock.json

* remove tests for 5.3

* remove snapshots

* Remove ensureCleanAttributes

* Remove puppeteer-testing-library, install missing expect-puppeteer package and update tests

The puppeteer-testing-library, although added by gutenberg is not actively used.
I have removed it and realised that the added functionality can be easily replaced by expect-puppeteer.
This is a package that we specify in the jest configuration but it was not part of our package.json.
The selectors from puppeteer-testing-library have been replaced with .toClick and the utility clearAndFillInput with .toFill

The Filter by Attribute block has been skiped until tests are fixed.

* Add back setupPageSettings to jest setup

* Fix filter by attribute block test

* Fix linting error

Co-authored-by: Raluca Stan <ralucastn@gmail.com>
2021-12-23 17:26:10 +01:00
Tom Cafferkey 5730574fde Update testing instructions for missing PRs in 6.6.0 (https://github.com/woocommerce/woocommerce-blocks/pull/5431) 2021-12-21 16:09:12 +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
Tom Cafferkey 5a7adba1bd Update 640.md 2021-12-17 10:47:16 +00: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
Mike Jolley 70106d45d3 Revise checkout payment statuses to avoid data loss on error (https://github.com/woocommerce/woocommerce-blocks/pull/5350)
* Clarify docs for STARTED

* Clarify docs for setActivePaymentMethod

* Remove useActivePaymentMethod hook (this held state for active methods and tokens)

* Update type defs

* Enhance setActivePaymentMethod action to accept method data

* SET_ACTIVE_PAYMENT_METHOD action

* Add setActivePaymentMethod dispatcher and make "started" status only

* Update setActivePaymentMethod usage in express methods

* Set radio control defaults

* Consolodate tokens and methods

* Update assets/js/base/context/providers/cart-checkout/payment-methods/reducer.ts

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

* Spacing

* Split saved cards tests from regular, since saved cards are checked by default

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2021-12-10 16:26:16 +01:00
Mike Jolley 7fd25d4b37 Typedefs and cartData for `usePaymentMethodInterface` (https://github.com/woocommerce/woocommerce-blocks/pull/5177)
* Typedefs and cartData for the payment interface

* fix case on noticeContexts

* typeof for enums

* immutable note

* Add cartData to docs table

* Rebase docs
2021-12-07 13:02:57 +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
Albert Juhé Lluveras 6e079b9a4b Add 6.3.3 testing steps 2021-11-25 13:26:12 +01:00
Alex Florisca 3aa9655e8c Update folder structure doc (https://github.com/woocommerce/woocommerce-blocks/pull/5235) 2021-11-24 14:19:32 +00:00
Raluca Stan b6b92b5908 Update payment-method-integration.md 2021-11-24 12:14:33 +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
Raluca Stan edbef32a6f Pass to registered payments a wrapper component to handle the loading state (https://github.com/woocommerce/woocommerce-blocks/pull/5135) 2021-11-22 10:41:54 +01:00
github-actions[bot] 519fd82949 Release: 6.3.2 (https://github.com/woocommerce/woocommerce-blocks/pull/5178)
* 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.

* 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.

* Empty commit for release pull request

* Update readme.txt

* Add testing instructions

* Add testing notes to README.md

* 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.

* Legacy Template Block: Remove the deletion lock (https://github.com/woocommerce/woocommerce-blocks/pull/5166)

Previously, our legacy template block was locked to prevent the users from
removing it. The block could however be removed by erasing the parent, so
this change allows the user to directly remove the block itself.

Also:
Closes woocommerce/woocommerce-blocks#5163
Closes woocommerce/woocommerce-blocks#5109

* Update release zip

* Update release zip

* Update testing instructions

* Bumping version strings to new version.

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: 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: Tom Cafferkey <tjcafferkey@gmail.com>
Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com>
2021-11-18 11:03:55 +07: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
Raluca Stan 5af0d7ddb9 Update payment-method-integration.md
Fix type-def link
2021-11-12 15:48:06 +01:00
Albert Juhé Lluveras 6aeac39f17 Downgrade @wordpress/scripts to 17.1.0 to fix dependency mistmach issue (https://github.com/woocommerce/woocommerce-blocks/pull/5124)
* Downgrade @wordpress/scripts to a previous version to fix dependency mismatch

* Fix typo
2021-11-11 12:06:04 +01:00
Seghir Nadir 6592796ff0 Add cart item classname filter (https://github.com/woocommerce/woocommerce-blocks/pull/4992)
* Add cartItemClass filter for cart line items

* Add cartItemClass, originally implemented in 96f18443bc

* add filter to order summary items

Co-authored-by: Manos Psychogyiopoulos <psyx@somewherewarm.net>
2021-11-09 15:15:35 +00:00
Niels Lange 7e547bef88 Remove Automattic Writing Style Guide section 2021-11-04 19:02:47 +07:00
Thomas Roberts 37bf5f38c5 Add `register_payment_requirements` documentation (https://github.com/woocommerce/woocommerce-blocks/pull/4994)
* Add table of contents

* Add documentation for register_payment_requirements
2021-11-04 11:45:41 +00:00
Niels Lange d1528e2d38 Remove link to Automattic Writing Style Guide 2021-11-04 18:44:26 +07: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
Raluca Stan 4cbd03c6a2 Update available-filters.md 2021-10-29 15:44:40 +01:00
Raluca Stan ace7287b28 Update slot-fills.md 2021-10-29 15:29:37 +01:00
Raluca Stan 613f7c91e8 Update slot-fills.md 2021-10-29 15:29:21 +01:00
Raluca Stan 8ad9f46366 Update available-slot-fills.md 2021-10-29 14:45:02 +01:00
Raluca Stan 4d9423cac9 Update slot-fills.md 2021-10-29 14:23:33 +01: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
Albert Juhé Lluveras 4253a5fe10 Make Mini Cart block react to removed_from_cart events (https://github.com/woocommerce/woocommerce-blocks/pull/4947)
* Make Mini Cart block react to removed_from_cart events

* Move listening to add to cart and remove from cart events to the useStoreCart hook

* Add tests
2021-10-25 18:05:01 +02: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
Raluca Stan 05dc130d21 Register as experimental the Cart i2 blocks and update the feature flag documentation (https://github.com/woocommerce/woocommerce-blocks/pull/4936)
* Use registerExperimentalBlockType for registering Cart i2 related blocks

* Update feature flags and experimental interfaces doc
2021-10-14 13:44:46 +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
Mike Jolley 61e5a4c55e Add Checkout Package and Checkout i2 Documentation (https://github.com/woocommerce/woocommerce-blocks/pull/4892)
* Move components

* Main index for docs

* Block registry documentation

* filter registry docs

* Utility docs

* Doc for components

* Link to package docs

* fix import
2021-10-12 15:23:52 +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
Niels Lange ad50a0e7d2 Add file and folder structure documentation (https://github.com/woocommerce/woocommerce-blocks/pull/4754)
* Add file and folder structure documentation

* Update docs/contributors/folder-structure.md

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

* Update docs/contributors/folder-structure.md

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

* Update docs/contributors/folder-structure.md

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

* Update description for atomic blocks in folder documentation

* Update description for base blocks in folder documentation

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2021-10-08 22:10:05 +07:00
Niels Lange ce371a0af7 Add documentation guidelines (https://github.com/woocommerce/woocommerce-blocks/pull/4893)
* Add documentation guidelines

* Link to Automattic Writing Style Guide

* Adjust section for heading usage

* Update docs/contributors/documentation-guidelines.md

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

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2021-10-08 11:54:52 +07:00
Albert Juhé Lluveras f8bf71c164 Document DOM events used in WC Blocks (https://github.com/woocommerce/woocommerce-blocks/pull/4876)
* Document DOM events used in WC Blocks

* Update docs/extensibility/dom-events.md

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

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2021-10-06 10:52:53 +02:00
Niels Lange 1557d347a5 Update js-build-system.md 2021-10-04 11:35:01 +07:00
github-actions[bot] cd5e31d9ba Release: 6.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/4850)
* Empty commit for release pull request

* add changelog

* change minimum_supported_wp_version to 5.6

* add testing instructions

* update testing steps with new code

* add terms and condition block testing steps

* Checkout i2: Show a notice if terms and conditions page (https://github.com/woocommerce/woocommerce-blocks/pull/4859)

* Make Terms block insertable

* add a notice to setup pages

* push updated error design in editor

* fix default text

* remove outline from checkbox-control in error

* update testing docs

* Update readme.txt

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

* Update readme.txt

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

* Update docs/testing/releases/600.md

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

* Update docs/testing/releases/600.md

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

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2021-09-29 11:23:49 +01:00
Raluca Stan a2f39d07f1 Add documentation for registerPaymentMethodExtensionCallbacks (https://github.com/woocommerce/woocommerce-blocks/pull/4834)
* Improve the type for callbacks registered by extensions

The previous type was CanMakePaymentCallback, used for the payment methods's own canMakePayment callbacks, which could also return Promises. In order to eliminate the confusion, a new type has been created that defines callbacks that only return true or false.

* Document registerPaymentMethodExtensionCallbacks

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

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

* Add information about payment method name in documentation

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2021-09-24 14:34:07 +01:00
Thomas Roberts d0f9920fe2 Merge release/5.9.0 into trunk following 5.9.1 release 2021-09-24 09:52:19 +01:00
Raluca Stan 27600b3309 Update canMakePayment to receive cart as argument and make it react to changes in billingData. (https://github.com/woocommerce/woocommerce-blocks/pull/4776)
* Add 	cartCoupons to canMakePayment argument

* Add cart to the paymentMethodArgument and improve the dependencies for the effect calling refreshCanMakePayments

* Debounce refreshCanMakePayments

The initial approach was to debounce billingData and use this value as a dependency for the useEffect that runs refreshCanMakePayments.
But because the depencies array can always change we decided to debounce the callback instead, ensuring this way that callback is not called multiple times: for example when typing a field in the billing address. Debounced was chosen instead of throttle because we want to call refreshCanMakePayments once the change event has stopped, with the final value.

* Update types and docs related to canMakePaymentArgument

* Mock the /cart call when testing payment methods

* Remove unused cartCoupons key in canMakePaymentArguments' interface
2021-09-23 16:27:02 +01:00
Mike Jolley 83c49d94c3 Add testing notes for 5.7.2 2021-09-23 15:06:01 +01:00
Seghir Nadir 686bb662ad Update feature flags and experimental interfaces document. (https://github.com/woocommerce/woocommerce-blocks/pull/4750)
* add missing blocks and update old links

* features behind a feature flag

* update filters and JS methods

* Apply suggestions from code review

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

Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2021-09-16 14:50:33 -04:00
Albert Juhé Lluveras 8eb656eccf Update build system docs (https://github.com/woocommerce/woocommerce-blocks/pull/4762)
* Update build system docs

* Update docs/contributors/js-build-system.md

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

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2021-09-16 17:58:03 +02:00
Raluca Stan 615b939383 Add Typescript to /blocks-registry/payment-methods (https://github.com/woocommerce/woocommerce-blocks/pull/4702)
* Type payment method under /block-registry

* Type assertions and add them back to PaymentMethodConfig

* Type ExpressPaymentMethodConfig

* Fix comment on payments types

* Fix CanMakePayment type

* Fix assertion for payment methods and the savedTokenComponent property

Because class properties come from the config object, they will never be null except if somebody explicitly adds them the the object with a value of null.
Which is not the case for savedTokenComponent for example, because it's optional and that's why we check it like this paymentMethods[ activePaymentMethod ]?.savedTokenComponent

* Add the complete CanMakePaymentReturnType and account for null for PaymentMethod.icons

- canMakePayment can also return a Promise and this was not included in the type definition
- in PaymentMethodConfig's constructor we also need to account for extensions passing {icons: null}.

* Revert Fix assertion for payment methods and the savedTokenComponent property

* Fix failing tests because of savedTokenComponent

I've reverted my changes and left the initialization of savedTokenComponent as it was.

* Rename types for more clarity

* Fix ExtensionNamespace and PaymentMethodName types

* Rename Supports and *PaymentMethodOptions type for better clarity
2021-09-15 18:36:02 +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
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
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 819ed4abb2 Add 5.7.1 testing notes 2021-08-30 10:28:15 +02:00
Niels Lange c8ee90c465 Remove obsolete colon and display checklist items as list 2021-08-27 10:07:35 +02:00
Thomas Roberts e3b88d501e Add documentation for `ExperimentalDiscountsMeta`, `cart/extensions` endpoint, and `extensionCartUpdate` (https://github.com/woocommerce/woocommerce-blocks/pull/4377)
* Add documentation for `cart/extensions`

* Add documentation for ExperimentalDiscountsMeta slot

* Add clearer information to `cart/extensions` documentation

* Change checkout screenshot

* Change checkout screenshot

* Update documentation into new template and amend based on suggestions

* Fix typo

* Fix punctuation and remove passive-aggressive voice!

* Update docs/extensibility/extend-rest-api-update-cart.md

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

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2021-08-25 13:12:34 +01: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
Thomas Roberts 48cf656269 Update documentation to describe updated snackbar filter (https://github.com/woocommerce/woocommerce-blocks/pull/4508)
* Update documentation to describe new snackbar filtering

* Remove use of personal pronouns

* Revert "Remove use of personal pronouns"

This reverts commit a3e30310c1a4714c758d5dce5f87960d570477f1.
2021-08-20 07:56:16 -04: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
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
Albert Juhé Lluveras 203128d323 Fix Hand-picked Products block name inconsistencies (https://github.com/woocommerce/woocommerce-blocks/pull/4497) 2021-07-27 12:46:51 +02:00
Raluca Stan 0c9cec5895 Update extend-rest-api-add-data.md (https://github.com/woocommerce/woocommerce-blocks/pull/4490)
Update doc file with Formatters links
2021-07-27 10:28:49 +02:00
Niels Lange 64f71be372 Update getting-started.md (https://github.com/woocommerce/woocommerce-blocks/pull/4499) 2021-07-26 14:25:24 +02:00
Thomas Roberts ce965a3578 Update notices documentation to reflect changes to Snackbar Notices (https://github.com/woocommerce/woocommerce-blocks/pull/4455)
* Update notices documentation to reflect changes to Snackbar Notices

* Update docs/block-client-apis/notices.md

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

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2021-07-12 12:49:47 +01:00
Thomas Roberts d841529f35 Add documentation for Formatters (https://github.com/woocommerce/woocommerce-blocks/pull/4390)
* Add documentation for Formatters

* Add link to formatters docs

* Add link to main README

* Add anchors to document

* Add code exaple of getting formatters

* Change CurrencyFormatter return into a table

* Fix table formatting issue and ensure arguments are all in tables
2021-07-09 17:19:24 +01: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
Thomas Roberts 93b750ee19 Change `couponName` filter to `coupons` and update documentation (https://github.com/woocommerce/woocommerce-blocks/pull/4312)
* Rework coupon filters to not be applied individually

* Add a `text` property to the coupons in the cart

This is needed to allow extensions to change the text without affecting the code.

* Output coupon text instead of code

* Add coupons filter documentation

* Add deprecation warning when extension uses couponName filter

* Change couponName filter to coupons

* Add label to Cart item definition

* Change coupon.text to coupon.label

* Update coupon.label in coupon aria-label

* Update image and coupon.text in docs

* Add filter registration example
2021-07-01 14:12:46 +01:00
Raluca Stan 5e38ee6090 Update/5.3.2 testing instructions (https://github.com/woocommerce/woocommerce-blocks/pull/4403) 2021-06-29 13:08:51 +03: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
Raluca Stan 837c58863a Update 531.md
Fix testing instruction with detailed info about the TT1 blocks theme
2021-06-25 11:16:23 +03:00
Thomas Roberts e5beda98f6 Add `IntegrationInterface` documentation (https://github.com/woocommerce/woocommerce-blocks/pull/4394)
* Add IntegrationInterface documentation

* Add information about the values of get_script_data being serialized

* Add link to main README
2021-06-25 09:13:44 +01:00
Raluca Stan f14a1f64bf Update 531.md 2021-06-23 15:36:00 +03:00
Darren Ethier 9d01e7d38b Update 520.md
clarify testing notes
2021-06-23 06:56:29 -04: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 f9fefd3e53 Split 5.2.0 testing steps between feature plugin and feature plugin + core 2021-06-18 18:21:24 +02:00
Albert Juhé Lluveras 4cd12a8108 Add 5.3.1 testing instructions (https://github.com/woocommerce/woocommerce-blocks/pull/4351)
* Update changelog and compatibility version for 5.3.1

* Add testing instructions for WC Blocks 5.3.1

* Update ZIP file for WC Blocks 5.3.1 testing
2021-06-15 11:47:11 +02:00
Thomas Roberts 0edcd0ef9a Add documentation for __experimentalDiscountsMeta slot (https://github.com/woocommerce/woocommerce-blocks/pull/4349) 2021-06-15 09:30:13 +01: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
github-actions[bot] 8c066b6fa3 Release: 5.3.0 (https://github.com/woocommerce/woocommerce-blocks/pull/4318) 2021-06-08 12:07:57 +03:00
Thomas Roberts bafa5c2827 Add snackbar filter (https://github.com/woocommerce/woocommerce-blocks/pull/4313) 2021-06-07 11:41:33 +03:00
Thomas Roberts f0cb4cba90 Add documentation for the `couponName` filter (https://github.com/woocommerce/woocommerce-blocks/pull/4282)
This was somehow omitted from woocommerce/woocommerce-blocks#4166
2021-06-02 11:11:26 +01:00
Thomas Roberts f4841cdff1 Update link to testing zip 2021-05-26 15:31:37 +01:00