Commit Graph

5513 Commits

Author SHA1 Message Date
Alba Rincón 5a9b13295a Fix image to avoid overlapping on mobile devices (https://github.com/woocommerce/woocommerce-blocks/pull/10108) 2023-07-07 08:26:34 +02:00
Albert Juhé Lluveras cc0cf1a905 Load product-query stylesheet when rendering the Products block (https://github.com/woocommerce/woocommerce-blocks/pull/10109)
* Load product-query stylesheet when rendering the Products block

* Simplify code
2023-07-06 17:16:33 +02:00
Daniel Dudzic f6a4b3c143 Product Gallery: Add Large Image inner block (https://github.com/woocommerce/woocommerce-blocks/pull/10045)
* Product Gallery: Add an new block base code

* Product Gallery: Add experimental flag

* Product Gallery: Add Large Image block code

* Product Gallery Large Image: Remove unsed types

* Product Gallery: Move the block from registerBlockType to registerBlockSingleProductTemplate

* Product Gallery: Update icon

* Product Gallery: Add missing icon import

* Product Gallery Large Image: Add experimental mode check

* Product Gallery Large Image: Deregister unnecessary block settings

* Product Gallery Large Image: Add experimental flag to the Product Gallery Large Image and remove the icon override

* Product Gallery Large Image: Add zoom and correct styling

* Product Gallery Large Image: Remove commented out unnecessary code

* Product Gallery Large Image: Re-add the removed action after capturing the large image html

* Product Gallery Large Image: Update Large Image icon and description. Move metadata to the block.json file.
2023-07-06 15:08:39 +00:00
Albert Juhé Lluveras ad973e9b46 Fix Filter blocks e2e tests (https://github.com/woocommerce/woocommerce-blocks/pull/10116)
* Revert "fix save method"

This reverts commit f6623c55320bf55ee7fa3c23eb294f06d79ee4a5.

* Revert "Revert "fix save method""

This reverts commit 739db2e3b0b62e10fbe1ebabd1ec6bbae8425b3c.

* Update Filter by Attribute and Filter by Stock e2e test fixtures

* Update Filter by Attribute 'can hide product count' test
2023-07-06 16:39:19 +02:00
Alba Rincón 3ccfec1eee Fix `Product Rating` styles & alignment (https://github.com/woocommerce/woocommerce-blocks/pull/10097)
* Fix alignment not working on the editor

* Fix style regression on rating
2023-07-06 09:25:29 +02:00
Roy Ho 5c72cfdb4d Update/fixtures html (https://github.com/woocommerce/woocommerce-blocks/pull/10080)
* Remove data attributes from fixture for active filters

* Remove data attributes from fixture for filter by price

* Remove data attributes from fixture for filter by attribute

* Remove data attributes from fixture for filter by stock
2023-07-05 06:16:36 -07:00
Mike Jolley 599274e3d6 Fix cart and checkout conditionals when using a block based theme and templates (https://github.com/woocommerce/woocommerce-blocks/pull/10098)
* Update conditionals to deal with templates instead of cart/checkout page objects

* Include notice style in main entrypoint
2023-07-05 04:02:27 -07:00
Karol Manijak 283dfc652f Add feedback form to the Product Collection block (https://github.com/woocommerce/woocommerce-blocks/pull/10079)
* Add feedback form to the Product Collection block

* Change the airtable link to the new one related to Product Collection
2023-07-05 10:34:25 +02:00
Alba Rincón b82c0de69d Fix image over content (https://github.com/woocommerce/woocommerce-blocks/pull/10092) 2023-07-05 10:30:20 +02:00
Luigi Teschio 78d320bc47 Products block: Improve stability E2E tests (https://github.com/woocommerce/woocommerce-blocks/pull/10075) 2023-07-05 07:45:38 +00:00
Luigi Teschio 7ca65db5b0 Fix filter count display toggle (https://github.com/woocommerce/woocommerce-blocks/pull/10096)
* fix save method

* improve check

* Only display counts if showCounts is true

---------

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
2023-07-05 08:51:02 +02:00
Tarun Vijwani 6b8e4c38e0 Fix notice banner links for Legacy notices (https://github.com/woocommerce/woocommerce-blocks/pull/9996) 2023-07-04 04:16:26 -07:00
Albert Juhé Lluveras df3ff6793e Per block stylesheets (https://github.com/woocommerce/woocommerce-blocks/pull/9831)
* Clean up blank lines

* Update Webpack config

* Update PHP logic to load block styles

* Style fixes

* Style fixes (II)

* Style fixes (III)

* Style fixes (IV)

* Fix missing stylesheets in the Site Editor

* Fix wrong return values in some PHP method docs

* Fix missing ProductPrice stylesheet causing 404 in tests

* Fix missing ProductGallery stylesheet causing 404 in tests
2023-07-04 13:06:48 +02:00
Paulo Arromba 50aee9846b Render Checkout on Pay for Order for FSE themes with checkout flow templates (https://github.com/woocommerce/woocommerce-blocks/pull/10076)
* Render Checkout on Pay for Order for FSE themes with checkout flow templates.
Few typos corrected

* Render Checkout on Pay for Order for FSE themes with checkout flow templates.
Few typos corrected

* Backup and restore notices so they display on the pay page still

* Cache and restore notices during hydration to avoid breaking real notices on pages/shortcodes

---------

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2023-07-04 11:34:24 +01:00
Alba Rincón 25a5737ec7 Fix image not rendering on the editor and empty styles (https://github.com/woocommerce/woocommerce-blocks/pull/10089) 2023-07-04 11:02:35 +02:00
Mike Jolley d6037a2efb Check for gutenberg_render_block_core_template_part (https://github.com/woocommerce/woocommerce-blocks/pull/10078) 2023-07-03 15:43:24 +01:00
Daniel Dudzic 3700c1c42d Product Gallery: Add an new block base code (https://github.com/woocommerce/woocommerce-blocks/pull/9937)
* Product Gallery: Add an new block base code

* Product Gallery: Add experimental flag

* Product Gallery: Move the block from registerBlockType to registerBlockSingleProductTemplate

* Product Gallery: Update icon
2023-07-03 14:21:31 +00:00
Roy Ho 48f7a9fdda Remove attributes data from save function for active filters (https://github.com/woocommerce/woocommerce-blocks/pull/10047) 2023-07-03 06:52:31 -07:00
Roy Ho f8cf9fe97a Remove attributes data from save function for filter by price (https://github.com/woocommerce/woocommerce-blocks/pull/10039) 2023-07-03 05:39:45 -07:00
Luigi Teschio aa48386834 Mark order confirmation template E2E test as flaky (https://github.com/woocommerce/woocommerce-blocks/pull/10041) 2023-07-03 12:26:47 +00:00
Niels Lange 0b01b8c60d Remove the word ‘beta’ from the compatibility notice (https://github.com/woocommerce/woocommerce-blocks/pull/10019)
* Remove the word ‘beta’ from the compatibility notice

* Optimise wording
2023-07-03 12:56:12 +02:00
Daniel Dudzic 8cacfce738 Rating: Fix TS error (https://github.com/woocommerce/woocommerce-blocks/pull/10001) 2023-07-03 10:50:06 +00:00
Alba Rincón b1bc51e3f0 Add new `Product Rating Stars` block (https://github.com/woocommerce/woocommerce-blocks/pull/10005)
* Add new `Product Rating Stars` block

* Make block experimental

* Fix dep
2023-07-03 11:48:50 +02:00
Alba Rincón fd86fd2e57 Add size settings to the `Product Image` block (https://github.com/woocommerce/woocommerce-blocks/pull/10034)
* Add height & width setting to the image sidebar settings

* Extract settings and add scale options

* Add width settings

* Apply settings on the frontend

* Style placeholder image

* Replace post featured image with product image

* Allow the width to be wider than container

* Fix image on top of other elements
2023-07-03 11:33:44 +02:00
Mike Jolley a6b8e0e542 Hide "collection from" text when a location has an incomplete address. (https://github.com/woocommerce/woocommerce-blocks/pull/9808)
* Hide "collection from" text when a location has an incomplete address.

* Fix display on confirmation page

* has_valid_pickup_location helper

* Missing isset

* Update test

* Fix pickup text assertion

---------

Co-authored-by: Niels Lange <info@nielslange.de>
2023-07-03 10:10:18 +01:00
Hritik Chaudhary c1f2949a5d Converted product-tag and removed its proptypes (https://github.com/woocommerce/woocommerce-blocks/pull/9758)
* Converted product-tag and removed its proptypes

* addressed review comments

---------

Co-authored-by: Niels Lange <info@nielslange.de>
2023-07-03 10:54:46 +02:00
Albert Juhé Lluveras 74e39331fb Cleanup code to lazy-load wc-settings in the Mini-Cart block (https://github.com/woocommerce/woocommerce-blocks/pull/10042) 2023-07-03 09:26:31 +02:00
Albert Juhé Lluveras b5080e379d Prevent prefetched Cart payload causing wrong values with cached Mini-Cart block (https://github.com/woocommerce/woocommerce-blocks/pull/10029)
* Prevent prefetched Cart payload causing wrong values with cached Mini-Cart block

* Pass Cart Totals object entirely

* Code cleanup

* Fixes and code cleanup

* Update Mini-Cart local storage when adding or removing products from cart
2023-06-30 16:05:27 +02:00
Luigi c5f3728060 Merge branch 'release/10.4.0' of https://github.com/woocommerce/woocommerce-blocks into trunk 2023-06-30 14:56:28 +02:00
github-actions[bot] 80fabe4991 Release: 10.4.5 (https://github.com/woocommerce/woocommerce-blocks/pull/10038)
* Product Rating block > Ensure the customer reviews text is linked to the relevant reviews (https://github.com/woocommerce/woocommerce-blocks/pull/9998)

* Fix reviews count not showing on Single Product page

* Fix css style

* Product Rating block: Ensure the Customer reviews text is linked to the relevant reviews when used within the Single Product Template. When used within the Single Product Block, the link directs the user to the product template. Additionally, clear out\ PHPCS warnings.

* remove unnecessary call to wc_get_star_rating_html

---------

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>

* Product Rating block: Fix reviews count not showing on Single Product page (https://github.com/woocommerce/woocommerce-blocks/pull/9995)

* Fix reviews count not showing on Single Product page

* Fix css style

* Single Product: Fix Product SKU not loading for different variations (https://github.com/woocommerce/woocommerce-blocks/pull/9990)

* Single Product: Fix incorrect add to cart form markup (https://github.com/woocommerce/woocommerce-blocks/pull/9986)

* Product Image Gallery block: Fix overflow when multiple images are used (https://github.com/woocommerce/woocommerce-blocks/pull/10013)

* Fix Product Image Gallery block overflow when multiple images are used

* Increase css specificity for the Product Image Gallery images

* Fix whitespace

* Fix style issue when using smaller images in the product image gallery

* Empty commit for release pull request

* update version

* add testing instructions

* update zip link

* Product Rating: append #reviews on the Single Product Block (https://github.com/woocommerce/woocommerce-blocks/pull/10040)

* Product Rating: append #reviews on the Single Product Block

* refactor after feedback

* fix version

* update zip link

* Single Product Block: avoid to register incompatibility blocks with the Single Product Block on the post/page editor (https://github.com/woocommerce/woocommerce-blocks/pull/10044)

* update testing instructions

* update zip link

---------

Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
2023-06-30 14:53:38 +02:00
Luigi Teschio cf8b73d79f Single Product Block: avoid to register incompatibility blocks with the Single Product Block on the post/page editor (https://github.com/woocommerce/woocommerce-blocks/pull/10044) 2023-06-30 14:06:12 +02:00
Luigi Teschio 6a35063dd1 Product Rating: append #reviews on the Single Product Block (https://github.com/woocommerce/woocommerce-blocks/pull/10040)
* Product Rating: append #reviews on the Single Product Block

* refactor after feedback
2023-06-30 11:31:14 +02:00
Luigi Teschio a06dd1d7c9 Add FrontendUtils class (https://github.com/woocommerce/woocommerce-blocks/pull/10033)
* Add FrontendUtils class

* fix conflicts

* use locator

* restore click usage

* fix util
2023-06-30 09:08:14 +02:00
Alexandre Lara 388605027b Product Image Gallery block: Fix overflow when multiple images are used (https://github.com/woocommerce/woocommerce-blocks/pull/10013)
* Fix Product Image Gallery block overflow when multiple images are used

* Increase css specificity for the Product Image Gallery images

* Fix whitespace

* Fix style issue when using smaller images in the product image gallery
2023-06-29 20:24:33 +02:00
Paulo Arromba f1df8fb975 Add Cart/Checkout/Order-Received Templates (https://github.com/woocommerce/woocommerce-blocks/pull/9301)
* WIP: dirty attempt to dry run Cart & Checkout templates

* Added Cart and Checkout to the template hierarchies

* Merge branch 'trunk' into poc/cart_and_checkout_fse_templates

* Updated cart & Checkout templates

* Order Received FSE template (https://github.com/woocommerce/woocommerce-blocks/pull/8937)

* Order Received template bootstrap

* typo

* WIP: new block

* add logic here

* Order received classic template

* reverted constants.ts

* Added the post title (buggy)

* Corrected page title

* Updated constants.ts

* Fixed template typo

* removed placeholder for order received block

* add order-received template description

* updated placeholder description

* Formatting fixes

* Template description.

* replaced hardcoded string with OrderReceivedTemplate::SLUG

---------

Co-authored-by: Luigi <gigitux@gmail.com>

* Code formatting (https://github.com/woocommerce/woocommerce-blocks/pull/8350)

* Code formatting

* page_template_hierarchy priority to 1 (https://github.com/woocommerce/woocommerce-blocks/pull/9323)

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>

* Migrate Cart and Checkout Pages to the Template Editor when using a FSE theme (https://github.com/woocommerce/woocommerce-blocks/pull/9339)

* Introduce woocommerce_blocks_template_content hook

* Migrate cart and checkout page content to the template editor

* Add redirection from edit page to edit template

---------

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>

* Removed header and footer from checkout template. (https://github.com/woocommerce/woocommerce-blocks/pull/9378)

* Removed header and footer from checkout template.

* Removed header and footer from checkout template migration

* Permalink solution for the checkout endpoint/template (https://github.com/woocommerce/woocommerce-blocks/pull/9406)

* Checkout endpoint work

* Move setting field to util

* Include link to edit the template

* Remove todo

* Refactor checkout templates to share logic (https://github.com/woocommerce/woocommerce-blocks/pull/9411)

* Sync endpoints with pages (https://github.com/woocommerce/woocommerce-blocks/pull/9426)

* Switch to page syncing

* Update settings descriptions

---------

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>

* Migrate pages to templates once (https://github.com/woocommerce/woocommerce-blocks/pull/9488)

* Migrate content on init, once

* Skip migration if page does not exist

* Put back HTML for header and footer parts

* Fix page redirect due to wrong ID

* fix loading template part

* Removed unnecessary var

* update cart and checkout html templates

---------

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>

* Include a notice to redirect user to template editor (https://github.com/woocommerce/woocommerce-blocks/pull/9508)

* Template Placeholder Design for the Order Received Template (https://github.com/woocommerce/woocommerce-blocks/pull/9602)

* Load frontend styles in editor iframe

* Update placeholder to include skeleton and updated icons

* Update classic template configs

* 1px border for .wp-block-woocommerce-classic-template__placeholder-copy

* Show copy on focus

* Sample data

---------

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>

* Add simplified header on checkout template (https://github.com/woocommerce/woocommerce-blocks/pull/9607)

* Added simplified header on checkout template

* Moved simplified header to template part

* updated constants.ts

* added template part to checkout.html

* Add missing translation

* frontpage_template_hierarchy no longer needed

* Allow plugin based template parts (https://github.com/woocommerce/woocommerce-blocks/pull/9667)

* Merge branch 'trunk' into add/9288_cart-checkout-order-received_fse_templates

* Synced templates on blockified folder

* Add blockified order-received.html

* removed WooCommerce prefix

* Refactor/rebrand order received template to order confirmation (https://github.com/woocommerce/woocommerce-blocks/pull/9734)

* rebrand order received to order confirmation

* updated descriptions for templates

* updated descriptions for order confirmation placeholder

* Resolve merge conflict

* Resolve merge conflicts

* Resolve more merge conflicts after rebase

* Fix formatting

* Use patterns for localisation (https://github.com/woocommerce/woocommerce-blocks/pull/9883)

* e2e tests for cart and checkout templates (https://github.com/woocommerce/woocommerce-blocks/pull/9939)

* Merge branch 'trunk' into poc/cart_and_checkout_fse_templates

* Merge branch 'trunk' into add/9288_cart-checkout-order-received_fse_templates

* Resolve merge conflicts

* Add e2e for permalink settings

* Test that templates exist

* Add test to check that templates can be edited

* Add tests to confirm templates can be edited

* Ensure cart has contents before running tests on frontend views

* Commend out problem test

* Make sure search has multiple results

* Remove useThrottle - bad rebase

* Revert changes to docs after rebase

* Revert function call for noReviewsPlaceholder

* Bad rebase

* Reverts

* Remove revertTemplate

* Spacing

* Wait for networkidle after navigation

* Always wait for network

* Use button roles in site editor

* More specific button locator

* Update option comparison

* Fix template content

* Disable failing tests

* Disable failing classic template tests

* Use enterEditMode

* More enterEditMode usage

* enterEditMode

* Use test.skip

* More robust selectors

* Alt iframe selector

---------

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>

* Skip flakey test

---------

Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2023-06-29 14:41:22 +01:00
Roy Ho 6d36b2547b Make filter by rating preview consistent with default settings (https://github.com/woocommerce/woocommerce-blocks/pull/10007)
* Make filter by rating preview consistent with default settings

* Remove unneeded classnames
2023-06-29 06:15:52 -07:00
Albert Juhé Lluveras 559f712e35 Avoid usage of __experimentalUseFocusOutside (https://github.com/woocommerce/woocommerce-blocks/pull/10017)
* Avoid usage of __experimentalUseFocusOutside

* Remove unnecessary fix in QuantitySelector

* Add explanatory comment
2023-06-28 14:43:03 +02:00
Alba Rincón 6de8172053 Use the single product block on the Hero Product pattern (https://github.com/woocommerce/woocommerce-blocks/pull/9935)
* Use the single product block on the Hero Product pattern

* Use the add to cart button block

* Use featured image and fix alignment
2023-06-28 14:34:51 +02:00
Thomas Roberts d76fa0a6cc Prevent saved payment methods showing if their main method `canPay` function returns `false` (https://github.com/woocommerce/woocommerce-blocks/pull/9917)
* Change type of payment requirements to string[]

* Add CanMakePaymentArgumentCart type and update CanMakePaymentArgument

* Add getCanMakePaymentArg function to get the arg, allows reusability

* Check saved methods gateway's to see if they can make payment

* Make canMakePaymentArg a dependency of the useMemo

* Remove await from sync function call

* Update variable names to better reflect what they store

* Add tests to ensure saved payment methods don't show if canPay is false

* Rename save-payment-method-options to tsx

* Update saved payment method options to TS

* Fix TS error in saved-payment-method-options test
2023-06-28 01:43:38 -07:00
Daniel Dudzic 254c7e8086 Product Rating: Remove empty markup if no ratings are present (https://github.com/woocommerce/woocommerce-blocks/pull/9822)
* Product Rating: Remove empty markup if no real or mocked ratings are present

* Fix TS errors

* Remove unrelated TS fixes
2023-06-27 19:14:47 +00:00
Daniel Dudzic a2d09319a7 Single Product: Fix Product SKU not loading for different variations (https://github.com/woocommerce/woocommerce-blocks/pull/9990) 2023-06-27 20:29:54 +02:00
Luigi Teschio 0441e10623 Single Product Template: fix compatibility layer logic when the blocks aren't wrapped in a group block (https://github.com/woocommerce/woocommerce-blocks/pull/9982) 2023-06-27 18:16:18 +02:00
Patricia Hillebrandt ff04f46ed0 Remove opinionated style for the price list in grouped products from the Add to Cart with Options block. (https://github.com/woocommerce/woocommerce-blocks/pull/9988) 2023-06-27 16:34:06 +02:00
Patricia Hillebrandt 8510615169 Product Rating block > Ensure the customer reviews text is linked to the relevant reviews (https://github.com/woocommerce/woocommerce-blocks/pull/9998)
* Fix reviews count not showing on Single Product page

* Fix css style

* Product Rating block: Ensure the Customer reviews text is linked to the relevant reviews when used within the Single Product Template. When used within the Single Product Block, the link directs the user to the product template. Additionally, clear out\ PHPCS warnings.

* remove unnecessary call to wc_get_star_rating_html

---------

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
2023-06-27 14:50:58 +02:00
Daniel Dudzic 35f73b4130 Single Product: Fix incorrect add to cart form markup (https://github.com/woocommerce/woocommerce-blocks/pull/9986) 2023-06-27 12:20:56 +00:00
Alexandre Lara 00725124b8 Product Rating block: Fix reviews count not showing on Single Product page (https://github.com/woocommerce/woocommerce-blocks/pull/9995)
* Fix reviews count not showing on Single Product page

* Fix css style
2023-06-27 07:50:48 -03:00
Siddharth Thevaril 09439560b2 move to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/9801)
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2023-06-27 12:48:26 +02:00
Tung Du f364aa41fb Product Image: use WC Core function to render image (https://github.com/woocommerce/woocommerce-blocks/pull/9984) 2023-06-27 17:31:19 +07:00
David Arenas 5a3f6e2e2e Update the Interactivity API files to include latest changes (https://github.com/woocommerce/woocommerce-blocks/pull/9924)
* Update Interactivity API JS files

* Disable TS checks in the Interactivity API for now

* Add new SSR files

* Replace wp_ prefixes with wc_ ones

* Replace wp- prefix with wc-

* Replace guternberg_ prefix with woocommerce_

* Remove file comments from Gutenberg

* Rename files with `wp` prefix

* Fix code to load Interactivity API php files

* Remove TODO comments

* Replace @wordpress with @woocommerce

* Update Webpack configuration

* Fix directive prefix

* Remove interactivity folder from tsconfig exclude

* Add client-side navigation meta tag code

* Remove unneeded blocks.php file

* Fix store tag id

* Register Interactivity API runtime script

* Fix Interactivity API runtime registering

* Remove all files related to directive processing in PHP

* Move json_encode to Store's render method
2023-06-27 12:22:12 +02:00
Luigi Teschio 1a77ce0da4 Fix Products block tests (https://github.com/woocommerce/woocommerce-blocks/pull/9951)
* fix Products block test

* test now

* fix test

* improve E2E test

* restore pw configuration

* change order

* remove timeout

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2023-06-27 12:01:38 +02:00
Alexandre Lara 96e9b14cf6 Update the release testing notes for release 10.2.4 2023-06-26 17:32:45 -03:00
Alba Rincón f8a13d6afb Add new `Product collection banner` pattern (https://github.com/woocommerce/woocommerce-blocks/pull/9953)
* Add new `Product collection banner` pattern

* Hard code black color

* Add new image

* Update pattern image
2023-06-26 15:01:19 +02:00
Luigi Teschio 5ee166c983 Single Product Block: update testing instructions about notice (https://github.com/woocommerce/woocommerce-blocks/pull/9955) 2023-06-26 09:17:54 +02:00
github-actions[bot] ee8cfdc304 Release: 10.4.4 (https://github.com/woocommerce/woocommerce-blocks/pull/9973)
* Empty commit for release pull request

* Add back filter blocks frontend scripts (https://github.com/woocommerce/woocommerce-blocks/pull/9954)

* Update changelog and bump version to 10.4.4

* Add testing notes for 10.4.4 release

* Update testing notes for release 10.4.4

* Replace Automated tests badge with Unit and E2E tests badge

* Wait for cart to be removed when emptied (https://github.com/woocommerce/woocommerce-blocks/pull/9829)

* Temporarily skip PHP Unit Tests for PHP 8.1 and 8.2 (https://github.com/woocommerce/woocommerce-blocks/pull/9859)

* Allow failure of the PHP Unit Tests

* Limit the PHP versions to 7.4 and 8.0 to run unit tests

* Don't allow failing fast

* Add a comment explaining the skipped part

* Cancel jobs later

* Cancel all the steps in workflow based on the same condition

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Karol Manijak <karol.manijak@automattic.com>
2023-06-23 15:30:05 -03:00
Alexandre Lara 273a6b4fa6 Update changelog and testing notes for 10.4.4 release 2023-06-23 12:24:59 -03:00
Alba Rincón 38cbf3af74 Add new `Small discount banner with image` pattern (https://github.com/woocommerce/woocommerce-blocks/pull/9947)
* Add new `Small discount banner with image` pattern

* Rename and improve mobile view
2023-06-23 15:22:52 +02:00
Patricia Hillebrandt c70c13c9a8 Single Product Block > Ensure the Product Summary and Title are always rendered with the correct context independent of their position (https://github.com/woocommerce/woocommerce-blocks/pull/9968)
* Ensure the Product Summary and Product Title blocks are always rendered independent of their position in the editor.

* Update docblock with note informing where the global post variable is restored for the post title and excerpt blocks.
2023-06-23 12:27:29 +02:00
Alba Rincón 9368060d79 Add new `Discount banner with image` pattern (https://github.com/woocommerce/woocommerce-blocks/pull/9957)
* Add new `Discount banner with image` pattern

* Improve mobile view

* Increase size
2023-06-23 11:33:41 +02:00
Alba Rincón c0ddfa68d8 Update rating filter test to match the new logic (https://github.com/woocommerce/woocommerce-blocks/pull/9974) 2023-06-23 11:18:47 +02:00
Luigi Teschio b31d6cf23c Update testing instruction for woocommerce/woocommerce-blocks#9573 (https://github.com/woocommerce/woocommerce-blocks/pull/9965)
* Adjust docblock

* update testing instructions for 9573 PR

---------

Co-authored-by: Niels Lange <info@nielslange.de>
2023-06-23 09:15:15 +02:00
Hsing-yu Flowers 4e9ddb5206 Add order number to checkout schema (https://github.com/woocommerce/woocommerce-blocks/pull/9927)
* Add order number to checkout schema

* Update description
2023-06-22 13:06:12 -07:00
Alexandre Lara e5c8002d55 Add changelog and testing notes for 10.2.4 release 2023-06-22 15:17:03 -03:00
Alexandre Lara ea147019ad Fix testing steps version number 2023-06-22 15:17:03 -03:00
Albert Juhé Lluveras 9283b6c48b Add back filter blocks frontend scripts (https://github.com/woocommerce/woocommerce-blocks/pull/9954) 2023-06-22 16:09:37 +02:00
Roy Ho aff69cda89 Add/attributes filter count display toggle (https://github.com/woocommerce/woocommerce-blocks/pull/9833)
* Default show product counts to false for filter by attributes block

* Default show product counts to false for filter by stock block

* Default show product counts to false for filter by rating block

* Refactor deprecation

* Refactor deprecation

* Refactor deprecation
2023-06-22 06:38:28 -07:00
Roy Ho a81a8b830d Allow customer account block to center align (https://github.com/woocommerce/woocommerce-blocks/pull/9750)
* Allow customer account block to center align

* Convert to using Flexbox

* Use mixins to DRY

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2023-06-22 05:41:06 -07:00
Alba Rincón ce253c24ec Add new `Discount banner` pattern (https://github.com/woocommerce/woocommerce-blocks/pull/9936)
* Add new `Discount banner` pattern

* Add shop link

* Fix copy

* Fix colors
2023-06-22 12:32:53 +02:00
Manish Menaria 697a6d0e49 Product Collection: Make it compatible with filter blocks (https://github.com/woocommerce/woocommerce-blocks/pull/9928)
* Add support for filter blocks

This commit updates the `ProductCollection` block implementation to add support for filter blocks, including the Price filter, Attributes filter, Rating filter, and In stock filter.

The changes include:

1. Adding a new property `$attributes_filter_query_args` to store the query arguments related to the filter by attributes block.

2. Adding a new method `add_support_for_filter_blocks()` to enable support for filter blocks. This method sets the necessary asset data to enable filtering and refreshes the page when a filter is applied.

3. Adding new methods to handle specific filter queries, including `get_filter_by_price_query()`, `get_filter_by_attributes_query()`, `get_filter_by_stock_status_query()`, and `get_filter_by_rating_query()`. These methods generate the respective queries based on the applied filters.

4. Refactoring the `get_final_query_args()` method to include the newly added filter queries using the `get_queries_by_applied_filters()` method.

These changes enhance the functionality of the `ProductCollection` block by allowing users to filter products based on price, attributes, rating, and stock status.

* Go to first page when filters are updated

* Enhance ProductCollection block to support filter blocks

This commit enhances the ProductCollection block to support various filter blocks such as Price filter block, Attributes filter block, Rating filter block, and In stock filter block.

The `build_query` method has been refactored into two separate methods: `build_frontend_query` and `get_final_frontend_query` to make the code more modular and readable. The `add_support_for_filter_blocks` method has been modified to support the generation of product IDs for filter blocks.

The method `update_rest_query` has been renamed to `update_rest_query_in_editor` for better clarity and understanding of its function. Similarly, `get_final_query_args` has been refactored to include the `$is_exclude_applied_filters` parameter which helps in generating product IDs for the filter blocks.

Moreover, the filter hook `pre_render_block` has been added to support the filtering of blocks before they are rendered.

This update will enhance the user experience by providing more filtering options in the ProductCollection block.

* Remove changes related to redirect to 1st page
2023-06-22 15:27:27 +05:30
Alba Rincón db45e85bc3 Shop by Price pattern: add price filters to buttons (https://github.com/woocommerce/woocommerce-blocks/pull/9915)
* Add price filters to buttons

* Add links to the titles

* Update title for the first blog
2023-06-22 08:04:54 +02:00
Hritik Chaudhary 73c7312969 removed proptypes from feedback-promt (https://github.com/woocommerce/woocommerce-blocks/pull/9838) 2023-06-21 18:02:19 +02:00
Karol Manijak ad0509f767 Adjust the Dependabot GitHub username (https://github.com/woocommerce/woocommerce-blocks/pull/9931) 2023-06-21 16:53:00 +02:00
Daniel W. Robert 9ec3779439 Remove caret range specifier from fast-xml-parser. (https://github.com/woocommerce/woocommerce-blocks/pull/9894) 2023-06-21 09:18:10 -04:00
Luigi a53e623f73 bump version 2023-06-21 14:36:02 +02:00
Luigi ee3eabe5d0 Merge branch 'release/10.5.0' of https://github.com/woocommerce/woocommerce-blocks into trunk 2023-06-21 14:34:39 +02:00
DAnn2012 2de1129e9d Removed the second keyword (which previously denoted the text domain) from two blocks (https://github.com/woocommerce/woocommerce-blocks/pull/9816)
* Update block.json

* Update block.json
2023-06-21 14:30:57 +02:00
Luigi Teschio 0cd274d1cf Update docs/internal-developers/testing/releases/1050.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2023-06-21 14:27:54 +02:00
Luigi Teschio 31a2fd77dd CI: Ensure that the CI returns an error if PHP code doesn't respect phpcs configuration (https://github.com/woocommerce/woocommerce-blocks/pull/9920) 2023-06-21 12:51:30 +02:00
Brian 249dcb74f2 Consistent Pattern Titles (https://github.com/woocommerce/woocommerce-blocks/pull/9814)
* Update featured-category-cover-image.php

* Update featured-category-focus.php

* Update featured-category-triple.php

* Update featured-products-5-cols.php

* Update filters.php

* Update footer-large-dark.php

* Update footer-large.php

* Update footer-simple-dark.php

* Update footer-simple.php

* Update footer-simple-menu-and-cart.php

* Update footer-with-2-menus-dark.php

* Update footer-with-2-menus.php

* Update footer-with-3-menus.php

* Update header-centered-search-pattern.php

* Update header-essential-dark.php

* Update header-essential.php

* Update header-large-dark.php

* Update header-large.php

* Update header-minimal.php

* Update hero-product-3-split.php

* Update hero-product-chessboard.php

* Update hero-product-split.php

* Update just-arrived-full-hero.php

* Update no-products-found.php

* Update product-collections-featured-collection.php

* Update product-collections-featured-collections.php

* Update product-collections-newest-arrivals.php

* Update product-details-listing.php

* Update product-details-pattern.php

* Update product-featured-2-columns.php

* Update product-hero-2-col-2-row.php

* Update product-hero.php

* Update product-listing-with-gallery-and-description.php

* Update product-query-1-1-image-4-column-products-row.php

* Update product-query-3-column-product-row.php

* Update product-query-4-column-product-row.php

* Update product-query-large-image-product-gallery.php

* Update product-query-minimal-5-column-products-row.php

* Update product-query-minimal-product-list.php

* Update product-query-product-gallery.php

* Update product-query-product-list-with-1-1-images.php

* Update product-query-product-list-with-full-product-description.php

* Update product-search-form.php

* Update shop-by-price.php

* Update store-info-alt-image-and-text.php

* Update testimonials-3-columns.php

* Update testimonials-single.php

* Create readme.md

* Update featured-category-cover-image.php

* Update featured-category-focus.php

* Update featured-category-triple.php

* Update featured-products-5-cols.php

* Update filters.php

* Update footer-large-dark.php

* Update footer-large.php

* Update testimonials-single.php

* Update testimonials-3-columns.php

* Update store-info-alt-image-and-text.php

* Update shop-by-price.php

* Update readme.md

* Update product-search-form.php

* Update product-query-product-list-with-full-product-description.php

* Update product-query-product-list-with-1-1-images.php

* Update product-query-product-gallery.php

* Update product-query-minimal-product-list.php

* Update footer-simple-dark.php

* Update footer-simple-menu-and-cart.php

* Update footer-simple.php

* Update footer-with-2-menus-dark.php

* Update footer-with-2-menus.php

* Update footer-with-3-menus.php

* Update product-query-minimal-5-column-products-row.php

* Update product-query-large-image-product-gallery.php

* Update product-query-4-column-product-row.php

* Update product-query-3-column-product-row.php

* Update product-query-1-1-image-4-column-products-row.php

* Update product-listing-with-gallery-and-description.php

* Update product-hero.php

* Update product-hero-2-col-2-row.php

* Update product-featured-2-columns.php

* Update product-details-pattern.php

* Update product-details-listing.php

* Update product-collections-newest-arrivals.php

* Update product-collections-featured-collections.php

* Update product-collections-featured-collection.php

* Update no-products-found.php

* Update just-arrived-full-hero.php

* Update hero-product-split.php

* Update hero-product-chessboard.php

* Update hero-product-3-split.php

* Update header-minimal.php

* Update header-large.php

* Update header-large-dark.php

* Update header-essential.php

* Update header-essential-dark.php

* Update header-centered-search-pattern.php

* Update readme.md

* Update and rename readme.md to README.md

* Update patterns/README.md

Co-authored-by: Karol Manijak <karol.manijak@automattic.com>

---------

Co-authored-by: Karol Manijak <karol.manijak@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
2023-06-21 09:50:12 +02:00
Luigi 2731b73954 Merge branch 'release/10.4.0' of https://github.com/woocommerce/woocommerce-blocks into trunk 2023-06-21 08:45:38 +02:00
github-actions[bot] 28535000db Release: 10.4.3 (https://github.com/woocommerce/woocommerce-blocks/pull/9919)
* Empty commit for release pull request

* Update Hero Product 3-split pattern image

* Update Banner Pattern To Replace Unsplash Image (https://github.com/woocommerce/woocommerce-blocks/pull/9760)

* Update Banner to replace Unsplash image.

Replaces the Unsplash image with a CCO licensed image from Pxhere. Also
updates the CTA button to link to the Shop page, by default.

* Remove extra padding from top of test column.

Vertical alignment was off on the text column due to 60px of top
padding. This aligns everythign, as expected.

* Update Chessboard pattern images (https://github.com/woocommerce/woocommerce-blocks/pull/9761)

* Updathe the Hero Product Split (https://github.com/woocommerce/woocommerce-blocks/pull/9762)

* Remove unused pattern image (https://github.com/woocommerce/woocommerce-blocks/pull/9763)

* Update Images for the Product Details Patterns (https://github.com/woocommerce/woocommerce-blocks/pull/9764)

* Update image for the Product Hero pattern.

Replace the Unsplash image with a CCO licensed image from Pxhere.

* Update images for Prod List Gallery Desc pattern

Replace the Unsplash image with a CCO licensed image from Pxhere for the
Product Listing with Gallery and Description pattern.

* Remove unneeded Unsplash images.

* Update copy for Prod Listing Gallery Desc pattern.

* Optimize new image exports.

* Update image for the Product Listing pattern.

Replace the Unsplash image with a CCO licensed image from Pxhere.

* Update images for Product Details pattern.

Replace the Unsplash images with CCO licensed images from Pxhere.

* Remove unneeded Unsplash image.

* Use Relative URLs for Images in the Product Listing Pattern

This commit replaces hardcoded URLs with dynamic ones for image placeholders in the `product-listing-with-gallery-and-description.php` pattern file.

- The `plugins_url()` function is now used to generate URLs, which correctly points to the images folder within the WooCommerce Blocks plugin directory. This approach provides better flexibility and portability since it doesn't rely on a specific domain or path. The `esc_url()` function is used to ensure the URL is safe to use in the HTML context.

- The change is made for a total of four images in the pattern.

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>

* Update/patterns featured category product collection (https://github.com/woocommerce/woocommerce-blocks/pull/9765)

* Update image for featured category focus pattern

* Update image for featured category cover image pattern

* Update images for featured category triple pattern

* Change to wide width

* Update links to buttons

* Fix typo in hex color value.

There was an extra `f` in the hex color value, causing the text to
unexpectedly render black.

---------

Co-authored-by: Daniel W. Robert <danielwrobert@gmail.com>

* Update/collection pattern images (https://github.com/woocommerce/woocommerce-blocks/pull/9766)

* Update featured collections images

* Add shop link to shop by price pattern

* Update hero product pattern title (https://github.com/woocommerce/woocommerce-blocks/pull/9769)

* Remove unused pattern image (https://github.com/woocommerce/woocommerce-blocks/pull/9770)

* Add 10.4.2 changelog in readme.txt

* Update version number to 10.4.2

* Add testing instructions for 10.4.2

* Add 9769 PR testing steps

* WooCommerce Classic Template block: Fix error on clearing customizations on Woo Templates (https://github.com/woocommerce/woocommerce-blocks/pull/9759)

* Fix Classic Template block error on clearing customizations on template

* Add link to issue in JS Doc

* Change the way of debug check of tests-mysql container (https://github.com/woocommerce/woocommerce-blocks/pull/9794)

* Add alt text to images used in patterns describing their purpose (https://github.com/woocommerce/woocommerce-blocks/pull/9788)

* Add alt text to images used in patterns describing their purpose

* Replace 1/3 notation with 1 out of 3, so it's better handled byt screen readers

* Update testing instructions to include 9759 PR

* Update zip to include 9759 PR

* Remove 9759 PR from testing instructions

* Mini Cart Block: show the total price, including tax, according to the option (https://github.com/woocommerce/woocommerce-blocks/pull/9878)

* Mini Cart Block: show the total price, including tax, according to the option

* Fix tests in PR 9878 (https://github.com/woocommerce/woocommerce-blocks/pull/9880)

* add unit test

---------

Co-authored-by: Karol Manijak <karol.manijak@automattic.com>

* Mini-Cart: don't include shipping price (https://github.com/woocommerce/woocommerce-blocks/pull/9914)

* Products Block: fix grid view with Gutenberg 16 (https://github.com/woocommerce/woocommerce-blocks/pull/9916)

* Revert "fix products block layout on gutenberg 16 (https://github.com/woocommerce/woocommerce-blocks/pull/9886)"

This reverts commit 53665a5bde.

* add post_template_has_support_for_grid_view setting

* add testing instructions

* bump version

* update zip link

* Empty commit for release pull request

* update link

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
Co-authored-by: Daniel W. Robert <danielwrobert@users.noreply.github.com>
Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
Co-authored-by: Roy Ho <roykho77@gmail.com>
Co-authored-by: Daniel W. Robert <danielwrobert@gmail.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: Karol Manijak <karol.manijak@automattic.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2023-06-21 08:38:10 +02:00
Daniel Dudzic d981395148 Mini Cart: Hide template part from the block inserter. Closes woocommerce/woocommerce-blocks#9753 (https://github.com/woocommerce/woocommerce-blocks/pull/9906) 2023-06-20 22:28:16 +02:00
Albert Juhé Lluveras ddacb581bb Remove unnecessary white space from Testimonials 3 Columns pattern (https://github.com/woocommerce/woocommerce-blocks/pull/9786) 2023-06-20 17:44:02 +02:00
Chris Jayden d9b87d5a56 docs: add link to batching cart item (https://github.com/woocommerce/woocommerce-blocks/pull/9776) 2023-06-20 08:41:16 -07:00
Karol Manijak bc2bcf2ec4 Fix PHP CS warnings (https://github.com/woocommerce/woocommerce-blocks/pull/9857) 2023-06-20 16:19:43 +02:00
Luigi b19213cabd Merge branch 'release/10.5.0' of https://github.com/woocommerce/woocommerce-blocks into release/10.5.0 2023-06-20 16:14:53 +02:00
Luigi 2349af5216 update zip link 2023-06-20 16:14:39 +02:00
Luigi Teschio eb24313fb0 Products Block: fix grid view with Gutenberg 16 (https://github.com/woocommerce/woocommerce-blocks/pull/9916)
* Revert "fix products block layout on gutenberg 16 (https://github.com/woocommerce/woocommerce-blocks/pull/9886)"

This reverts commit 53665a5bde.

* add post_template_has_support_for_grid_view setting
2023-06-20 16:12:43 +02:00
Luigi Teschio e285dd0879 Products Block: fix grid view with Gutenberg 16 (https://github.com/woocommerce/woocommerce-blocks/pull/9916)
* Revert "fix products block layout on gutenberg 16 (https://github.com/woocommerce/woocommerce-blocks/pull/9886)"

This reverts commit 53665a5bde.

* add post_template_has_support_for_grid_view setting
2023-06-20 14:12:30 +00:00
Alba Rincón fe8330d2a8 `Featured Products 5-item grid` fix alignment (https://github.com/woocommerce/woocommerce-blocks/pull/9913)
* Styling and improvements

* Fix pattern alignment

---------

Co-authored-by: roykho <roykho77@gmail.com>
2023-06-20 15:49:43 +02:00
Roy Ho a5271fcbe3 Styling and improvements (https://github.com/woocommerce/woocommerce-blocks/pull/9893) 2023-06-20 06:09:12 -07:00
Roy Ho 93a43b791a Make use of product search (https://github.com/woocommerce/woocommerce-blocks/pull/9890) 2023-06-20 06:08:04 -07:00
Luigi Teschio e92393684c Update docs/internal-developers/testing/releases/1050.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2023-06-20 14:52:31 +02:00
Luigi Teschio 70cb05b991 Update docs/internal-developers/testing/releases/1050.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2023-06-20 14:52:23 +02:00
Luigi 50998bc9fa update testing instructions 2023-06-20 14:46:37 +02:00
Albert Juhé Lluveras 25f8137e9c Mini-Cart: don't include shipping price (https://github.com/woocommerce/woocommerce-blocks/pull/9914) 2023-06-20 14:45:30 +02:00
Albert Juhé Lluveras 99dd12e6c7 Mini-Cart: don't include shipping price (https://github.com/woocommerce/woocommerce-blocks/pull/9914) 2023-06-20 14:41:37 +02:00
Luigi 20be12a52c update zip link 2023-06-20 11:58:01 +02:00
Niels Lange e39cc21444 Reference Mini Cart drawer preview dynamically (https://github.com/woocommerce/woocommerce-blocks/pull/9912)
* Reference Mini Cart drawer preview dynamically

* Update assets/js/blocks/mini-cart/edit.tsx

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

---------

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2023-06-20 11:56:36 +02:00
Niels Lange 532393fe07 Reference Mini Cart drawer preview dynamically (https://github.com/woocommerce/woocommerce-blocks/pull/9912)
* Reference Mini Cart drawer preview dynamically

* Update assets/js/blocks/mini-cart/edit.tsx

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

---------

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2023-06-20 11:52:53 +02:00
Alba Rincón df5f1d21d1 Improve spacing and centering in responsive designs (https://github.com/woocommerce/woocommerce-blocks/pull/9877) 2023-06-20 10:30:51 +02:00
Luigi 08842ef392 update screenshot 2023-06-20 10:30:27 +02:00
Luigi 8b1cfe6c87 update testing instructions 2023-06-20 10:26:41 +02:00
Alba Rincón 5aa3779a62 Add shop link to the button (https://github.com/woocommerce/woocommerce-blocks/pull/9879) 2023-06-20 09:12:32 +02:00
Luigi 8f0d480f73 update testing instruction for woocommerce/woocommerce-blocks#9809 2023-06-20 09:12:05 +02:00
Luigi 6443868725 update zip link 2023-06-20 09:01:26 +02:00
Luigi 6b9c38dfc7 add woocommerce/woocommerce-blocks#9886 PR 2023-06-20 09:00:08 +02:00
Luigi Teschio b8d072b291 fix products block layout on gutenberg 16 (https://github.com/woocommerce/woocommerce-blocks/pull/9886) 2023-06-20 08:57:31 +02:00
Luigi Teschio 53665a5bde fix products block layout on gutenberg 16 (https://github.com/woocommerce/woocommerce-blocks/pull/9886) 2023-06-20 08:56:55 +02:00
Manish Menaria a6c1a2de52 Add E2E tests for Product Collection Block (https://github.com/woocommerce/woocommerce-blocks/pull/9825)
* Add E2E tests for Product Collection Block

This commit does the following changes:

1. Adjusts the .gitignore file to ignore the test-results and artifacts directories under all subdirectories named 'e2e-pw'.

2. Adds new E2E tests for the Product Collection block, specifically testing:
   - If the block renders correctly, including validating the number of product images, titles, prices, and 'Add to Cart' buttons.
   - If the sidebar settings correctly control the number of displayed columns.

3. Implements the 'ProductCollectionPage' class, providing methods to perform actions such as creating a new post, inserting a block, publishing a post, and locating various elements on the page.

4. Adjusts the directory structure for the E2E tests to improve organization and readability.

* Minor improvements

* Update E2E tests for Product Collection block sidebar settings

This commit updates the E2E tests for the sidebar settings of the Product Collection block. The changes include:

1. Refactoring the test assertions to use property accessors instead of method calls for the `ProductCollectionPage` class. This improves readability and consistency.

2. Updating the `ProductCollectionPage` class to initialize locators for editor and frontend elements separately. This allows easier differentiation between editor and frontend locators.

The test file `sidebar-settings.block_theme.spec.ts` has been deleted, as its functionality is now covered by the updated tests in `product-collection.block_theme.spec.ts`.

* Don't update package.json files

* Don't update gitignore file

* Add E2E test for order by control

This commit updates the E2E tests for the sidebar settings and order by control of the Product Collection block. The changes include:

1. Refactoring the test assertions and descriptions for improved readability and clarity.

2. Adding a new test case to verify the correct sorting of products by title in descending order.

3. Updating the `ProductCollectionPage` class to include a new method `setOrderBy()` to set the order by value in the order by control.

4. Adding a new method `waitForProductsToLoad()` in the `ProductCollectionPage` class to wait for the products to load in the block.

These changes ensure that the sidebar settings and order by control are functioning correctly in the Product Collection block.

* Minor improvements

* Add tests for "on sale" filter

* Add tests for Hand picked products filter

This commit updates the E2E tests for the handpicked products filter in the Product Collection block. The changes include:

1. Adding a new test case to verify that products can be filtered based on the selection in the handpicked products option.

2. Adding a new method `addFilter()` to the `ProductCollectionPage` class to select a filter option from the dropdown.

3. Adding a new method `setHandpickedProducts()` to the `ProductCollectionPage` class to set the handpicked products in the block settings.

These changes ensure that the handpicked products filter is functioning correctly in the Product Collection block.

* Verify that on sale filter works on frontend

Adding assertions to verify the count and presence of on-sale products in the frontend after publishing.

* Add tests for Keyword filter

This commit updates the E2E tests for the keyword filter in the Product Collection block. The changes include:

1. Adding assertions to verify that the products are correctly filtered based on the keyword entered.

2. Adding assertions to verify the filtered products in the frontend after publishing.

These changes ensure that the keyword filter in the Product Collection block is functioning correctly.

* Use fixture to setup product collection page

This commit refactors the E2E tests for the Product Collection block to improve test structure and readability. The changes include:

1. Refactoring the test structure using the `test.extend` function to define shared setup and teardown logic.

2. Moving the creation of the `ProductCollectionPage` instance to the shared setup logic.

3. Using the `pageObject` fixture in each test to access the `ProductCollectionPage` instance.

4. Removing duplicate code for creating the `ProductCollectionPage` instance.

These changes enhance the maintainability and readability of the E2E tests for the Product Collection block.
2023-06-20 10:56:12 +05:30
Thomas Roberts 3ebcd7f601 Add `CartEventContext` and dispatch events when pressing proceed to checkout button (https://github.com/woocommerce/woocommerce-blocks/pull/7809)
* Add CartEventsContext with onProceedToCheckout event

* Wrap Cart in CartEventsProvider

* Dispatch onProceedToCheckout event when button is pressed

* Update type of children on CartEventsProvider

* Add test for ProceedToCheckout block

* Add tests for CartEventProvider

* Remove superfluous div

* Fix incorrect nesting after rebase

* Wrap mini cart in CartEventsProvider

* Dispatch onProceedToCheckout event when clicking button in mini cart

* Add tests for mini cart onProceedToCheckout emitter

* Make observer fail so navigation isn't attempted

* Prevent console error on navigation

* Try preventing navigation in unit tests

* Try preventing navigation in unit tests

* Try preventing navigation in unit tests

* Try preventing navigation in unit tests

* Try preventing navigation in unit tests

* Try preventing navigation in unit tests

* Try preventing navigation in unit tests
2023-06-19 08:44:37 -07:00
Luigi 51bc46594d add woocommerce/woocommerce-blocks#9878 PR 2023-06-19 17:15:55 +02:00
Luigi Teschio b585355fda Mini Cart Block: show the total price, including tax, according to the option (https://github.com/woocommerce/woocommerce-blocks/pull/9878)
* Mini Cart Block: show the total price, including tax, according to the option

* Fix tests in PR 9878 (https://github.com/woocommerce/woocommerce-blocks/pull/9880)

* add unit test

---------

Co-authored-by: Karol Manijak <karol.manijak@automattic.com>
2023-06-19 17:14:51 +02:00
Luigi Teschio bc6dc106ab Mini Cart Block: show the total price, including tax, according to the option (https://github.com/woocommerce/woocommerce-blocks/pull/9878)
* Mini Cart Block: show the total price, including tax, according to the option

* Fix tests in PR 9878 (https://github.com/woocommerce/woocommerce-blocks/pull/9880)

* add unit test

---------

Co-authored-by: Karol Manijak <karol.manijak@automattic.com>
2023-06-19 17:14:35 +02:00
Luigi e190f46064 update zip file testing 2023-06-19 15:51:46 +02:00
Luigi edd3dd38da add woocommerce/woocommerce-blocks#9869 PR 2023-06-19 15:23:12 +02:00
Alexandre Lara 677d66f137 Fix PropType warning and error when adding All Reviews block to Editor (https://github.com/woocommerce/woocommerce-blocks/pull/9869) 2023-06-19 15:17:07 +02:00
Daniel Dudzic 8835140c41 Mini Cart: Fix un-strict comparisons (https://github.com/woocommerce/woocommerce-blocks/pull/9837) 2023-06-19 12:57:04 +02:00
Alexandre Lara 48696c6727 Fix PropType warning and error when adding All Reviews block to Editor (https://github.com/woocommerce/woocommerce-blocks/pull/9869) 2023-06-19 15:39:54 +05:30
Daniel Dudzic de425c9efb Mini Cart: Add Price, Icon and Product Count color settings (https://github.com/woocommerce/woocommerce-blocks/pull/9647)
* Mini Cart: Update color settings to include Price, Icon and Product Count.

* Fix color settings in the editor.

* Mini Cart: Add color settings for the Price, Icon and Product Count.

* Mini Cart: Remove unnecessary color settings.

* Remove unnecessary code comments.

* Update color settings labels.

* Add price color to the tax label.

* Add missing docs comment

* Fix TS errors

* Fix TS error

* Adjust type declaration

* Add TS error comments

* Change @ts-to-do to @ts-expect-error

---------

Co-authored-by: tjcafferkey <tjcafferkey@gmail.com>
2023-06-19 11:42:37 +02:00
Luigi 244cdf86e2 add testing instructions 2023-06-19 11:39:43 +02:00
Luigi 028d0a90ab bump version 2023-06-19 11:38:19 +02:00
Luigi 8758f586e4 add readme 2023-06-19 10:05:54 +02:00
Alexandre Lara 8a6e1cdb76 Adjust PropTypes definition and fix block error when store has no reviews (https://github.com/woocommerce/woocommerce-blocks/pull/9868) 2023-06-19 12:37:57 +05:30
Karol Manijak 115ccca4f9 Don't treat Dependabot as community contributor (https://github.com/woocommerce/woocommerce-blocks/pull/9254)
* Test commit

* Don't treat dependabot as a community

* Remove unwanted change

* Make the check for ignored usernames clearer
2023-06-19 08:49:59 +02:00
Manish Menaria eec844f447 Add Display Settings Toolbar to the Product Collection Block (https://github.com/woocommerce/woocommerce-blocks/pull/9747)
This commit introduces the 'Display Settings' toolbar for the 'Product Collection' block in the Gutenberg editor.
- A new component 'DisplaySettingsToolbar' is added in 'display-settings-toolbar.tsx'. It includes controls for changing the number of items per page, the offset, and the maximum number of pages to show in the block. The toolbar only shows up when the 'inherit' query attribute is set to false.
- The 'DisplaySettingsToolbar' component is then integrated into the main 'edit.tsx' file through 'ToolbarControls'.
- Styles have also been added to 'editor.scss' to ensure the popover content of the display settings toolbar has an appropriate minimum width.
2023-06-19 10:37:05 +05:30
Niels Lange d70481ed8c Update available-slot-fills.md 2023-06-18 20:08:05 +02:00
Brian 8dacf20cef Update Keywords for Customer Account Block in block.json (https://github.com/woocommerce/woocommerce-blocks/pull/9815)
Co-authored-by: Karol Manijak <karol.manijak@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
2023-06-18 19:42:08 +02:00
Alexandre Lara c5e8cc2256 Refactor: Convert with-transform-single-select-to-multiple-select.js to with-transform-single-select-to-multiple-select.tsx and replace propTypes with TypeScript definitions (https://github.com/woocommerce/woocommerce-blocks/pull/9798)
* Transform file from Javascript to Typescript

* Add SelectOption type and default value to selected prop
2023-06-16 16:24:12 -03:00
Alexandre Lara e5dd772c94 Convert Product On Sale block file from JS to TS (https://github.com/woocommerce/woocommerce-blocks/pull/9834) 2023-06-16 13:43:54 -03:00
Alexandre Lara ba47d5dc40 Refactor: Convert All Products block file from Javascript to Typescript and replace propTypes with TypeScript definitions (https://github.com/woocommerce/woocommerce-blocks/pull/9802)
* Convert All Products block from Javascript to Typescript

* Replace BlockAttributes type with local interface
2023-06-16 12:48:47 -03:00
Karol Manijak f12c35ffc2 Temporarily skip PHP Unit Tests for PHP 8.1 and 8.2 (https://github.com/woocommerce/woocommerce-blocks/pull/9859)
* Allow failure of the PHP Unit Tests

* Limit the PHP versions to 7.4 and 8.0 to run unit tests

* Don't allow failing fast

* Add a comment explaining the skipped part

* Cancel jobs later

* Cancel all the steps in workflow based on the same condition
2023-06-16 14:16:19 +02:00
Niels Lange 0d94479bbe Update README.md 2023-06-16 13:59:30 +02:00
Mike Jolley 496fac8386 Performance: Cache script data in a transient for production builds (https://github.com/woocommerce/woocommerce-blocks/pull/9120)
* Cache script data in a transient for production builds

* Store as json

* Disable cache when script debug is on

* Disable in test environment

* Simplify caching structure

* Put back cache buster

* Fix update_script_data_cache

* Merge dependencies param always—do not cache it
2023-06-16 12:21:51 +01:00
Mike Jolley ee4e0fac18 Keep change button visible even if prefersCollection is true (https://github.com/woocommerce/woocommerce-blocks/pull/9809) 2023-06-16 12:21:19 +01:00
Mike Jolley 4d14426ecb Request 2.88.2 (https://github.com/woocommerce/woocommerce-blocks/pull/9827) 2023-06-16 11:46:03 +01:00
Alba Rincón 8a67ae2f80 Convert `edit.js` to `edit.tsx` and replace `propTypes` with TypeScript definitions (https://github.com/woocommerce/woocommerce-blocks/pull/9823)
* Remove proptypes

* Refactor after review
2023-06-16 09:30:54 +02:00
Alba Rincón 2460a04abd Remove propTypes (https://github.com/woocommerce/woocommerce-blocks/pull/9824) 2023-06-15 16:21:02 +02:00
Alba Rincón e423c4fde9 Add a default attribute to the pattern if exists (https://github.com/woocommerce/woocommerce-blocks/pull/9812)
* Add a default attribute to the pattern if exists

* Use esc_attr instead of esc_html
2023-06-15 16:07:47 +02:00
Karol Manijak 1eebcd6750 Replace Automated tests badge with E2E and Unit tests badges (https://github.com/woocommerce/woocommerce-blocks/pull/9836) 2023-06-15 14:23:23 +02:00
Daniel Dudzic cc6a9eab48 Mini Cart: Fix icon render (https://github.com/woocommerce/woocommerce-blocks/pull/9828) 2023-06-14 18:42:56 +02:00
Mike Jolley c30c6afc53 Wait for cart to be removed when emptied (https://github.com/woocommerce/woocommerce-blocks/pull/9829) 2023-06-14 16:59:21 +01:00
Roy Ho 31138031f6 Convert grid-layout-control to use Typescript (https://github.com/woocommerce/woocommerce-blocks/pull/9811) 2023-06-14 07:07:28 -07:00
dependabot[bot] 4c012300c1 Bump mockery/mockery from 1.6.1 to 1.6.2 (https://github.com/woocommerce/woocommerce-blocks/pull/9796)
Bumps [mockery/mockery](https://github.com/mockery/mockery) from 1.6.1 to 1.6.2.
- [Release notes](https://github.com/mockery/mockery/releases)
- [Changelog](https://github.com/mockery/mockery/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mockery/mockery/compare/1.6.1...1.6.2)

---
updated-dependencies:
- dependency-name: mockery/mockery
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-14 15:05:10 +01:00
Roy Ho 6270c39de8 Convert inner-block-layout-context to typescript (https://github.com/woocommerce/woocommerce-blocks/pull/9799)
* Convert inner-block-layout-context to typescript

* Add isLoading context
2023-06-14 06:36:39 -07:00
Mike Jolley 524b95acbd Bump fast-xml-parser from 4.0.7 to 4.2.4 (https://github.com/woocommerce/woocommerce-blocks/pull/9818)
* Bump fast-xml-parser from 4.0.7 to 4.2.4

Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 4.0.7 to 4.2.4.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v4.0.7...v4.2.4)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update package lock

* Update package

* Revert other package lock changes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-14 14:32:19 +01:00
github-actions[bot] 09e9fb9388 Release: 10.4.2 (https://github.com/woocommerce/woocommerce-blocks/pull/9784)
* Empty commit for release pull request

* Update Hero Product 3-split pattern image

* Update Banner Pattern To Replace Unsplash Image (https://github.com/woocommerce/woocommerce-blocks/pull/9760)

* Update Banner to replace Unsplash image.

Replaces the Unsplash image with a CCO licensed image from Pxhere. Also
updates the CTA button to link to the Shop page, by default.

* Remove extra padding from top of test column.

Vertical alignment was off on the text column due to 60px of top
padding. This aligns everythign, as expected.

* Update Chessboard pattern images (https://github.com/woocommerce/woocommerce-blocks/pull/9761)

* Updathe the Hero Product Split (https://github.com/woocommerce/woocommerce-blocks/pull/9762)

* Remove unused pattern image (https://github.com/woocommerce/woocommerce-blocks/pull/9763)

* Update Images for the Product Details Patterns (https://github.com/woocommerce/woocommerce-blocks/pull/9764)

* Update image for the Product Hero pattern.

Replace the Unsplash image with a CCO licensed image from Pxhere.

* Update images for Prod List Gallery Desc pattern

Replace the Unsplash image with a CCO licensed image from Pxhere for the
Product Listing with Gallery and Description pattern.

* Remove unneeded Unsplash images.

* Update copy for Prod Listing Gallery Desc pattern.

* Optimize new image exports.

* Update image for the Product Listing pattern.

Replace the Unsplash image with a CCO licensed image from Pxhere.

* Update images for Product Details pattern.

Replace the Unsplash images with CCO licensed images from Pxhere.

* Remove unneeded Unsplash image.

* Use Relative URLs for Images in the Product Listing Pattern

This commit replaces hardcoded URLs with dynamic ones for image placeholders in the `product-listing-with-gallery-and-description.php` pattern file.

- The `plugins_url()` function is now used to generate URLs, which correctly points to the images folder within the WooCommerce Blocks plugin directory. This approach provides better flexibility and portability since it doesn't rely on a specific domain or path. The `esc_url()` function is used to ensure the URL is safe to use in the HTML context.

- The change is made for a total of four images in the pattern.

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>

* Update/patterns featured category product collection (https://github.com/woocommerce/woocommerce-blocks/pull/9765)

* Update image for featured category focus pattern

* Update image for featured category cover image pattern

* Update images for featured category triple pattern

* Change to wide width

* Update links to buttons

* Fix typo in hex color value.

There was an extra `f` in the hex color value, causing the text to
unexpectedly render black.

---------

Co-authored-by: Daniel W. Robert <danielwrobert@gmail.com>

* Update/collection pattern images (https://github.com/woocommerce/woocommerce-blocks/pull/9766)

* Update featured collections images

* Add shop link to shop by price pattern

* Update hero product pattern title (https://github.com/woocommerce/woocommerce-blocks/pull/9769)

* Remove unused pattern image (https://github.com/woocommerce/woocommerce-blocks/pull/9770)

* Add 10.4.2 changelog in readme.txt

* Update version number to 10.4.2

* Add testing instructions for 10.4.2

* Add 9769 PR testing steps

* WooCommerce Classic Template block: Fix error on clearing customizations on Woo Templates (https://github.com/woocommerce/woocommerce-blocks/pull/9759)

* Fix Classic Template block error on clearing customizations on template

* Add link to issue in JS Doc

* Change the way of debug check of tests-mysql container (https://github.com/woocommerce/woocommerce-blocks/pull/9794)

* Add alt text to images used in patterns describing their purpose (https://github.com/woocommerce/woocommerce-blocks/pull/9788)

* Add alt text to images used in patterns describing their purpose

* Replace 1/3 notation with 1 out of 3, so it's better handled byt screen readers

* Update testing instructions to include 9759 PR

* Update zip to include 9759 PR

* Remove 9759 PR from testing instructions

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
Co-authored-by: Daniel W. Robert <danielwrobert@users.noreply.github.com>
Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
Co-authored-by: Roy Ho <roykho77@gmail.com>
Co-authored-by: Daniel W. Robert <danielwrobert@gmail.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: Karol Manijak <karol.manijak@automattic.com>
2023-06-13 19:18:40 +04:00
Tarun Vijwani fe1294729e Merge remote-tracking branch 'origin/trunk' into trunk 2023-06-13 16:13:47 +04:00
Tarun Vijwani eed8d5088e Add testing notes and changelog of 10.4.2 2023-06-13 16:13:03 +04:00
Hritik Chaudhary 563b439f25 Migrate Block Title component to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/9712)
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2023-06-13 16:30:57 +05:30
Daniel W. Robert 9f87afde32 Apply further optimizations to pattern images. (https://github.com/woocommerce/woocommerce-blocks/pull/9803)
Ran images through imagemin with the pngquant plugin to reduce the file
sizes for our pattern images.
2023-06-12 22:22:44 -04:00