Commit Graph

3331 Commits

Author SHA1 Message Date
Alex Florisca 9b3fdbb0b0 Ts blocks (https://github.com/woocommerce/woocommerce-blocks/pull/5668)
* filter-element-label -> ts

* filter-submit-button -> ts

* form -> ts

* load-more-button -> ts

* loading-mask -> ts

* pagination -> ts

* ProductList -> ts (in progress)

* ProductList -> ts continued

* ProductList -> ts - done + fix some ts errors

* ProductList -> ts continued

* ProductList -> ts

* Tidy up

* Extract type for RegisteredBlockComponent

* Feedback from Mike

* Fix unit tests
2022-02-07 09:34:30 +00:00
Tom Cafferkey d533ae42e7 Add a Remove Image option to the Featured Category block (https://github.com/woocommerce/woocommerce-blocks/pull/5719) 2022-02-07 08:35:02 +00:00
Tomasz Tunik 729de5ea05 Revert "fix: accessibility of search products block (https://github.com/woocommerce/woocommerce-blocks/pull/5691)" (https://github.com/woocommerce/woocommerce-blocks/pull/5717)
This reverts commit d4d3f18453.
2022-02-04 11:26:34 +01:00
Daniel Dudzic 0b28bdf0dd Add stories for Button component woocommerce/woocommerce-blocks#5250 (https://github.com/woocommerce/woocommerce-blocks/pull/5706)
* Add stories for Button component woocommerce/woocommerce-blocks#5250

Add stories for Button component
Co-authored-by: gigitux <gigitux@gmail.com>

* Button: Change With Spinner story title to Loading
2022-02-03 13:29:06 +01:00
Tomasz Tunik d4d3f18453 fix: accessibility of search products block (https://github.com/woocommerce/woocommerce-blocks/pull/5691)
When output with php the block had correct accessibility on
the frontend but in the editor or when rendered as block
the correct aria label was missing because of misspelled
aria-label attribute.

Also fixed wrong value type provided for tabIndex in editor
while at it.
2022-02-02 19:56:56 +01:00
Luigi Teschio 86bbf5a037 Attribute Filter block: Enable global style (https://github.com/woocommerce/woocommerce-blocks/pull/5557)
* Product title: add support global style woocommerce/woocommerce-blocks#4965

* add specific type

* add custom save function

* move hooks in a specific folder

* fix crash on WP 5.8

* Featured Category block: Add support for global style woocommerce/woocommerce-blocks#4965

Featured Category block: Add support for global style

* fix border color

* Attribute Filter block: enable global style woocommerce/woocommerce-blocks#4965

Attribute Filter block: enable global style woocommerce/woocommerce-blocks#4965

* fix eslint error

* fix test

* add comments about !important
2022-02-02 18:41:39 +01:00
Tomasz Tunik d68f6d25b8 Fix Twenty Twenty-Two Products by Category block item tile styling issues (https://github.com/woocommerce/woocommerce-blocks/pull/5684)
* fixes products by category added to cart style

fixes woocommerce/woocommerce-blocks#5285 - View cart after adding item to cart was squeezed
in on the same line as the Add to Cart button

* fixes products by category sale price styles

fixes woocommerce/woocommerce-blocks#5286 - sale price was underlined because of the default
styles on the used ins HTML element
2022-02-02 18:21:39 +01:00
renovate[bot] 0554288807 Update dependency @types/react to v16.14.22 (https://github.com/woocommerce/woocommerce-blocks/pull/5696)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-02 15:05:42 +00:00
Mike Jolley 67283c02be Compare assets from builds (https://github.com/woocommerce/woocommerce-blocks/pull/5634)
* Comparison workflow

* Update locks
2022-02-02 14:56:16 +00:00
Mike Jolley 81bb982c5e Include issue submission link in the footer of all documention (.md files) (https://github.com/woocommerce/woocommerce-blocks/pull/5655)
* Add links to single routes in main index woocommerce/woocommerce-blocks#4473

* Footer

* Feedback template

* Remove footer from existing MD files

* Add doc footer script

* Apply script to all docs

* Fix examples
2022-02-02 14:27:46 +00:00
Tomasz Tunik eb54c4bec0 fix: Category List element not visible on all products item edit (https://github.com/woocommerce/woocommerce-blocks/pull/5688)
fixes woocommerce/woocommerce-blocks#5674 - item edit relied on data from @woocommerce/previews
productsPreview which was missing mock data for product category
2022-02-02 12:57:52 +01:00
Alex Florisca 072115ee75 Update version to 7.0.0-dev (https://github.com/woocommerce/woocommerce-blocks/pull/5705) 2022-02-02 11:57:48 +00:00
github-actions[bot] 8ce88ad3c4 Release: 6.9.0 (https://github.com/woocommerce/woocommerce-blocks/pull/5680)
* Empty commit for release pull request

* Empty commit for release pull request

* Update readme.txt

* Update versions

* Update testing notes and changelog

* Empty commit for release pull request

* Empty commit for release pull request

* Update readme.txt

* Update versions

* Update testing notes and changelog

* Empty commit for release pull request

* Empty commit for release pull request

* Update readme.txt

* Update versions

* Update testing notes and changelog

* Empty commit for release pull request

* Empty commit for release pull request

* REadme.txt update

* new zip for testing

* update zip file

* Add `CopyWebpackPlugin` to ensure `block.json` is copied to `build` (https://github.com/woocommerce/woocommerce-blocks/pull/5692)

* Add CopyWebpackPlugin and add block metadata to build

* Check build directory for block.json

* New zip file

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-02-02 11:40:45 +00:00
Luigi Teschio accce8e024 Fix 404 HTTP error for Product Title, Product Summary, and Product Stock indicator blocks woocommerce/woocommerce-blocks#5468 (https://github.com/woocommerce/woocommerce-blocks/pull/5649)
Fix 404 HTTP error for Product Title, Product Summary, and Product Stock indicator blocks
2022-02-02 10:20:17 +01:00
renovate[bot] bc9ae24aaa Update dependency @testing-library/jest-dom to v5.16.1 (https://github.com/woocommerce/woocommerce-blocks/pull/5698)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-02 08:19:03 +00:00
renovate[bot] 61bd3cb4eb Update storybook monorepo to v6.4.17 (https://github.com/woocommerce/woocommerce-blocks/pull/5697)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-02 04:51:46 +00:00
renovate[bot] ba476ac34d Pin dependencies (https://github.com/woocommerce/woocommerce-blocks/pull/5695)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-02 02:17:49 +00:00
Mike Jolley 2b5f115d41 Remove custom `Icon` component in favour of `@wordpress/icons` where possible (https://github.com/woocommerce/woocommerce-blocks/pull/5599)
* Remove atom icon

* Swap icon usage to WordPress package

* remove unused icons from library

* Use @wordpress/primitives

* Product cats block to listView

* On-sale to use percent instead of tag icon

* add to cart button use button icon

* on sale products block icon

* Handpicked products use stack icon

* Products by stock box icon

* Make sparkles woo purple

* Fix icon name

* Correct more tag name

* fix path to icons

* Update snaps

* Update readme to explain updated usage

* Import SVG and path from primitives

* Missing isFeaturePluginBuild

* Update assets/js/icons/README.md

Co-authored-by: Raluca Stan <raluca.stan@automattic.com>

* Update assets/js/icons/README.md

Co-authored-by: Raluca Stan <raluca.stan@automattic.com>

* Update assets/js/icons/README.md

Co-authored-by: Raluca Stan <raluca.stan@automattic.com>

* update lock

Co-authored-by: Raluca Stan <raluca.stan@automattic.com>
2022-02-01 16:54:38 +00:00
Thomas Roberts 5e32fb0576 Add `CopyWebpackPlugin` to ensure `block.json` is copied to `build` (https://github.com/woocommerce/woocommerce-blocks/pull/5692)
* Add CopyWebpackPlugin and add block metadata to build

* Check build directory for block.json
2022-02-01 16:42:15 +00:00
Tung Du 995d41e2a9 Fix: Empty Mini Cart contents overflow issue (https://github.com/woocommerce/woocommerce-blocks/pull/5635)
* fix: add wrapper for empty mini cart contents inner blocks. Allow inner content to be scrollable

* fix overflow issue for the editor

* add padding for the empty cart view
2022-02-01 17:19:41 +01:00
Luigi Teschio 9d1464baf3 Featured Product: Enable global style (https://github.com/woocommerce/woocommerce-blocks/pull/5555)
* Product title: add support global style woocommerce/woocommerce-blocks#4965

* add specific type

* add custom save function

* move hooks in a specific folder

* fix crash on WP 5.8

* Featured Category block: Add support for global style woocommerce/woocommerce-blocks#4965

Featured Category block: Add support for global style

* fix border color

* Featured Product block: enable global style woocommerce/woocommerce-blocks#4965

Featured Product block: enable global style

* fix border color

* fix eslint error

* fix opacity

* fix border radius

* fix opacity

* disable font-size support

* restore height for featured product and featured category
2022-02-01 15:01:31 +01:00
Thomas Roberts 426eb51830 Update Checkout block E2E fixture and increase node version in GH actions (https://github.com/woocommerce/woocommerce-blocks/pull/5678)
* Remove unnecessary setup step and use node v16 in E2E action

* Ensure storefront is active

* Use new checkout fixture

* Try with only checkout test

* Update package.json

* Run all tests, not just checkout
2022-02-01 11:14:16 +00:00
Luigi Teschio 2438fcd434 Disable font-size for the Featured Category block woocommerce/woocommerce-blocks#5681 (https://github.com/woocommerce/woocommerce-blocks/pull/5682)
Disable font-size for the Featured Category block
2022-01-31 18:03:54 +01:00
Manos Psychogyiopoulos 6ed7034223 Add inner wrapper div in 'td.wc-block-cart-item__product' (https://github.com/woocommerce/woocommerce-blocks/pull/5240)
* Add inner wrapper div in td.wc-block-cart-item__product

Adding this wrapper element is necessary in order to be able to "fake" item grouping in a theme-agnostic manner: https://user-images.githubusercontent.com/1783726/118831630-97855600-b8c8-11eb-8906-c7f9ada769e7.png

* Whoops

* Remove classnames function

* Update indentation for QuantitySelector

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2022-01-31 15:18:29 +00:00
Niels Lange 83ae876898 Keep top margin for create account section in editor (https://github.com/woocommerce/woocommerce-blocks/pull/5633) 2022-01-31 22:15:46 +07:00
Tomasz Tunik 54ca9e16b0 Fix ReadMore component maxLines prop reactivity (https://github.com/woocommerce/woocommerce-blocks/pull/5673)
when changing property value of maxLines component would not
update until remounted or reloaded with new settings
2022-01-31 13:56:19 +01:00
Thomas Roberts c7aa3a75b9 Update tests to use `useEvent` (https://github.com/woocommerce/woocommerce-blocks/pull/5573)
* Update payment-method-data-context tests to use userEvent

* Update mini cart block tests to use userEvent

* Update payment methods tests to use userEvent
2022-01-31 10:53:21 +00:00
Thomas Roberts afd9d42805 Add Checkout Order Summary inner block tests (https://github.com/woocommerce/woocommerce-blocks/pull/5675)
* Add fake items fixture

* Add test for rendering items in sidebar

* Add test for items with addons

* Add textContentMatcherAccrossSiblings helper

This is needed to match text when it's spread over a few elements

* Add test to ensure subtotal renders correctly

* Add test to ensure discounts are rendered correctly

* Add test to ensure fees are shown correctly

* Add test to check coupon entry form isn't present when coupons disabled

* Add more mock data to useStoreCart

* Mock useShippingDataContext

* Rename useStoreCartValue to useStoreCartReturnValue

* Remove unnecessary coupon button test

This should be tested within the TotalsCoupon component

* Add tests for shipping presence

* Add test for coupons

* Remove cart items fixtures

These are no longer needed

* Move the findByText utils to the utils folder

* Move inner blocks test to correct directory
2022-01-31 10:53:08 +00:00
Thomas Roberts a46f13c6c5 Move Checkout block attributes into metadata (`block.json`) (https://github.com/woocommerce/woocommerce-blocks/pull/5594)
* Add block title to AbstractBlock class

* Add block title to Checkout block

* Include all block.json files in tsconfig

* Add get_block_title method to Checkout.php

* Remove redundant block_title field

* Add block.json and remove static attributes from attributes.ts

* Register block using attributes from block.json

* Add metadata_path to AbstractBlock

* Add function to AssetsApi to get the metadata path from the plugin root

* Register the block using metadata if it's set in the block's class

* Remove get_block_title method

* Only add supports and attributes to the block when not registering with metadata

* Change get_block_metadata to get_block_metadata_path

* Change indentation to tabs in block.json

* Update comment to clarify why attributes and supports are set later

* Check if path to metadata is not empty instead of set and not empty

* Move checkout block out of cart-checkout directory

* Update get_block_metadata_path function to find block.json automatically

* Remove metadata path from AbstractBlock

* Check if there's a metadata file and register blocks with metadata if so

* Move deprecated attributes out of metadata and into attributes.ts

* Re-add deprecated attributes to checkout index

* Move order notes test

* Move test for checkout phone number in edito

* Fix indentation in checkout/block.json

* Move checkout terms tests

* Try forcing storefront theme in e2e tests

* Revert "Try forcing storefront theme in e2e tests"

This reverts commit 5b0fd47a2c39aadb0141a4ed28cbc0e6baa89625.

* Try capturing screenshot on test failures

* Try uploading error in try catch

* Try uploading artefacts on error

* Test uploading artefacts

* Screenshot just before looking for edit post layout

* Revert "Screenshot just before looking for edit post layout"

This reverts commit 61dff027789ce13a0d84e7b6f11e431637c5a450.

* Revert "Test uploading artefacts"

This reverts commit adf5cc55bcdb677f889bf5a62803b4150d98e665.

* Revert "Try uploading artefacts on error"

This reverts commit 7441a832a113a95fef89cc1b8db6dc79271be516.

* Revert "Try uploading error in try catch"

This reverts commit ca412ce505d56286b164f588a201a451f6bceeb6.

* Revert "Try capturing screenshot on test failures"

This reverts commit 0de6e97df19b116091a7bb3b8652713867d2d80f.

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2022-01-28 16:37:06 +00:00
Mike Jolley d8fb1933ef Fix devtool config broken in woocommerce/woocommerce-blocks#5589 2022-01-28 14:34:36 +00:00
Mike Jolley 1f6f97d860 Implement `@wordpress/scripts` analyze script (https://github.com/woocommerce/woocommerce-blocks/pull/5589)
* Add analyze-bundles command, replacing explore

* Replace source map explorer from webpack in favour of BundleAnalyzerPlugin

* Update deps

* update locks
2022-01-28 11:40:23 +00:00
Tung Du d6e6470937 Fix Mini Cart Edit template link (https://github.com/woocommerce/woocommerce-blocks/pull/5615) 2022-01-27 20:47:35 +07:00
Thomas Roberts b7560ebed5 Add tests for Checkout Terms block (https://github.com/woocommerce/woocommerce-blocks/pull/5621)
* Install @wordpress/block-editor package

* Add test for checkout terms frontend block

* Add tests for checkout terms in editor

* Add tests for Checkout Terms in editor

* Use void 0 as function's return type

* Update tests to use toBeInTheDocument and split checkbox test in two

* Use void 0 for empty function
2022-01-27 12:34:52 +00:00
Tung Du 6f4c00a2fd Fix: Exclude Mini Cart and other blocks inside the Mini Cart Contents block (https://github.com/woocommerce/woocommerce-blocks/pull/5616) 2022-01-27 17:10:53 +07:00
Tom Cafferkey 9934533375 Revert "Allow LegacyTemplate block to be reinserted, only on WooCommerce block templates. (https://github.com/woocommerce/woocommerce-blocks/pull/5545)" (https://github.com/woocommerce/woocommerce-blocks/pull/5643)
This reverts commit cf9c82e02e.
2022-01-27 09:45:00 +00:00
Tung Du 7e67bf62ca Fix: Mini Cart global style is not applied (https://github.com/woocommerce/woocommerce-blocks/pull/5618) 2022-01-27 08:38:49 +07:00
Luigi Teschio 2370ce4378 Featured Category block: add support for global style (https://github.com/woocommerce/woocommerce-blocks/pull/5542)
* Product title: add support global style woocommerce/woocommerce-blocks#4965

* add specific type

* add custom save function

* move hooks in a specific folder

* fix crash on WP 5.8

* Featured Category block: Add support for global style woocommerce/woocommerce-blocks#4965

Featured Category block: Add support for global style

* fix border color

* fix opacity

* fix border radius

* fix order rules css
2022-01-26 18:16:50 +01:00
renovate[bot] 2ab6037812 Update storybook monorepo to v6.4.14 (https://github.com/woocommerce/woocommerce-blocks/pull/5641)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-26 11:49:54 +00:00
Niels Lange 6ae286f670 Remove .gitattributes file (https://github.com/woocommerce/woocommerce-blocks/pull/5242) 2022-01-26 11:46:01 +07:00
renovate[bot] 57aab872fa Update dependency jest-html-reporters to v2.1.7 (https://github.com/woocommerce/woocommerce-blocks/pull/5640)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-26 02:42:57 +00:00
renovate[bot] 5de563b823 Update dependency @types/wordpress__block-editor to v6.0.5 (https://github.com/woocommerce/woocommerce-blocks/pull/5639)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-26 02:32:45 +00:00
renovate[bot] c87a944f77 Update dependency @babel/core to v7.16.12 (https://github.com/woocommerce/woocommerce-blocks/pull/5638)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-26 02:21:51 +00:00
Alex Florisca 4ba300d6d1 Prevent third party blocks from breaking the entire checkout/cart block (https://github.com/woocommerce/woocommerce-blocks/pull/5297)
* Prevent third party blocks from breaking the entire checkout block

* Fixed types and block error boundary around forced blocks

* Move InnerBlocksComponentWrapper and remove extra }

* Allow HTML nodes to be rendered in the component tree, not just eleents
2022-01-25 12:01:19 +00:00
Seghir Nadir 40ba5710a5 Update review automation to use Rubik name 2022-01-24 21:33:23 +01:00
Luigi fe0dfa81b1 update readme and add testing instructions for release 6.7.2 and 6.7.3 2022-01-24 15:08:59 +01:00
Luigi Teschio b0a3e95527 update checklist for the deploy process (https://github.com/woocommerce/woocommerce-blocks/pull/5619) 2022-01-24 14:15:21 +01:00
Luigi Teschio e52549208e Enable Mini Cart template-parts only for experimental builds woocommerce/woocommerce-blocks#5598 (https://github.com/woocommerce/woocommerce-blocks/pull/5606)
Enable Mini Cart template-parts only for experimental builds
2022-01-24 09:41:34 +01:00
Niels Lange 59c8ddc531 Show single express payment button in full width (https://github.com/woocommerce/woocommerce-blocks/pull/5601)
* Show single express payment button in full width

* Change :first-child:nth-last-child(1) to :only-child
2022-01-24 10:22:02 +07:00
Tung Du 718f2dbc6f Mini Cart Contents: Support link and text colors (https://github.com/woocommerce/woocommerce-blocks/pull/5566) 2022-01-22 00:39:04 +07:00
Thomas Roberts aaaf6787a3 Add tests for phone field on checkout (https://github.com/woocommerce/woocommerce-blocks/pull/5604) 2022-01-21 13:24:48 +00:00