Commit Graph

5547 Commits

Author SHA1 Message Date
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
Daniel Dudzic 0a23aca517 Mini Cart: Add an alternative icon setting (https://github.com/woocommerce/woocommerce-blocks/pull/9570)
* Mini Cart: Add an icon setting with 3 alternative icon options. Closes woocommerce/woocommerce-blocks#8556.

* Mini Cart: Fix Mini-cart icons in the toggle setting.

* Minor type fixes.

* Clean up type definitions.

* Move alt icon logic to a separate function.

* Fix cart icons sizes

* Add a negative margin to the mini cart icon
2023-06-12 22:23:52 +02:00
Karol Manijak b7f1ac2b4e 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
2023-06-12 19:34:03 +02:00
Karol Manijak 42e95d1c54 Change the way of debug check of tests-mysql container (https://github.com/woocommerce/woocommerce-blocks/pull/9794) 2023-06-12 19:00:27 +02:00
Alexandre Lara 06a9b274c1 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
2023-06-12 13:55:20 -03:00
Hritik Chaudhary e17221ac79 Removed proptypes and js to ts conversion for Product Categories (https://github.com/woocommerce/woocommerce-blocks/pull/9755)
* Removed proptypes from product-categories

* deleted js file
2023-06-12 18:52:21 +02:00
Karol Manijak 1e849ff3c3 Disable the debug check of tests-mysql to let PHP unit tests pass (https://github.com/woocommerce/woocommerce-blocks/pull/9791) 2023-06-12 17:20:04 +02:00
Alba Rincón ae4757a53f Port to trunk testing notes and readme from 10.2.3 2023-06-09 16:33:08 +02:00
Albert Juhé Lluveras 0be2ef2d84 Fix capitalization in Product Collections: Newest Arrivals pattern (https://github.com/woocommerce/woocommerce-blocks/pull/9777) 2023-06-09 16:04:53 +02:00
Albert Juhé Lluveras a89a229b37 Prevent Mini-Cart table to show horizontal scrollbar (https://github.com/woocommerce/woocommerce-blocks/pull/9676) 2023-06-09 10:48:23 +02:00
Alba Rincón 2b5c73d47e Remove unused pattern image (https://github.com/woocommerce/woocommerce-blocks/pull/9770) 2023-06-09 09:41:15 +02:00
Alba Rincón bc00fbd22b Update hero product pattern title (https://github.com/woocommerce/woocommerce-blocks/pull/9769) 2023-06-09 09:18:30 +02:00
Daniel W. Robert 13a48fb62e 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>
2023-06-09 12:13:19 +05:30
Roy Ho 1041bce0e4 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>
2023-06-09 00:37:25 -04:00
Roy Ho f4da27ca56 Update/collection pattern images (https://github.com/woocommerce/woocommerce-blocks/pull/9766)
* Update featured collections images

* Add shop link to shop by price pattern
2023-06-09 00:07:52 -04:00
Alba Rincón 49a98abef2 Remove unused pattern image (https://github.com/woocommerce/woocommerce-blocks/pull/9763) 2023-06-08 16:30:23 -04:00
Alba Rincón d78c5e57ef Update Chessboard pattern images (https://github.com/woocommerce/woocommerce-blocks/pull/9761) 2023-06-08 16:28:00 -04:00
Alba Rincón 0aa4ba69d0 Updathe the Hero Product Split (https://github.com/woocommerce/woocommerce-blocks/pull/9762) 2023-06-08 16:27:48 -04:00
Daniel W. Robert 43b6f62ad0 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.
2023-06-08 16:00:55 -04:00
Alba Rincón 9aa1e3448f Update Hero Product 3-split pattern image 2023-06-08 21:41:35 +02:00
Roy Ho 8e94500136 Use correct SVG for RTL display (https://github.com/woocommerce/woocommerce-blocks/pull/9756) 2023-06-08 11:29:34 -07:00
Roy Ho bb60a90f5c Convert product-orderby-control to use typescript (https://github.com/woocommerce/woocommerce-blocks/pull/9751) 2023-06-08 05:56:57 -07:00
Tarun Vijwani 27ba84cd84 Update version number to 10.5.0-dev 2023-06-08 15:31:29 +04:00
Tarun Vijwani ac99027225 Cherry pick updated 10.4.0 testing steps 2023-06-08 14:53:22 +04:00
Tarun Vijwani 0833316129 Cherry-pick 10.4.0 testing steps 2023-06-08 14:51:50 +04:00
Tarun Vijwani 8bcbeb8c0e Cherry-pick 10.4.0 changelogs 2023-06-08 14:43:54 +04:00
Albert Juhé Lluveras aa912e31a8 Fix the order of enqueued scripts in the Mini-Cart block (https://github.com/woocommerce/woocommerce-blocks/pull/9749)
* Fix the order of enqueued scripts in the Mini-Cart block

* Use again wp_script_is() to detect is a script has been enqueued or not
2023-06-08 10:37:00 +02:00
Tarun Vijwani c6d0f30989 Remove experimental blocks from the changelog 2023-06-08 11:36:21 +04:00
Manish Menaria d91385e3b9 Product Collection: Hand picked products control in sidebar settings (https://github.com/woocommerce/woocommerce-blocks/pull/9733)
* Add support for hand-picked products in Product Collection block

This commit introduces the ability to manually select specific products in the Product Collection block.

Changes include:
- Added `woocommerceHandPickedProducts` to the `ProductCollectionQuery` and `DEFAULT_FILTERS` in `constants.ts`.
- Created a new control file `hand-picked-products-control.tsx` which introduces a token field where the user can search for and select specific products.
- Included `HandPickedProductsControl` in the Product Collection block's inspector controls in `index.tsx`.
- Updated `ProductCollectionQuery` in `types.ts` to accommodate handpicked products.
- Updated the PHP `ProductCollection` class to handle the hand-picked products query parameters.

These changes allow users to hand-pick products to be displayed in the Product Collection block. This allows for greater customization of the products shown in the block.

* Enhance handling of hand-picked products

- A Set data structure is now used to store 'newHandPickedProducts' instead of an Array, which will help prevent duplicate entries.
- Additionally, the suggestions for products to be hand-picked now excludes already selected products, enhancing the user experience by avoiding redundancy in the suggestions list.
- Lastly, the function name 'displayTransform' has been changed to 'transformTokenIntoProductName' to more accurately reflect its purpose, which is to transform a token into a product name.

* Update import & export of HandPickedProductsControl
2023-06-08 06:03:01 +00:00
Manish Menaria 1814bc95e5 Product Collection: Add author filter in sidebar settings (https://github.com/woocommerce/woocommerce-blocks/pull/9736)
* Add author filter to ProductCollection block

This commit adds an author filter to the ProductCollection block in WooCommerce Blocks.

- A new file, `author-control.tsx`, has been created inside the `inspector-controls` directory of the `product-collection` block. This file contains the React component for the author filter, which fetches the list of authors from the WordPress database using `useEntityRecords`. The filter provides an interface for selecting authors whose products should be displayed in the ProductCollection block.

- The author filter is added to the main component of the `inspector-controls` in `index.tsx`.

- In `ProductCollection.php`, the 'author' parameter is now included in the product query. This allows products from a specific author to be displayed in the ProductCollection block, depending on the user's selection in the Gutenberg editor.

This addition enhances the functionality of the ProductCollection block by allowing site administrators to create more customized and targeted displays of products.

* Update error handling

* Refactor 'Author' interfaces and fix offset calculation

This commit refactors the 'Author' interfaces in the 'author-control.tsx' file. The interface 'AuthorsMapping' has been removed and its properties have been merged into 'AuthorsInfo' for simplicity and maintainability.

In the PHP file 'ProductCollection.php', the offset calculation logic has been improved to handle pagination correctly. Now, the offset is calculated as '(per_page * (page - 1)) + offset', which correctly accounts for both the page number and the offset when determining the starting point for the product query.
2023-06-08 11:10:05 +05:30
Tarun Vijwani 0f3e9340f0 Cherry pick 9684 PR as it got merged after release branch was created 2023-06-07 23:37:49 +04:00
Luigi Teschio 460b8a5034 Product rating: improve preview style when the product doesn't have rating (https://github.com/woocommerce/woocommerce-blocks/pull/9684)
* product rating: improve preview style when no rating is visible

* fix class naming

* fix cutted star

* change variable

* fix cut border
2023-06-07 23:32:31 +04:00
Tarun Vijwani 5f60dbbd6c Update testing zip file to include 9748 PR 2023-06-07 21:52:06 +04:00
Tarun Vijwani 9468a9c0d8 Cherry-pick 9748 2023-06-07 21:44:20 +04:00
Alba Rincón 8eb7b16af0 Render the single product title as an h1 (https://github.com/woocommerce/woocommerce-blocks/pull/9748) 2023-06-07 21:31:24 +04:00
Alba Rincón 06a0ab94ce Render the single product title as an h1 (https://github.com/woocommerce/woocommerce-blocks/pull/9748) 2023-06-07 15:47:56 +02:00
Tarun Vijwani 76601b3971 Remove expiremental block from testing notes 2023-06-07 16:56:56 +04:00