Commit Graph

2011 Commits

Author SHA1 Message Date
Darren Ethier ea4cd86c69 Release 3.7.1 2020-11-05 08:16:05 -05:00
Darren Ethier f3fdbd7b59 Fix account creation bugs (https://github.com/woocommerce/woocommerce-blocks/pull/3371)
* account for registration enabled setting when creating accounts

* default to false instead of global setting for initial allowCreateAccount attribute

* consider global allows signup value for whether account creation checkbox shows

* include existing hook when determining if checkout signup is available:
- woocommerce_checkout_registration_enabled hook

* use public api for registration settings (via WC_Checkout)

* initial round of test fixes

* fix logic flaw exposed by tests and align tests with actual values in real use

* return early if WC_Checkout is not available

* remove temporary test group and uncomment new test.

* improve test method name

* fix comment to match new routine name

* ensure block shows login prompt when store disables checkout signup

* fix incorrect conditional order and cover with tests

Co-authored-by: Rua Haszard <rua.haszard@automattic.com>
2020-11-05 15:22:43 +13:00
renovate[bot] f11cd7a50f Update dependency @stripe/stripe-js to v1.11.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3365)
* Update dependency @stripe/stripe-js to v1.11.0

* Update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-11-04 17:36:45 +01:00
renovate[bot] f50f510f63 Update storybook monorepo to v6.0.28 (https://github.com/woocommerce/woocommerce-blocks/pull/3369)
* Update storybook monorepo to v6.0.28

* Update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-11-04 15:10:06 +01:00
renovate[bot] ebe7023a75 Update dependency html-react-parser to v0.14.1 (https://github.com/woocommerce/woocommerce-blocks/pull/3368)
* Update dependency html-react-parser to v0.14.1

* Update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-11-04 15:09:55 +01:00
renovate[bot] bd98a5b30e Update dependency @types/react to v16.9.55 (https://github.com/woocommerce/woocommerce-blocks/pull/3367)
* Update dependency @types/react to v16.9.55

* Update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-11-04 15:09:48 +01:00
renovate[bot] c8ac09bceb Update dependency @testing-library/react to v11.1.1 (https://github.com/woocommerce/woocommerce-blocks/pull/3366)
* Update dependency @testing-library/react to v11.1.1

* Update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-11-04 12:47:35 +01:00
renovate[bot] 6d87a3f1f6 Update dependency @octokit/graphql to v4.5.7 (https://github.com/woocommerce/woocommerce-blocks/pull/3364)
* Update dependency @octokit/graphql to v4.5.7

* Update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-11-04 11:24:59 +01:00
Darren Ethier 6f08922ea0 Improve smoke testing docs (https://github.com/woocommerce/woocommerce-blocks/pull/3351)
* Improve smoke testing docs and change location in docs

* add smoke testing to release pull request checklists
2020-11-03 11:40:26 -05:00
Seghir Nadir 4d82f1c14c Add __experimental_woocommerce_blocks_checkout_order_processed action (https://github.com/woocommerce/woocommerce-blocks/pull/3238)
* Add woocommerce_blocks_checkout_order_processed action

* pass order object as well

* remove empty post data

* add prefix and docs

* pass order object
2020-11-03 15:41:42 +01:00
Darren Ethier 49894c1f42 Fix approved-with-labels workflow
So apparently the action expects different encoding for the different label options (!)
2020-11-02 15:41:22 -05:00
Darren Ethier 16a0b02cba Create approved-with-labels.yml
Adds `status: ready to merge` and removes `status: needs review` labels from approved pull requests.
2020-11-02 13:46:50 -05:00
Darren Ethier 64210fab1b Add new doc referencing feature flags and experimental interfaces. (https://github.com/woocommerce/woocommerce-blocks/pull/3348)
* add doc for feature flag and experimental interfaces

* add new doc to TOC

* update pull request template to include checklist item for experimental/feature flag items

* tweak wording for experimental prefix

* fix bad formatting of bold for lines

* fix double slash in url

* add missing sentence case

* remove account signup as that is not included in Cart and Checkout block logic.

* Fix typo
2020-10-30 10:35:50 -04:00
Albert Juhé Lluveras 9069a8d509 Update composer.lock to v. 2 (https://github.com/woocommerce/woocommerce-blocks/pull/3335) 2020-10-30 09:37:33 +01:00
Rua Haszard 330d91f4b6 3.8.0-dev version bump 2020-10-30 09:42:48 +13:00
github-actions[bot] f4eeb5d0c6 Release: 3.7.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3339)
* generating changeset for pull request

* generating changeset for pull request

* tweak wording - testing instructions are focused on new features

* testing instructions (tbc) for 3.7.0

* link in 3.7.0

* add instructions for checkout signup

* 3.7.0 changelog

* Add missing doc links to TOC for release testing notes.

* fix typo in "replace"

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

* add testing instructions for various issues fixed in 3.7

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Rua Haszard <rua.haszard@automattic.com>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-10-30 09:38:18 +13:00
Rua Haszard 01132107a4 Allow shoppers to sign-up for an account from the Checkout block (https://github.com/woocommerce/woocommerce-blocks/pull/3331)
* expose checkout signup feature to release build (feature plugin):
- remove isExperimental from block/editor js (the block is already gated
  to plugin only)
- gate entire service class to feature plugin && Woo >= 4.7
  - this ensures our custom email and set password flow are only active
    for supported woo version, if blocks plugin is active
  - also refactored the gating logic so the woo version check is used to
    gate all code

* eslint action told me to delete comment `.` ... ?

* remove experimental feature flag for checkout signup front-end:
- "Create Account?" checkbox in address/contact component
- logged-out prompt logic - handle case when signup is enabled and guest
checkout is not enabled, i.e. checkout requires automatic signup

* fix formatting issues

* add allowCreateAccount to proptypes for CheckoutForm and AddressStep
2020-10-29 10:42:49 +13:00
renovate[bot] 814b84f973 Update dependency wordpress-compose to v3.22.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3330)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-10-28 13:32:13 -04:00
renovate[bot] a6047110f4 Update storybook monorepo to v6.0.27 (https://github.com/woocommerce/woocommerce-blocks/pull/3332)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-10-28 13:15:36 -04:00
renovate[bot] e49e306940 Update dependency commander to v6.2.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3329)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-10-28 12:49:26 -04:00
renovate[bot] a5e6dd4d3d Update dependency eslint to v7 (https://github.com/woocommerce/woocommerce-blocks/pull/3333)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-10-28 12:07:34 -04:00
renovate[bot] ee092f2d3d Update dependency @testing-library/jest-dom to v5.11.5 (https://github.com/woocommerce/woocommerce-blocks/pull/3327)
* Update dependency @testing-library/jest-dom to v5.11.5

* Update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-10-28 16:29:42 +01:00
renovate[bot] 10304dbc5e Update dependency axios to v0.21.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3328)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-10-28 11:29:21 -04:00
renovate[bot] 9a58cd8c7f Update dependency @types/react to v16.9.54 (https://github.com/woocommerce/woocommerce-blocks/pull/3306)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-10-28 11:04:56 -04:00
Seghir Nadir 2482e307e0 Save order after creating an account (https://github.com/woocommerce/woocommerce-blocks/pull/3260)
* Save order after creating an account

* create account before saving

* fix tests

* remove order from createOrder

* rename variable

* fix tests
2020-10-28 15:18:22 +01:00
Albert Juhé Lluveras 55007b4601 Enable react-hooks/exhaustive-deps ESLint flag (https://github.com/woocommerce/woocommerce-blocks/pull/3325) 2020-10-28 10:14:46 +01:00
Albert Juhé Lluveras 109a7c3f54 Fix React hook dependency warnings in filter an All Products blocks (https://github.com/woocommerce/woocommerce-blocks/pull/3285)
* Fix wrong JSDocs

* Fix React hook dependency warnings in usePrevious hook

* Fix React hook dependency warnings in Filter an All Products blocks
2020-10-27 16:39:08 +01:00
Albert Juhé Lluveras 55e1a15149 Fix React hook dependency warnings in Cart & Checkout blocks + withAttributes HOC (https://github.com/woocommerce/woocommerce-blocks/pull/3314)
* Fix React hook dependency warnings in Cart & Checkout blocks

* Fix React hook dependency warnings in withAttributes HOC

* Fix select validation

* Fix test

* Remove unnecessary optional chaining

* Undo merge of two useEffects
2020-10-27 15:37:18 +01:00
Bartosz Budzanowski f66aa18e43 Change items organisation on smaller viewports. (https://github.com/woocommerce/woocommerce-blocks/pull/3299)
* Change items organisation on smaller viewports.

* Justify and gap.

* Align cost to quantity.
2020-10-27 15:23:27 +01:00
Bartosz Budzanowski 58734be009 Fix Gutenberg e2e tests failures. (https://github.com/woocommerce/woocommerce-blocks/pull/3324)
* Add e2e utils file.

* Update tests to use new utils.

* Remove allow failures.
2020-10-27 13:24:53 +01:00
renovate[bot] 7323392746 Update dependency @types/jest to v26.0.15 (https://github.com/woocommerce/woocommerce-blocks/pull/3305)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-10-26 14:26:35 -04:00
renovate[bot] 643a7ceace Update dependency @testing-library/react to v11.1.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3304)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-10-26 13:53:13 -04:00
Darren Ethier d288daa6f5 Fix PHP 8 error when argument is not invocable in AssetsDataRegistry::add_data (https://github.com/woocommerce/woocommerce-blocks/pull/3315)
* fix php 8 error when $data is not invocable

`is_callable` is the preferred way for checking whether a variable value is invocable or not.

* use is_callable in AbstractDependencyType
2020-10-26 13:28:25 -04:00
Darren Ethier 552981899c convert `composer/installers` to range instead of pinned dependency (https://github.com/woocommerce/woocommerce-blocks/pull/3323) 2020-10-26 09:17:28 -04:00
Bartosz Budzanowski abed796bd6 Respect Enable Taxes setting for checkout block taxe display. (https://github.com/woocommerce/woocommerce-blocks/pull/3291)
* Respect Enable Taxes setting for checkout block taxes display.

* Refactor logic into a named const.
2020-10-26 11:34:30 +01:00
renovate[bot] e1bfb747f9 Update dependency react-test-renderer to v16.14.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3307)
* Update dependency react-test-renderer to v16.14.0

* Update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-10-23 11:38:22 +02:00
renovate[bot] e6fc57748d Update dependency @stripe/stripe-js to v1.10.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3303)
* Update dependency @stripe/stripe-js to v1.10.0

* Update package-lock.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-10-23 11:30:04 +02:00
Remi Corson 181797906a E2E WC Core Terms Consistency (https://github.com/woocommerce/woocommerce-blocks/pull/3310)
* E2E WC Core Terms Consistency

fixes 3309

* fix test text

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2020-10-22 09:49:55 -04:00
Albert Juhé Lluveras 10ceda5851 Use @wordpress/base-styles and @automattic/color-studio as a base for our styles (https://github.com/woocommerce/woocommerce-blocks/pull/3300)
* Use colors variables instead of hardcoded values when possible

* Update WC colors from @automattic/color-studio

* Decrease specificity of price-slider CSS selectors

* Update colors to WC purple

* Update bright colors

* Update grays

* Update blacks and whites

* Add @todo comment

* Remove unnecessary blank line

* Remove purple color from price slider handle

* Fix colors not shown in SVG background

* Remove unnecessary box-shadow declaration

* Add theming docs

* Refactor/remove SCSS variables

* Add @todo comment to breakpoints

* Update package-lock.json
2020-10-22 12:40:32 +02:00
Seghir Nadir 9b5e436cc7 add draft order to woocommerce_valid_order_statuses_for_payment_complete (https://github.com/woocommerce/woocommerce-blocks/pull/3298) 2020-10-22 11:29:10 +01:00
renovate[bot] 8dfcad481f Update babel monorepo (https://github.com/woocommerce/woocommerce-blocks/pull/3302)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-10-21 09:30:00 -04:00
Albert Juhé Lluveras 4f60b6367e Fix 3D secure payment errors (https://github.com/woocommerce/woocommerce-blocks/pull/3272)
* Add errors to UI in onCheckoutAfterProcessingWithError

* Fix missing useEffect dependency

* Typo

* Reset source id if Stripe intent fails

* Remove default error on onCheckoutAfterProcessingWithError

* Add missing useEffect dependency

* Only add default error message if there is no errors in any other context

* Fix useEffect running too many times

* Add type-defs and minor improvements

* Only count error notices
2020-10-20 11:50:33 +02:00
Darren Ethier b28c2f56e8 Update js-css-linting.yml (https://github.com/woocommerce/woocommerce-blocks/pull/3297) 2020-10-19 10:08:23 -04:00
Seghir Nadir b488c4a1c7 Document how to update E2E WP versions. (https://github.com/woocommerce/woocommerce-blocks/pull/3284)
* add guide to update WP version

* typo
2020-10-19 14:37:21 +01:00
Darren Ethier 884442bc27 Add a php coding standards action (https://github.com/woocommerce/woocommerce-blocks/pull/3292)
* add a php coding standards action

* add temporary php coding standards error to test action

* fix php standards error

* remove php linting check from travis run

* update woocommerce sniffs package

* try php 8 for linting

* revert back to php 7.4
2020-10-19 06:52:24 -04:00
Darren Ethier 6add52ccb7 Add workflow for linting js and css (https://github.com/woocommerce/woocommerce-blocks/pull/3294)
* Add workflow for linting js and css

* try alternative action to see if we get annotations

* add deliberate linting errors to validate new workflow behaviour

* try to fix annotations?

* maybe invalid check-name?

* try a different eslint action

* fix eslint fails

* remove js/css linting from travis

* remove unnecessary build execution
2020-10-18 12:49:59 -04:00
Bartosz Budzanowski 4e322d99cc Escape basename paths with spaces correctly. (https://github.com/woocommerce/woocommerce-blocks/pull/3290) 2020-10-16 15:36:34 +02:00
Albert Juhé Lluveras e4225dd54d Some changes/additions to the release checklist (https://github.com/woocommerce/woocommerce-blocks/pull/3269)
* Create ZIP before writing testing steps

* Add a note to restore the release branch

* Add a link to the milestones page

* Revert "Add a note to restore the release branch"

This reverts commit 362bf8779be2023c8015bb71a1328eca9bab4997.
2020-10-15 12:24:35 +02:00
renovate[bot] 02d6cea895 Update dependency downshift to v6 (https://github.com/woocommerce/woocommerce-blocks/pull/3281)
* Update dependency downshift to v6

* regenerate package-lock for downshift v6

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Rua Haszard <rua.haszard@automattic.com>
2020-10-15 14:49:00 +13:00
Rua Haszard c7b4e3aa76 Use store-themed set password form for checkout signup (https://github.com/woocommerce/woocommerce-blocks/pull/3236)
* use my-account/lost-password endpoint url for set password (tbd):
- companion for working on https://github.com/woocommerce/woocommerce/issues/27754

* use more appropriate (new) set-password endpoint

* add version check - use new woo core endpoint if woo version is new enough

* use my-account/lost-password for setting password in checkout signup:
- this has been available forever - no need for a version check
- page will show `Lost password`; looking at options for overriding that

* use more explicit `newaccount` action for set password url if available

* tweak feature gating for checkout signup:
- only available in dev builds (will change soon)
- only available if Woo core 4.7 or newer
- checkout signup relies on fixes in 4.7+ (tbc) to
  my-account/lost-password endpoint for setting initial password
- standardise feature gate logic so is consistent, ensure feature is
  disabled in API/backend, hide editor option, and disable front end
- add new setting `wcVersion` to allow feature gating on woo version

* fix woo-version feature gate of checkout signup:
- fixed version logic, explicit 4.7.0 reference version
- refactor version compare routine so can be used for woo or WP version

* revamp Woo 4.7+ logic so PHPunit tests aren't dependent on Woo version:
- Woo-version feature gating is implemented at integration layer:
  - checkout REST API
  - register/override new account email handler
2020-10-15 14:13:49 +13:00