* Mini Cart: Add an icon setting with 3 alternative icon options. Closeswoocommerce/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
* 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 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 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.
* 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
* 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.
* Convert summary/utils to TS
* Add @wordpress/wordcount type defs
* Move trimWords, trimCharacters, remoteTags & appendMoreText to own file
* Add tests for trimWords and related functions
* Trim payment method description if it is longer than 30 words
* Add color to the search button, fix php notices
* Update button color
* Update button color
* Update button color
* Update button color
* Update button color
* Remove WooCommerce from the name to follow standards
* Remove colors from buttons in patterns without hardcoded bg color