Commit Graph

4172 Commits

Author SHA1 Message Date
Daniel W. Robert 02ce62109e Add font-weight option to Mini Cart block text (https://github.com/woocommerce/woocommerce-blocks/pull/6760)
* Add font-weight option to Mini Cart button text.

Need to repeat steps for icon SVG and cart item count.

* Add font-weight controls to mini-cart item count.

* Add better error handling to PHP style output.

Ensure style value is set for style item in the
get_font_weight_class_and_style attributes array before rendering it to
the output.

* Revert font-weight option for quantity badge.

Per conversation with @vivialice, it looks better for now to keep the
font weight adjustment capabilities to just the price and leave the cart
icon and count as-is.

* Move $typography_styles variable into markup fn.

To resolve merge conflicts and get everything in it's proper place, this
commit will move the $typography_styles variable into the
get_cart_price_markup() function from woocommerce/woocommerce-blocks#6796.
2022-08-05 14:15:10 -04:00
Tung Du fcedd5174f Fix: flaky tests related to setMaxPrice (https://github.com/woocommerce/woocommerce-blocks/pull/6856) 2022-08-05 16:37:44 +07:00
Tung Du c252e7a907 Fix: Compare action should update its original comment instead of a new comment (https://github.com/woocommerce/woocommerce-blocks/pull/6736) 2022-08-05 16:25:42 +07:00
Luigi Teschio 19e0883861 Add missing label to dependabot configuration (https://github.com/woocommerce/woocommerce-blocks/pull/6848) 2022-08-05 09:58:55 +02:00
Luigi Teschio 88027a5e00 fix markdownlint violation (https://github.com/woocommerce/woocommerce-blocks/pull/6853) 2022-08-04 16:05:14 +02:00
Paulo Arromba 39d4bb4ed9 Merge branch 'release/8.2.0' into trunk
# Conflicts:
#	docs/internal-developers/testing/releases/README.md
#	package.json
#	readme.txt
#	src/Package.php
#	woocommerce-gutenberg-products-block.php
2022-08-04 12:45:20 +01: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
dependabot[bot] 372a56c1bd Bump mini-css-extract-plugin from 1.3.6 to 1.6.2 (https://github.com/woocommerce/woocommerce-blocks/pull/6714)
Bumps [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) from 1.3.6 to 1.6.2.
- [Release notes](https://github.com/webpack-contrib/mini-css-extract-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.3.6...v1.6.2)

---
updated-dependencies:
- dependency-name: mini-css-extract-plugin
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2022-08-04 12:05:44 +02:00
Luigi Teschio e942ce8367 Update renovate configuration (https://github.com/woocommerce/woocommerce-blocks/pull/6836)
* delete renovate bot

* update renovate configuration

* try now
2022-08-04 11:06:13 +02:00
Tung Du b5cc976905 E2E: Try improving product list loading state detection and fix Site Editor URL (https://github.com/woocommerce/woocommerce-blocks/pull/6811)
* e2e:try: detect loading state for product list

* fix: always use site-editor.php

* wait for price filter to be applied before checking the result
2022-08-03 16:22:37 -04:00
dependabot[bot] 7eb665e726 Bump @wordpress/api-fetch from 6.9.0 to 6.11.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6833)
Bumps [@wordpress/api-fetch](https://github.com/WordPress/gutenberg/tree/HEAD/packages/api-fetch) from 6.9.0 to 6.11.0.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/api-fetch/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/api-fetch@6.11.0/packages/api-fetch)

---
updated-dependencies:
- dependency-name: "@wordpress/api-fetch"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-03 18:16:04 +02:00
Luigi Teschio 36ecb2f6f9 delete renovate bot (https://github.com/woocommerce/woocommerce-blocks/pull/6824) 2022-08-03 14:00:15 +02:00
Thomas Roberts aad09c975d 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>
2022-08-03 11:51:56 +01:00
dependabot[bot] 33b45f163f Bump @typescript-eslint/parser from 5.30.5 to 5.31.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6809)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.30.5 to 5.31.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.31.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2022-08-03 12:03:16 +02:00
dependabot[bot] 3521a0f68b Bump @wordpress/wordcount from 3.12.0 to 3.13.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6711)
Bumps [@wordpress/wordcount](https://github.com/WordPress/gutenberg/tree/HEAD/packages/wordcount) from 3.12.0 to 3.13.0.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/wordcount/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/wordcount@3.13.0/packages/wordcount)

---
updated-dependencies:
- dependency-name: "@wordpress/wordcount"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-03 12:02:10 +02:00
dependabot[bot] 1466367e66 Bump johnbillion/wp-hooks-generator from 0.7.0 to 0.9.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6705)
Bumps [johnbillion/wp-hooks-generator](https://github.com/johnbillion/wp-hooks-generator) from 0.7.0 to 0.9.0.
- [Release notes](https://github.com/johnbillion/wp-hooks-generator/releases)
- [Commits](https://github.com/johnbillion/wp-hooks-generator/compare/0.7.0...0.9.0)

---
updated-dependencies:
- dependency-name: johnbillion/wp-hooks-generator
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2022-08-03 12:00:04 +02:00
dependabot[bot] e656f6b48f Bump github/codeql-action from 1 to 2 (https://github.com/woocommerce/woocommerce-blocks/pull/6700)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2022-08-03 11:15:53 +02:00
dependabot[bot] dcccd33aa3 Bump yoast/phpunit-polyfills from 1.0.2 to 1.0.3 (https://github.com/woocommerce/woocommerce-blocks/pull/6704)
Bumps [yoast/phpunit-polyfills](https://github.com/Yoast/PHPUnit-Polyfills) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/Yoast/PHPUnit-Polyfills/releases)
- [Changelog](https://github.com/Yoast/PHPUnit-Polyfills/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/Yoast/PHPUnit-Polyfills/compare/1.0.2...1.0.3)

---
updated-dependencies:
- dependency-name: yoast/phpunit-polyfills
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-03 11:12:38 +02:00
dependabot[bot] 3ee24f9a93 Bump @wordpress/i18n from 4.12.0 to 4.14.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6817)
Bumps [@wordpress/i18n](https://github.com/WordPress/gutenberg/tree/HEAD/packages/i18n) from 4.12.0 to 4.14.0.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/i18n/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/i18n@4.14.0/packages/i18n)

---
updated-dependencies:
- dependency-name: "@wordpress/i18n"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2022-08-03 11:11:22 +02:00
dependabot[bot] 54ff4315f9 Bump AbleLincoln/push-to-sftp from 1.0 to 1.2 (https://github.com/woocommerce/woocommerce-blocks/pull/6808)
Bumps [AbleLincoln/push-to-sftp](https://github.com/AbleLincoln/push-to-sftp) from 1.0 to 1.2.
- [Release notes](https://github.com/AbleLincoln/push-to-sftp/releases)
- [Commits](https://github.com/AbleLincoln/push-to-sftp/compare/v1.0...v1.2)

---
updated-dependencies:
- dependency-name: AbleLincoln/push-to-sftp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2022-08-03 10:49:52 +02:00
dependabot[bot] 1d849997e5 Bump @wordpress/is-shallow-equal from 4.12.0 to 4.13.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6710)
Bumps [@wordpress/is-shallow-equal](https://github.com/WordPress/gutenberg/tree/HEAD/packages/is-shallow-equal) from 4.12.0 to 4.13.0.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/is-shallow-equal/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/is-shallow-equal@4.13.0/packages/is-shallow-equal)

---
updated-dependencies:
- dependency-name: "@wordpress/is-shallow-equal"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2022-08-02 17:46:17 +02:00
Albert Juhé Lluveras d93bb44537 Update version to 8.3.0-dev 2022-08-02 17:24:34 +02:00
github-actions[bot] c8728fb2b5 Release: 8.2.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6806)
* Empty commit for release pull request

* Update 8.2.0 changelog

* Add 8.2.0 testing steps

* Fix typo in 8.2.0 testing steps

* Ensure package names display correctly if only one item is in package (https://github.com/woocommerce/woocommerce-blocks/pull/6815)

* Check package length >= 1 to show package name

* Check shipping rates length in order shipping packages slot

* Fix TS error where boolean value could be undefined

* Show items if there is more than one shipping rate

* Update 8.2.0 testing zip

* Bumping version strings to new version.

* Remove empty element from changelog

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-08-02 17:22:37 +02:00
Albert Juhé Lluveras 26472acc14 Remove empty element from changelog 2022-08-02 17:08:48 +02:00
Albert Juhé Lluveras 3b24911c0e Bumping version strings to new version. 2022-08-02 16:59:58 +02:00
Daniel W. Robert fef4d5e597 Add option to hide/show price in Mini Cart block (https://github.com/woocommerce/woocommerce-blocks/pull/6796)
* Add toggle control to sidebar in editor.

Adds a visibility toggle in the Mini Cart block's sidebar editor
settings for the block price.

* Update name of hasVisiblePrice attrubite.

Adjusts the name of the hasVisiblePrice attribute to hasHiddenPrice.
This seems a bit easier to reason about, where we can set the default
state of the visibility toggle to 'off'.

* Add conditional price rendering to server side.

Since this is a dynamic block, need to add the condidional attribute
state to the server-side render callback.

* Add price visibility setting to block frontend.

We need to prevent pricec from rendering when hidden setting is active
after the JS kicks in on the frontend (i.e., when the Mini Cart is
interacted with by the user).

* Fix logic error in frontend rendering conditional.

* Add unit tests for both show/hide price states.
2022-08-02 10:28:52 -04:00
Albert Juhé Lluveras 3a4c123026 Update 8.2.0 testing zip 2022-08-02 15:53:46 +02:00
Thomas Roberts 5fe61143d8 Ensure package names display correctly if only one item is in package (https://github.com/woocommerce/woocommerce-blocks/pull/6815)
* Check package length >= 1 to show package name

* Check shipping rates length in order shipping packages slot

* Fix TS error where boolean value could be undefined

* Show items if there is more than one shipping rate
2022-08-02 15:49:17 +02:00
Thomas Roberts 0fc1ee46bd Ensure package names display correctly if only one item is in package (https://github.com/woocommerce/woocommerce-blocks/pull/6815)
* Check package length >= 1 to show package name

* Check shipping rates length in order shipping packages slot

* Fix TS error where boolean value could be undefined

* Show items if there is more than one shipping rate
2022-08-02 04:51:21 -07: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
Albert Juhé Lluveras 5bac0fefcf Update 8.2.0 changelog 2022-08-01 18:37:20 +02:00
Tung Du 862477f9aa Remove compatibility notice from Mini Cart block (https://github.com/woocommerce/woocommerce-blocks/pull/6803) 2022-08-01 18:01:57 +02:00
Seghir Nadir 8e2a2636c2 fix proceed to checkout button (https://github.com/woocommerce/woocommerce-blocks/pull/6804) 2022-08-01 16:29:28 +01:00
Saad Tarhi dc97e5af1e Fix missing translations in inspector (https://github.com/woocommerce/woocommerce-blocks/pull/6737)
* Try registering the "cart taxes" inner block

Registering server side. This example isn't working, but I'm pushing to
share it and see what's wrong with this implementation.

* Fix registering the cart taxes inner block issue

* Update translation script loading

* Remove unnecessary JS translation

The translation should work fine by getting the title & description from
the `block.json` file

* Put back the initial code in the 'Cart Taxes' inner block

We didn't provide the correct `block.json` file path server side,
that's why the `metadata` wasn't correctly registered

* Generate `block.json`files for inner blocks

This is the first step on fixing the missing translations of `metadata`
in `block.json` files

* Set the folder name exactly the same as the inner block name

We are doing this first test for the `Cart taxes` inner block.

The `Block` & its containing folder need to have the same name for:
- Consistency
- We use the `Block` name to get the file Path

* Update imports after folder renaming

* Get block name directly from the JSON metadata

Getting the block name from the JSON metadata is less error prone than
extracting it from the file path.

And no need to rename all our `inner-blocks` to get the correct
`block.json` path

* Revert folder naming change of `Cart taxes` inner block

Since we are getting the `block` name directly from the `block.json`
metadata instead of extracting it from the file path, there is no need
to keep their names in sync anymore

* Fix missing translations for the `Cart Subtotal` Block

* Register only the client-side settings on the client

When the block is registered on the server, you only need to register
the client-side settings on the client using the same block’s name.
See [docs](https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides/block-api/block-metadata.md#javascript-client-side).

* Add schema validation to `block.json`

Development is improved by using a defined schema definition file.
Supported editors can provide help like tooltips, autocomplete, and
schema validation.

* Use the same `editor_script` as the parent block

This prevents WordPress from generating script tags to inexistant
inner blocks JS files

* Add C&C inner blocks in Cart.php & Checkout.php

This is a refactoring to keep the block types controller file less
overloaded

* Fix all Cart inner blocks missing translations

* Create the "AbstractInnerBlock" class

The "Inner Blocks" will use their parent's script, so no need to create
new scripts for each one of them

And, our "Inner Blocks" should always be registered using the metadata file

* Update the "Inner Blocks" PHP classes

* Fix PHP lint erros & update function description

* Fix missing translations bug for all Checkout Inner Blocks

* Update src/BlockTypes/Checkout.php

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

* skip lazy loaded scripts

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2022-08-01 15:57:33 +01:00
Tung Du 0ee5dbbc18 Fix: Replace DropdownSelector with FormTokenField from Gutenberg (https://github.com/woocommerce/woocommerce-blocks/pull/6647) 2022-08-01 19:00:59 +07: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
Daniel W. Robert 056e6946e8 Add new icon for mini cart block (https://github.com/woocommerce/woocommerce-blocks/pull/6784)
* Add new icon for mini cart block (inserter).

See https://github.com/woocommerce/woocommerce-blocks/issues/6617.

* Adjust size of SVG

The new SVG was rendering a little bit smaller than the original icon.
Potentially because of the mask and the artboard size.

This commit adjusts the size to render at the same size as the original
version of the icon in the inserter.
2022-07-29 15:40:03 -04:00
Seghir Nadir 008c63b0dc Refactor external dispatch actions from being called inside useSelect (https://github.com/woocommerce/woocommerce-blocks/pull/6718)
* refactor coupon functions outside of useSelect

* fix test
2022-07-29 16:20:48 +01:00
renovate[bot] 6f87c75587 Update babel monorepo to v7.18.9 (https://github.com/woocommerce/woocommerce-blocks/pull/6719)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-29 14:46:31 +02:00
renovate[bot] 8a5973d995 Update dependency @types/wordpress__blocks to v11.0.5 (https://github.com/woocommerce/woocommerce-blocks/pull/6758)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-29 14:02:02 +02:00
Niels Lange 59eead8ae8 Update pull_request_template.md 2022-07-29 13:55:23 +02:00
Thomas Roberts 82dd8c22db Add comment to prevent linting error on commented out code (https://github.com/woocommerce/woocommerce-blocks/pull/6789) 2022-07-29 04:54:52 -07:00
Niels Lange 42fd38858c Update pull_request_template.md 2022-07-29 13:47:57 +02:00
Thomas Roberts 89022e18f8 Ensure addresses sync when loading the checkout shipping address block (https://github.com/woocommerce/woocommerce-blocks/pull/6773) 2022-07-28 07:38:29 -07:00
renovate[bot] a03487d9ad Update dependency @types/jest to v27.5.2 (https://github.com/woocommerce/woocommerce-blocks/pull/6759)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-28 15:51:44 +02:00
dependabot[bot] 52282e51cd Bump mockery/mockery from 1.4.4 to 1.5.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6703)
Bumps [mockery/mockery](https://github.com/mockery/mockery) from 1.4.4 to 1.5.0.
- [Release notes](https://github.com/mockery/mockery/releases)
- [Changelog](https://github.com/mockery/mockery/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mockery/mockery/compare/1.4.4...1.5.0)

---
updated-dependencies:
- dependency-name: mockery/mockery
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
2022-07-28 15:34:17 +02:00
Alba Rincón ef13f65dc0 Use the archive-product template to render product attributes pages (https://github.com/woocommerce/woocommerce-blocks/pull/6776) 2022-07-28 12:49:13 +02:00
Bernie Reiter 3858b03aec All Products block: Migrate to block.json (https://github.com/woocommerce/woocommerce-blocks/pull/6754)
* All Products: Use block.json to register

* Simplify edit def

* Separate file for save

* No more client-side registration

* Remove uncommented, now-obsolete code

* Add back client-side block registration

* Remove stray textdomain from keywords field

* Add textdomain field

* Set apiVersion to 1
2022-07-28 12:26:36 +02:00
Thomas Roberts 488ff13ca9 Update the `previewCart` property we use to get `hasCalculatedShipping` in `useShippingData` and fix broken JS tests (https://github.com/woocommerce/woocommerce-blocks/pull/6781)
* Require the rest of the @woocommerce/block-settings module in block.test.js

* Use correct property from previewCart for hasCalculatedShipping
2022-07-28 02:22:42 -07:00
Niels Lange 423fd29c0d Add link to ZIP file only ones (https://github.com/woocommerce/woocommerce-blocks/pull/6769)
* Add link to ZIP file only ones

* Add text file for testing purposes

* Remove text file for testing purposes
2022-07-27 13:24:06 +02:00
Thomas Roberts 3fbd497d28 Add gap between pakage panels (https://github.com/woocommerce/woocommerce-blocks/pull/6740) 2022-07-26 23:00:38 -07:00
Thomas Roberts 6bf8f07c39 Ensure shipping rate names show when multiple packages are used (https://github.com/woocommerce/woocommerce-blocks/pull/6753)
* Get shipping rates from preview cart in editor

* Set showItems in ShippingRatesControl to true if multiple packages

* Move dependency in useShippingData to correct section

* Ensure getting packageData.shipping_rates.length won't error
2022-07-26 23:00:17 -07:00
Seghir Nadir cf91d616e4 switch up token (https://github.com/woocommerce/woocommerce-blocks/pull/6755) 2022-07-26 17:26:26 +02:00
dependabot[bot] 088907dec2 Bump automattic/jetpack-autoloader from 2.10.7 to 2.11.6 (https://github.com/woocommerce/woocommerce-blocks/pull/6702)
Bumps [automattic/jetpack-autoloader](https://github.com/Automattic/jetpack-autoloader) from 2.10.7 to 2.11.6.
- [Release notes](https://github.com/Automattic/jetpack-autoloader/releases)
- [Changelog](https://github.com/Automattic/jetpack-autoloader/blob/trunk/CHANGELOG.md)
- [Commits](https://github.com/Automattic/jetpack-autoloader/compare/v2.10.7...v2.11.6)

---
updated-dependencies:
- dependency-name: automattic/jetpack-autoloader
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-26 15:14:18 +02:00
dependabot[bot] caedfa278a Bump wp-phpunit/wp-phpunit from 5.8.1 to 6.0.1 (https://github.com/woocommerce/woocommerce-blocks/pull/6701)
Bumps [wp-phpunit/wp-phpunit](https://github.com/wp-phpunit/wp-phpunit) from 5.8.1 to 6.0.1.
- [Release notes](https://github.com/wp-phpunit/wp-phpunit/releases)
- [Commits](https://github.com/wp-phpunit/wp-phpunit/compare/5.8.1...6.0.1)

---
updated-dependencies:
- dependency-name: wp-phpunit/wp-phpunit
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-26 14:40:13 +02:00
Alba Rincón e56107f436 Select the correct inner button for the "Featured Item" button to update its url (https://github.com/woocommerce/woocommerce-blocks/pull/6741)
* Select the correct id/attributes for the button to update its url

* Fix variables case
2022-07-26 14:30:18 +02:00
dependabot[bot] c7d49bc792 Bump moment from 2.29.3 to 2.29.4 (https://github.com/woocommerce/woocommerce-blocks/pull/6689)
Bumps [moment](https://github.com/moment/moment) from 2.29.3 to 2.29.4.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.3...2.29.4)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-26 11:48:18 +02:00
renovate[bot] 06dbe95eb6 Update dependency @types/react to v17.0.47 (https://github.com/woocommerce/woocommerce-blocks/pull/6638)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-25 14:52:12 +02:00
renovate[bot] 2e0f0b00d0 Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/6632)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-25 12:12:26 +02:00
Tung Du c10e91e7e1 Fix: navigate through Mini Cart contents with keyboard (https://github.com/woocommerce/woocommerce-blocks/pull/6731)
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-07-25 12:39:47 +07:00
Niels Lange 91e498c28a Generate ZIP file using GitHub Actions (https://github.com/woocommerce/woocommerce-blocks/pull/6661)
* Generate ZIP file using GitHub Actions

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Upload generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Create release for each PR in sub-repo

* Update generate-zip.yml

* Push release ZIP to woocommerce/woocommerce-blocks-releases

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Generate ZIP file using GitHub Actions

* Generate ZIP file using GitHub Actions

* Generate ZIP file using GitHub Actions

* Generate ZIP file using GitHub Actions

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Update generate-zip.yml

* Generate ZIP file using GitHub Actions

* Update .github/workflows/generate-zip.yml

Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>

* Rename temp folder to wc-blocks-pr-release__temp

Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
2022-07-22 13:48:54 +02:00
Tung Du 6e2fa9061b Revert "ci: try update existing report first" (https://github.com/woocommerce/woocommerce-blocks/pull/6735)
This reverts commit 60bf1e286c.
2022-07-22 17:18:04 +07:00
Tung Du 60bf1e286c ci: try update existing report first 2022-07-22 17:10:58 +07:00
Lucio Giannotta 615ff35fac `SearchListControl`: Fix preserving case of original item (https://github.com/woocommerce/woocommerce-blocks/pull/6551)
Searches would keep the case of the user input instead of the original
case of the name. Search still is case insensitive, but preserves
the original item's case.

Also, this PR adds a test for this bug and fixes a previous test case.
2022-07-21 21:49:42 +02: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
Tung Du 02a3d27de6 Fix: WooCommerce messages don't appear in block themes with Mini Cart block (https://github.com/woocommerce/woocommerce-blocks/pull/6728) 2022-07-22 00:05:52 +07:00
Alba Rincón 63ce706139 Start using `block.json` and convert to TS the `Product Best Sellers` block (https://github.com/woocommerce/woocommerce-blocks/pull/6683)
* Start using `block.json` and convert to TS the `Product Best Sellers` block

* Update assets/js/blocks/product-best-sellers/edit.tsx

Co-authored-by: Luigi Teschio <gigitux@gmail.com>

* Import props

Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2022-07-20 11:29:49 +02:00
Luigi Teschio c1c2860232 Mini Cart Block: additional class are visible on the frontend page woocommerce/woocommerce-blocks#5581 (https://github.com/woocommerce/woocommerce-blocks/pull/6716)
Mini Cart Block: additional class are visible on the frontend page
2022-07-20 09:57:41 +02:00
Alba Rincón ad4fb01228 Start using `block.json` and convert to TS the `Product by Category` block (https://github.com/woocommerce/woocommerce-blocks/pull/6680)
* Start using `block.json` and convert to TS the `Product by Category` block

* Address feedback to remove some TS errors

* Remove unnecessary prop
2022-07-19 15:09:46 +02:00
Alba Rincón a4077d865c Bump version from 8.1.0 to 8.2.0-dev 2022-07-19 10:59:47 +02: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
Luigi Teschio f999790df8 Update deps (https://github.com/woocommerce/woocommerce-blocks/pull/6670)
* fix E2E tests

* Empty-Commit

* upgrade deps

* upgrade deps

* upgrade deps

* fix E2E tests

* update deps

* try now

* try now

* install @wordpress/compose

* try different version

* update packages

* update package-lock

* restore husky
2022-07-19 09:38:57 +02:00
Luigi Teschio 1761da37cd fix E2E tests (https://github.com/woocommerce/woocommerce-blocks/pull/6639) 2022-07-18 11:38:49 +02:00
Michael P. Pfeiffer 1784b525df Update block template descriptions (https://github.com/woocommerce/woocommerce-blocks/pull/6667) 2022-07-15 15:54:04 +02:00
Alba Rincón 5b50d37028 Prevent showing the blockified templates util they are implemented (https://github.com/woocommerce/woocommerce-blocks/pull/6682) 2022-07-14 14:54:25 +02:00
Paulo Arromba 678fa6bff0 Add: Cross-sells for the Store API Cart response. (https://github.com/woocommerce/woocommerce-blocks/pull/6635)
* Added Cross-sells object and schema for the API Cart response.

* Cross-sells are now WC_Product objects that pass through the visibility filter.

* Removed redundant check.

* Updated function doc comment.

* Cleaned up imports.

* Cross-sells item schema (extension of ProductSchema) was removed, and replaced by ProductSchema itself. Cross-sells are direct product representation, and extending this goes out of scope for the task at hand.

* Unit testing for cart response containing cross-sell products.
2022-07-13 15:02:49 +01:00
Luigi Teschio abf7b80576 Mini Cart: Fix loading deps when WordPress is installed in a subdir (https://github.com/woocommerce/woocommerce-blocks/pull/6673)
* Fix loading deps when WordPress is installed in a subdir woocommerce/woocommerce-blocks#6500

Fix loading deps when WordPress is installed in a subdir

* update logic
2022-07-13 12:42:28 +02:00
Niels Lange 45c27adac5 Update release-initial-checklist.md 2022-07-12 18:16:55 +02:00
Raluca Stan cb9ec18f7f Update README.md 2022-07-11 16:21:46 +03:00
Tung Du 42453b7582 Fix: Add support to apply filters via URL for All Products block (https://github.com/woocommerce/woocommerce-blocks/pull/6642)
* price-filter: update URL when filtering products of All Products block.

* active-filters: update the URL when removing price filter

* price-filter: prevent update query on PHP templates when changing prices

* active-filters: on PHP templates, remove filter only triggers the page reload

* price-filter: update comments and naming to reflect new URL behavior

* stock-filter: update url when filtering for All Products block

* attribute-filter: update the URL when filtering for All Products block

* attribute-filter: fix: uncheck all filter doesn't clear the URL

* attribute-filter: fix: endless page reload when filtering for PHP template

* attribute-filter: correctly set the defaults and update the filter query from URL

* fix: filter URL containing stock status doesn't work on homepage

* price-filter: fix issue with URL on All Products

The price slider doesn't reset after removing price filter from the Active Filters block if the initial price filter is set from URL

* ref: passing document.title to pushState is unnecessary

* use replaceState to avoid changing browser history

* extract change URL logic
2022-07-11 14:04:19 +07:00
Tung Du 4e8c48144c Fix: Attribute Filters: allow choosing between single/multiple selection (https://github.com/woocommerce/woocommerce-blocks/pull/6620) 2022-07-07 06:14:22 +07:00
Paulo Arromba ffbc39bfd3 fix: fixed colors for error input and labels on dark palette mode themes and dark controls. (https://github.com/woocommerce/woocommerce-blocks/pull/6292) 2022-07-06 15:03:15 +01:00
Luigi Teschio 4aaaebe0c0 Disable render blockified Product Grid Block (https://github.com/woocommerce/woocommerce-blocks/pull/6660)
* Disable render blockified Product Grid Block

* try now
2022-07-06 14:16:32 +02:00
Alba Rincón 75184ae22d Add migration strategy and load blockified templates (https://github.com/woocommerce/woocommerce-blocks/pull/6538)
* Increase `schema_version` to add the new `wc_blocks_use_blockified_templates` flag

If the schema version stored on the db is <= 260 means the plugin is being updated
to the new version and we should keep using the old templates, not the blockified ones.

* After the theme is switched we check if we need to update the flag to
start loading the blockified templates or not.

* Get the templates from the blockified folder if the flag is set to true on the db

* Add temporary blockified template for testing purposes

* Inline variable

* Improve comment

* Use blockified templates on new installs with block themes only

* Don't use blockified templates when switching to a non FSE theme

* Fix condition

* Add tests for the option value

* Move the check to use blockified templates

* WIP

* WIP

* Add migration strategy

* Move the blockified templates to the templates folder and filter them depending on the option

* Fix tests and start using the Options constants

* Fix migration, the `should_use_blockified_product_grid_templates` and tests

* Rename tests and move to Utils folder

* add Migration class test

* try

* remove PHP

* add composer

* Replace the blockified templates with a temporary version

* Fix tests

* add comment

* Add feature gating for experimental builds

* Inject the package to the controller

* test

* Change blocks.ini

* debug

* Remove debug info

* fix test

* fix tests

* try now

* using composer cache

* install deps

* test

* Remove unnecessary extra key

* Add cache actions

* Undo tests change

* Fix readme format

Co-authored-by: Luigi <gigitux@gmail.com>
2022-07-06 09:51:39 +02:00
Niels Lange 073392c96a Bump version from 8.0.0 to 8.1.0-dev 2022-07-05 18:48:38 +02: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
Alba Rincón f36115b175 Prevent `Featured Product` block from breaking when product is out of stock + hidden from catalog (https://github.com/woocommerce/woocommerce-blocks/pull/6640) 2022-07-05 09:24:28 +02:00
Niels Lange 1ab1e17205 Update README.md 2022-07-04 12:39:17 +02:00
Tarun Vijwani e6dfd66d5d Update billing address when shipping address gets change in Cart block (https://github.com/woocommerce/woocommerce-blocks/pull/6591)
* update billing address when shipping address gets change in Cart block

* Add a new line to test linting error

* Remove a new line to test linting error

* Fix linting error

* Fix linting error

* Fix linting error by adding a space and removing a comma

* Fix linting error by replacing a space with tab

Co-authored-by: Niels Lange <info@nielslange.de>
2022-07-04 12:22:32 +02:00
Tarun Vijwani a1526ed660 Make form components require onChange and have a default value (https://github.com/woocommerce/woocommerce-blocks/pull/6636) 2022-07-01 21:50:44 +04:00
Alba Rincón b5b454ad42 Fix condition to allow rendering classic templates (https://github.com/woocommerce/woocommerce-blocks/pull/6643) 2022-06-29 17:35:40 +02:00
Luigi Teschio e7eb8a6dd5 Show classic template in the inserter only for specific templates (https://github.com/woocommerce/woocommerce-blocks/pull/6539)
* Show classic template in the inserter only for specific templates

* add feature gate

* add todo comment

* rename variable

* address feedback

* not register block on post and page editor

* avoid casting
2022-06-29 09:42:02 +02:00
Seghir Nadir 6e9c348cc4 add custom local pick handling (https://github.com/woocommerce/woocommerce-blocks/pull/6631)
This PR fixes an issue in which taxes are calculated against the user address for local pickups orders. A niche issue, but an important one.
2022-06-27 15:52:24 +01:00
Tarun Vijwani 474d432836 Add key to BlockErrorBoundary component in renderForcedBlocks (https://github.com/woocommerce/woocommerce-blocks/pull/6582) 2022-06-24 16:55:49 +04:00
Luigi Teschio dc2765efcb Add dry run and simulate release mode (https://github.com/woocommerce/woocommerce-blocks/pull/5273)
* Add dry run and simulate release mode woocommerce/woocommerce-blocks#3059

Add dry run and simulate release mode

* execute more svn commands in release mode

* fix boolean

* fix command
2022-06-23 17:39:30 +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
Brian 2328ca3f4f Add Footer Template Part (https://github.com/woocommerce/woocommerce-blocks/pull/6596)
* Adjust template with tagname footer

* Adjust template with tagname footer

* Adjust template with tagname footer

* Adjust template with tagname footer

* Adjust template with tagname footer

* Update e2e tests snapshots

Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-06-22 16:31:20 +02:00
Ovidiu Liuta 9796af2fb4 changing tax_query field to term_id (https://github.com/woocommerce/woocommerce-blocks/pull/6585)
Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
2022-06-22 12:51:14 +02:00
renovate[bot] a2a7235ea2 Update dependency @types/react-dom to v17.0.17 (https://github.com/woocommerce/woocommerce-blocks/pull/6573)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-22 10:10:00 +00:00
Nadir Seghir e50b654d69 update version 2022-06-22 10:42:03 +01:00
github-actions[bot] da202ab1e0 Release: 7.9.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6604)
* Empty commit for release pull request

* update readme

* add testing notes

* update link

* Bumping version strings to new version.

* move testing docs

* remove old folder

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2022-06-22 10:40:03 +01:00
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
Luigi Teschio 15ee965e48 Fix crash when the user saves Mini Cart Template (https://github.com/woocommerce/woocommerce-blocks/pull/6613) 2022-06-21 18:30:26 +02:00
Tung Du aadb94c012 Fix: Display the correct title for templates from theme (https://github.com/woocommerce/woocommerce-blocks/pull/6452) 2022-06-21 22:26:09 +07:00
Tung Du 138df96762 Fix: Convert Active Filters Block codebase to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/6580) 2022-06-21 21:53:49 +07: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
Seghir Nadir 298a76495b Fix broken storybook link 2022-06-21 14:39:24 +01:00
Luigi Teschio 5e2eeb4c45 Add markdownlint extension in the recommended extensions list (https://github.com/woocommerce/woocommerce-blocks/pull/6605) 2022-06-21 11:13:44 +02: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
Daniel Dudzic 8f00447f2d Add descriptions for all WC templates and refactor Search template hierarchy loading logic (https://github.com/woocommerce/woocommerce-blocks/pull/6345)
* Refactor template title and description loading and search template hierarchy updating

* Remove an unnecessary return

* Fix template descriptions for custom templates

* Fix template description typos

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

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

* Restore the original order of the container registrations

* Restore the product search template slug

* Restore the Product Search Results slug as a constant

Co-authored-by: Luigi <gigitux@gmail.com>
2022-06-20 14:49:18 +01:00
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 fc956b7f48 Fix images hidden by default in Product grid blocks (https://github.com/woocommerce/woocommerce-blocks/pull/6599) 2022-06-20 14:13:56 +02:00
Paulo Arromba 2477e5ed19 Fix/4929 remove unnecessary files from core build process (https://github.com/woocommerce/woocommerce-blocks/pull/6425)
* Added /assets, /packages, /patches and global.d.ts to .distignore

* re-added /assets folder

* Reverted "/packages" removal
2022-06-20 09:07:39 +01: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 b543fa2684 Replace instances of wp_is_block_theme() with wc_current_theme_is_fse_theme() (https://github.com/woocommerce/woocommerce-blocks/pull/6590) 2022-06-17 14:51:04 +02:00
Tung Du 27224fd46e Fix: Convert Filter Products by Attribute Block to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/6545)
* wip: convert attribute filter to ts

* change query to optional

* update SearchListControlProps and SearchListItemType

* get default attribute from metadata

* update types

* convert attributes utils to ts

* convert attribute query utils to ts

* fix type error, remove type casting

* revert type change for SearchListItemType

* apply new format
2022-06-15 19:50:42 +07:00
Michael P. Pfeiffer 521f93619b Upgrade wp-prettier to 2.6.2 and reformat the codebase (https://github.com/woocommerce/woocommerce-blocks/pull/6566)
* Remove mixed tabs and spaces in tsconfig.json

* Update formatting in json files

* Upgrade wp-prettier to 2.6.2
2022-06-15 11:56:52 +02:00
Tomasz Tunik 0dfc1ad58b provide span wrapper for category list item name (https://github.com/woocommerce/woocommerce-blocks/pull/6574)
will enable adding text overflow of other effects that user might not want to interfere with the image element
2022-06-15 11:37:21 +02:00
Tung Du 1ba3ca2ba1 Fix: Mini Cart content scrolling issue (https://github.com/woocommerce/woocommerce-blocks/pull/6565) 2022-06-15 15:18:50 +07: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
Tung Du 6531c4cb0b Fix: Convert Filter Products by Price Block to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/6514) 2022-06-14 15:48:49 +07:00
Albert Juhé Lluveras 680ebba7cb Fix an endless loop when using product grid blocks inside product descriptions (https://github.com/woocommerce/woocommerce-blocks/pull/6471)
* Fix an endless loop when using product grid blocks inside product descriptions

* Add array_key_exists protection

* Typo in comment

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

Co-authored-by: Panos (Panagiotis) Synetos <panos.synetos@automattic.com>
2022-06-14 11:24:48 +03:00
Niels Lange 10d6e97833 Use default .editorconfig settings for *.md files (https://github.com/woocommerce/woocommerce-blocks/pull/6553) 2022-06-13 23:10:21 +02:00
Albert Juhé Lluveras bfd62a3f78 Add Testing steps for version 7.8.1 2022-06-13 15:50:02 +02:00
Albert Juhé Lluveras 3cae916042 Add changelog to readme.txt 2022-06-13 15:49:55 +02:00
Niels Lange 15a22db4f4 Update README.md 2022-06-13 14:37:05 +02:00
Michael P. Pfeiffer d7820b98bb Featured items: fix focal point block json spacing (https://github.com/woocommerce/woocommerce-blocks/pull/6552) 2022-06-13 14:06:48 +02:00
Luigi Teschio 04ebfd2264 Fix E2E tests (https://github.com/woocommerce/woocommerce-blocks/pull/6415)
* Fix E2E tests woocommerce/woocommerce-blocks#6415

Fix E2E tests

* Add full state in customer data and exclude it from details check

* update webpack configuration

* Revert change to combobox index

* don't splitChunk frontend scripts

* simplfy output folders

* reduce minimum chunk size to 10kb

* add all inner blocks for loading

* better splitChunks

* update translation code

* wait for scripts

* try sleeping

* fix loading translation

* fix tests for mini cart

* simplfy po logic

* automate loading chunks

* rename webpack group file

* rename block.json path

* remove test

* revert changes to webpack file

* fix loading of chunks

* revert changes to assets api as well

* restore wp-env json configuration

* restore .wp-env.json

* address feedback

* add comment

* address comments

* improve utils function

* install puppeteer

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2022-06-13 11:15:29 +02:00
Tung Du 876e955125 Fix: Convert Filter Products by Stock to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/6533) 2022-06-13 08:39:09 +07:00
Niels Lange d7d043cb5b Rename billingData to billingAddress (https://github.com/woocommerce/woocommerce-blocks/pull/6369)
* Rename billingData to billingAddress

* Add unit test to ensure billingData remains accessible

* add integration tests for slots

* Keep billingData in usePaymentMethodRegistration for backwards compatibility

* Gate `billingData` in deprecation gate

* Replace deprecation call

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2022-06-10 18:59:25 +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
Michael P. Pfeiffer a432a85bf0 Cart: ensure express checkout placeholder does not stick to checkout button (https://github.com/woocommerce/woocommerce-blocks/pull/6547)
* Cart: ensure express checkout placeholder does not stick to checkout button

* Display to affect description only
2022-06-10 15:20:41 +02:00
Luigi Teschio 8ac7fd2440 Restore package.json and package-lock.json (https://github.com/woocommerce/woocommerce-blocks/pull/6546) 2022-06-10 14:05:51 +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
Tung Du 45f48e6b0a Fix: Register Filter Blocks using `block.json` (https://github.com/woocommerce/woocommerce-blocks/pull/6505) 2022-06-09 21:45:24 +07:00
Luigi Teschio abd5c6afd1 Fix ESLint: use window.localstorage instead localstorage woocommerce/woocommerce-blocks#6442 (https://github.com/woocommerce/woocommerce-blocks/pull/6540)
Fix ESLint: use window.localstorage instead localstorage
2022-06-09 14:47:17 +02:00
Niels Lange a748f533a8 Format Markdown files using wp-scripts (https://github.com/woocommerce/woocommerce-blocks/pull/6462)
* Format Markdown files using Prettier

* Format Markdown files using wp-scripts

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

* Check for address_1 first then address
2022-06-09 12:45:00 +03:00
Tung Du 111b4eca48 Convert `useCollectionData` hook to TS (https://github.com/woocommerce/woocommerce-blocks/pull/6535) 2022-06-09 16:05:11 +07:00
renovate[bot] 2bc09b13e6 Update dependency cross-env to v7 (https://github.com/woocommerce/woocommerce-blocks/pull/6504)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2022-06-09 11:26:23 +03:00
Albert Juhé Lluveras b5252dbd8f Disable page scroll when Mini Cart is open (https://github.com/woocommerce/woocommerce-blocks/pull/6532) 2022-06-09 09:58:29 +02:00
Albert Juhé Lluveras d994f06803 Fix PHP notice in Mini Cart when prices included taxes (https://github.com/woocommerce/woocommerce-blocks/pull/6537) 2022-06-09 09:57:37 +02:00
Luigi Teschio 9a80ad3f6a bump version and update tested up value for WordPress and WooCommerce (https://github.com/woocommerce/woocommerce-blocks/pull/6534) 2022-06-07 15:58:18 +02:00
github-actions[bot] 7a05f8559d Release: 7.8.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6517)
* Empty commit for release pull request

* Add changelog for the 7.8.0 release

* Add testing notes for 7.8.0 release

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

* update changelog and testing instructions after the cherry-pick

* add link

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

Gutenberg uses two different attributes for text colors:

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

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

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

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

See woocommerce/woocommerce-blocks#6492

* upload new zip

* update changelog

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

This reverts commit 4976afad58.

* upload new zip

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-06-07 15:40:54 +02:00
Albert Juhé Lluveras 40231ea1f9 Revert "Remove Combobox patch (https://github.com/woocommerce/woocommerce-blocks/pull/6465)" (https://github.com/woocommerce/woocommerce-blocks/pull/6531)
This reverts commit 4976afad58.
2022-06-07 14:09:50 +02:00
Luigi Teschio bbda7f42b5 Update step for the section 'Create the Testing Notes' (https://github.com/woocommerce/woocommerce-blocks/pull/6523)
* update step for the section 'Create the Testing Notes'

* Update .github/patch-initial-checklist.md

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

* Update .github/release-initial-checklist.md

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

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-06-07 11:07:42 +02:00
Lucio Giannotta 7531428b31 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
2022-06-07 10:44:45 +02:00
Luigi Teschio 96b9cbf0c6 Add the button to migrate to the blockified version of the Product Grid Block woocommerce/woocommerce-blocks#6483 (https://github.com/woocommerce/woocommerce-blocks/pull/6485)
Add the button to migrate to the blockified version of the Product Grid Block
2022-06-06 16:49:19 +02:00
Seghir Nadir 87a5e41e05 move legacy payment processing to its own class (https://github.com/woocommerce/woocommerce-blocks/pull/6519) 2022-06-06 13:44:52 +01:00
renovate[bot] ec7705d5ce Update storybook monorepo to v6.5.7 (https://github.com/woocommerce/woocommerce-blocks/pull/6503)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-06 10:38:22 +02:00
Tung Du fb84599f42 Fix: Use `register_block_type_from_metadata` function (https://github.com/woocommerce/woocommerce-blocks/pull/6511) 2022-06-03 10:10:08 +07:00
Michael P. Pfeiffer f38e0819ad Featured items: ensure valid DOM nesting in inspector controls (https://github.com/woocommerce/woocommerce-blocks/pull/6501) 2022-06-01 10:02:24 +02:00
Albert Juhé Lluveras 70a1af8288 Add WC core release thread tasks to release checklist (https://github.com/woocommerce/woocommerce-blocks/pull/6502)
* Add WC core release thread tasks to release checklist

* Apply suggestions from code review

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

Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>
2022-06-01 08:42:23 +02:00
Lucio Giannotta 52b946bd29 Featured Item: Fix default color being overridden by themes (https://github.com/woocommerce/woocommerce-blocks/pull/6492)
This fix applies the user selected color on the block's parent element.

Also: Fix default and custom colors not being applied to title correctly.
2022-05-31 17:43:03 +02:00
Alba Rincón 2a99207fac Set the default value for focalPoint on block.json (https://github.com/woocommerce/woocommerce-blocks/pull/6499) 2022-05-31 13:26:36 +02:00
Michael P. Pfeiffer d17bb32c02 Filter Products by Price: Decrease step sequence from 10 to 1 (https://github.com/woocommerce/woocommerce-blocks/pull/6486) 2022-05-31 12:44:50 +02:00
Tung Du d3ab637ba2 Show a warning to notify the user if the WC Blocks version is behind the one bundled in WC Core (https://github.com/woocommerce/woocommerce-blocks/pull/6459)
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-05-31 07:42:28 +07:00
Tung Du 775e149ad7 Fix: All translations related to JS blocks are loaded even if the block is not used (https://github.com/woocommerce/woocommerce-blocks/pull/6478) 2022-05-30 23:00:40 +07:00
Lucio Giannotta d63c5dafc1 Migrate Featured Items Blocks to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/6439)
Also:

* Refactored some composed components into one inclusive HOC,
called `withUpdateButtonAttributes`.

* The HOC `withTransformSingleSelectToMultipleSelect` allows for the wrong
type to be passed to its wrapped component: if a single element is
passed, that is wrapped into an array.

This didn't play well with TypeScript which obviously complains about
the wrong type being passed to the component.

So we now allow for arrays to be passed as props and ignored by the HOC
2022-05-30 16:38:52 +02:00
Daniel Dudzic b15050909e Mini Cart: Add font size and font family controls (https://github.com/woocommerce/woocommerce-blocks/pull/6396)
* Mini Cart: Add font size and family controls

* Remove redundant property from the path

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

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

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

* Remove space

* Small tweaks after review feedback
2022-05-30 09:08:53 +02:00
Seghir Nadir 3ff8440643 Respect low stock setting (https://github.com/woocommerce/woocommerce-blocks/pull/6444) 2022-05-27 20:55:46 +01:00
Luigi Teschio 90736d1742 Update RenovateBot configuration (https://github.com/woocommerce/woocommerce-blocks/pull/6477)
* Update RenovateBot configuration

* increase priority for devDeps

* update conf
2022-05-27 15:47:27 +02:00
Alex Florisca f85e0c6347 Only assign a reviewer when a PR is ready for review (https://github.com/woocommerce/woocommerce-blocks/pull/6461)
* Only assign a reviewer when a PR is ready for review

* Also run reviwer action when opening a normal PR

* Only assign a reviewer when a PR is ready for review
2022-05-27 18:05:54 +07:00
Luigi Teschio b72b1556d8 Update RenovateBot configuration (https://github.com/woocommerce/woocommerce-blocks/pull/6469)
* Update RenovateBot configuration

* increase priority for devDeps
2022-05-27 11:33:24 +02:00
Tung Du 0b51900bd2 Fix: Wait for the product to be added to cart before redirecting customer to the cart page (https://github.com/woocommerce/woocommerce-blocks/pull/6466) 2022-05-27 13:36:49 +07:00
Albert Juhé Lluveras 4976afad58 Remove Combobox patch (https://github.com/woocommerce/woocommerce-blocks/pull/6465) 2022-05-26 12:31:29 +02:00
Daniel Dudzic 9488b9186d Post-release version bump to 7.8.0-dev 2022-05-26 11:08:20 +02:00
github-actions[bot] 7f32bc4c14 Release: 7.7.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6448)
* Empty commit for release pull request

* Add changelog for the 7.7.0 release

* Add testing notes for the 7.7.0 release

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

* Update .zip link for the 7.7.0 release

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

* revert changes to webpack file

* fix loading of chunks

* revert changes to assets api as well

* include chunks from other blocks

* bail early if there is no build folder

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

* Update the 7.7.0 release .zip file

* Bumping version strings to new version.

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

* fix loading of chunks

* revert changes to assets api as well

* include chunks from other blocks

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

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

* Fix gradient overlay
2022-05-24 16:10:16 +02:00
Alex Florisca 3f0e93268e Fix being able to remove Cart Totals block (https://github.com/woocommerce/woocommerce-blocks/pull/6449) 2022-05-24 12:49:53 +01:00
Alex Florisca 52a87760c3 Cache node_modules between workflows (https://github.com/woocommerce/woocommerce-blocks/pull/6404)
* Running actions

* Cache node_modules

* Correct cache-name-prop

* rejig if statements

* cache node_modules everywhere

* Simplify unit test action

* Add checkout action back into other unit test action steps

* Share node_modules and build assets between jobs

* Cache node_modules between jobs

* Fix github error

* Tidy up

* Change wp-env-with-gutenberg to support multiple plugins

* Fix permissions issue

* Remove chmod

* Pass woocommerce.zip as a string

* Revert change to plugins override in unit test workflow

* Revert wp-env-with-gutenberg change

* Revert wp-env-with-gutenberg change

* Revert wp-env-with-gutenberg change

* Refactor check-modified-assets workflow

* Fix missed dependency

* Revert breaking the check-modified-assets.yml
2022-05-24 12:42:54 +01:00
Thomas Roberts 4a7b8ae1cf Revert "Add `requireExactMatch` prop to `ComboBox` to prevent wrong country/state values being sent to the server (https://github.com/woocommerce/woocommerce-blocks/pull/6426)" (https://github.com/woocommerce/woocommerce-blocks/pull/6447)
This reverts commit b1f4e35c00.
2022-05-24 10:49:17 +02:00
Seghir Nadir 238ab01ab2 Refactor webpack splitting to fix missing translation (https://github.com/woocommerce/woocommerce-blocks/pull/6420)
* don't splitChunk frontend scripts

* simplfy output folders

* reduce minimum chunk size to 10kb

* add all inner blocks for loading

* better splitChunks

* update translation code

* wait for scripts

* try sleeping

* fix loading translation

* fix tests for mini cart

* simplfy po logic

* automate loading chunks

* rename webpack group file

* rename block.json path
2022-05-23 15:58:13 +01:00
Luigi Teschio 33a9e654ca Enable ESLint for E2E folder woocommerce/woocommerce-blocks#6410 (https://github.com/woocommerce/woocommerce-blocks/pull/6413)
Enable ESLint for E2E folder; fix ESLint errors
2022-05-23 14:05:30 +02:00
Alex Florisca 903f96f677 Locked blocks cannot be unlocked and removed (https://github.com/woocommerce/woocommerce-blocks/pull/6419)
* DIsable the locking/unlocking mechansism for the cart-items-block so it cannot be unlocked and deleted

* Update all locked inner blocks with support: { lock: false } to disable locking/unlocking the blocks
2022-05-23 13:59:07 +02:00
Alba Rincón a18e44e1a7 Convert `Products by Attribute` to TS (https://github.com/woocommerce/woocommerce-blocks/pull/6418)
* Convert `Products by Attribute` block to TS

* Small tweaks after review

* Extract InspectorControls and EditMode into components

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

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

* Remove edit mode

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

* Improved interfaces/props after review

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

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

* Extract InspectorControls and EditMode into components

* Refactor edit and remove the `editMode` attribute

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

* Improve interfaces/props after review

* Move withSpokenMessages to wrap the whole Edit block
2022-05-23 10:14:51 +02:00
Alba Rincón d61c5116ad Start using `block.json` for the `Products by Attribute` block (https://github.com/woocommerce/woocommerce-blocks/pull/6414) 2022-05-23 10:10:06 +02:00
Albert Juhé Lluveras bcdb2174aa Remove bold styles from All Products block (https://github.com/woocommerce/woocommerce-blocks/pull/6436) 2022-05-20 15:15:55 +02:00
Alba Rincón 6e5ebdff85 Start using the `block.json` metadata file for `Products by Tag` (https://github.com/woocommerce/woocommerce-blocks/pull/6403)
* Start using the block.json metadata file for `Products by Tag`

* Remove comment

* Add version, schema, and text domain

* Add defaults

* Remove wrong keyword

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

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

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

Styles have also been refactored using mixins and extends and they mostly live in one place.
2022-05-19 18:16:46 +02:00
Thomas Roberts b1f4e35c00 Add `requireExactMatch` prop to `ComboBox` to prevent wrong country/state values being sent to the server (https://github.com/woocommerce/woocommerce-blocks/pull/6426)
* Add requireExactMatch prop to ComboBox & only run onChange if value matches

* Set requireExactMatch to true for Country and State inputs

* Add unit tests for ComboBox

* Update expected value for onChange call

* Re-add autocomplete option to country input

* Use correct case for autoComplete in country input
2022-05-18 18:32:42 +01:00
Alba Rincón 22e6394d47 Implement `Fixed image` and `Repeated image` media controls for the `Featured Product` (https://github.com/woocommerce/woocommerce-blocks/pull/6344)
* Add `Fixed` and `Repeated` background controls to `Featured Product`

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

* Extract `get_image_url` function

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

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

* Adjust styles

* Remove unused function, improve phpdoc

* Use alt and product name

Fix error rebasing master

* Hide alt if isRepeat is true

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

* Add `Fixed image` behaviour

* Remove unnecessary single quotes

* Remove duplicated const due to rebasing

* Fix focal point getting lost after enabling Fixed bg

* Fix duotone for fixed and repeated images

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

* Don't allow alt if the image is a bg not an img element
2022-05-18 16:08:32 +02:00
Alba Rincón 89a553a8a7 Fix phpunit path after the repo renaming (https://github.com/woocommerce/woocommerce-blocks/pull/6421)
* Fix phpunit path after the repo renaming

* Use the current folder name to run phpunit tests
2022-05-18 14:58:22 +02:00
Thomas Roberts 622f873c80 Update release PR checklist template (https://github.com/woocommerce/woocommerce-blocks/pull/6422) 2022-05-17 13:01:43 +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
Luigi Teschio 38c8a2ae32 Add E2E tests for the Active Filters Block (https://github.com/woocommerce/woocommerce-blocks/pull/6393)
* wip

* set editor using env var instead

* fix attribute missing issue when watching the test

* wip php templates test

* Add E2E tests for the Filter Products By Price Block woocommerce/woocommerce-blocks#6363

add E2E tests for the Filter Products By Price Block

* Add E2E tests for the Filter Products By Price Block woocommerce/woocommerce-blocks#6363

add E2E tests for the Filter Products By Price Block

* create clickLink util

* Add E2E tests for the Active Filters Block woocommerce/woocommerce-blocks#6377

add E2E tests for the Active Filters Block

* Add E2E tests for the Filter Products By Attribute Block woocommerce/woocommerce-blocks#6322

add E2E tests for the Filter Products By Attribute Block

* Add E2E tests for the Filter Products By Stock Block woocommerce/woocommerce-blocks#6323

add E2E tests for the Filter Products By Stock Block

* improve checks

* improve checks

* improve checks

* remove globals.d.ts file

* replace waitForTimeout

* create clickLint utils

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-05-13 15:18:51 +02:00
Alba Rincón 42166068b6 Start using the `block.json` metadata file for `Handpicked products` (https://github.com/woocommerce/woocommerce-blocks/pull/6392)
* Start using the `block.json` metadata file for `Handpicked products`

* Add the `properties` attribute to properly parse booleans

* Remove comment

* Add schema, delete version
2022-05-13 14:57:34 +02:00
Luigi Teschio 07e6878700 Add E2E tests for the Filter Products By Price Block (https://github.com/woocommerce/woocommerce-blocks/pull/6373)
* Add E2E tests for the Filter Products By Price Block woocommerce/woocommerce-blocks#6363

add E2E tests for the Filter Products By Price Block

* Add E2E tests for the Filter Products By Attribute Block woocommerce/woocommerce-blocks#6322

add E2E tests for the Filter Products By Attribute Block

* Add E2E tests for the Filter Products By Stock Block woocommerce/woocommerce-blocks#6323

add E2E tests for the Filter Products By Stock Block

* improve checks

* improve checks

* remove globals.d.ts file

* replace waitForTimeout
2022-05-13 14:15:33 +02:00
Alba Rincón bedd25ead6 Remove unnecessary `index.js` on Featured Category (https://github.com/woocommerce/woocommerce-blocks/pull/6394) 2022-05-13 12:36:46 +02:00
Luigi Teschio ac609f05dc Add E2E tests for the Filter Products By Stock Block (https://github.com/woocommerce/woocommerce-blocks/pull/6357)
* Add E2E tests for the Filter Products By Attribute Block woocommerce/woocommerce-blocks#6322

add E2E tests for the Filter Products By Attribute Block

* Add E2E tests for the Filter Products By Stock Block woocommerce/woocommerce-blocks#6323

add E2E tests for the Filter Products By Stock Block

* improve checks

* improve checks

* remove globals.d.ts file
2022-05-13 11:11:02 +02:00
renovate[bot] 76383c781c Update dependency @types/react to v17.0.45 (https://github.com/woocommerce/woocommerce-blocks/pull/6397)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-12 19:36:14 +02:00
renovate[bot] 7f501b41df Update dependency @types/wordpress__data to v4.6.11 (https://github.com/woocommerce/woocommerce-blocks/pull/6398)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-12 19:06:36 +02:00
renovate[bot] 11de221b85 Update dependency react-number-format to v4.9.3 (https://github.com/woocommerce/woocommerce-blocks/pull/6399)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-12 17:52:03 +02:00
Luigi Teschio ded12079cf Add E2E tests for the Filter Products By Attribute Block (https://github.com/woocommerce/woocommerce-blocks/pull/6355)
* Add E2E tests for the Filter Products By Attribute Block woocommerce/woocommerce-blocks#6322

add E2E tests for the Filter Products By Attribute Block

* improve checks
2022-05-12 17:15:53 +02:00
Thomas Roberts 2bfc687093 Bump version numbers following release PR merge 2022-05-10 12:55:02 +01:00
github-actions[bot] 07b201664a Release: 7.6.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6388)
* Empty commit for release pull request

* Bump version numbers and add changelog

* Add testing notes

* Add correct list of blocks to 6302 notes

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-05-10 12:50:11 +01:00
Thomas Roberts 9f13888d3a Merge branch 'trunk' into release/7.6.0 2022-05-10 12:49:50 +01:00
Thomas Roberts f3dc80c6f7 Bump version numbers to 7.7.0-dev 2022-05-10 09:54:22 +01:00
Thomas Roberts 712a6a6429 Bumping version strings to new version. 2022-05-10 09:37:40 +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
Thomas Roberts 44a7e7f6bf Bump version numbers and add changelog 2022-05-09 12:03:39 +01:00
Tom Cafferkey fffe7903d7 Check asset_data_registry keys do not exist before adding them for PHP templates (https://github.com/woocommerce/woocommerce-blocks/pull/6384)
* Check key does not exists before adding it

* Use third param to check if duplicate key exists instead of condition
2022-05-09 11:50:22 +01:00
Daniel Dudzic 0b3acfad27 Add the product image control for all blocks utilizing GridContentControl (https://github.com/woocommerce/woocommerce-blocks/pull/6302) 2022-05-09 12:04:33 +02:00
Tung Du 773db56bc5 Fix: Empty Mini Cart Contents view in editor is not vertically centered on WP 6.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6379) 2022-05-06 18:05:54 +07:00
Artur Piszek 62024321b9 Fix relative include paths (https://github.com/woocommerce/woocommerce-blocks/pull/6365) 2022-05-06 09:46:54 +02:00
Michael P. Pfeiffer 3aba1b4339 Featured Product: add background color option (https://github.com/woocommerce/woocommerce-blocks/pull/6367) 2022-05-06 07:13:11 +02:00
Lucio Giannotta 3ed91db9e7 Add media controls to the Featured Category block (https://github.com/woocommerce/woocommerce-blocks/pull/6360)
Also:

* Make sure media controls are unavailable unless there is media
2022-05-05 17:55:53 +02:00
Michael P. Pfeiffer 3f6b197063 Featured Category: add background color option (https://github.com/woocommerce/woocommerce-blocks/pull/6368) 2022-05-05 16:12:01 +02:00
Tung Du a22c93f00b Disable lock menu item for Mini Carts Contents and its inner blocks (https://github.com/woocommerce/woocommerce-blocks/pull/6374) 2022-05-05 17:31:57 +07:00
Tarun Vijwani 2440fb6f36 Fixed Release Schedule link in release and patch initial checklist (https://github.com/woocommerce/woocommerce-blocks/pull/6338) 2022-05-05 14:01:37 +04:00
Tarun Vijwani 51495ff32c Meaningful comment for skipping the e2e tests (https://github.com/woocommerce/woocommerce-blocks/pull/6353)
* Added meaningful comment for skipping the tests if it's a WooCommerce Core process environment.

* Fixed the flag number for MiniCart
2022-05-05 12:19:38 +04:00
Tung Du 26fbb3f569 Shop page: Remove the Template panel from the Setting Sidebar (https://github.com/woocommerce/woocommerce-blocks/pull/6366) 2022-05-05 08:08:10 +07:00
Tung Du 217c822b76 Fix: Mini Cart block is not available from the Edit template screen (https://github.com/woocommerce/woocommerce-blocks/pull/6351)
* revert woocommerce/woocommerce-blocks#5653

* remove unused global variable

* fix class name
2022-05-05 07:41:35 +07:00
Tung Du 5930ee6a94 Remove custom ensureSidebarOpened() (https://github.com/woocommerce/woocommerce-blocks/pull/6359) 2022-05-05 07:14:07 +07:00
Daniel Dudzic cd8196fa5f Product Tag Cloud: Hide from Widgets screen in classic themes (https://github.com/woocommerce/woocommerce-blocks/pull/6327)
* Product Tag Cloud: Hide from Widgets screen in classic themes
* Fix code indentation
2022-05-04 16:57:25 +02:00
Albert Juhé Lluveras 3d8043ca6b Add clarification about 'Do not include in the Testing Notes' checkbox in PR template (https://github.com/woocommerce/woocommerce-blocks/pull/6370) 2022-05-04 15:14:54 +02:00
Tung Du 206672f27e Classic Template: set the default alignment to wide (https://github.com/woocommerce/woocommerce-blocks/pull/6356) 2022-05-04 18:02:42 +07:00
renovate[bot] 18f7d5f3c5 Update dependency @types/react-dom to v17.0.16 (https://github.com/woocommerce/woocommerce-blocks/pull/6361)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-04 11:15:30 +02:00
Tarun Vijwani 02a1b9f78d Remove redundant front-end Checkout block test case (https://github.com/woocommerce/woocommerce-blocks/pull/6352)
* Removed redundant front-end test case
2022-05-04 09:58:12 +04:00
renovate[bot] 8ffd0928c3 Update dependency @types/wordpress__block-editor to v6.0.6 (https://github.com/woocommerce/woocommerce-blocks/pull/6362)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-04 04:02:30 +00:00
Alba Rincón dcc4e60dda Parse categories coming from the back-end as a json array (https://github.com/woocommerce/woocommerce-blocks/pull/6358)
* Parse categories coming from the back-end as a json array

The category ids that come from php are in json array format (e.g. '[40,41]'),
so it's necessary to parse them and convert them into a js array before
processing them. Otherwise the api request will fail.

* Only parse category ids if not undefined
2022-05-03 16:09:20 +02:00
Tung Du ab797e8237 Fix: Prevent page reloads twice when the shopper sets a price filter and attribute filter using blocks in a PHP template (https://github.com/woocommerce/woocommerce-blocks/pull/6350) 2022-05-03 17:04:44 +07:00
Lucio Giannotta 9a38c6445e Add media controls to the Featured Product block (https://github.com/woocommerce/woocommerce-blocks/pull/6348)
This PR adds image editing controls to the Featured Product block. In particular, user can now:

* Rotate the image
* Crop the image
* Change the aspect ratio of the image
* Zoom the image

Each edit gets saved in the database as a new image.
2022-05-03 09:11:13 +02:00
renovate[bot] 28ddbbac83 Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/6354)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-03 08:52:16 +02:00
renovate[bot] a83c98f0d5 Update dependency @types/puppeteer to v5.4.6 (https://github.com/woocommerce/woocommerce-blocks/pull/6329)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-02 13:49:23 +02:00
renovate[bot] 587f01dd05 Update dependency @types/lodash to v4.14.182 (https://github.com/woocommerce/woocommerce-blocks/pull/6328)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-02 12:43:45 +02:00
Alex Florisca 2f9b54ae03 Try to fix E2E tests once and for all (https://github.com/woocommerce/woocommerce-blocks/pull/6337)
* Try to fix account.test.js

* Remove language installations for woo core and wp core and take screenshots

* Upload screenshots to artifacts

* npm install instead of npm ci

* Upload artifacts  not matter what

* fsdf

* fsdfsf

* remove screenshoting from account.test.js and only run checkout-terms.test.js

* Print NODE_ENV

* Better handling of overriding wp-env.json

* Run all tests

* Re-enable translations for WP and Woo

* Wait for Cart & Checkout blocks to load before moving on

* Uncomment github actions

* Try to fix shipping test

* fill checkout before placing order, duuuh

* Wait until networkidel0 instead of domcontentloaded for page navigations

* Fix account.test.js

* change visitBlockPage() to  use Promise.all()

* Remove screenshot taking

* I think Promise.all() is being funny and not throwing properly, testing

* wait for checkbox to be visible before clicking

* Remove try catch around Promise.all()

* Fix linting issues

* Remove screenshot dir

* Raluca feedback:

* Timeout back to 30000

* Login to merhcant before changing settings

* merchant.logout()
2022-05-01 12:33:58 +01:00
Albert Juhé Lluveras 027a5d2490 Updates to release checklist and PR template to improve processes (https://github.com/woocommerce/woocommerce-blocks/pull/6293)
* Updates to release checklist to clarify testers, blockers, etc.

* Specify that commits related to failing PRs need to be reverted

* Update PR & Release templates

Release template
- the Write testing notes has been moved to the PR template, and removed from the release checklist
- mention that common functionality should be tested by both porters
- update the instructions on how to create the WC PR's changelog

Pull request template
- better visibility for the feature flag/experimental changes
- add before/after table for screenshots
- add WooCommerce Visibility to help with the changelog of the WC PR
- add an extra check to not include a PR in The testing notes

* Remove duplication on pinging porters for testing

* Clarify PR author is the responsible to fix failing PRs

* Update .github/patch-initial-checklist.md

Co-authored-by: Raluca Stan <ralucastn@gmail.com>

* Update .github/release-initial-checklist.md

Co-authored-by: Raluca Stan <ralucastn@gmail.com>

* Include information about testing the Store API

* Add information about logging issues that appear during testing

* Fix punctuation

* Remove Manual Testing section from PR template

* Close milestones when creating the release branch

* Add create a milestone for the next version step

Co-authored-by: Raluca Stan <ralucastn@gmail.com>
2022-04-29 11:53:57 +02:00
Alba Rincón bdfd1da4c5 Start using the `block.json` metadata file for the `Featured Category` block (https://github.com/woocommerce/woocommerce-blocks/pull/6300)
* Start using the `block.json` metadata file for the `Featured Category` block

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

* Remove unnecessary `get_block_metadata_defaults` function

* Add alt attribute to the block.json file

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

* Get default attributes from the block.json file

* Add removed comment

* Remove unnecessary `get_block_metadata_defaults` function

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

Allow to define an alt text for the Feature Product block

* Simplify on change

* Improve alt description and use name instead of short description

Short description can contain html and images, so it's not adequate to use on the alt attribute
2022-04-28 16:28:22 +02:00
Alba Rincón ec73743d0f Add new `alt` attribute to the `Featured Category` media settings (https://github.com/woocommerce/woocommerce-blocks/pull/6341) 2022-04-28 16:28:09 +02:00
Albert Juhé Lluveras 2455d7a390 Cleanup AttributeFilterBlock code (https://github.com/woocommerce/woocommerce-blocks/pull/6333) 2022-04-28 10:29:54 +02:00
Albert Juhé Lluveras 81f348b466 Ensure Filter Products by Attribute block reloads the page when interacting with PHP templates (https://github.com/woocommerce/woocommerce-blocks/pull/6332) 2022-04-28 09:51:24 +02:00
Tarun Vijwani 1d0acebfa9 Update to dev version: 7.6.0-dev (https://github.com/woocommerce/woocommerce-blocks/pull/6336)
* update to dev version: 7.6.0-dev
2022-04-27 17:54:51 +04:00
github-actions[bot] a0d7400432 Release: 7.5.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6312)
* Release: 7.5.0
2022-04-27 17:19:21 +04:00
renovate[bot] 1412f779e2 Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/6304)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-27 12:35:57 +01:00
Tom Cafferkey 6fb43ed8cb Deprecate legacy filter widgets with block alternatives (https://github.com/woocommerce/woocommerce-blocks/pull/6299)
* Transform object for woocommerce_price_filter legacy widget to be replaced with block alternative

* Filter products by price transform

* Price Filter formatting

* Set set_filterable_product_data data on the widgets screen

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

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

* Transform layered nav classic widget to attribute filter block

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

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

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

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

* mock @woocommerce/settings for has_filterable_products setting

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

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

This reverts commit 5ad09e964b77e5c6499b4134cf58d7a6c226424d.

* try: add all product block to bypass has_filterable_products check

* fix: backend e2e test for attribute filter

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-04-27 08:36:00 +01:00
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
Tung Du db2cb044f9 Active Filters: Add support for Filters Products by Rating widget (https://github.com/woocommerce/woocommerce-blocks/pull/6319) 2022-04-26 19:36:06 +07:00
Tom Cafferkey 781de225da Only set data is_rendering_php_template in Classic Themes on WooCommerce product archive templates where filters are being used. (https://github.com/woocommerce/woocommerce-blocks/pull/6324) 2022-04-26 12:22:43 +01:00
Tung Du 2e829bca05 Active Filters block: Clear All button work with all types of permalink settings. (https://github.com/woocommerce/woocommerce-blocks/pull/6315) 2022-04-26 16:39:34 +07:00
Tung Du a999a3d992 Active Filters block: support Filter Products by Rating widget (https://github.com/woocommerce/woocommerce-blocks/pull/6316)
* support rating filter

* use plural form for consistency
2022-04-26 16:22:30 +07:00
Tung Du e0f140c7e2 Fix: Customizer fatal error for bundled woocommerce-blocks package (https://github.com/woocommerce/woocommerce-blocks/pull/6317) 2022-04-26 15:21:14 +07:00
Seghir Nadir bbd7e53598 graduate draft orders (https://github.com/woocommerce/woocommerce-blocks/pull/6288) 2022-04-25 15:08:37 +01:00
Seghir Nadir bcd490a78f udpate attributes docs (https://github.com/woocommerce/woocommerce-blocks/pull/6272) 2022-04-25 15:08:14 +01:00
Seghir Nadir 162c21a84d show attributes in simple products (https://github.com/woocommerce/woocommerce-blocks/pull/6274) 2022-04-25 15:07:47 +01:00
Niels Lange f10bb2da82 Critical flows: Merchant → Checkout → Can adjust T&S and Privacy Policy options (https://github.com/woocommerce/woocommerce-blocks/pull/6211)
* Add test to check if T&C and Privacy links are visible

* Fix filling wrong type of form error

With a virtual product we shouldn't need to fill the shipping details
We need to fill the billing instead

* Fix undefined 'termsCheckbox' bug

* Fix terms checkbox name

* Activate test case

* Replace static URL with dynamic one

* Convert external plugin into mock

* Fix JS linting issue

Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
2022-04-25 10:48:54 +02:00
Tung Du ce99a47fb4 Fix: Make Active Filters work with PHP templates (https://github.com/woocommerce/woocommerce-blocks/pull/6295)
* make active filters block work with PHP templates

* use getSettingWithCoercion

* redirect to the base url when clicking Clear All link

* fix: eslint error and warning
2022-04-22 16:30:40 +01:00
Tom Cafferkey eb3537bcc1 Fix ESLint errors and warnings (https://github.com/woocommerce/woocommerce-blocks/pull/6298) 2022-04-22 11:46:51 +01:00
Tomasz Tunik f366eaeddf Fix attribute filter dropdown list z-index; (https://github.com/woocommerce/woocommerce-blocks/pull/6294)
was conflicting with other components like:
- sale badge
- all products placeholder items
2022-04-22 09:16:50 +02:00
Tom Cafferkey 5573485daa Filter Products by Attribute: Fix the page reload which happens when clicking the filter button on PHP templates (https://github.com/woocommerce/woocommerce-blocks/pull/6287)
* Move redirect logic to its own callback

* Update comment for updateAttributeFilter

* Remove condition for updating state for active filters only when filter button is not available

* Replace onSubmit with updateAttributeFilter

* Update logic lost in merge

* Replace checked stateful data with activeFilters data from URL

* Remove catalog_visibility from filteredCounts useCollectionData query for PHP templates
2022-04-22 07:38:33 +01:00
dependabot[bot] c98e33d5fc Bump async from 2.6.3 to 2.6.4 (https://github.com/woocommerce/woocommerce-blocks/pull/6265)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-21 14:22:59 +02:00
Harris Papazoglou f46d912cc9 Product Query: pass any product taxonomies existing in the URL parameters. (https://github.com/woocommerce/woocommerce-blocks/pull/6152)
* Product Query: pass any product taxonomies existing in the URL parameters.

* Products API: add custom product taxonomy in docs.

* Docs: fixes type.

* Linting the docs.

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

* Product Query: fixes the taxonomies merge order.

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

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

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

* Product Query: updates attribute operator enum.

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

Co-authored-by: cpap <papazoglou.charalampos@gmail.com>
2022-04-21 15:00:11 +03:00
renovate[bot] 54f82d841e Update dependency @actions/github to v5.0.1 (https://github.com/woocommerce/woocommerce-blocks/pull/6198)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-21 11:36:01 +02:00
Alba Rincón df206284a3 Make `Filters Products by Price` work with `Active Filters` block (https://github.com/woocommerce/woocommerce-blocks/pull/6245)
* Set the min and max price from the URL to make the active filters work with PHP templates

* Extract price formatting into a separate function

* Rename the `hasSetPriceDefault` variable and improve comments

Co-authored-by: Tomasz Tunik <tomasztunik@gmail.com>
2022-04-21 10:25:17 +02:00
Luigi Teschio 881c202717 Make Filter Products by Stock block compatible with PHP rendered Classic Template block (https://github.com/woocommerce/woocommerce-blocks/pull/6261)
* Enable Attribute Filter block to work with the PHP rendered Classic Template block

* Check for presence of option before rendering it

* improve filter product by attribute

* fix pagination problem

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

* fix filter by stock for PHP templates

* fix naming and comment

* Update filter key in ClassicTemplate

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

* Remove unused useEffect and fix ESLint error

* Set active stock filter and track using local state

* ESLint fix

* Remove unncessary dependencies from useEffect

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

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

* Export ConstrainedResizeable from Featured Product

* Wrap duotone in feature plugin flag

* Add support for `border-radius`

* Change prop order

* Add SSR for new options on Featured Category block

* Optional chaining on border radius

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

* Add default to overlay and height

* Optional chaining on border radius for Featured Product block

* Fix gradient persistence and default overlay discrepacies

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

Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
2022-04-21 08:20:10 +01:00
Tarun Vijwani 3e36dd40dc Critical flows: Shopper → Checkout → Can login to existing account and can create an account (https://github.com/woocommerce/woocommerce-blocks/pull/6147)
* Added test cases for user can login and create an account from Checkout block page
2022-04-21 10:47:22 +04:00
renovate[bot] 4cb5ecab32 Update dependency simple-git to 3.5.0 [SECURITY] (https://github.com/woocommerce/woocommerce-blocks/pull/6221)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-20 17:58:06 +02:00
Achyuth Ajoy a17159cb52 Allow saved payment methods labels other than card/eCheck to display brand & last 4 digits if present (https://github.com/woocommerce/woocommerce-blocks/pull/6177)
* Allow default label to use brand & last4 if present

* Lint fixes
2022-04-20 13:15:04 +02:00
Tung Du 97a3b06a66 Mini Cart: Support RTL languages (https://github.com/woocommerce/woocommerce-blocks/pull/6264) 2022-04-20 15:52:22 +07:00
renovate[bot] 2c0a935dd8 Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/6183)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-20 10:24:28 +02:00
Tung Du e8d922142c E2E: Explain the reason for the addition language update command (https://github.com/woocommerce/woocommerce-blocks/pull/6280) 2022-04-20 11:48:13 +07:00
Lucio Giannotta 9b6d0e0e0f Fix Featured Product block frontend mismatch (https://github.com/woocommerce/woocommerce-blocks/pull/6263)
If the Featured Product block was added but not modified at all,
the block would not match the editor on the front end.

This was due to the fact that, on the frontend, the
block is SSR and was missing some defaults which
were present in JS.
2022-04-19 15:57:05 +02:00
Raluca Stan 54fba3fe4e Update release-initial-checklist.md 2022-04-19 11:35:00 +02:00
Niels Lange a1a7ae78fe Update information about Woo core changelog entry 2022-04-19 11:20:06 +02:00
Alex Florisca 59b4da800b Cart & Checkout translations test use nl_NL (https://github.com/woocommerce/woocommerce-blocks/pull/6267)
* Cart & Checkout translations test use the already installed language nl_NL

* Extra timeout when checking for shipping and billing addresses

* wait for selector instead of increase timeout

* Change waitForSelector selector:

* Clean up

* Increase idleTime for waitForNetworkRequest

* Fix random timeouts and increase timeout of verifying shipping option

* feedack
2022-04-19 08:56:52 +01:00
Tom Cafferkey 0d9348f618 Provide product filter blocks a method to know when to display. (https://github.com/woocommerce/woocommerce-blocks/pull/6270)
* Add has_filterable_products data to the AllProducts block to be used by product filter blocks

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

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

* Update comment of set_php_template_data method on ClassicTemplatesCompatibility class

* Move conditional checking if the current theme is a block theme in ClassicTemplatesCompatibility class
2022-04-19 08:14:09 +01:00
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
Thomas Roberts 32189c0bb5 Fix bug with server errors not showing in Cart/Checkout (https://github.com/woocommerce/woocommerce-blocks/pull/6268)
* Add correct context to checkout and cart errors from API

* Correct typo in add-to-cart context

* Add correct context in add to cart form

* Add correct context in add to cart form

* Add correct context in Checkout State
2022-04-15 13:17:09 +01:00
Niels Lange 75f8de911a Allow running e2e test individually (https://github.com/woocommerce/woocommerce-blocks/pull/6230)
* Allow running e2e test individually

* Adjust ignore and root paths

* Simplify jest.performance.config.js

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2022-04-15 09:34:18 +01:00
Shendy 19dfae3dcc Call plugin_dir_url() in Package::get_url() instead of from its constructor. (https://github.com/woocommerce/woocommerce-blocks/pull/6260) 2022-04-14 17:28:32 +01:00
Tom Cafferkey 4d3c609a3c Make Attribute Filter block compatible with PHP rendered Classic Template block (https://github.com/woocommerce/woocommerce-blocks/pull/6204)
* Enable Attribute Filter block to work with the PHP rendered Classic Template block

* Check for presence of option before rendering it

* improve filter product by attribute

* fix pagination problem

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

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

* Add Changelog to readme.txt

* Update WC tested and required versions

* Add testing notes

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

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

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

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

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

This reverts commit fc39535f8476d02e35353374d9434a8723458cfa.

* Fix the returned template for older Checkout block iterations

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

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

* Fix checkout coupon tests in checkout

They have been written for logged in user

* Fix Order Summary Heading inner block's default text

* Update comments with better wording

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

This reverts commit ab09021b923fad4218b3016e47760ad07f6bc960.

(cherry picked from commit 0b18ff59bd)

* Update the zip file link

* Update testing instructions

* Remove experimental build related PR from testing notes

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

* Add box sizing to Totals item

* Add some unit tests for Order summary blocks

* Fix Proceed to checkout button size

(cherry picked from commit d22ce7cd0b)

* Update the WC required/tested versions

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

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

* Update src/BlockTypes/MiniCart.php

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

* rename function

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

* Update the release's ZIP file

* Update testing notes

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

* Update the testing notes

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

* Update Testing notes

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

* Remove woocommerce/woocommerce-blocks#6166 testing instructions

We reverted this PR

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

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

This reverts commit 92387e2

(cherry picked from commit c586b1a5f3)

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
Co-authored-by: Raluca Stan <ralucastn@gmail.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-04-14 11:55:33 +00:00
Saad Tarhi c586b1a5f3 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
2022-04-14 10:31:01 +00:00
renovate[bot] 78ea50775a Update dependency @testing-library/react to v12.1.5 (https://github.com/woocommerce/woocommerce-blocks/pull/6241)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-14 11:19:41 +01:00
Luigi Teschio bac2c59daa Add Product Search Results Template (https://github.com/woocommerce/woocommerce-blocks/pull/6219)
* Add Search Result Product Template woocommerce/woocommerce-blocks#6218

Add Search Result Product Template

* update title

* add E2E test for Product Search Results template

* renaming class

* update E2E tests
2022-04-14 11:45:00 +02:00
renovate[bot] da7d8f664a Update dependency @testing-library/jest-dom to v5.16.4 (https://github.com/woocommerce/woocommerce-blocks/pull/6199)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-13 16:59:14 +01:00
Tung Du 93ad72f6ff Mini Cart Contents: Use block pattern to make the empty cart message translatable (https://github.com/woocommerce/woocommerce-blocks/pull/6248)
* try: use block pattern to make empty cart message translatable

* Update src/BlockTypes/MiniCart.php

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

* rename function

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Luigi <gigitux@gmail.com>
2022-04-13 17:15:48 +02:00
Tung Du ad85348151 Shopper → Mini Cart → Can view translated mini cart contents block (https://github.com/woocommerce/woocommerce-blocks/pull/6214) 2022-04-13 18:51:13 +07:00
renovate[bot] 8297085662 Update dependency @types/react to v17.0.44 (https://github.com/woocommerce/woocommerce-blocks/pull/6242)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-13 04:42:46 +00:00
Tung Du 230bc2f9f0 Fix: Shop page: Filter Products by Price block only works with Number of decimals set to 2 (https://github.com/woocommerce/woocommerce-blocks/pull/6229) 2022-04-13 11:31:55 +07:00
Lucio Giannotta ebd8774ae6 Enable more style options for the Featured Product block (https://github.com/woocommerce/woocommerce-blocks/pull/6181)
* Add support for overlay color and duotone
* Add support for custom inner padding
* Wrap all block experimental features in `isFeaturePluginBuild`
* Fix resizable container min height

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

* Fix resizable handle not being fully visible

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

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

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

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

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

This reverts commit fc39535f8476d02e35353374d9434a8723458cfa.

* Fix the returned template for older Checkout block iterations

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

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

* Fix checkout coupon tests in checkout

They have been written for logged in user

* Fix Order Summary Heading inner block's default text

* Update comments with better wording

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

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

* Updated get_extended_schema & get_item_response

* Test for extensions field on products

* Updated endpoint extend Readme
2022-04-11 17:40:26 +01:00
Manos Psychogyiopoulos 62bfed8dec Decode HTML entities when formatting Store API error messages (https://github.com/woocommerce/woocommerce-blocks/pull/5870)
* Decode HTML entities when formatting Store API error messages

* 👌IMPROVE: Code formatting to avoid linting issues - woocommerce/woocommerce-blocks#5869

* 👌IMPROVE: Decode entities directly on the store notices container - woocommerce/woocommerce-blocks#5869

*  REVERT: Revert decode entities directly on the store notices container - woocommerce/woocommerce-blocks#5869

*  REVERT: Revert decode entities directly on the store notices container - woocommerce/woocommerce-blocks#5869

Co-authored-by: Panos (Panagiotis) Synetos <panos.synetos@automattic.com>
2022-04-11 15:11:25 +03:00
Daniel Dudzic 562a1afd56 Remove the ToggleButtonControl in favor of ToggleGroupControl (https://github.com/woocommerce/woocommerce-blocks/pull/5967)
* Remove the ToggleButtonControl in favor of ToggleGroupControl

* Remove ESLint errors. Use experimental feature as this is low risk

* Fix the 'Expected preceding comment block' ESLint error

Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2022-04-11 13:33:46 +02:00
Alex Florisca 5c396c4e26 Tidy up and organise e2e tests (https://github.com/woocommerce/woocommerce-blocks/pull/6206)
* rename some things

* Refactor e2e tests

* remove only from checkout test

* Typo in test

* Add --testPathIgnorePatterns performance back into package.json

* Niels feedback and fix a test

* Update import from utils
2022-04-11 11:52:33 +01:00
Alex Florisca 6c2d24e3e5 Fix/e2e tests timeout issue (https://github.com/woocommerce/woocommerce-blocks/pull/6165)
* Increase timeout of translations test to 30000

* Wait for network idle in goToCart and goToCheckout

* Increase timeout to 30000

* fix E2E tests

* try fix

* test

* test

* test

* another test

* fix test

* 60s timeout

* test

* Update product constants

* Simplify orderSummary check

* Go back to page.$

Co-authored-by: Luigi <gigitux@gmail.com>
2022-04-08 14:47:49 +01:00
Alex Florisca 0c7c2db6c0 Update @woocmmerce/eslint-plugin to 2.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6203)
* Update @woocmmerce/eslint-plugin to 2.0.0

* Fixed some eslint errors

* Fix syntax errors

* Fix most linting errors

* Feedback changes

* Fix one more eslint issue
2022-04-08 14:47:19 +01:00
Thomas Roberts cab947bc2b Remove `useStoreNotices` and interact directly with data store instead (https://github.com/woocommerce/woocommerce-blocks/pull/6159)
* Make useStoreNotices interact directly with the store

* Get/set error notices directly in store in paymentMethodDataContext

* Add hasNoticesOfType util

* Remove useStoreNotices and interact directly with data store

* Create/remove notices directly in store

* Remove tests for useStoreNotices

* Add tests for notices util

* Use setIsSuppressed from useStoreNoticesContext

* remove useStoreNotices hook

* Update context typedef to define only isSuppressed and setIsSuppressed

* Remove all values from StoreNoticesContext besides setIsSuppressed

* Wrap Cart and Checkout blocks in StoreNoticesProvider (for isSuppressed)

* Make StoreNoticesContainer a named export

This is required so we can import it from @wooommerce/base-context

* Change addErrorNotice to createErrorNotice to match store action

* Remove unnecessary StoreNoticeProviders and pass only context to container

* Accept a context in StoreNoticesContainer

* Pass relevant context to StoreNoticesContainer

* Add function to remove notices by status

* Prevent checkout from breaking when removing notices during processing

* Prevent TS error about not included path

* Add StoreNoticesContainer to single product block

* Add StoreNoticesContainer to All Products Block

* Ensure errors are shown when using All Products & Single Product Blocks

* Add a context arg to removeNoticesByStatus

* Use correct contexts for all products and single product block

* Update tests to reflect new context argument

* Re-add missing block file for order-summary

* Remove block file for order-summary

* Send context to useStoreCartCoupons to show errors correctly
2022-04-08 13:11:50 +01:00
Tung Du d5503b6e46 Fix: Mini Cart block isn't available in the Customizer > Widget (https://github.com/woocommerce/woocommerce-blocks/pull/6201) 2022-04-08 17:14:25 +07:00
Tung Du 5415c22251 Prepare the Mini Cart block for WC Core release (https://github.com/woocommerce/woocommerce-blocks/pull/6209) 2022-04-08 15:51:21 +07:00
Tung Du 1fb7274633 Refactor: Style quantity input dynamically (https://github.com/woocommerce/woocommerce-blocks/pull/6167) 2022-04-08 15:49:27 +07:00
Tarun Vijwani d85e9766a7 Increased Cart product quantity limit to 9999 (https://github.com/woocommerce/woocommerce-blocks/pull/6202)
Increased per item cart limit to 9999
2022-04-08 12:46:48 +04:00
Alex Florisca e37b787e50 Move mini cart outside cart-checkout folder (https://github.com/woocommerce/woocommerce-blocks/pull/6192)
* Move shared folder to /blocks

* Moved mini-cart block in blocks dir:

* Rename shared folder to cart-checkout-shared

* Remove customDir from mini-cart webpack entry

* Update assets/js/base/context/tsconfig.json

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

* Feedback changes

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-04-07 14:47:58 +01:00
Thomas Roberts d7a52b6f67 Check for performance file existence before running reporter (https://github.com/woocommerce/woocommerce-blocks/pull/6189)
* Check for performance file existence before running

* check reports/performance-report.json file exists on setup

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2022-04-06 12:22:51 +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
Albert Juhé Lluveras 58c649e971 Update Filter Products by Price block to work with PHP templates (https://github.com/woocommerce/woocommerce-blocks/pull/6146)
* Update Filter Products by Price block to work with PHP templates

* Reformat param formatting

* Add check for PHP template

* window guards and comments for context

* Add comment to page reload

* Addressed code review feedback

* Fix setMinPriceQuery and setMaxPriceQuery values

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

* package-lock.json update

Co-authored-by: tjcafferkey <tjcafferkey@gmail.com>
2022-04-05 11:52:35 +01:00
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
Thomas Roberts 10793e8e18 Try adding performance tests (https://github.com/woocommerce/woocommerce-blocks/pull/6119)
* Add performance script to measure load times of cart and checkout blocks

* Temp commit

* Temp commit

* Temp commit

* Remove specific test from performance e2e command

* Add performance reporter

* Add step to clean performance file before running tests

* Add test report constant & average and logPerformanceResult test utils

* Update uses of product name constant

* Add cart coupon performance test

* Check if report file is empty before parsing

* Limit performance tests to only ones in performance directory

* Round the averages and add a linebreak after each entry in the log

* Fix formatting of report and only output after all tests

* Log each loading metric as an individual data point

* Improve formatting

* Get load times in ms from profiler

* Revert changes to fixtures

* Remove trace.json from git

* Remove checkout test file (tests not implemented)

* Check performance log file exists before truncating it

* Fix checkout coupon test

* Remove console logs

* Revert to use virtual products after rename of constant

* Ignore performance tests when running regular e2e tests

* Feedback changes

* Tidy up

* Fix packag-log.json:

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2022-04-04 13:30:07 +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
Alba Rincón b56097337f Update `Product Title` link settings to match `Post Title` (https://github.com/woocommerce/woocommerce-blocks/pull/6131)
* Rename `Product Title` `Content` panel to `Link settings`

* Rename toggle `Link to Product Page` to `Make title a link`

* Remove help text

* Add `rel` and `linkTarget` to the `Product Title` settings

* Add `rel` and `linkTarget` to the `Product Title` block

* Only add the `target` attribute if the title is rendered as a link

* Keep the `nofollow` in rel as it was before

* Make `linkTarget` and `rel` optional

To not change the html generated for other components also using `ProductName`

* Add tests fotr the `Title` component

* Improve rel condition

* Extract `linkRel` variable

* Remove unnecessary undefined

* Remove the default value for `linkTarget`

Since it is the default behavior of the browsers, we don't need it.

* Remove the `nofollow` rel value

It was decided to remove it since it's a link to internal pages.
See the PR discussion for more context.

* Remove the `rel` option

It does not have much sense to have it since it's always an internal link.
See the PR discussion for more context.

* Clean-up `rel` related code
2022-04-04 09:06:24 +02:00
Saad Tarhi c636cb1bbe Shopper → Checkout → Can apply single-use coupon once (https://github.com/woocommerce/woocommerce-blocks/pull/6174)
* Add "single-use" coupon to the fixture data

* Create a first draft of the coupon e2e test

* Create single use coupon code constant

* Create "applyCouponFromCheckout" function

* Remove the "single-use" coupon from the fixture data

* Setup coupon creation using Woo's Rest API

* Add single-use coupon E2E test

* Move discount XPath definition to the expressions file

* Clean comments

* Remove unnecessary delay function

* Refactor to a more human friendly check

* Clear the setup in the afterAll branch (delete coupon)

Co-authored-by: Saad Tarhi <saad.tarhi@automattic.com>
2022-04-01 23:09:54 +00:00
Mike Jolley eb196226d8 WIP: Add Inner blocks to order summary (https://github.com/woocommerce/woocommerce-blocks/pull/6065)
* Sub/Total/Fee inner blocks

* Row blocks within the inner block

* Update icons

* Resolve stying issues

* Remove old block

* Pin totals row

* Locking logic update

* Heading inner block

* Refactor where inner blocks are defined

* Add todos

* Todo for Consider deprecating OrderMetaSlotFill and DiscountSlotFill in favour of inner block areas.

* Improve frontend registration of components using new entrypoint

* Experiment- external block context

* Revert "Experiment- external block context"

This reverts commit 4b75668ec7eb62f065c6a488cd942a666e26204f.

* Duplicate inner blocks to avoid conflicts with context

* Remove todo

* Rename block dir

* Some test fixes

* Fix import

* fix import

* linting

* Remove unused attributes

* Optional classname

* fix coupons import

* fix shipping mocks

* Styling

* Fix selectors in e2e tests

* Add back the wc-block-components-totals-wrapper class that was used for each segment in the totals Order summary

Because, removing them was:
-  a breaking change for the old structure
- was making it harder to target the inner blocks. Before the class was used to target each segment
- it was making the wc-block-components-totals-item behave as a child or parent depending on the inner block, inconsitency

* Reuse the TotalsWrapper component for C& C blocks inner blocks

This component was removed in this PR, but  we wrap components in the Cart and Checkout sidebar in a TotalsWrapper. This will ensure consistent spacing and borders are applied to items in the sidebar.

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: Raluca Stan <ralucastn@gmail.com>
2022-04-01 15:45:18 +02:00
renovate[bot] d6e0db14ef Update dependency @types/lodash to v4.14.181 (https://github.com/woocommerce/woocommerce-blocks/pull/6162)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-01 13:26:59 +01:00
Luigi Teschio 4f2f267cf8 Add tests for the Mini Cart Block when it is added on the FSE editor. (https://github.com/woocommerce/woocommerce-blocks/pull/6000)
* Add tests for the Mini Cart Block when it is added on the FSE editor woocommerce/woocommerce-blocks#5727

Add tests for the Mini Cart Block when it is added on the FSE editor

* not hardcoding selectors

* fix typo

* restore old searchForBlock function

* add export

* Revert "restore old searchForBlock function"

This reverts commit 7049ad85bc2752ad33933eec00da9682943ec35a.

* use searchForBlock from package only for FSE pages

* add fix for GB
2022-04-01 11:23:48 +02:00
Luigi Teschio 54b52c62ca Mini Cart block - fix translations handling woocommerce/woocommerce-blocks#6153 (https://github.com/woocommerce/woocommerce-blocks/pull/6158)
* Mini Cart block - fix translations handling woocommerce/woocommerce-blocks#6153

Mini Cart block - fix translations handling

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

* loads translations for deps

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

* address code review. load translations close to associated scripts

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-04-01 10:54:01 +02:00
Tomasz Tunik d62a126476 Ensure e2e tests work with TS (https://github.com/woocommerce/woocommerce-blocks/pull/6173)
* Cleanup e2e jest config from moduleFileExtensions

moduleFileExtensions by default support js, ts, tsx etc.

* convert legacy-template-blocks e2e test to TS

* clean up jest.config.json moduleFileExtensions

unnecessary defaults override
2022-04-01 10:22:54 +02:00
Alba Rincón 92387e2912 Prevent `Featured Product` block from breaking when product is out of stock + hidden from catalog (https://github.com/woocommerce/woocommerce-blocks/pull/6166)
* Prevent accessing the first element of the `parentProduct` array if empty

* Include all products regardless of their `stock_status`

By default, the `/wc/store/v1/products` endpoint does not return products with
`outofstock` stock status. We want the users to be able to select any product
regardless of its stock status, we need to explicitly request them using the
`stock_status` query param.

* Use the optional chaining operator

Co-authored-by: Tomasz Tunik <tomasztunik@gmail.com>
2022-03-31 15:24:10 +02:00
Niels Lange 8943629a86 Shopper → Checkout → Can have different shipping and billing addresses (https://github.com/woocommerce/woocommerce-blocks/pull/5860)
* Shopper can have different shipping and billing addresses

* Shopper can have different shipping and billing addresses

* Shopper can have different shipping and billing addresses

* Correct billing field IDs

* Remove unused variable

* Remove unused timeout

* Remove unused commands

* Activate company field using setCheckbox

* Deactivate company field using unsetCheckbox

* Remove obsolete command

* Empty cart before and after each test

* Remove obsolete import

* Check billing and shipping company

* Remove manual code with unsetCheckbox

* Fill company if field exist

* Get checkbox ID from label

* Remove duplicate company field toFill method

Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
Co-authored-by: Saad Tarhi <saad.tarhi@automattic.com>
2022-03-31 13:10:50 +02:00
Tung Du 77990a5c1b Fix: Shopping Button default hover and focus style (https://github.com/woocommerce/woocommerce-blocks/pull/6157) 2022-03-30 18:38:29 +07:00
Albert Juhé Lluveras eb8bfedcf1 Remove button aligment from Featured Product and Featured Category blocks (https://github.com/woocommerce/woocommerce-blocks/pull/6156) 2022-03-30 10:57:06 +02:00
renovate[bot] 992e84dc58 Update dependency @types/react to v17.0.43 (https://github.com/woocommerce/woocommerce-blocks/pull/6163)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-30 03:36:38 +00:00
dependabot[bot] b560a00acc Bump node-forge from 1.2.1 to 1.3.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6142)
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/digitalbazaar/forge/releases)
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-29 16:06:13 +01:00
dependabot[bot] f2dc23a7b9 Bump plist from 3.0.4 to 3.0.5 (https://github.com/woocommerce/woocommerce-blocks/pull/6143)
Bumps [plist](https://github.com/TooTallNate/node-plist) from 3.0.4 to 3.0.5.
- [Release notes](https://github.com/TooTallNate/node-plist/releases)
- [Changelog](https://github.com/TooTallNate/plist.js/blob/master/History.md)
- [Commits](https://github.com/TooTallNate/node-plist/commits)

---
updated-dependencies:
- dependency-name: plist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-29 16:05:47 +01:00
Alex Florisca 1108c9994b Fix E2E Tests on trunk (https://github.com/woocommerce/woocommerce-blocks/pull/6154)
* Fire up CI

* Increase timeout after selector
2022-03-29 16:05:11 +01:00
dependabot[bot] 3201282e1a Bump minimist from 1.2.5 to 1.2.6 (https://github.com/woocommerce/woocommerce-blocks/pull/6141)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-29 15:58:54 +01:00
Tung Du f4d4bed2c1 Mini Cart Contents: Refactor inner blocks styling using `currentColor` (https://github.com/woocommerce/woocommerce-blocks/pull/6130) 2022-03-29 20:48:59 +07:00
Alba Rincón adca9b0c30 Convert Title component to TS (https://github.com/woocommerce/woocommerce-blocks/pull/6115) 2022-03-29 12:16:17 +02:00
Alex Florisca f344d192d9 E2E tests for translated Cart & Checkout blocks (https://github.com/woocommerce/woocommerce-blocks/pull/6101)
* Translation tests for Cart & Checkout

* Remove comments
2022-03-28 16:20:59 +01:00
tjcafferkey beaefc0bc6 Version bump to 7.4.0-dev 2022-03-28 16:01:04 +01:00
github-actions[bot] b60a7418f1 Release: 7.3.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6129)
* Empty commit for release pull request

* Updated changelog

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

* Release notes

* Update plugin url

* Add 730 to README testing

* Remove PR from testing notes and changelog

* Remove PR from testing notes

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

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

* Fake commit to make CI run

* Revert change to .gitignore to make CI run

* Update testing instructions

* Update testing instructions

* Update download link

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: tjcafferkey <tjcafferkey@gmail.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-03-28 15:58:41 +01:00
Alex Florisca 2459c05d42 Critical flows: Shopper → Cart/Checkout → Can use express checkout (https://github.com/woocommerce/woocommerce-blocks/pull/6075)
* Test if express payment button is available on cart & checkout

* Remove unused uiUnblocked
2022-03-28 14:48:21 +01:00
Alba Rincón e140901142 Convert `CheckoutOrderNotes` to TS (https://github.com/woocommerce/woocommerce-blocks/pull/6118)
* Convert order-notes to TS

* Rename onChange argument name

To be consistent with the one in the `setOrderNotes` action
2022-03-28 15:44:25 +02:00
Tomasz Tunik f7f1b89dc5 Upgrade @wordpress/scripts and /env packages (https://github.com/woocommerce/woocommerce-blocks/pull/6114)
* upgrade wordpress/scripts to 22.3

* update jest config/setup

* add explicit-exports-references plugin

to handle payment-method-config.tsx spying on external methods
the way code is output now changed and tests like this would not
work anymore as transpilet files were no longer using exports but
local references to methods.

* missing snapshot

* make cart-products E2E test more stable

* surppress eslint error in test file

* fix css stylelint issues

* update eslint-plugin-woocommerce eslint package

* remove temp test:e2e:start script

* re-run

* add stylelint as recommended extension

* remove redundant types (provided by packages now)

* patch update @testing-library/jest-dom
2022-03-28 15:00:20 +02:00
Tomasz Tunik e821983447 Improve goToSiteEditor E2E utils (https://github.com/woocommerce/woocommerce-blocks/pull/6109)
* dry getAllTemplates util

* Improve goToSiteEditor e2e util

It will now properly wait for page to load
and critical parts to be available before
handing control over to the next steps

* adapt site editing tests to new goToSiteEditor API

* try to stabilize the saveTemplate

to early navigation was causing the dreaded
"Expected an Error, but "" was thrown"

* try stabilizing saveTemplate

* contextually group/sort params

* improve clarity of the goToSiteEditor E2E util

- adds goToSiteEditor private helper that hides the temporary need
for handling theme.php and site-editor.php paths
- adds two exported utils goToTemplatesList and goToTemplateEdit
that hide UX details of waiting ofr page to be ready on load including special
case for waitingFor templates list actions to be loaded

* put back page where it belongs 
2022-03-28 14:32:15 +02:00
Thomas Roberts 5cc165d7a8 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
2022-03-28 12:10:36 +01:00
Tung Du 3b8d790efe Prepare the Mini Cart block for Feature Plugin (https://github.com/woocommerce/woocommerce-blocks/pull/6127) 2022-03-28 15:42:07 +07:00
Tung Du 7d60c8fc66 Fix: Mini Cart: Ability to choose the drawer behavior when user add products to cart (https://github.com/woocommerce/woocommerce-blocks/pull/6052) 2022-03-26 07:32:23 +07:00
Saad Tarhi ba2308f729 Shopper → Checkout → Can see warnings when form is incomplete (https://github.com/woocommerce/woocommerce-blocks/pull/6116)
* Create "isLoggedIn" shopper function

This function checks if a shopper is logged in

* Add "Can see warnings when form is incomplete" test

* Optimize login check and logout process for the test

Co-authored-by: Saad Tarhi <saad.tarhi@automattic.com>
2022-03-25 18:34:17 +01:00
Daniel Dudzic 070852bf69 Filter Products by Attribute: Fix dropdown search case sensitivity (https://github.com/woocommerce/woocommerce-blocks/pull/6096)
* Filter Products by Attribute: Fix dropdown search case sensitivity handling

* Refactor the dropdown search logic and add an isCaseSensitive option

* Dropdown search: Match against the name rather than value

* Clean up and refactor the search dropdown code
2022-03-25 10:49:17 +01:00
Alba Rincón 88b208ebef Convert Textarea component to TS (https://github.com/woocommerce/woocommerce-blocks/pull/6113) 2022-03-25 10:21:09 +01:00
Tung Du ed83dfbafa Shopper → Mini Cart → Can remove product (https://github.com/woocommerce/woocommerce-blocks/pull/5937) 2022-03-24 22:37:17 +07:00
Tung Du 6e375408f7 Mini Cart: Fix footer buttons hover style (https://github.com/woocommerce/woocommerce-blocks/pull/6086)
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-03-24 22:34:36 +07:00
Tom Cafferkey b3fca9a1b9 Add static keyword to function (https://github.com/woocommerce/woocommerce-blocks/pull/6112) 2022-03-24 09:55:46 +00:00
Tomasz Tunik fdb8dde033 Fix site editor E2E tests for Gutenberg latest (https://github.com/woocommerce/woocommerce-blocks/pull/6080)
* Add handling of editor context via GUTENBERG_EDITOR_CONTEXT env var
* Fix flaky tests around editing templates
* Wait for save template response to complete
2022-03-23 14:18:00 +01:00
Saad Tarhi f8c5e910d2 Shopper → Cart → Can update product quantity (https://github.com/woocommerce/woocommerce-blocks/pull/6025)
* Add XPath expressions

* Add "setCartQuantity" utility function

* Add "productIsInCart" utility function

* Add "update product qty" e2e test

* Clean up test file

* Fix test on headless mode

* Add Increase/Decrease qty test cases

* Decrease the query chain for better maintainability

* Rename expression functions/file for more clarity

* Resolve conflict with trunk

Co-authored-by: Saad Tarhi <saad.tarhi@automattic.com>
2022-03-23 13:51:56 +01:00
Niels Lange 9346e723f3 Shopper can place an order as logged in user (https://github.com/woocommerce/woocommerce-blocks/pull/6037)
* Shopper can place an order as logged in user

* Fill billing address for logged in user

Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
2022-03-23 13:23:22 +01:00
Niels Lange e4088cc398 Update documentation-guidelines.md 2022-03-23 12:22:06 +01:00
Tarun Vijwani 532952dd31 Critical flows: Shopper → Checkout → Can view empty checkout message (https://github.com/woocommerce/woocommerce-blocks/pull/6042)
* Added new test case for Critical flows: Shopper → Checkout → Can view empty checkout message
2022-03-23 15:17:48 +04:00
Niels Lange 512ae84b09 Shopper → Checkout → Can choose payment option (https://github.com/woocommerce/woocommerce-blocks/pull/5839)
* Shopper can choose payment option

* Empty cart before and after each test

Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
2022-03-23 12:01:33 +01:00
Tom Cafferkey 7d0c2847f5 Refactor BlockTemplateUtils (https://github.com/woocommerce/woocommerce-blocks/pull/6019)
* Refactor BlockTemplateUtils.php

* Update comments

* Code review feedback

Co-authored-by: Tom Cafferkey <tom@Toms-MBP-2.broadband>
2022-03-23 09:16:07 +00:00
renovate[bot] 39b873fe76 Update dependency @types/react-dom to v17.0.14 (https://github.com/woocommerce/woocommerce-blocks/pull/6084)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-23 09:49:50 +01:00
renovate[bot] 323eca31bc Update dependency @types/gtag.js to v0.0.10 (https://github.com/woocommerce/woocommerce-blocks/pull/6082)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-23 09:00:13 +01:00
renovate[bot] 630bc9ee99 Pin dependency prettier to 2.0.5 (https://github.com/woocommerce/woocommerce-blocks/pull/6081)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-23 08:51:15 +01:00
renovate[bot] fa6e6cfb33 Update dependency @types/react to v17.0.41 (https://github.com/woocommerce/woocommerce-blocks/pull/6083)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-23 08:50:25 +01:00
Tomasz Tunik e1ae6b4552 Update GitHub actions/setup-node and add optionalDependencies handling (https://github.com/woocommerce/woocommerce-blocks/pull/6032)
* Update actions/setup-node to v2 and to use ,nvmrc file

* Fix order of actions for Bundle Size workflow

* Use actions/setup-node cache instead of actions/cache

+ ensure we always install with npm ci

* restore linting setup job to cache npm

* Don't install ndb in CI

Move ndb package to optionalDependencies and update
the CI workflows to not install optional dependencies

* Update actions/setup-node to v3

* Update actions/checkout to v3

* Update download and upload-artifact actions to v3

* Update actions/stale to v5
2022-03-23 08:41:43 +01:00
Tung Du 937bab7688 Fix: Mini Cart Contents: only show the active view (https://github.com/woocommerce/woocommerce-blocks/pull/6053) 2022-03-23 09:58:03 +07:00
Alba Rincón 1f9e4675fc Add `CurrencyCode` type (https://github.com/woocommerce/woocommerce-blocks/pull/6035)
* Create the CurrencyCode and use it for the currency `code` instead of the type `string`

Using the CurrencyCode type, the allowed values for the `code` property are restricted
to the ISO 4217 codes and not any string.

* Add and remove some currency codes to match the ones on WooCommerce

The WooCommerce supported list can be found here: https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce/includes/wc-core-functions.php#L475

* Use CurrencyCode type on CurrencyInfo and CurrencyResponse instead of string
2022-03-23 00:30:56 +01:00
Alba Rincón e7a061d56f Show the skeleton only when the slider is loading and disabled (on the first load) (https://github.com/woocommerce/woocommerce-blocks/pull/6078)
It should not be shown when the user changes the input range
2022-03-22 23:38:53 +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 89e86b4999 Create deprecated_dependency wrapper to log errors conditionally (https://github.com/woocommerce/woocommerce-blocks/pull/6074)
Store Editing  E2E tests are failing because of an upstream regression, not related to this PR
2022-03-22 15:06:14 +01:00
Tung Du 9c22f241ca Mini Cart: Improve template part description (https://github.com/woocommerce/woocommerce-blocks/pull/6054) 2022-03-22 08:56:02 +07:00
Tung Du 64ae9330a2 Shopper → Mini Cart → Can see correct tax (https://github.com/woocommerce/woocommerce-blocks/pull/5979)
Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com>
2022-03-22 08:54:06 +07:00
renovate[bot] c735812df9 Update dependency @types/lodash to v4.14.180 (https://github.com/woocommerce/woocommerce-blocks/pull/6058)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-16 04:49:56 +00:00
renovate[bot] eaabd1eee9 Update dependency @types/gtag.js to v0.0.9 (https://github.com/woocommerce/woocommerce-blocks/pull/6057)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-16 04:46:20 +00:00
renovate[bot] 6421f80ed2 Update dependency @testing-library/react to v12.1.4 (https://github.com/woocommerce/woocommerce-blocks/pull/6056)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-16 02:35:25 +00:00
renovate[bot] fad55e9295 Pin dependency @woocommerce/e2e-utils to 0.2.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6055)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-16 02:20:32 +00:00
Mike Jolley c299411e28 7.2 testing notes 2022-03-15 11:53:56 +00:00
Mike Jolley f68890170a 7.2.0 changelog 2022-03-15 11:33:20 +00:00
Mike Jolley f926b24480 Checkout: Missing country error for virtual orders (edge case) (https://github.com/woocommerce/woocommerce-blocks/pull/6050)
* Make shipping address field optional on checkout routes

* Make update_customer_from_request use billing for shipping if omitted

* making shipping optional when needed

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2022-03-14 13:53:08 +00:00
Mike Jolley c401369e04 Revert "Remove .gitattributes file (https://github.com/woocommerce/woocommerce-blocks/pull/5242)" (https://github.com/woocommerce/woocommerce-blocks/pull/6049)
This reverts commit 6ae286f670.
2022-03-14 12:42:34 +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
Daniel Dudzic 5a8e94d86e Product Ratings: Add Global Styles font size and spacing support (https://github.com/woocommerce/woocommerce-blocks/pull/5927)
* Product Ratings: Add font size and spacing support

* Fix useTypographyProps hook

* Set SkipSerialization for Ratings block props

* Add additional hasSpacingStyleSupport check for the spacing

Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Tomasz Tunik <tomasztunik@gmail.com>
2022-03-11 16:52:00 +01:00
Mike Jolley 011c4cb6fd Add missing chunk to register_block_type_assets 2022-03-11 15:34:25 +00:00
Albert Juhé Lluveras 0819ab2797 Correctly load JS translations from WC core (II) (https://github.com/woocommerce/woocommerce-blocks/pull/6036)
* Correctly load JS translations from WC core (II)

* typo

* empty instead of count

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2022-03-11 14:18:45 +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
Tomasz Tunik 2ad55b5b9e Fix box-sizing on Global Styles blocks with border width control (https://github.com/woocommerce/woocommerce-blocks/pull/6043)
Set box-sizing to border-box on affected blocks: Featured product, featured category, sale badge.
2022-03-11 13:01:15 +01:00
Luigi Teschio f78b2d8619 Remove not used attributes (https://github.com/woocommerce/woocommerce-blocks/pull/5974)
* Remove not used attributes woocommerce/woocommerce-blocks#5952

remove not used attributes

* remove not necessary jsdoc comments

Co-authored-by: Tomasz Tunik <tomasztunik@gmail.com>
2022-03-11 12:44:51 +01:00
Tung Du 75bf08d2c9 Fix: Exclude Button block from the Empty Mini Cart Contents block insterter (https://github.com/woocommerce/woocommerce-blocks/pull/6034) 2022-03-11 08:17:37 +07:00
renovate[bot] dcec8f38b5 Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/5724)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-10 18:16:25 +01:00
Seghir Nadir d694b9b089 Ignore storybook dist folder when running eslint (https://github.com/woocommerce/woocommerce-blocks/pull/6033)
* ignore storybook dist folder

* Add reports folder to .eslintignore

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2022-03-10 17:25:29 +01:00
Luigi Teschio 807720a28d Remove not necessary todo woocommerce/woocommerce-blocks#5827 (https://github.com/woocommerce/woocommerce-blocks/pull/6039)
Remove not necessary todo
2022-03-10 14:53:42 +01:00
Mike Jolley 7f512d1c26 Merge branch 'trunk' of https://github.com/woocommerce/woocommerce-gutenberg-products-block into trunk 2022-03-10 13:38:55 +00:00
Mike Jolley bfdd50cb63 7.3.0-dev in package.json 2022-03-10 13:38:52 +00:00
Mike Jolley 5165611e45 Remove deprecated data controls in favour of those from the `@wordpress/data` package (https://github.com/woocommerce/woocommerce-blocks/pull/5574)
* Remove expected warnings from test suite

* Switch dispatch and select usage to `controls`, from `@wordpress/data`

* Wrap render with act

* resolveSelect to wait for resolution

* resolveSelect
2022-03-10 13:22:05 +00:00