Commit Graph

2335 Commits

Author SHA1 Message Date
Rua Haszard 87d9b01dfb Add storybook demo for CheckboxControl (https://github.com/woocommerce/woocommerce-blocks/pull/3030)
* story for CheckboxControl aka Checkbox

* Rename exported story to Default and use correct component name

This keeps our stories more consistent
2020-12-10 10:38:26 +00:00
renovate[bot] 09009e4f8e Update dependency core-js to v3.8.1 (https://github.com/woocommerce/woocommerce-blocks/pull/3529)
* Update dependency core-js to v3.8.1

* manual refresh lock file

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Rua Haszard <rua.haszard@automattic.com>
2020-12-10 16:10:57 +13:00
Rua Haszard f8208f8c63 Revert "experiment: remove core-js dependency, suspect unused 🧐"
This reverts commit f1794c334f.
2020-12-10 15:21:19 +13:00
Rua Haszard f1794c334f experiment: remove core-js dependency, suspect unused 🧐 2020-12-10 15:19:34 +13:00
renovate[bot] 3109ce7483 Update dependency @types/jest to v26.0.18 (https://github.com/woocommerce/woocommerce-blocks/pull/3527)
* Update dependency @types/jest to v26.0.18

* manual refresh lock file

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Rua Haszard <rua.haszard@automattic.com>
2020-12-10 15:08:11 +13:00
renovate[bot] baa0fce79c Update dependency eslint to v7.15.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3530)
* Update dependency eslint to v7.15.0

* manual refresh lock file

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Rua Haszard <rua.haszard@automattic.com>
2020-12-10 14:18:19 +13:00
Albert Juhé Lluveras 01c1ce8ffb Update WP versions used in Travis e2e tests (https://github.com/woocommerce/woocommerce-blocks/pull/3535)
* Update WP versions used in Travis e2e tests

* Remove WP 5.3 tests

* Remove legacy WP version checks in e2e tests
2020-12-09 17:09:45 +01:00
Albert Juhé Lluveras 8d9d98d8e9 Add missing experimental functions to the feature flags page (https://github.com/woocommerce/woocommerce-blocks/pull/3522)
* Remove no longer used __experimentalPersistItemToCollection function

* Add __experimentalDeRegisterPaymentMethod and __experimentalDeRegisterExpressPaymentMethod to feature flags doc
2020-12-09 15:10:57 +01:00
Mike Jolley 7bbe4926f5 Update Release Template and Docs (https://github.com/woocommerce/woocommerce-blocks/pull/3524)
* Remove release docs from plugin

* Clarify text in release checklists
2020-12-09 11:32:16 +00:00
Albert Juhé Lluveras bc40247d70 Rename Cart & Checkout totals components (https://github.com/woocommerce/woocommerce-blocks/pull/3520)
* Rename TotalsCouponCodeInput to TotalsCoupon

* Rename SubtotalsItem to Subtotal

* Rename TotalsDiscountItem to TotalsDiscount

* Rename TotalsFeesItem to TotalsFess

* Rename TotalsFooterItem folder

* Rename TotalsItem folder

* Rename TotalsShippingItem to TotalsShipping

* Rename TotalsTaxesItem to TotalsTaxes
2020-12-09 08:29:34 +01:00
Mike Jolley 58a65ec6e5 4.1.0-dev 2020-12-08 14:18:42 +00:00
github-actions[bot] dc5ad5701d Release: 4.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3509)
* generating changeset for pull request

* generating changeset for pull request

* Update readme changelog

* Update requirements

* Testing instructions

* Update zip file

* Update nonce outside of json parse

* Set logged in cookie on store api requests

* Update zip

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2020-12-08 13:40:40 +00:00
renovate[bot] be0b17c8d6 Update dependency @woocommerce/components to v5 (https://github.com/woocommerce/woocommerce-blocks/pull/3156)
* Update dependency @woocommerce/components to v5

* Fix lock file.

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: budzanowski <bartosz.budzanowski@gmail.com>
2020-12-07 16:49:41 +01:00
Albert Juhé Lluveras 85e3e8df2f Add missing experimental hook to docs (https://github.com/woocommerce/woocommerce-blocks/pull/3508) 2020-12-07 11:46:22 +00:00
renovate[bot] cb7cf6ab73 Update dependency autoprefixer to v10 (https://github.com/woocommerce/woocommerce-blocks/pull/3216)
* Update dependency autoprefixer to v10

* pin postcss & postcss-loader versions (Renovate will manage updates)

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Rua Haszard <rua.haszard@automattic.com>
2020-12-07 14:09:23 +13:00
Seghir Nadir 231d49406a Introduce pluginArea in Cart and Checkout (https://github.com/woocommerce/woocommerce-blocks/pull/3498)
* add plugin area

* add invisible errorBoundary

* move PluginArea to CheckoutProvider
2020-12-04 10:52:52 +01:00
Bartosz Budzanowski 2293e41f1d Fix:3501 Omit keys in `customerPaymentMethods` that have an empty list as a value. (https://github.com/woocommerce/woocommerce-blocks/pull/3502)
* Don't add empty methods key.
2020-12-03 19:33:33 +01:00
Mike Jolley 6825dc909f Add Formatter Classes to the Store API for Extensions to Consume (https://github.com/woocommerce/woocommerce-blocks/pull/3503)
* Create and register formatter classes

* Update Schema to use formatter classes

* Update tests

* Currency formatter

* Fix tests

* Use wc_get_price_decimals() as default

* Exception on non existing formatter call

* Feedback

* remove setter
2020-12-03 19:17:03 +01:00
Ettore Del Negro daa6454138 CartItems must extend AbastractCartRoute otherwise the cart is not loaded from the session (https://github.com/woocommerce/woocommerce-blocks/pull/3488) 2020-12-03 16:51:23 +01:00
Albert Juhé Lluveras 2e5bcca7c6 Update @wordpress/components to v. 11.1.1 and @wordpress/base-styles to v. 3.2.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3457)
* Update @wordpress/components and @wordpress/base-styles

* Fix JS warning in Select/downshift

* Remove color definitions that are now imported from @wordpress/base-styles. Fixes woocommerce/woocommerce-blocks#3311

* Use -unit values from @wordpress/base-styles. Fixes woocommerce/woocommerce-blocks#3313

* Update snapshots

* Fix payment methods test

* Don't extract dependencies that are not available in WP 5.3

* Avoid extracting @wordpress/compose since last version doesn't have resize observer

* Remove unnecessary uses of @wordpress/compose in a frontend scripts

* Add missing spaces
2020-12-03 14:04:25 +01:00
Mike Jolley ea52a2a2d5 Drop stock reservation when removing item from cart via the Store API (https://github.com/woocommerce/woocommerce-blocks/pull/3468)
* Remove Blocks version of ReserveStock Class

* When a cart item is removed, remove holds on stock

* Move maybe_release_stock to abstract

* Update ReserveStockException usage
2020-12-02 16:03:24 +00:00
renovate[bot] 7e656711b4 Update dependency html-react-parser to v0.14.2 (https://github.com/woocommerce/woocommerce-blocks/pull/3494)
* Update dependency html-react-parser to v0.14.2

* Update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-12-02 16:08:02 +01:00
renovate[bot] 4ae3cd5555 Update dependency core-js to v3.8.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3493)
* Update dependency core-js to v3.8.0

* Update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-12-02 15:57:34 +01:00
renovate[bot] 01df3ea8ca Update dependency config to v3.3.3 (https://github.com/woocommerce/woocommerce-blocks/pull/3492)
* Update dependency config to v3.3.3

* Update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-12-02 15:45:31 +01:00
Rua Haszard ce6dd93e7b Handle change to logged-in status in checkout API AJAX requests (https://github.com/woocommerce/woocommerce-blocks/pull/3429)
* refactor and reorder checkout processing

* improve handling of checkout POST with mixed success:
- return coupon errors in a property
- don't throw from coupon validation:
  - return info about errors to route handler
  - tweak logic in route handler to prevent subsequent processing
  - default payment result to fail to avoid accidental successful checkout
- in client, catch errors and new customer id:
  - render any errors as notices - i.e. coupon error
  - if a customer ID is included, push into store (so UI updates)

* fix linter whitespace issue from rebase merge

* fix MIA order validation/errors (due to rebase):
- reinstate thrown exception when validating order
- return exception was an experiment, now solved in woocommerce/woocommerce-blocks#3454

* hide "Create account" checkbox if account is created during an error response:
- update store with new user id
- remove stale response.errors handling;
  - current approach (https://github.com/woocommerce/woocommerce-blocks/pull/3454) is to add data to error response

* show a notice informing user that they have signed up

* white space

* Handle header and update typedef

* Remove "errors" schema

* remove errors

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2020-12-02 14:27:28 +00:00
renovate[bot] b4919b0356 Update dependency @types/jest to v26.0.16 (https://github.com/woocommerce/woocommerce-blocks/pull/3491)
* Update dependency @types/jest to v26.0.16

* Update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-12-02 14:28:52 +01:00
renovate[bot] 1ddff6ea05 Update dependency @octokit/graphql to v4.5.8 (https://github.com/woocommerce/woocommerce-blocks/pull/3490)
* Update dependency @octokit/graphql to v4.5.8

* Update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-12-02 14:28:44 +01:00
renovate[bot] 5bd216baa0 Pin dependency github-label-sync to 2.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3489)
* Pin dependency github-label-sync to 2.0.0

* Update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-12-02 14:28:24 +01:00
Rua Haszard 0cb3b3d9a8 refactor and reorder checkout processing (https://github.com/woocommerce/woocommerce-blocks/pull/3454)
* refactor and reorder checkout processing

* move experimental order_processed hook as last step before payment:
+ flesh out docs - intention/purpose, introduced version, link to PR,
relationship to legacy hook

* return current user_id with checkout error responses, so UI can update

* clarify user id comment

* Add store API nonce to all responses

* catch new nonce & update store for POST /checkout errors

* ensure $order hook param and database are in sync

* fetchResponse->errorResponse

* Move payment method ID validation to schema

* Add the nonce inline

* Simplify error method

* Add todo for injection

* Hook docs

* Return user ID as a header instead of in error response

* Default to private methods

* Tidied processing logic/order save placement

* White space removal

* Remove duplicate comment

* Remove root slash

* Remove unused created variable

* Remove woocommerce_registration_error_email_exists filter in error message from API

* Move payment validation

* Moved comments

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2020-12-02 12:22:42 +00:00
Albert Juhé Lluveras 5683ed1e54 Fix c notice close button color in Twenty Twenty One dark mode (https://github.com/woocommerce/woocommerce-blocks/pull/3472) 2020-12-02 13:09:57 +01:00
Albert Juhé Lluveras 281cc99291 Create IE11 SCSS mixin (https://github.com/woocommerce/woocommerce-blocks/pull/3473) 2020-12-01 09:04:52 +01:00
renovate[bot] ca26289ece Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/3484)
* Lock file maintenance

* Lock file maintenance

* Lock file maintenance

* Lock file maintenance

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2020-11-30 15:21:22 +00:00
Seghir Nadir 8c2c0f73ad Change register_endpoint_data to use an array of params instead of individual params. (https://github.com/woocommerce/woocommerce-blocks/pull/3478)
* use an array args

* allow schema to be empty if nothing was registred
2020-11-30 15:38:10 +01:00
Darren Ethier f4e4bdd1e7 update label sync json 2020-11-27 15:52:06 -05:00
Darren Ethier 8e7a168c9a add label-sync script and config 2020-11-27 15:41:36 -05:00
Albert Juhé Lluveras 4a03e88b45 Typo 2020-11-27 11:55:26 +01:00
renovate[bot] 389f82c53a Update babel monorepo (https://github.com/woocommerce/woocommerce-blocks/pull/3460)
* Update babel monorepo

* update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2020-11-26 12:16:53 +00:00
renovate[bot] cd39759844 Update Node.js to v12.20.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3459)
* Update Node.js to v12.20.0

* update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2020-11-26 11:51:42 +00:00
Darren Ethier dcef9838ef bump version to dev after release 2020-11-25 15:36:58 -05:00
github-actions[bot] 671976907e Release: 3.9.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3453)
* generating changeset for pull request

* generating changeset for pull request

* add changelog for version 3.9

* clear vendor folder before doing deploy script

* start testing docs

* more build script improvements

* Finish testing notes

* update testing docs

* Prevent exclude drafts filter being tree shaken (https://github.com/woocommerce/woocommerce-blocks/pull/3463)

* Reverse logic for hiding product name in checkout sidebar (https://github.com/woocommerce/woocommerce-blocks/pull/3464)

The hasLink prop was removed from ProductName and disabled is used instead, this change makes the variable name more descriptive, and uses disabled to signal if the ProductName should link or not.

* update zip file

* tweak changelog

* add link to release post in changelog

* fix release date in readme.txt

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: opr <5656702+opr@users.noreply.github.com>
2020-11-25 15:33:23 -05:00
renovate[bot] cdfe3e851e Update dependency @types/react to v16.14.2 (https://github.com/woocommerce/woocommerce-blocks/pull/3461)
* Update dependency @types/react to v16.14.2

* update package-lock.json

* update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2020-11-25 16:17:06 +00:00
renovate[bot] 364df26e2d Update dependency @testing-library/react to v11.2.2 (https://github.com/woocommerce/woocommerce-blocks/pull/3419)
* Update dependency @testing-library/react to v11.2.2

* update package-lock.json

* update package-lock.json

* restore package-lock.json

* update package-lock.json

* update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2020-11-25 15:58:09 +00:00
renovate[bot] d7d5b89af0 Update dependency chalk to v4 (https://github.com/woocommerce/woocommerce-blocks/pull/3217)
* Update dependency chalk to v4

* update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2020-11-25 15:02:58 +00:00
Albert Juhé Lluveras 0b2112c3d5 Prevent exclude drafts filter being tree shaken (https://github.com/woocommerce/woocommerce-blocks/pull/3463) 2020-11-25 13:46:13 +01:00
opr 704fab02d6 Reverse logic for hiding product name in checkout sidebar (https://github.com/woocommerce/woocommerce-blocks/pull/3464)
The hasLink prop was removed from ProductName and disabled is used instead, this change makes the variable name more descriptive, and uses disabled to signal if the ProductName should link or not.
2020-11-25 12:39:02 +00:00
Seghir Nadir bc54dce0c8 make cart endpoint extensible (https://github.com/woocommerce/woocommerce-blocks/pull/3445) 2020-11-25 13:18:44 +01:00
opr 404e669f72 Change left margin of notice's dismiss icon to auto (https://github.com/woocommerce/woocommerce-blocks/pull/3455)
This is needed to ensure the dismiss icon in notices will always be as far over to the right of the parent container as possible.
2020-11-25 11:50:59 +00:00
renovate[bot] 6df3a7e2e0 Update dependency eslint to v7.14.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3462)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-11-25 11:38:26 +00:00
renovate[bot] 4e2b78135b Update dependency mini-css-extract-plugin to v1.3.1 (https://github.com/woocommerce/woocommerce-blocks/pull/3420)
* Update dependency mini-css-extract-plugin to v1.3.1

* update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2020-11-25 11:30:09 +00:00
Darren Ethier 0b09a5a906 fix deploy script not doing tags for patch releases not deployed to wp.org (https://github.com/woocommerce/woocommerce-blocks/pull/3451) 2020-11-23 16:51:10 -05:00