Commit Graph

2718 Commits

Author SHA1 Message Date
renovate[bot] 42db41a06d Update Node.js to v12.21.0 (https://github.com/woocommerce/woocommerce-blocks/pull/3883)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-02-24 08:55:15 +00:00
renovate[bot] 5a5de268fe Pin dependencies (https://github.com/woocommerce/woocommerce-blocks/pull/3882)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-02-24 04:45:58 +00:00
Darren Ethier af99c16931 Add TypeScript support and convert cart data store to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/3768)
* add typescript support

* Add type declarations for Cart and CartResponse interfaces

* make sure we’re resolving .ts files as well as .js files on imports

* add more types

* type the cart data store

* Apply suggestions from code review (implement .tsx in configs)

Co-authored-by: Jon Surrell <jon.surrell@automattic.com>

* remove global fetchMock declaration and directly import where used.

* rename type

* remove named action types and just infer by returning action creator values as const

* use interface instead of type

* rename

* renames

* create CartAction type as union of action creator returned types and implement in reducer

* remove unused imports

* refresh package-lock after rebase

* Add base TS config that projects will inherit from

* Add tsconfig for assets/js/data project

* Ignore TS error on cart store registration

We will address this in cooldown when we have time to investigate further

* Add tsc to build step to catch TypeScript errors

* add a separate command for tsc and tweak build command to use

* restore checkJs and allowJs values in config and remove ts check from build command

* Add ts:check-all command

* Add TypeScript checking workflows

* Change triggers for TypeScript workflow

* Use npm ci instead of npm install

* Remove ts:check-all from TypeScript workflow

* Remove TS Check GitHub workflow

* Remove type-defs dir from TS include, and remove ts:check-all script

We no longer need the ts:check-all script because ts:check will do this for us, the old ts:check did nothing and did not work.

* fix coupon loading issues

* include .ts files only from type-defs folder

Co-authored-by: Jon Surrell <jon.surrell@automattic.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2021-02-23 20:36:24 -05:00
Thomas Roberts 549afc1065 Merge branch 'release/4.5.1' into trunk 2021-02-23 11:38:52 +00:00
Thomas Roberts 17ec003cfd Merge branch 'release/4.5.2' into release/4.5.1 2021-02-23 11:37:33 +00:00
Thomas Roberts 583402a9d6 Bumping version strings to new version. 2021-02-23 11:19:09 +00:00
Thomas Roberts 7b1bd90f61 Update changelog to describe a bug fix more appropriately 2021-02-23 10:35:24 +00:00
Thomas Roberts 81fdd45f70 Update changelog in readme 2021-02-23 10:20:05 +00:00
Thomas Roberts 76d00db174 Update testing docs 2021-02-23 10:18:57 +00:00
Thomas Roberts 78a0680657 Show total sale badge in medium carts & make it display below price (https://github.com/woocommerce/woocommerce-blocks/pull/3879)
* Show total sale badge in medium carts

* Add markup to cart line item row to enable it to be displayed as flex

* Add styling to display price and sale badge as flex

* Revert product price being displayed as block

* Rename sale badge and price wrapper

* Hide line-total sale badge on mobile

* Change class name on total price and sale badge wrapper again
2021-02-23 10:14:48 +00:00
Thomas Roberts caaedfb386 Show total sale badge in medium carts & make it display below price (https://github.com/woocommerce/woocommerce-blocks/pull/3879)
* Show total sale badge in medium carts

* Add markup to cart line item row to enable it to be displayed as flex

* Add styling to display price and sale badge as flex

* Revert product price being displayed as block

* Rename sale badge and price wrapper

* Hide line-total sale badge on mobile

* Change class name on total price and sale badge wrapper again
2021-02-23 10:12:27 +00:00
Thomas Roberts 1e93a75104 Update zip file in testing notes 2021-02-22 14:19:12 +00:00
Thomas Roberts 8a73b5c870 Fix cart line subtotal display when currency has 0 decimals (https://github.com/woocommerce/woocommerce-blocks/pull/3876)
* Fix cart line subtotal display when currency has 0 decimals

* Fix wrong usages of getCurrency instead of getCurrencyFromPriceResponse

* Add tests

* Move comment in tests to relevant line
2021-02-22 14:16:23 +00:00
Thomas Roberts 366e0a1875 Add 4.5.2 testing notes 2021-02-22 13:46:57 +00:00
Thomas Roberts c7c8fbe4bf Update Readme with changelog 2021-02-22 13:33:04 +00:00
github-actions 68b0fad08b generating changeset for pull request 2021-02-22 13:17:40 +00:00
github-actions aa76de1385 generating changeset for pull request 2021-02-22 13:17:40 +00:00
Albert Juhé Lluveras 0ddf8587d1 Fix cart line subtotal display when currency has 0 decimals (https://github.com/woocommerce/woocommerce-blocks/pull/3876)
* Fix cart line subtotal display when currency has 0 decimals

* Fix wrong usages of getCurrency instead of getCurrencyFromPriceResponse

* Add tests

* Move comment in tests to relevant line
2021-02-22 13:16:45 +00:00
Mike Jolley 6c963c19e5 Fix button style (https://github.com/woocommerce/woocommerce-blocks/pull/3862) 2021-02-22 11:50:23 +00:00
Mike Jolley 4a6c5fc28f Use variation prices (https://github.com/woocommerce/woocommerce-blocks/pull/3854) 2021-02-22 11:50:11 +00:00
Mike Jolley 760ad3fa3b StoreAPI: Inject Order and Cart Controllers into Routes (https://github.com/woocommerce/woocommerce-blocks/pull/3871)
* Inject cart_controller into cart routes

* Inject order controller

* Remove todo

* Move reserve stock instance
2021-02-22 11:49:25 +00:00
Raluca Stan c4edcc2740 Move ProductSortSelect and ProductListItem under /product-list (https://github.com/woocommerce/woocommerce-blocks/pull/3870) 2021-02-22 12:04:29 +01:00
Thomas Roberts f923615949 Add information about hub authentication and GitHub releases (https://github.com/woocommerce/woocommerce-blocks/pull/3861) 2021-02-22 09:15:22 +00:00
Raluca Stan 76295fc972 Move payment-methods folder from base components to cart-checkout block (https://github.com/woocommerce/woocommerce-blocks/pull/3866) 2021-02-19 16:16:39 +01:00
Thomas Roberts b6650ab0bc Replace uppercase Translators with translators & make comment style consistent (https://github.com/woocommerce/woocommerce-blocks/pull/3869)
* Replace uppercase Translators with translators

* Change comment style for all // translators instances
2021-02-19 11:58:44 +00:00
Darren Ethier b0c7260d05 Update 410.md
Fix spacing
2021-02-18 09:26:02 -05:00
Darren Ethier 426b681157 Update 410.md
Add missing screenshots
2021-02-18 09:25:36 -05:00
Raluca Stan 7e54af999f Handle out of stock product visibility setting in All Products block. (https://github.com/woocommerce/woocommerce-blocks/pull/3859)
* Take stock status into account for All Products block.

A new `hideOutOfStockItems` setting flag has been added and it is used to hide the out of stock products
from the block. Products that are not out of stock can have 'instock', 'onbackorder' as stock status.

* Update StoreApi docs with new stock_status

* Fix the stock_status query param for collections of products
2021-02-18 10:53:48 +01:00
Mike Jolley 077aaf2be3 Only use SHOP_URL if set (https://github.com/woocommerce/woocommerce-blocks/pull/3845) 2021-02-17 15:17:54 +00:00
Albert Juhé Lluveras b2339bda5d Update Panel component class names to follow guidelines (https://github.com/woocommerce/woocommerce-blocks/pull/3860)
* Rename panel class names to follow correct guidelines

* Remove unused CSS

* Add docs page link
2021-02-17 14:48:53 +01:00
Mike Jolley 5f5bcd7c06 Refactor block types to include script registration and integration classes (https://github.com/woocommerce/woocommerce-blocks/pull/3829)
* Move bulk of payment registry/interface to more generic classes

* Implement registries for block types

* Split editor and frontend integration contexts

* Make abstract dynamic blocks extend the abstract block class

* Remove block type scripts from assets

* deprecate register_block_script

* Updates remaining blocks with new AbstactBlock which takes care of script enqueueing

* Add suffix to integration registry

* rename translator comment

* clarify method comment

* Wrong variable after rebase
2021-02-17 14:18:35 +01:00
Seghir Nadir 30c2079af4 Enhance checkout filter system. (https://github.com/woocommerce/woocommerce-blocks/pull/3835)
* Add filter to extend product price

* Remove code targeting WC Subscriptions

* Rename filter

* Use extendibility API instead of filters

* Remove __EXPERIMENTAL_CART_ITEM_PRICE_FILTER from docs

* throw errors on validation

* Don't catch filter errors for admins

* Add tests

* wrap filter calls in memo

* pass extensions as top level prop

* abstract errors

* add jsdoc

* update tests

* review

* turn __experimentalApplyCheckoutFilter into a hook and move useMemo inside it

* revert name

* wrap getCheckoutFilters in useMemo

* refactor filter function so memozation is done inside components

* unify true instance

* fix rebase

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2021-02-17 14:01:20 +01:00
Albert Juhé Lluveras eac22ca2f7 Remove shadows from text buttons and gradient background from selects in some themes (https://github.com/woocommerce/woocommerce-blocks/pull/3846)
* Reset select background property instead of only background-color

* Set text-shadow to none in text-button mixin
2021-02-17 13:40:52 +01:00
Darren Ethier b79066b5a5 Update 410.md
improve testing notes section about WordPress 5.6
2021-02-17 07:26:48 -05:00
Darren Ethier 0675355cf7 Update 440.md
Fix testing note in wrong section.
2021-02-17 07:24:49 -05:00
Thomas Roberts 89e6708573 Remove line in incorrect version from readme.txt 2021-02-17 12:00:55 +00:00
Bartosz Budzanowski 37a590abed Fix typo.
enqueing -> enqueuing
2021-02-17 12:33:26 +01:00
Thomas Roberts 222499a9ff Update plugin version to 4.6.0-dev 2021-02-17 09:46:15 +00:00
Thomas Roberts 4cbfb85ff9 Merge branch 'release/4.5.1' into trunk 2021-02-17 09:41:45 +00:00
renovate[bot] 37bdb53493 Update babel monorepo to v7.12.16 (https://github.com/woocommerce/woocommerce-blocks/pull/3858)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-02-17 06:18:50 +00:00
renovate[bot] fae1fa0f4b Update Node.js to v12.20.2 (https://github.com/woocommerce/woocommerce-blocks/pull/3857)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-02-17 04:29:07 +00:00
Thomas Roberts 4e409e2fc5 Update changelog for 4.4.2 and 4.5.1 2021-02-16 19:31:01 +00:00
github-actions 82ccf5b159 generating changeset for pull request 2021-02-16 18:09:09 +00:00
github-actions e5441060ec generating changeset for pull request 2021-02-16 18:09:09 +00:00
Thomas Roberts 70262ab890 Bumping version strings to new version. 2021-02-16 18:08:49 +00:00
Thomas Roberts 3f79b42c14 Bumping version strings to new version. 2021-02-16 16:40:15 +00:00
Thomas Roberts 71cbc9cfa0 Update date of release in readme 2021-02-16 16:38:04 +00:00
Thomas Roberts 20a9d9ff22 Fix a typo in the word image 2021-02-16 14:27:11 +00:00
Thomas Roberts 3d1fc239d3 Remove documentation improvement from changelog 2021-02-16 14:02:56 +00:00
Thomas Roberts aaab546b39 Update zip file for testing 2021-02-16 13:47:57 +00:00