Commit Graph

1699 Commits

Author SHA1 Message Date
Albert Juhé Lluveras c4e7191269 Fix credit card validation errors alignment (https://github.com/woocommerce/woocommerce-blocks/pull/2662)
* Use same margin-bottom in credit card input as in checkout inputs

* Set cursor:text for Checkout input labels

* Increase line height of expiry and cvc input validation errors in large viewports

* Increase height of expiry and cvc input validation errors in small viewports
2020-06-08 12:55:10 +02:00
Albert Juhé Lluveras 40426cbf93 Fix styling issues introduced in woocommerce/woocommerce-blocks#2597 and woocommerce/woocommerce-blocks#2619 (https://github.com/woocommerce/woocommerce-blocks/pull/2652)
* Move order summary styles to component style.scss

* Fix wrong class name in Order summary

* Move express payment methods a little bit higher

* Fix shipping options panel misaligned in the Cart sidebar

* Add right padding to panel button so text doesn't overlap the arrow

* Fix wrong class name in Order summary (II)
2020-06-08 11:28:58 +02:00
renovate[bot] 4dfd5bd687 Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/2595)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-07 18:55:11 -04:00
Darren Ethier 2bbe2e63c6 Fix retrying after failed payment processed server side. (https://github.com/woocommerce/woocommerce-blocks/pull/2655)
* add state for selected saved token in payment data

* add handling for flipping payment status back to pristine when checkout has error

If payment status is successful client side, but the checkout state goes into an error after server side processing, then we reset payment status to pristine to allow for reprocessing of payment method client side.

This is skipped for saved payment method tokens because they effectively are _only_ processed server side.
2020-06-07 16:47:16 -04:00
Seghir Nadir 0ac76337d4 Expand Feature flags (https://github.com/woocommerce/woocommerce-blocks/pull/2591)
* Revert "Move blocks to stable flag (https://github.com/woocommerce/woocommerce-blocks/pull/2261)"

This reverts commit a005649ab8.

* migrate to number based gating

* add todo to watch feature flag

* remove flags from build

* change flag in travis

* load flag in right order

* expose flag to js

* simplify flag definition

* more feature flags

* wrap flag in check

* add helper functions

* add helpers in PHP

* fix typo in flag

* move php code to src/domain/package

* tweak if condition

* return flag to travis

* fix broken block name
2020-06-05 20:13:51 +01:00
Seghir Nadir baefb8d6e9 Add fixtures data for all entities. (https://github.com/woocommerce/woocommerce-blocks/pull/2548)
* change entrypoint setup and install wc-rest-api

* enable pretty links in docker

* create fixtures functions

* create and load global setup and teardown files

* support multiple shipping zones

* use env values

* refactor command

* fix typo in command

* more to import instead of require

* add docs

* refactor test data to its own file and refactor shipping methods

* revert to commonJS require

* rename function name

* rename global variable

* update fixture functions to accept fixture as param

* document fixture data

* pin wc rest api

* update package-lock

* remove forgetten test line
2020-06-05 17:49:07 +01:00
Darren Ethier 5dafeac1ab Audit payment method interface API (https://github.com/woocommerce/woocommerce-blocks/pull/2622)
* remove obsolete useStoreOrder hook and implementation.

This hook was actually never completed and was only implemented in the `usePaymentMethodInterface` hook/api. The original purpose was to expose order details to registered payment methods, but that is now exposed via checkout state event emitters so it’s no longer needed.

OrderId is exposed via the `CheckoutState` context provider.

* remove setBillingData from being exposed to payment methods directly

billingData is updated via event emitter callback responses (see payment method data context provider) and is not something that should be set directly via payment methods.

We want checkout to have control over how billing data is updated in the state.
2020-06-05 11:20:05 -04:00
Albert Juhé Lluveras eaeedd31e0 Update item count badge styles (https://github.com/woocommerce/woocommerce-blocks/pull/2619)
* Update item count badge styles

* Make sure item count badge doesn't break in multiple lines

* Make item count badge have white background

* Add docs

* Move order summary CSS properties outside of the sidebar class to reduce specificity

* Move Order summary to its own component
2020-06-05 17:03:48 +02:00
Seghir Nadir 177b30f940 Refactor E2E setup routine (https://github.com/woocommerce/woocommerce-blocks/pull/2544)
* skip test and delete unneeded ones

* update comment
2020-06-05 15:50:17 +01:00
Mike Jolley 2925d0d0ee Add Atomic SKU block (https://github.com/woocommerce/woocommerce-blocks/pull/2645)
* Add SKU block

* Edit product link in inspector
2020-06-05 15:36:07 +01:00
Albert Juhé Lluveras 1b51a8e050 Unify Cart headers (https://github.com/woocommerce/woocommerce-blocks/pull/2615)
* Unify Cart headers

* Change Cart title to 'Your cart (x items)'
2020-06-05 16:30:49 +02:00
Albert Juhé Lluveras f2f60b3ff2 Rename wc-single-product script name (https://github.com/woocommerce/woocommerce-blocks/pull/2648) 2020-06-05 13:19:57 +01:00
Mike Jolley da58a8b44f Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607)
* Register Atomic Blocks and save some block content

* renderInnerBlocks utility

* Frontend Rendering

* Clean up atomic block classnames

* Move shared styles

* Create a hoc for attribute mapping

* Rename some unpluralised class names

* Remove prefixes from atomic component class names

* Updated styles

* Update styles from master

* Revert product list styles

* 2020 fixes

* Separate renderFrontend from renderInnerBlocks

* Lazy loading of components

* Tweak loading classes

* FIx all products loading state

* Revert lazy implementation - creates too many unneccessary files due to webpack config

* Cleanup

* Remove wcBlocksBuildUrl

* Move call to register_atomic_blocks

* Remove duplicate key

* reuse render frontend

* Corectly handle frontend attribute mapping to keep editor working

* Style updates

* Update side effects

* Remove width style from rating to fix alignment

* Move ssr grid styles to main stylesheet

* Put back prefixed classnames

* 2020 styling fixes

* Create frontend files instead of doing it all in block map

* Update assets/js/atomic/utils/get-block-map.js

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

* Update assets/js/atomic/utils/render-parent-block.js

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

* Fix last child alignment regardless of block type

* More specificity fixes

* 2020 button alignment

* static fix to prevent offsets

* fix placeholder image in firefox

* Issues reported in feedback

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-05 13:18:16 +01:00
Darren Ethier 2e8a3c8d6e Update README.md with a note about L2 version support. (https://github.com/woocommerce/woocommerce-blocks/pull/2644) 2020-06-05 07:20:34 -04:00
Albert Juhé Lluveras 104850deb5 Update WC tested version to 4.2 (https://github.com/woocommerce/woocommerce-blocks/pull/2643) 2020-06-05 12:57:25 +02:00
Albert Juhé Lluveras 77b68795d8 Update Cart & Checkout heading styles (https://github.com/woocommerce/woocommerce-blocks/pull/2597)
* Honor heading styles in Cart and Checkout blocks

* Replace Panel with DisclosureWidget and remove Card

* Remove panel-style from main entry

* Rename DisclosureWidget props

* Simplify TitleTag assign

* Add aria-expanded attribute

* Rename DisclosureWidget to Panel

* Make Panel button clickable area smaller

* Fix specificity issues with Twenty Twenty

* Reset italics in reset-typography mixin

* Make C&C titles font size large

* Add padding to shipping options when in the sidebar
2020-06-05 12:00:19 +02:00
Albert Juhé Lluveras 8a65d7297b Make sure Select styles don't change on hover (https://github.com/woocommerce/woocommerce-blocks/pull/2647) 2020-06-05 11:12:34 +02:00
renovate[bot] 04691be547 Update babel monorepo to v7.10.2 (https://github.com/woocommerce/woocommerce-blocks/pull/2609)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-04 06:57:07 -04:00
renovate[bot] 348bbe9051 Update Node.js to v12.18.0 (https://github.com/woocommerce/woocommerce-blocks/pull/2608)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-03 10:53:27 -04:00
renovate[bot] 8fc7e7ab77 Update dependency @testing-library/jest-dom to v5.9.0 (https://github.com/woocommerce/woocommerce-blocks/pull/2612)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-03 10:52:34 -04:00
renovate[bot] 0dda29d36a Update dependency @stripe/stripe-js to v1.6.0 (https://github.com/woocommerce/woocommerce-blocks/pull/2611)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-03 10:51:26 -04:00
renovate[bot] 3e58b5e096 Update dependency @octokit/graphql to v4.5.0 (https://github.com/woocommerce/woocommerce-blocks/pull/2610)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-03 10:47:43 -04:00
Darren Ethier 0ff1db36f4 2.6.0 followups for release process etc. (https://github.com/woocommerce/woocommerce-blocks/pull/2598)
* Add a pull request template for releases

* add testing instructions for 2.6.0 in a new testing/releases folder

* add create todo list button and fixt typo

* Add additional notes to release process

- Include about creating a release pull request and the template to use.
- Include about the process for creating the package update bump in WooCommerce core.

* add testing docs for 2.6.1 release

* Apply suggestions from code review

Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

* improve wording to account for merging changes to master from the release branch

* Changes to pull request template

- make checklist more assertive instead of inquisitive.
- Provide more direction via notes and leading text in the template.
- include section on devnotes.

* remove section on updating the wiki

Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-03 09:39:48 -04:00
renovate[bot] 4880374c41 Update dependency @testing-library/react to v10.0.6 (https://github.com/woocommerce/woocommerce-blocks/pull/2613)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-06-03 10:19:43 +01:00
Darren Ethier e890446029 VID replacements for 2.6.0 release
# Conflicts:
#	package.json
#	woocommerce-gutenberg-products-block.php
2020-06-02 16:31:14 -04:00
Albert Juhé Lluveras 13e79f21b4 Fix product grid blocks markup & design inconsistencies (https://github.com/woocommerce/woocommerce-blocks/pull/2428)
* Fix Sale badge markup discrepancy. Fixes woocommerce/woocommerce-blocks#2107

* Fix product link markup discrepancy

* Use same class name for ratings markup in product grid blocks

* Remove editor specific class name for product title

* Unify price layout between product grid blocks and All Products block

* Change specificity raising classes to avoid editor class names

* Make small images fill the available width in product grid blocks

* Avoid increasing selector specificity in the frontend

* Undo AbstractProductGrid.php template changes

* Do not remove .wc-block-grid__product-rating__stars from CSS

* Add theming docs
2020-06-02 17:06:28 +02:00
Mike Jolley 28d516050e Add context support to Atomic Blocks (https://github.com/woocommerce/woocommerce-blocks/pull/2592)
* Bulk rename InnerBlockConfiguration to InnerBlockLayout context

* Refactor button to use context and handle null product data

* Move preview data to context

* Update blocks to support context

* fix button

* Update assets/js/atomic/blocks/product/title/block.js

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

* remove falsey check

* Update product retrieval code

* Update product prop usage

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-02 12:14:46 +01:00
Albert Juhé Lluveras a6da13920d Fix Cart sidebar styles after font size changes (https://github.com/woocommerce/woocommerce-blocks/pull/2593)
* Fix Cart sidebar styles after font size changes

* Margin/padding cleanup
2020-06-02 09:33:10 +02:00
Albert Juhé Lluveras 31b5f4e00c Fixes to Twenty Twenty product grid styles (https://github.com/woocommerce/woocommerce-blocks/pull/2573)
* Remove underline from discounted prices

* Fix position of on sale badge in Twenty Twenty

* Make sure we reset styles from Core

* Fix image on sale badge not correctly positioned

* Fix sale badge alignment when they are on in the right
2020-06-02 09:18:34 +02:00
Darren Ethier 3e0a2c580e update changelog in readme.txt for 2.6.1 release 2020-06-01 14:49:29 -04:00
Mike Jolley 55b8be7d76 Remove CURRENT_TIMESTAMP default on the stock table (https://github.com/woocommerce/woocommerce-blocks/pull/2590)
* Remove the default timestamp value which requires mysql 5.6.5

* Change REPLACE INTO with INSERT INTO .. ON DUPLICATE KEY UPDATE

This will allow us to set the timestamp value on first insert only.
2020-06-01 13:40:03 -04:00
Darren Ethier 576686b3d2 fix package version 2020-06-01 13:06:50 -04:00
Albert Juhé Lluveras 00b0a81874 Make filter font sizes named (https://github.com/woocommerce/woocommerce-blocks/pull/2594) 2020-06-01 06:45:40 +02:00
Mike Jolley 2361c5f52c Add "edit product" card to single product block sidebar (https://github.com/woocommerce/woocommerce-blocks/pull/2585)
* Add edit product card

* Replace with div
2020-05-29 14:50:12 +01:00
Mike Jolley a5b09b7a43 Update atomic block structure (https://github.com/woocommerce/woocommerce-blocks/pull/2587)
* Move components to blocks dir

* Update import

* Create edit.js for each block

* Remove components/fix title

* Update imports

* Pass corect attributes on edit

* Import

* remove lightBlockWrapper
2020-05-29 14:49:56 +01:00
Mike Jolley 18480b0d68 Add layour editor to the single product block (https://github.com/woocommerce/woocommerce-blocks/pull/2586) 2020-05-29 12:28:04 +01:00
Albert Juhé Lluveras d1685bda7b Use named font sizes instead of values in px (https://github.com/woocommerce/woocommerce-blocks/pull/2533)
* Use named font sizes instead of values in px

* Convert rem mixin to em

* Remove unnecessary line-height

* 'Design' -> 'layout'

* Add comment to magic line-heihgt number

* Update a couple of class names to use BEM

* Use consistent name for SCSS variables

* Fix order summary line heights

* Update docs/contributors/coding-guidelines.md

Co-authored-by: Mike Jolley <mike.jolley@me.com>

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2020-05-29 12:16:33 +02:00
Mike Jolley 597c9ded72 Single Product Block Edit Mode (https://github.com/woocommerce/woocommerce-blocks/pull/2577)
* Previews

* Edit mode

* Remove preview alt text

* Remove unused styles
2020-05-28 12:41:10 +01:00
Albert Juhé Lluveras 0ba29d28d4 Update placeholder styles (https://github.com/woocommerce/woocommerce-blocks/pull/2456)
* Convert several default buttons to primary

* Align primary and tertiary buttons

* Align select controls of placeholders

* Don't force a placeholder background color

* Add border to placeholder lists

* Add work-around for SearchListComponent compatibility with last version of @wordpress/components
2020-05-28 12:20:47 +02:00
renovate[bot] b7430d2197 Update babel monorepo to v7.10.1 (https://github.com/woocommerce/woocommerce-blocks/pull/2572)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-28 11:03:32 +01:00
Mike Jolley 2dc0e8112a Create shared contexts handle for inner blocks (https://github.com/woocommerce/woocommerce-blocks/pull/2568)
* Create shared contexts

* At to jest config
2020-05-28 11:02:10 +01:00
Darren Ethier 401cb20af1 update readme.txt and bump development version 2020-05-27 15:25:20 -04:00
Darren Ethier 926a46b31e make sure set variable is implemented! (https://github.com/woocommerce/woocommerce-blocks/pull/2580) 2020-05-27 13:48:05 -04:00
Darren Ethier 9f0bf26ac3 verify index is present before using (https://github.com/woocommerce/woocommerce-blocks/pull/2580) 2020-05-27 13:35:24 -04:00
Darren Ethier 5699778cad Ensure payment method assets are initialized before main block assets are. (https://github.com/woocommerce/woocommerce-blocks/pull/2579) 2020-05-27 12:34:29 -04:00
Albert Juhé Lluveras bc51052b04 Checkout steps improvements (https://github.com/woocommerce/woocommerce-blocks/pull/2530)
* Don't render step heading content if there is no content

* Make checkout step headings h2

* Add empty alt value to form step counter
2020-05-27 16:48:23 +02:00
Mike Jolley a06aa1eb39 Create single product block placeholder (https://github.com/woocommerce/woocommerce-blocks/pull/2569)
* Create single product block placeholder

* test

* Placeholder frontend js

* Update imports

* Update src/BlockTypes/SingleProduct.php

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

* Update src/BlockTypes/SingleProduct.php

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

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-05-27 15:45:18 +01:00
Mike Jolley 1d2f3e8d3c Delete orders using delete method in batches of 20 (https://github.com/woocommerce/woocommerce-blocks/pull/2574)
* Delete orders using delete method in batches of 20

* Batch size to variable

* Tweak conditional for unit tests

* Force delete of draft orders rather than trash
2020-05-27 10:06:44 -04:00
renovate[bot] 38a050bb01 Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/2550)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-27 14:55:44 +01:00
renovate[bot] 051b7d928f Update Node.js to v12.17.0 (https://github.com/woocommerce/woocommerce-blocks/pull/2571)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-27 14:54:50 +01:00
Albert Juhé Lluveras 35d4031d18 Add arguments to wc_get_shipping_method_count() (https://github.com/woocommerce/woocommerce-blocks/pull/2543) 2020-05-27 15:47:49 +02:00
Mike Jolley a3c20b0dd8 Update abstract block class (https://github.com/woocommerce/woocommerce-blocks/pull/2566) 2020-05-27 11:11:47 +01:00
Mike Jolley b062a67faf Accept object parameters in renderFrontend util (https://github.com/woocommerce/woocommerce-blocks/pull/2567) 2020-05-27 11:11:30 +01:00
Darren Ethier a5b6061dcc Ensure all inline @todos in code are covered by issues and obsolete @todos removed. (https://github.com/woocommerce/woocommerce-blocks/pull/2557)
* Remove todos for colors (see woocommerce/woocommerce-blocks#1331)

* remove todo for payment method express payments placeholder

No placeholder is needed because we don’t want to show this at all if there are no payment methods setup (or initialized based on `canMakePayment`). The payment methods step will have instructions in the editor for users to setup their payment methods.

So this todo was invalid.

* Remove todo comment for useStoreOrder (see woocommerce/woocommerce-blocks#2555)

* remove obsolete todos for usePaymentMethodInterface

* changed todo into a Note for the useQueryState tests

With focused work happening on tests, this is better as a note that can be picked up when this file is touched again.

* remove obsolete todo from payment method registration validation

* remove todo covered by created issue (see woocommerce/woocommerce-blocks#2166)

* remove obsolete todo for stripe utils

* Convert todo to a Note for Checkout Block php registration

For now, I think having the comment block noting what is happening here is sufficient. Whether or not we extend the blocks to cover the other endpoints is something that will surface in future planning and putting in an issue right now coudl be premature (and likely just land the issue in the icebox)

* Remove todo related to ReserveStock covered by woocommerce/woocommerce-blocks#2556

* Remove todo in AbstractRoute covered by issue in WooCommerce project

see https://github.com/woocommerce/woocommerce/pull/26219 for the issue.

* Convert todo to note for wp_version check in Library class
2020-05-26 13:31:33 -04:00
Albert Juhé Lluveras d81444f208 Use absint for per-page param validation (https://github.com/woocommerce/woocommerce-blocks/pull/2563)
* Revert "Fix Products by Category JSON response error (https://github.com/woocommerce/woocommerce-blocks/pull/2551)"

This reverts commit 19f7247d8f.

* Fix Products by Category JSON response error
2020-05-26 07:34:11 -04:00
Albert Juhé Lluveras 79359e7056 Fix Cart style discrepancies (editor-frontend) (https://github.com/woocommerce/woocommerce-blocks/pull/2486)
* Fix different heading size of Cart block between frontend and editor

* Increase Cart submit button specificity so styles are applied in the editor

* Ensure buttons don't inherit borders

* Simplify styles

* Create Title component

* Rename 'level' prop to 'headingLevel'
2020-05-25 18:45:38 +02:00
Darren Ethier 0ae5a8d516 Fix links and extra redundant header in README.md 2020-05-25 10:15:13 -04:00
Darren Ethier 4ab10fb2e3 More improvements to README.md
- remove usage of word stable
- add better wording in initial sentence.
2020-05-25 10:13:06 -04:00
Darren Ethier 5de4e97463 Update README.md with new version requirements 2020-05-25 10:11:14 -04:00
Albert Juhé Lluveras 19f7247d8f Fix Products by Category JSON response error (https://github.com/woocommerce/woocommerce-blocks/pull/2551)
* Fix Products by Category JSON response error

* Create wrapper for the 'intval' function

* Make get_intval public

* Small improvements
2020-05-25 10:05:16 -04:00
Darren Ethier a25cfaa064 Improve readme.txt with note about nature of feature plugin (https://github.com/woocommerce/woocommerce-blocks/pull/2553)
* add improvements to readme.txt

* some more tweaks to align with README.md

* Fix up TOC

* Remove errant “This.”
2020-05-25 09:39:21 -04:00
Albert Juhé Lluveras 5f69fd93ba Exclude three more files from the build ZIP (https://github.com/woocommerce/woocommerce-blocks/pull/2514) 2020-05-25 13:12:04 +02:00
Darren Ethier ce1e334c56 Fix broken dynamic address fields dependent on locale for selected country. (https://github.com/woocommerce/woocommerce-blocks/pull/2547)
* add missing dependency

* Don’t include all defaultAddressFields in address field config
2020-05-25 07:00:26 -04:00
Darren Ethier a5bca5708c Reakit tab already handles selecting the default tab if it isn’t set. (https://github.com/woocommerce/woocommerce-blocks/pull/2545) 2020-05-22 15:32:41 -04:00
Darren Ethier 5668f58f2c Include `onSubmit` handler for CheckoutForm component. (https://github.com/woocommerce/woocommerce-blocks/pull/2532)
* include `onSubmit` handler for CheckoutForm component and implement

* remove redundant preventDefault
2020-05-22 10:51:38 -04:00
Albert Juhé Lluveras 6d1cb26d63 Import TwentyTwenty block styles from Core (https://github.com/woocommerce/woocommerce-blocks/pull/2513)
* Add TwentyTwenty styles from Core

* Increase product on sale selector specificity

* Add theme class name to admin

* Fix some more style discrepancies

* Use em instead of rem
2020-05-21 19:09:50 +02:00
renovate[bot] 89f3b97041 Pin dependencies (https://github.com/woocommerce/woocommerce-blocks/pull/2508)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-21 16:10:11 +01:00
Albert Juhé Lluveras a59966350d Align Product Categories List select and button (https://github.com/woocommerce/woocommerce-blocks/pull/2517) 2020-05-21 10:53:13 +02:00
Seghir Nadir 6862938653 Add React Testing Library (https://github.com/woocommerce/woocommerce-blocks/pull/2528)
* refactor sidebar to its own component

* install RTL

* wrap component in EditorPreview

* remove example test
2020-05-20 20:33:16 +01:00
Albert Juhé Lluveras 60c0ebfdb7 Fix misalignment between value and label in form components (https://github.com/woocommerce/woocommerce-blocks/pull/2518)
* Fix misalignment between value and label in form components

* Do the calculation in SCSS
2020-05-20 15:54:37 +02:00
renovate[bot] d6779c4a8b Update dependency autoprefixer to v9.8.0 (https://github.com/woocommerce/woocommerce-blocks/pull/2511)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-20 14:41:55 +01:00
renovate[bot] 6fce572f3a Update dependency eslint-plugin-jest to v23.13.1 (https://github.com/woocommerce/woocommerce-blocks/pull/2512)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-20 14:41:36 +01:00
renovate[bot] dd18c75163 Update dependency @types/jest to v25.2.3 (https://github.com/woocommerce/woocommerce-blocks/pull/2509)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-20 14:29:11 +01:00
Albert Juhé Lluveras 0dc7e9e6f1 Fix decimal ratings not correctly displayed (https://github.com/woocommerce/woocommerce-blocks/pull/2507)
* Fix decimal ratings not correctly displayed

* Fix aria label rounding ratings
2020-05-19 17:24:20 +02:00
Albert Juhé Lluveras 8f2003df4b Remove some unique font-size (https://github.com/woocommerce/woocommerce-blocks/pull/2498)
* Remove font-sizes which are already inherited

* Remove font sizes from buttons with no text

* Make summary item quantity font-size 12px
2020-05-19 08:06:35 -04:00
Albert Juhé Lluveras b18e2a7d0d Add notices docs (https://github.com/woocommerce/woocommerce-blocks/pull/2502)
* Query state docs fixes

* Add notices docs

* Improve format

* Typo

* Avoid repeating in each method that current context is used.
2020-05-19 07:40:48 -04:00
Darren Ethier 989ec4a673 Fix version for workflow 2020-05-18 16:12:19 -04:00
Darren Ethier 9c8059dfab Create project-management-automations.yml
Hook up the woocommerce project management automations with the todo automation.
2020-05-18 16:09:32 -04:00
Mike Jolley 13bf17559a Add 2.5.16 changelog 2020-05-18 18:10:35 +02:00
Albert Juhé Lluveras 89b94e7cf2 Bumping version strings to new version. 2020-05-18 17:21:41 +02:00
Albert Juhé Lluveras 1fea56d8cd Remove class 'button' from Button component (https://github.com/woocommerce/woocommerce-blocks/pull/2494) 2020-05-18 12:53:57 +02:00
renovate[bot] 199231f94a Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/2501)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-18 11:06:17 +01:00
Albert Juhé Lluveras d91de709df Remove ProductPreview component (https://github.com/woocommerce/woocommerce-blocks/pull/2499) 2020-05-18 11:20:00 +02:00
Seghir Nadir c48518de54 Use Reakit in payment tabs (https://github.com/woocommerce/woocommerce-blocks/pull/2371)
* WIP

* convert to reakit

* rebase and fix styling issues

* add forget initialTabName

* delete button and force manual select

* fix git diff problem in package-lock

* directly render tabs

* fix regression

* gaurd against unset values

* update reakit and guard against empty tabs
2020-05-15 14:55:17 -04:00
Darren Ethier 121cf0a893 swap rate pricing for preview data (https://github.com/woocommerce/woocommerce-blocks/pull/2496) 2020-05-15 11:07:24 -04:00
Darren Ethier 519ca4febd Fix Editor performance issues with checkout block. (https://github.com/woocommerce/woocommerce-blocks/pull/2495)
* add missing typedef

* make sure default shipping address is consistent with everywhere else

* fix test for new expectation
2020-05-15 08:48:45 -04:00
Albert Juhé Lluveras b59a6d56e3 Checkout block: fix error 'setIsSuppressed' in editor (https://github.com/woocommerce/woocommerce-blocks/pull/2492) 2020-05-15 07:09:36 -04:00
Darren Ethier e2d6e4a038 Fix shipping rate and address handling in Stripe payment request payment method. (https://github.com/woocommerce/woocommerce-blocks/pull/2484)
* fix dependencies

* refactor stripe payment-request to extract things into smaller units

- adds/fixes typedefs
- fixes dependencies
- improves logic.

* implement memoizing for functions.

* if same shipping address is selected, just call updateWith immediately

* add separate handler for failed shipping rate retrieval

* improve logic around shipping rate fail/success status

* add notice suppression logic to store notices.

- this is implemented in checkout processor to suppress notices when express payment methods are active.

* add error detection for shipping address errors and update the shipping status accordingly

* update type-def

* set billingData before shippingData

This is needed because of the shipping data and billing data sync logic in use-checkout-address.

* have to tighten dependencies to prevent unnecessary firing

With us now adding error status setters for shippping, the potential for the shipping status changes to trigger the effect went up. So tightening the dependencies to only the stati we care about prevent unnecessary effect calls.

* refactor event handlers to be named and remove all listeners.

This is an undocumented api on the stripe `paymentRequest.on` return value, but I’m trusting it will be relatively stable for this api.

The need for this is caused by the fact that without it, the listeners are re-registered on the paymentRequest event everytime the paymentRequest modal is closed and reopened.

* fix typo in doc block
2020-05-14 19:55:22 -04:00
Rua Haszard 89f843b2b7 respect stripe saved cards store setting (https://github.com/woocommerce/woocommerce-blocks/pull/2455)
* expose a allowSavedCards option to JS on stripe settings data

* hide 'save my card' checkbox if merchant disables saved cards

* use stripe allowSavedCards option to control "Save my card" checkbox

* (linter) remove unnecessary useEffect dependency:

- stripePromise const is defined outside component, so hook doesn't
depend on it

* clarify comment about saved cards and supports( tokenization )

* correct comment about save card merchant option - doesn't affect paying with previously saved payment methods

* use true boolean value for stripe allow saved cards setting:

previously was using woo option `yes no` style, other JS settings all use true bool

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

* fix client side check now `allowSavedCards` is true boolean

Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
2020-05-15 11:35:17 +12:00
Mike Jolley e5c500c70d Only set to pristine when checkout is idle, not when idle status changes (https://github.com/woocommerce/woocommerce-blocks/pull/2485) 2020-05-14 18:18:18 -04:00
Albert Juhé Lluveras 631a07dbf2 Add docs for CSS specificity (https://github.com/woocommerce/woocommerce-blocks/pull/2479)
* Add docs for CSS specificity

* Update docs/contributors/coding-guidelines.md

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Update docs/contributors/coding-guidelines.md

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Update docs/contributors/coding-guidelines.md

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Update docs/contributors/coding-guidelines.md

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Update docs/contributors/coding-guidelines.md

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Update docs/contributors/coding-guidelines.md

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Remove 'popular' from title

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2020-05-14 12:03:43 +02:00
Albert Juhé Lluveras 11981947c5 Add CSS resets for better theme compatibility (https://github.com/woocommerce/woocommerce-blocks/pull/2478) 2020-05-14 11:07:21 +02:00
Darren Ethier a5a62359d7 Fix all shipping address changes in stripe payment request timing out with no rate update. (https://github.com/woocommerce/woocommerce-blocks/pull/2482)
* remove unnecessary shipping field and shipping fields setter

* remove a commented out block

* account for billingData having values but billingFields not when shipping address changes.
2020-05-13 20:05:09 -04:00
Mike Jolley 24035a1508 Update Stripe Method to display generic icon and text in label, with cards below (https://github.com/woocommerce/woocommerce-blocks/pull/2466)
* Support card alignment as a prop

* Add generic card icon to stripe

* Add icons to stripe content

* Update styles

* Label element with icon whitelist

* Update assets/js/base/components/payment-methods/payment-methods.js

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

* Remove activePaymentMethod

* Remove spread operator

Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
2020-05-13 16:48:03 +01:00
Mike Jolley 2395137790 Ensure email and phone are persisted through `setBillingData` (https://github.com/woocommerce/woocommerce-blocks/pull/2477)
* Force inclusion of email and phone

* Update deps

* update deps
2020-05-13 15:39:26 +01:00
renovate[bot] 9e4755ad04 Update dependency @octokit/graphql to v4.4.0 (https://github.com/woocommerce/woocommerce-blocks/pull/2472)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-13 15:24:14 +01:00
renovate[bot] 425b039dee Update dependency eslint-plugin-jest to v23.11.0 (https://github.com/woocommerce/woocommerce-blocks/pull/2476)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-13 15:23:51 +01:00
Darren Ethier 0f53b24f1a Fix regression for payment methods in incognito mode. (https://github.com/woocommerce/woocommerce-blocks/pull/2473)
* ensure we set initial tab if it’s not set

* set appropriate defaults for supports if we don’t have payment method configuration object yet.
2020-05-13 05:34:05 -04:00
renovate[bot] 21fe9d05bc Update dependency @types/react to v16.9.35 (https://github.com/woocommerce/woocommerce-blocks/pull/2475)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-13 10:30:59 +01:00
renovate[bot] 0dff6c6b95 Pin dependencies (https://github.com/woocommerce/woocommerce-blocks/pull/2471)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-13 10:30:16 +01:00