Commit Graph

1909 Commits

Author SHA1 Message Date
Darren Ethier 69ba8161b6 Add @woocommerce/eslint-plugin dependency (https://github.com/woocommerce/woocommerce-blocks/pull/3115)
* convert eslint config to use @woocommerce/eslint-plugin

- removes unnecessary dependencies
- adds e2e-tests/specs to eslint ignore (they are automatically generated)
- turns off rules that will be handled in subsequent pulls (to avoid a mammoth changeset for review).
- NOTE: prettier config needs left in because of a bug with the existing version of `@wordpress/eslint-plugin` pulled in (fixed in https://github.com/WordPress/gutenberg/pull/25068) so I left the file for now.

* prettier fixes.

* remove obsolete plugin and fixes for eslint update

This branch brings an update to eslint which also changes some syntax with plugins. So this commit:

- fixes featuer-flag plugin syntax.
- removed obsolete dependency-group plugin (which is now in the `@woocommerce/eslint-plugin` configuration.

* add to-do comment

* fixes for test runs

- this also converts our e2e test scripts to use `wp-script test:e2e`, an advantage of this is it will load CHROMIUM on demand for the e2e test run.

* fixes for test runs

- this also converts our e2e test scripts to use `wp-script test:e2e`, an advantage of this is it will load CHROMIUM on demand for the e2e test run.

* include prettier alias as a dependency

This has to be done because prettier is installed with storybook and thus the alias setup in `@wordpress/scripts` is over-ridden by the storybook import.

* another attempt at e2e-test-fix

* add some debugging and temporarily just add one e2e config test for travis

* more debugging

* try installing full puppeteer and see if fixes

* fix package-lock?

* setupSettings separately from other fixture loading

* add debugging of files

* add another console.log (hopefully trigger travis)

* split out blockPage creation to it’s own as well

* fixed! remove debugging and re-enable travis configs for entire test suite

* fix config and rename e2e-tests to e2e

- fixes the failing product-search test
- tests/e2e-tests was redundant, I changed to `tests/e2e` (this follows a file pattern change made in woocommerce core as well).

* add todo for some eslint properties

* remove unnecessary early function execution

* revert earlier commit and remove duplicate call to createBlockPages
2020-09-07 13:31:10 -04:00
Albert Juhé Lluveras a9bcdb7d08 Create DebouncedValidatedTextInput component (https://github.com/woocommerce/woocommerce-blocks/pull/3108)
* Fix wrong Form component name

* Split CheckoutForm into smaller components for each step

* Centralize call to useCheckoutAddress

* Create DebouncedValidatedTextInput component

* Rename some variables
2020-09-07 19:03:04 +02:00
Albert Juhé Lluveras 1e75a866d8 Split Checkout form component into smaller files (II) (https://github.com/woocommerce/woocommerce-blocks/pull/3106)
* Fix wrong Form component name

* Split CheckoutForm into smaller components for each step

* Centralize call to useCheckoutAddress
2020-09-07 17:43:05 +02:00
Albert Juhé Lluveras fa593359bf Fix Cart&Checkout layout broken in some themes (https://github.com/woocommerce/woocommerce-blocks/pull/3111) 2020-09-07 17:39:53 +02:00
Rua Haszard 2edbd03080 Fix product reviews schema date fields to use new (WP 5.5) `date-time` format (https://github.com/woocommerce/woocommerce-blocks/pull/3109)
* update dates in ProductReviewSchema to 5.5 date-time format:
- https://developer.wordpress.org/rest-api/extending-the-rest-api/schema/#format

* fix formatted date schema - is human readable, not 'date-time'
2020-09-04 08:23:10 +12:00
Albert Juhé Lluveras dfd57b0ee8 useMemo for complex computations in Country/State inputs (https://github.com/woocommerce/woocommerce-blocks/pull/3107) 2020-09-03 10:02:26 +02:00
renovate[bot] 04cbd80b60 Update dependency source-map-explorer to v2.5.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3100)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-09-02 11:08:57 +02:00
Rua Haszard 5c7447f434 Rename js/components to js/editor-components (https://github.com/woocommerce/woocommerce-blocks/pull/3069)
* mass-rename js/components => js/editor-components & update webpack

* mass-change import '@woocommerce/editor-components' +
+ jsprettier quotes fix

* more mass-rename @woocommerce/editor-components

* fix up references to js/editor-components in various places:
- docs/readmes
- jest config
- typescritp config

* fix story path to match new folder/alias 'editor-components'

* fix jest tests: use new alias for editor-components

* include renamed `editor-components` in editor stylesheet cache group
2020-09-02 10:21:46 +02:00
Rua Haszard 62aeb29031 update next-dev version number manually (cc @nerrad) 2020-09-02 14:16:45 +12:00
github-actions[bot] 51e48f43b1 Release: 3.3.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3077)
* generating changeset for pull request

* generating changeset for pull request

* 3.3.0 changelog + add woocommerce contributor (https://github.com/woocommerce/woocommerce-blocks/pull/3067)

* update min required WooCommerce - 4.2 (out of date!)

* require Woo 4.2+ min (L-2 policy)

* draft test instructions for new feature in 3.3.0

* add testing instructions for 3.3.0 bug fixes

* update TOC for testing instructions and add MIA 3.0-3.2 (!)

* add convenient zip file download to testing instructions

* update zip file - missed `composer install --no-dev` step

* clarify testing instructions for product price block +
+ remove mention of MIA screenshots

* retroactively add release notes for all products child block customization options

* add testing instructions for all products child block changes (3.1.0) +
+ use changelog note for testing headings

* Fix product element styling class names (https://github.com/woocommerce/woocommerce-blocks/pull/3095)

* Update sale badge align class names to match other element blocks

* Update product price align class names to match other element blocks

* Fix Product title alignment class names. Fixes woocommerce/woocommerce-blocks#3094

* Make styling attributes apply to Product title block when it's not a link. Fixes woocommerce/woocommerce-blocks#3093

* Linting fixes

* add changelog note for woocommerce/woocommerce-blocks#3095 + use standard changelog prefixes

* update release date

* update zip file link (new test build ft. woocommerce/woocommerce-blocks#3095)

* 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: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-09-02 14:04:27 +12:00
Albert Juhé Lluveras 4de3a0447b Fix product element styling class names (https://github.com/woocommerce/woocommerce-blocks/pull/3095)
* Update sale badge align class names to match other element blocks

* Update product price align class names to match other element blocks

* Fix Product title alignment class names. Fixes woocommerce/woocommerce-blocks#3094

* Make styling attributes apply to Product title block when it's not a link. Fixes woocommerce/woocommerce-blocks#3093

* Linting fixes
2020-09-01 16:52:25 +02:00
Seghir Nadir 4c371e064c Use wp_login_url instead of hardcoding login path (https://github.com/woocommerce/woocommerce-blocks/pull/3090)
* use wp_login_url instead of hardcoding login path

* generating changeset for pull request

* generating changeset for pull request

Co-authored-by: github-actions <github-actions@github.com>
2020-09-01 10:56:11 +01:00
Darren Ethier 4adb9d553e update release pull request workflow
fix improper indentation for expression.
2020-08-31 14:42:54 -04:00
Darren Ethier 06a952fb93 update wordpress deploy workflow
fix incorrect syntax for conditional expression in slack notification steps.
2020-08-31 14:39:30 -04:00
Darren Ethier 7858137b0b Update release pull request workflow
- improve conditional on whether job runs to only run on branches containing 'release/'.
- fix syntax on if conditionals in slack notifications
2020-08-31 14:38:20 -04:00
Seghir Nadir d7a8328528 Fix JS console error when COD is enabled and no shipping method is available. (https://github.com/woocommerce/woocommerce-blocks/pull/3086)
* only return selected shipping methods from useSelectShippingRate

* add docs
2020-08-31 17:15:56 +01:00
Albert Juhé Lluveras 80400e50da Split Checkout block component into smaller files (https://github.com/woocommerce/woocommerce-blocks/pull/3062)
* Rename CheckoutForm to Form

* Create CheckoutForm component

* Simplify directory structure

* Add docs about class name changes

* Add PropTypes to CheckoutForm

* Update skeleton class name

* Extract LoginPrompt

* Move loginToCheckoutUrl to a constant

* Move replaced class name docs to 3.4.0 specific file
2020-08-31 12:17:42 +02:00
Darren Ethier 93e493bef9 Change location of if notification 2020-08-30 20:21:46 -04:00
Darren Ethier a71503ccf9 Add slack notifications to release-pull-request workflow 2020-08-30 12:49:42 -04:00
Darren Ethier 03a7765c8c Create release pull request automation workflow 2020-08-30 12:35:42 -04:00
Darren Ethier b8932cc7bd Update project-management-automations.yml
Update the version used for existing workflow
2020-08-30 12:32:51 -04:00
Darren Ethier 493436ca0f Add templates for release pull request automation (https://github.com/woocommerce/woocommerce-blocks/pull/3073)
* add templates for release pull request automation

* add configuration
2020-08-30 12:31:52 -04:00
renovate[bot] 567d4b7c6b Update dependency @testing-library/react to v10.4.9 (https://github.com/woocommerce/woocommerce-blocks/pull/3053)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-30 11:53:47 +01:00
renovate[bot] 95f4c9dee7 Update dependency @octokit/graphql to v4.5.4 (https://github.com/woocommerce/woocommerce-blocks/pull/3020)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-30 11:53:36 +01:00
Darren Ethier 0244bd5327 Fix deploy scripts for handling composer.json version and version string validation (https://github.com/woocommerce/woocommerce-blocks/pull/3027)
* improve patch version detection and automatically fix incorrect format for version

* don’t include composer.json version update in commit

* update build-plugin zip to account for autoloader generation

* for zip-only do composer dump-autoload command

* regenerate classmap after composer version change reverted in composer.json and/or deployed

* fix condition

* improve/fix version string splitting

* remove lingering debugging

* Add some more info around the question on whether this is deployed to WordPress.org or not

* update release doc about main branch version bumping

* tweak wording in release docs

* fix grammar in user instructions
2020-08-27 09:17:52 -04:00
Rua Haszard 0a1a14f5db upgrade Storybook to 6.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3039)
* upgrade Storybook and add core-js:
- core-js is needed for Storybook, at least as a workaround for an issue
- https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#core-js-dependency-errors

* rejig package-lock after merge
2020-08-27 12:02:20 +12:00
Rua Haszard 77aa2a33a3 clarify intentions / purpose of different component folders in docs (https://github.com/woocommerce/woocommerce-blocks/pull/3025)
* add high-level docs about our components & remove stale detail info

* use current collection/folder naming in docs:
- let's rename js/components in a separate PR
- split paragraphs on to separate lines to improve future diffs

* rename storybook.md => components.md and update link/summary

* tweak component collection docs:
- base have more stringent requirements, since they can be used anywhere
- editor components are less strict and can assume editor context

* clarify js/base/components readme in line with main doc

* remove line about editor components being specialised to woo blocks
2020-08-27 08:15:16 +12:00
renovate[bot] 96836fa117 Update dependency @types/wordpress__data to v4.6.8 (https://github.com/woocommerce/woocommerce-blocks/pull/3055)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-26 11:26:39 +02:00
renovate[bot] 8f91667b86 Update dependency @babel/core to v7.11.4 (https://github.com/woocommerce/woocommerce-blocks/pull/3051)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-26 11:26:18 +02:00
Albert Juhé Lluveras 8d9de5c11c Fix discounted price misalignment in Cart block (https://github.com/woocommerce/woocommerce-blocks/pull/3047)
* Fix discounted price misalignment in Cart block

* Fix Product Price block alignment
2020-08-25 15:10:11 +02:00
Albert Juhé Lluveras ff6382f0c8 Add Webpack config docs (https://github.com/woocommerce/woocommerce-blocks/pull/3043)
* Add Webpack config docs

* Typo

* Add note that aliases make refactors easier

* Rewrite 'Relevant files' section of the build system docs
2020-08-25 12:01:19 +02:00
Albert Juhé Lluveras 7ba25d63c1 Fix CartItems unit tests (https://github.com/woocommerce/woocommerce-blocks/pull/3044) 2020-08-25 10:33:41 +02:00
renovate[bot] 1bcaa5f5e5 Update dependency webpack-cli to v3.3.12 (https://github.com/woocommerce/woocommerce-blocks/pull/3023)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-24 10:33:41 +02:00
Albert Juhé Lluveras 58788acf0b Exclude storybook from released ZIP (https://github.com/woocommerce/woocommerce-blocks/pull/3036)
* Create copy plugin files bash script so logic is not duplicated

* Exclude storybook from ZIP. Fixes woocommerce/woocommerce-blocks#2671
2020-08-24 10:27:58 +02:00
renovate[bot] 96263cb029 Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/3040)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-24 10:27:01 +02:00
Albert Juhé Lluveras a6178359bb Display Checkout block with a notice when adding a product sold individually that was already in the cart (https://github.com/woocommerce/woocommerce-blocks/pull/2854)
* Rename component to match directory

* Typo

* Checkout API: return cart errors as 'notice' property instead of throwing

* Checkout block: display server errors as notices

* Strip tags content

* Use same strings as in Core

* Add support for several notices

* Rename variables and allow all kind of notices

* Strip HTML tags and content in frontend

* Fix Checkout block in editor

* Add stripTagsAndContents tests

* Print notices before running blocks logic
2020-08-21 09:34:29 +02:00
Albert Juhé Lluveras 8bb217cec6 Show express payment methods in the Cart block (https://github.com/woocommerce/woocommerce-blocks/pull/3004)
* Shown express payment methods in Cart block

* Fixes

* Create usePositionRelativeToViewport hook

* Typo

* Style fixes

* Remove footer push div

* Styling fixes

* Improve code clarity

* Split ExpressCheckoutFormControl into two components

* Rename visibilityObserver to referenceElement

* Replace 'useEffect' with 'useLayoutEffect'

* Add tests for usePositionRelativeToViewport

* Self-closing div

* Add explanatory comment

* Create a shim for IntersectionObserver

* Update express payment components class names

* Add todo comment to remove IntersectionObserver shim when we drop IE11 support
2020-08-20 16:14:12 +02:00
Seghir Nadir 996925dab8 update versions 2020-08-19 16:03:20 +01:00
Seghir Nadir ab99e7d19e Release 3.2 (https://github.com/woocommerce/woocommerce-blocks/pull/3016)
* add testing checklist

* add zip to file

* add changelog

* Bumping version strings to new version.

* remove version from composer

* fix version number in package.json

* pin wc to 4.3.3

* add jetpack constant to travis
2020-08-19 15:50:12 +01:00
renovate[bot] 2f6dd1e5cd Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/2984)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-18 10:55:08 -04:00
renovate[bot] 1f6a3f651d Update dependency autoprefixer to v9.8.6 (https://github.com/woocommerce/woocommerce-blocks/pull/2967)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-18 10:51:16 -04:00
renovate[bot] 18bc3b37b9 Update babel monorepo (https://github.com/woocommerce/woocommerce-blocks/pull/2964)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-08-18 10:41:34 -04:00
Seghir Nadir 28d3bd7dda remove suspense polyfill (https://github.com/woocommerce/woocommerce-blocks/pull/3015) 2020-08-18 12:32:40 +01:00
Darren Ethier fad8c06b23 Add defensive checks for cart instance (https://github.com/woocommerce/woocommerce-blocks/pull/3009) 2020-08-18 07:30:28 -04:00
Seghir Nadir 69ff731b4e use TextControl instead of PlainText (https://github.com/woocommerce/woocommerce-blocks/pull/3014)
* use TextControl instead of PlainText

* update e2e test

* revert changes for label

* update test
2020-08-18 12:25:48 +01:00
Darren Ethier c0dbb08ef9 Deprecate wc.wcSettings.setSetting function. (https://github.com/woocommerce/woocommerce-blocks/pull/3010)
* Add deprecation notice for setSettings

* add todo for followup issue to actually remove the function

* update todo

* fix tests

* fix todo

* Update assets/js/settings/shared/set-setting.js

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2020-08-18 10:40:08 +01:00
Rua Haszard 0fbc366746 update minimum required version of WordPress core to 5.3 (https://github.com/woocommerce/woocommerce-blocks/pull/3013)
* update min version of WordPress core to 5.3 in readmes

* update min WP version to 5.3 - main plugin file & admin compat notice

* remove WordPress 5.2 travis e2e test build

* disable legacy (WP <5.3) webpack entry points

* add "update user docs" step to release process, incl min WP/Woo reqs

* add 5.5 test

* allow test to fail

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2020-08-17 15:20:51 +01:00
Rua Haszard 506806065f rename `ProductQueryFilters` file to match class name (PSR4 compatible) (https://github.com/woocommerce/woocommerce-blocks/pull/3012) 2020-08-17 13:07:23 +01:00
Seghir Nadir 85ed96b58e Add dark colors support to Cart & Checkout controls (https://github.com/woocommerce/woocommerce-blocks/pull/2981)
* add dark styles setting

* add attributes to blocks

* add colors to input and select

* cover rest of items

* tweak select contrast

* fix ie11 issue

* fix focus

* include checkbox styles

* fix extra spacing after phone number

* add styling to quantity selector

* remove extra rule

* remove editor styles for radio control

* use border-color

* rename variables and classes and wording

* adjust colors

* provide tighter control over colors

* remove redudant outline rule

* add more variables

* add support for order note

* use variables for textarea

* move dark mode panel to last
2020-08-14 12:08:16 +01:00
Seghir Nadir 1fddb9451d Use real previews for the Cart and Checkout blocks (https://github.com/woocommerce/woocommerce-blocks/pull/2992)
* Use real previews for the cart and checkout

* remove extra files and css
2020-08-13 14:24:51 +01:00