Commit Graph

1954 Commits

Author SHA1 Message Date
Albert Juhé Lluveras 2fadea064e Document Cart & Checkout button styles (https://github.com/woocommerce/woocommerce-blocks/pull/2814)
* Reduce specificity of some button styles

* Submit container: make it possible for themes to change the shadow color without the need to rewrite shadow values

* Use background-color instead of background property in docs

* Add docs to style the button and the submit container

* Remove border from button

* Add back state styles to button component

* Docs improvements

* Undo unncessary changes in button component styles

* Add spaces
2020-07-07 11:59:51 +02:00
Albert Juhé Lluveras adfecb4259 Split up webpack files for better readability (https://github.com/woocommerce/woocommerce-blocks/pull/2817)
* Split up webpack files for better readability

* Fix storybook

* Fix tests

* update progress-bar-webpack-plugin and implement better feedback

- updates progress-bar-webpack-plugin to latest version which includes more granular output of what webpack event is being processed.
- Improve asset build complete summary to include what build was completed.

* remove unnecessary s suffix

* Add back package-lock

Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
2020-07-07 11:05:06 +02:00
Albert Juhé Lluveras 9c1c075be9 Don't load frontend scripts in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/2788)
* Move register_block_script and get_block_asset_build_path to src/Assets/Api

* Only load block scripts in the frontend

* Fix version_compare numbers so they match 5.2.x versions

* Use register_scripts from AssetApi class
2020-07-07 10:15:46 +02:00
Rua Haszard 6232bad7c3 2.10.0-dev next-version bump 2020-07-07 11:23:22 +12:00
Rua Haszard d664d27fa6 Release: 2.9.0 (https://github.com/woocommerce/woocommerce-blocks/pull/2816)
* update version number in readme.txt

* 2.9.0 changelog

* flesh out changelog + consistent punctuation

* fix changelog prefixes

* remove extraneous .

* testing instructions for 2.9.0

* tweak testing instructions - delete shortcode

* 2.9 version in package-lock

* 2.9 version numbers

* 2.9 release version in package-lock

* Bumping version strings to new version.
2020-07-07 11:19:17 +12:00
Mike Jolley 8cd96950e8 Reviews by product/category e2e tests (https://github.com/woocommerce/woocommerce-blocks/pull/2808)
* Tests for reviews by product

* reviews by category
2020-07-06 14:48:39 -04:00
Darren Ethier e3dc2e9c86 Update javascript-testing.md 2020-07-03 08:11:00 -04:00
Albert Juhé Lluveras 2013c5e0f5 Dashicon module replacement: prevent cloning a non-element (https://github.com/woocommerce/woocommerce-blocks/pull/2804) 2020-07-03 10:51:37 +02:00
Rua Haszard c49a7af270 add basic docs for running e2e tests (https://github.com/woocommerce/woocommerce-blocks/pull/2800)
* add basic docs for running e2e tests

* shift common dependencies info to top, clarify iterate-test comment

* link out to wp-env docs

Co-authored-by: Darren Ethier <darren@roughsmootheng.in>

* remove extra bracket, tweak wp-env docs link

* typo

Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
2020-07-03 09:26:23 +12:00
Seghir Nadir 81570d733c Tweak some logic in our cart Integration test. (https://github.com/woocommerce/woocommerce-blocks/pull/2778)
* Fix Cart test async logic

* tweak test

* refactor test to not call response twice

* add comment for why we're calling fetch twice

* fix duplicate calls

* reset empty test to normal value

* switch to mockResponse

* convert comment to todo block

Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
2020-07-02 15:10:19 -04:00
Darren Ethier 76ab006219 bump versions to 2.9.0-dev 2020-07-02 09:51:05 -04:00
Seghir Nadir 7ed01f9254 Release: 2.8.0 (https://github.com/woocommerce/woocommerce-blocks/pull/2768)
* update readme file

* add testing docs

* Bumping version strings to new version.
2020-07-02 09:48:08 -04:00
Rua Haszard 29e7aa9bdf basic e2e test for instantiating All Reviews block (https://github.com/woocommerce/woocommerce-blocks/pull/2799)
* add e2e test for instantiating All Reviews block:
- adapted code from @senadir in-progress PR
https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/2756

* remove pptr-testing-library - not needed for this test

* Don't skip tests for the review block on < 5.3

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2020-07-02 11:32:42 +01:00
renovate[bot] 661ebc196a Update dependency autoprefixer to v9.8.4 (https://github.com/woocommerce/woocommerce-blocks/pull/2797)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-02 07:59:02 +02:00
renovate[bot] c417003e56 Update babel monorepo to v7.10.4 (https://github.com/woocommerce/woocommerce-blocks/pull/2794)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-02 07:53:31 +02:00
renovate[bot] 5bdba6f0a3 Update Node.js to v12.18.2 (https://github.com/woocommerce/woocommerce-blocks/pull/2793)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-02 07:50:59 +02:00
renovate[bot] 346ce3ae16 Update dependency @testing-library/jest-dom to v5.11.0 (https://github.com/woocommerce/woocommerce-blocks/pull/2795)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-02 07:50:43 +02:00
renovate[bot] cdf75babed Update dependency @types/react to v16.9.41 (https://github.com/woocommerce/woocommerce-blocks/pull/2796)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-01 16:10:16 +02:00
renovate[bot] 30b1f0fb38 Update dependency css-loader to v3.6.0 (https://github.com/woocommerce/woocommerce-blocks/pull/2798)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-07-01 16:06:14 +02:00
Rua Haszard cb4ee3e632 update wporg readme docs to link to primary docs on docs.woocommerce.com (https://github.com/woocommerce/woocommerce-blocks/pull/1758)
* link to official docs in WPORG readme and remove old block docs

* simplify block list in readme - remove inline docs + add cart/checkout
2020-07-01 11:50:28 +01:00
Mike Jolley 00b7204f1c Sort states and countries correctly using `deep_sort_with_accents` (https://github.com/woocommerce/woocommerce-blocks/pull/2779)
* deep_sort_with_accents

* Fancy sorting fixes
2020-07-01 11:49:16 +01:00
Darren Ethier 4f5693e63c Add storybook story for icon library (https://github.com/woocommerce/woocommerce-blocks/pull/2787)
* modify dashicon replacements to be consistent with other icon exports

This also involved modifying the dashicon module replacement to use `cloneElement` instead of `createElement`.

* import from packages not global

* export woo icon consistent with other icons from the library

The Woo category icon was not using the Icon system and not exported consistent with other icons.

* add missing viewbox to arrowBack

* add story for icon library

* Update assets/js/icons/stories/index.js

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

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-26 10:22:41 -04:00
Mike Jolley c65fd05a73 Reorder dependencies (https://github.com/woocommerce/woocommerce-blocks/pull/2774) 2020-06-26 13:01:35 +01:00
Mike Jolley d25d233f27 Replace usage of `cart-checkout/button` with `@woocommerce/base-components/button` (https://github.com/woocommerce/woocommerce-blocks/pull/2781)
* Change to base component

* Remove todo
2020-06-25 16:50:48 +01:00
Seghir Nadir 73adef6c85 Add custom matcher (https://github.com/woocommerce/woocommerce-blocks/pull/2780) 2020-06-25 14:00:27 +01:00
renovate[bot] 5247a77a43 Pin dependencies (https://github.com/woocommerce/woocommerce-blocks/pull/2770)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-25 11:28:06 +01:00
renovate[bot] 8927095e5e Update babel monorepo to v7.10.3 (https://github.com/woocommerce/woocommerce-blocks/pull/2772)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-25 09:44:56 +00:00
renovate[bot] 5f07d2192b Update Node.js to v12.18.1 (https://github.com/woocommerce/woocommerce-blocks/pull/2771)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-25 09:47:23 +01:00
renovate[bot] 28d9d48978 Update dependency @testing-library/react to v10.4.3 (https://github.com/woocommerce/woocommerce-blocks/pull/2773)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-25 09:46:46 +01:00
Rua Haszard 98413f2c40 Auto-merge renovate dependency updates (except major versions) (https://github.com/woocommerce/woocommerce-blocks/pull/2742)
* configure renovate to automerge all but major upgrades

* remove renovate weekly schedule - we want automerged updates ASAP :)

* mention dependency updates in release process

* fix heading levels in `Create a release pull request` section

* Revert "remove renovate weekly schedule - we want automerged updates ASAP :)"

This reverts commit c07ae84120a81fad4bc8d138623128bc0876e8d2.

* fix indentation (should be tabs)
2020-06-24 16:37:19 +12:00
Darren Ethier 19ab667672 implement `page.waitForNavigation` for handling the page load after clicking the search submit (https://github.com/woocommerce/woocommerce-blocks/pull/2769) 2020-06-23 10:38:48 -04:00
Darren Ethier 1953d4f96a remove unnecessary await (https://github.com/woocommerce/woocommerce-blocks/pull/2764) 2020-06-23 09:22:18 -04:00
Albert Juhé Lluveras 3fae904643 Use WooCommerce thumbnail images in Blocks (https://github.com/woocommerce/woocommerce-blocks/pull/2755)
* Remove legacy files

* Use thumbnail product image for Cart, Checkout and Reviews blocks

* Add option to toggle between full size and cropped image to the Atomic Product image block
2020-06-23 13:25:28 +01:00
Mike Jolley b40600a8b2 Update stock when a row already exists (https://github.com/woocommerce/woocommerce-blocks/pull/2747) 2020-06-23 11:35:10 +01:00
Albert Juhé Lluveras b74b85dc03 Remove text color from Cart and Checkout blocks (https://github.com/woocommerce/woocommerce-blocks/pull/2745)
* Remove text color from Cart and Checkout blocks

* Fix Cart price column misalignement. woocommerce/woocommerce-blocks#2744
2020-06-23 11:13:53 +01:00
Mike Jolley 94306573bc Call add to cart in click handler (https://github.com/woocommerce/woocommerce-blocks/pull/2763) 2020-06-23 11:10:06 +01:00
renovate[bot] 74b6cc5764 Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/2760)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-22 11:04:41 +01:00
Albert Juhé Lluveras dfa6fca924 Cart & Checkout: show shipping method prices with taxes depending on settings (https://github.com/woocommerce/woocommerce-blocks/pull/2748) 2020-06-22 10:47:35 +02:00
Darren Ethier a1768ad3ec Remove reference to REST API feature plugin. 2020-06-20 08:21:46 -04:00
Mike Jolley 98d240d5e6 Introduce Variation Picker Component (https://github.com/woocommerce/woocommerce-blocks/pull/2497)
* Add attributes to API

* Add component

* API updates to return variation data

* Update to handle updated api responses

* Working picker

* Update tests

* update test

* Use SelectControl

* Add Picker to Form Block

* Code cleanup and splitting

* Inline todos

* Update todos

* Update assets/js/atomic/blocks/product/add-to-cart/product-types/variable/variation-attributes/index.js

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

* change classname and move styles within component

* Correct conditional

* Avoid nesting filters

* Remove exclude from getVariationsMatchingSelectedAttributes

* basic select styles

* remove custom select styles

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-19 15:51:09 +01:00
Darren Ethier 1026ff8fd4 Switch to use `wp-env` as the development/test environment (https://github.com/woocommerce/woocommerce-blocks/pull/2730)
* Switch to use wp-env

* fix travis config

* fix spacing?

* doh need to install packages before starting environment!

* more fixes for errors in travis environment

* hmm still have node-git issues

* nope must use dash

* maybe it’s a caching issue (we’re caching node_modules?)

* remove configs

* add wp-env override json to gitignore

* remove obsolete scripts

* fix config in travis

* restore default env (for phpunit)

* for e2e manually set WORDPRESS_BASE_URL

* doh fix variable for wp version

* run phpunit via docker and fix WordPress version used for tests

* find out what’s going on with this thing

* don’t escape?

* doh phpunit needs dev installed from composer!

* fix versions

* looks liek we have to make sure wp db is up to date?!?

- also moves pre-configuration stuff all into one file for easier maintenance.

* see if I can get insight into what the siteurl is in the wp environment on travis

* try env setup (known that will break phpunit but possible it might fix e2e?)

* output plugin list to see what is active in travis

* try flushing rules

* do a hard fulsh

* fix argument syntax

* move things around and add pre-configuration as files so all wp commands run at once

* revert back to running each container command separately

Not sure, but this might affect permissions issues?

* maybe re-ordering before the file sync will help?

also try some configuration changes

* another attempt at travis config

In this attempt:
- map .htaccess to the server on the environment start
- try changing permissions of wp-content and wp-content/plugins as a part of the e2e test bootup

* use default wp version for gute build

* refactor to run all wp commands in one go

* don’t return promise from setup function

- this might fix the sporadic fails related to the fixtures being setup (and potential race conditions there).

* make sure we activate gutenberg plugin (previously we were just installing)

The syntax of the command was incorrect.

* try alternative syntax for installing and activating plugin
2020-06-17 16:28:11 -04:00
renovate[bot] 0be5642d3a Update dependency @testing-library/jest-dom to v5.10.1 (https://github.com/woocommerce/woocommerce-blocks/pull/2733)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-17 14:12:26 +01:00
renovate[bot] 6e9da71bbb Update dependency @types/react to v16.9.37 (https://github.com/woocommerce/woocommerce-blocks/pull/2734)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-17 14:12:07 +01:00
renovate[bot] d030669f5f Update dependency @octokit/graphql to v4.5.1 (https://github.com/woocommerce/woocommerce-blocks/pull/2732)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-17 14:11:42 +01:00
renovate[bot] 4db5e67371 Pin dependencies (https://github.com/woocommerce/woocommerce-blocks/pull/2731)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-17 14:11:13 +01:00
Mike Jolley cae6cbb191 `registerInnerBlock` ->`registerBlockComponent` (https://github.com/woocommerce/woocommerce-blocks/pull/2688)
* registerBlockComponent

* BW compat and docs

* Add tests for deprecated methods
2020-06-17 14:10:46 +01:00
Albert Juhé Lluveras 610e082f9c Update base/components classnames (https://github.com/woocommerce/woocommerce-blocks/pull/2711)
* Update base/components classnames

* Fix class name conflict

* Fix some class names mismatch

* Fix review loading placeholder styles

* Fix docs format

* Update old class name

* Fix price slider regression

* Fix load more button component missing legacy class

* Fix wrong loading mask styles classname

* Remove 'checkout' from 'wc-block-components-checkout-payment-methods__save-card-info' classname

* Make it explicit legacy classes will be removed in the next major version

* Make product variation data styles belong to product metadata

* Improve docs sentence
2020-06-17 11:53:42 +02:00
Mike Jolley 09aa20d0d3 Introduce Atomic Add to Cart Block (https://github.com/woocommerce/woocommerce-blocks/pull/2705)
* Form/button stucture

* Use registerBlockComponent

* Context for add to cart form

* Working cart button

* Tidy up button component

* Add todos

* Revert reg block

* Hide stock indicator if not purchasable

* Hide terms if empty

* Add url and type to API

* Skip default category from term response

* Rename form element

* Form for product types

* Tidy up context provider and expand todos

* No longer using qty icon

* Update todos

* Correct text domain

* registerExperimentalBlockType

* Duplicate method

* Remove prevent default

* Update docblock

* Description for button code
2020-06-17 10:52:03 +01:00
Mike Jolley 340cf01255 Update documentation indexes and add checkout docs (https://github.com/woocommerce/woocommerce-blocks/pull/2720)
* Fix existing indexes

* Update indexes

* Stock docs
2020-06-16 16:50:09 +01:00
Albert Juhé Lluveras e26b60f00e Add 2.7.1 testing instructions 2020-06-16 15:47:42 +02:00