Commit Graph

3508 Commits

Author SHA1 Message Date
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