Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Product Query: Add patterns #7857

Merged
merged 16 commits into from
Dec 13, 2022
Merged

Conversation

danieldudzic
Copy link
Contributor

@danieldudzic danieldudzic commented Dec 6, 2022

This PR adds Product Query patterns based on Figma designs.

Fixes #7624

Testing

Automated Tests

  • Changes in this PR are covered by Automated Tests.
    • Unit tests
    • E2E tests

User Facing Testing

  1. Create a new page.
  2. Add each pattern and make sure it displays correctly in the editor and frontend.

1. Product gallery

Figma Pattern
🔎_Product_Query_Block_–_Figma All_Products_–_ratings-11

2. 4-Column Product Row

Figma Pattern
🔎_Product_Query_Block_–_Figma Products_–_ratings

3. 3-Column Product Row

Figma Pattern
🔎_Product_Query_Block_–_Figma Products_–_ratings

4. Large Image Product Gallery

Figma Pattern
🔎_Product_Query_Block_–_Figma Products_–_ratings

5. Minimal 5-Column Products Row

Figma Pattern
🔎_Product_Query_Block_–_Figma Products_–_ratings

6. 1:1 Image 4-Column Products Row

Figma Pattern
🔎_Product_Query_Block_–_Figma Products_–_ratings

7. Product list with full product description

Figma Pattern
🔎_Product_Query_Block_–_Figma Products_–_ratings

8. Product list with 1:1 images

Figma Pattern
🔎_Product_Query_Block_–_Figma Products_–_ratings

9. Minimal product list

Figma Pattern
🔎_Product_Query_Block_–_Figma Products_–_ratings
  • Do not include in the Testing Notes

WooCommerce Visibility

  • WooCommerce Core
  • Feature plugin
  • Experimental

Changelog

Products block: Add patterns.

@danieldudzic danieldudzic changed the title Product Query: Add patterns [WIP] Product Query: Add patterns Dec 6, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2022

The release ZIP for this PR is accessible via:

https://wcblocks.wpcomstaging.com/wp-content/uploads/woocommerce-gutenberg-products-block-7857.zip

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2022

Script Dependencies Report

There is no changed script dependency between this branch and trunk.

This comment was automatically generated by the ./github/compare-assets action.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2022

Size Change: +22 B (0%)

Total Size: 992 kB

Filename Size Change
build/all-products.js 33.2 kB +4 B (0%)
build/product-query.js 5.93 kB +21 B (0%)
build/wc-blocks-style-rtl.css 24.3 kB -3 B (0%)
ℹ️ View Unchanged
Filename Size
build/active-filters-frontend.js 7.74 kB
build/active-filters-wrapper-frontend.js 6.02 kB
build/active-filters.js 7.32 kB
build/all-products-frontend.js 11.3 kB
build/all-reviews.js 7.79 kB
build/attribute-filter-frontend.js 22.6 kB
build/attribute-filter-wrapper-frontend.js 7.2 kB
build/attribute-filter.js 12.3 kB
build/blocks-checkout.js 27.3 kB
build/cart-blocks/cart-accepted-payment-methods-frontend.js 1.37 kB
build/cart-blocks/cart-cross-sells-frontend.js 253 B
build/cart-blocks/cart-cross-sells-products--product-add-to-cart-frontend.js 5.47 kB
build/cart-blocks/cart-cross-sells-products-frontend.js 4.78 kB
build/cart-blocks/cart-express-payment--checkout-blocks/express-payment-frontend.js 5.04 kB
build/cart-blocks/cart-express-payment-frontend.js 778 B
build/cart-blocks/cart-items-frontend.js 298 B
build/cart-blocks/cart-line-items--mini-cart-contents-block/products-table-frontend.js 5.28 kB
build/cart-blocks/cart-line-items-frontend.js 1.07 kB
build/cart-blocks/cart-order-summary-frontend.js 1.23 kB
build/cart-blocks/cart-totals-frontend.js 320 B
build/cart-blocks/empty-cart-frontend.js 346 B
build/cart-blocks/filled-cart-frontend.js 785 B
build/cart-blocks/order-summary-coupon-form-frontend.js 1.73 kB
build/cart-blocks/order-summary-discount-frontend.js 2.16 kB
build/cart-blocks/order-summary-fee-frontend.js 272 B
build/cart-blocks/order-summary-heading-frontend.js 455 B
build/cart-blocks/order-summary-shipping-frontend.js 5.98 kB
build/cart-blocks/order-summary-subtotal-frontend.js 273 B
build/cart-blocks/order-summary-taxes-frontend.js 434 B
build/cart-blocks/proceed-to-checkout-frontend.js 1.19 kB
build/cart-frontend.js 46.2 kB
build/cart.js 46.4 kB
build/checkout-blocks/actions-frontend.js 1.77 kB
build/checkout-blocks/billing-address--checkout-blocks/shipping-address-frontend.js 3.89 kB
build/checkout-blocks/billing-address-frontend.js 1.09 kB
build/checkout-blocks/contact-information-frontend.js 1.86 kB
build/checkout-blocks/express-payment-frontend.js 1.13 kB
build/checkout-blocks/fields-frontend.js 344 B
build/checkout-blocks/order-note-frontend.js 1.14 kB
build/checkout-blocks/order-summary-cart-items-frontend.js 3.67 kB
build/checkout-blocks/order-summary-coupon-form-frontend.js 1.89 kB
build/checkout-blocks/order-summary-discount-frontend.js 2.28 kB
build/checkout-blocks/order-summary-fee-frontend.js 275 B
build/checkout-blocks/order-summary-frontend.js 1.24 kB
build/checkout-blocks/order-summary-shipping-frontend.js 6.03 kB
build/checkout-blocks/order-summary-subtotal-frontend.js 273 B
build/checkout-blocks/order-summary-taxes-frontend.js 434 B
build/checkout-blocks/payment-frontend.js 8.32 kB
build/checkout-blocks/shipping-address-frontend.js 1.07 kB
build/checkout-blocks/shipping-methods-frontend.js 5.01 kB
build/checkout-blocks/terms-frontend.js 1.63 kB
build/checkout-blocks/totals-frontend.js 324 B
build/checkout-frontend.js 48.3 kB
build/checkout.js 40.6 kB
build/featured-category.js 13.2 kB
build/featured-product.js 13.4 kB
build/filter-wrapper-frontend.js 13.8 kB
build/filter-wrapper.js 2.4 kB
build/general-style-rtl.css 1.29 kB
build/general-style.css 1.29 kB
build/handpicked-products.js 7.29 kB
build/legacy-template.js 2.86 kB
build/mini-cart-component-frontend.js 20 kB
build/mini-cart-contents-block/empty-cart-frontend.js 366 B
build/mini-cart-contents-block/filled-cart-frontend.js 230 B
build/mini-cart-contents-block/footer-frontend.js 2.95 kB
build/mini-cart-contents-block/items-frontend.js 238 B
build/mini-cart-contents-block/products-table-frontend.js 591 B
build/mini-cart-contents-block/shopping-button-frontend.js 289 B
build/mini-cart-contents-block/title-frontend.js 368 B
build/mini-cart-contents.js 17.1 kB
build/mini-cart-frontend.js 1.88 kB
build/mini-cart.js 4.29 kB
build/price-filter-frontend.js 13.6 kB
build/price-filter-wrapper-frontend.js 7.02 kB
build/price-filter.js 8.38 kB
build/price-format.js 1.19 kB
build/product-add-to-cart--product-button--product-category-list--product-image--product-price--product-r--a0326d00.js 226 B
build/product-add-to-cart--product-button--product-image--product-rating--product-title.js 151 B
build/product-add-to-cart-frontend.js 1.47 kB
build/product-add-to-cart.js 8.37 kB
build/product-best-sellers.js 7.62 kB
build/product-button--product-category-list--product-image--product-price--product-rating--product-sale-b--e17c7c01.js 440 B
build/product-button--product-image--product-rating--product-sale-badge--product-title.js 301 B
build/product-button-frontend.js 2.18 kB
build/product-button.js 3.85 kB
build/product-categories.js 2.36 kB
build/product-category-list-frontend.js 1.14 kB
build/product-category-list.js 502 B
build/product-category.js 8.61 kB
build/product-image-frontend.js 2.16 kB
build/product-image.js 3.93 kB
build/product-new.js 7.62 kB
build/product-on-sale.js 7.95 kB
build/product-price-frontend.js 2.17 kB
build/product-price.js 1.54 kB
build/product-rating-frontend.js 1.48 kB
build/product-rating.js 816 B
build/product-sale-badge-frontend.js 1.39 kB
build/product-sale-badge.js 813 B
build/product-search.js 2.62 kB
build/product-sku-frontend.js 629 B
build/product-sku.js 376 B
build/product-stock-indicator-frontend.js 1.26 kB
build/product-stock-indicator.js 646 B
build/product-summary-frontend.js 1.53 kB
build/product-summary.js 918 B
build/product-tag-list-frontend.js 1.14 kB
build/product-tag-list.js 497 B
build/product-tag.js 8 kB
build/product-title-frontend.js 1.59 kB
build/product-title.js 3.3 kB
build/product-top-rated.js 7.86 kB
build/products-by-attribute.js 8.54 kB
build/rating-filter-frontend.js 21.1 kB
build/rating-filter-wrapper-frontend.js 5.73 kB
build/rating-filter.js 7.41 kB
build/reviews-by-category.js 11.2 kB
build/reviews-by-product.js 12.3 kB
build/reviews-frontend.js 7.01 kB
build/single-product-frontend.js 17.5 kB
build/single-product.js 10.1 kB
build/stock-filter-frontend.js 7.79 kB
build/stock-filter-wrapper-frontend.js 6.03 kB
build/stock-filter.js 6.71 kB
build/vendors--attribute-filter-wrapper--mini-cart-contents-block/footer--product-add-to-cart--rating-fil--b47816ec-frontend.js 6.86 kB
build/vendors--attribute-filter-wrapper--rating-filter-wrapper-frontend.js 8.21 kB
build/vendors--cart-blocks/cart-cross-sells-products--cart-blocks/cart-line-items--cart-blocks/cart-order--671ca56f-frontend.js 5.26 kB
build/vendors--cart-blocks/cart-cross-sells-products--cart-blocks/order-summary-shipping--checkout-blocks--18f9376a-frontend.js 19.1 kB
build/vendors--cart-blocks/cart-cross-sells-products--product-add-to-cart-frontend.js 7.54 kB
build/vendors--cart-blocks/cart-line-items--checkout-blocks/order-summary-cart-items--mini-cart-contents---233ab542-frontend.js 3.14 kB
build/vendors--cart-blocks/order-summary-shipping--checkout-blocks/billing-address--checkout-blocks/order--5b8feb0b-frontend.js 4.85 kB
build/vendors--cart-blocks/order-summary-shipping--checkout-blocks/order-summary-shipping--checkout-block--dda5866c-frontend.js 8.85 kB
build/wc-blocks-data.js 18.8 kB
build/wc-blocks-editor-style-rtl.css 5.22 kB
build/wc-blocks-editor-style.css 5.23 kB
build/wc-blocks-google-analytics.js 1.56 kB
build/wc-blocks-middleware.js 934 B
build/wc-blocks-registry.js 2.92 kB
build/wc-blocks-shared-context.js 1.52 kB
build/wc-blocks-shared-hocs.js 1.72 kB
build/wc-blocks-style.css 24.3 kB
build/wc-blocks-vendors-style-rtl.css 1.95 kB
build/wc-blocks-vendors-style.css 1.95 kB
build/wc-blocks-vendors.js 62.8 kB
build/wc-blocks.js 2.63 kB
build/wc-payment-method-bacs.js 816 B
build/wc-payment-method-cheque.js 811 B
build/wc-payment-method-cod.js 909 B
build/wc-payment-method-paypal.js 837 B
build/wc-settings.js 2.6 kB

compressed-size-action

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2022

TypeScript Errors Report

Files with errors: 433
Total errors: 2093

🎉 🎉 This PR does not introduce new TS errors.

@danieldudzic danieldudzic added the block-type: product-query Issues related to/affecting all product-query variations. label Dec 6, 2022
@Aljullu Aljullu added this to the 9.1.1 milestone Dec 12, 2022
@nerrad
Copy link
Contributor

nerrad commented Dec 12, 2022

For the rating block, is there a way to change the default rendering when there are no ratings to show 5 empty stars instead of blank? It would help with preserving the layout and eventually be a consistent way to link shoppers directly to the rating results for the product.

@danieldudzic
Copy link
Contributor Author

For the rating block, is there a way to change the default rendering when there are no ratings to show 5 empty stars instead of blank? It would help with preserving the layout and eventually be a consistent way to link shoppers directly to the rating results for the product.

This is a really good suggestion. I'll reach out to @kmanijak and see if he can prioritize this.

@kmanijak
Copy link
Contributor

@nerrad , @danieldudzic I created an issue, I'll kick it off tomorrow 👍

@github-actions
Copy link
Contributor

The release ZIP for this PR is accessible via:

https://wcblocks.wpcomstaging.com/wp-content/uploads/woocommerce-gutenberg-products-block-7857.zip

Copy link
Contributor

@Aljullu Aljullu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a couple of inline comments, but overall looks good to me, so pre-approving.

Two more things which I don't consider blocking:

  • I think we should review Product elements margins altogether. Ideally we should remove the margins from CSS and use global styles for that. It's tricky because we have other blocks that rely on some of these margins and it's an issue that was also present in the All Products block (All Products: make atomic blocks margin consistent to improve alignment #2565).
  • In some occasions, there is content shift when selecting inner blocks. It might be related to the CSS margin issues we have, or it might be an issue in GB and not in our repo, I have no idea. But it might be worth creating an issue to investigate it.

patterns/product-query-minimal-product-list.php Outdated Show resolved Hide resolved
patterns/product-query-product-list-with-1-1-images.php Outdated Show resolved Hide resolved
@danieldudzic danieldudzic marked this pull request as ready for review December 13, 2022 12:43
@danieldudzic danieldudzic changed the title [WIP] Product Query: Add patterns Product Query: Add patterns Dec 13, 2022
@woocommercebot woocommercebot requested a review from a team December 13, 2022 12:44
@woocommercebot woocommercebot requested review from thealexandrelara and removed request for a team December 13, 2022 12:44
@danieldudzic danieldudzic merged commit bdc8f99 into trunk Dec 13, 2022
@danieldudzic danieldudzic deleted the add/7624-product-query-patterns branch December 13, 2022 13:53
@danieldudzic danieldudzic added the type: enhancement The issue is a request for an enhancement. label Dec 14, 2022
gigitux pushed a commit that referenced this pull request Dec 14, 2022
* Product Query: First attempt at adding patterns

* Product Query: Update patterns and the default block template

* Product Query: And new and update existing patterns

* Product Query: Adjust layout of the Minimal Product Row pattern

* Product Query: Update pattern names

* Product Query: Polish spaces between blocks inside the patterns

* Product Query patterns: Link product titles and improve spacing between product elements

* Product Query patterns: Button font-size update

* Product Query patterns: Center the pagination

* Product Query patterns: Center the pagination for the default pattern

* Product Query patterns: Remove an empty column

* Product Query patterns: Remove an empty column from the product list with 1:1 images pattern
gigitux added a commit that referenced this pull request Dec 15, 2022
* Empty commit for release pull request

* Update the readme file with 9.1.1 release changes

* Product Query: Add `Sorted by title` preset. (#7949)

* Add `Sort by title` preset.

* sorted, thanks @nerrad

* Update the readme file with #7949 changes

* 9.1.1 Release: Add testing docs

* Atomic Block: fix ancestor definition (#7947)

* Fix the incorrect layout of Rating and Price in Classic Template and Products block (#7932)

* Fix the incorrect layout of Rating and Price in Classic Template

There were styles required in Rating Filter that were added globally and influenced the layout of Rating in Products block as well as Classic template. The styles were moved to the Rating Filter block

* Add dropdown version of Filter by Stock Status (#7831)

* Extend Filter by Stock Editor options with dropdown and single/multiple choice

* Add dropdown implementation for Filter by Stock Status

* Adjust font-sizes to the rest of the filters

* Add tests to Filter by Stock: dropdown and list variants

* Change test file extension from .js to .tsx, so it handles types as well

* Add E2E test to Filter by Stock checking if display style can be toggled

* When typing in Filter by Stock dropdown, handle the space so it highlights the suggestions

* Change the name of the filter blocks in the test files

* Remove unnecessary waiting step in E2E test for Filter by Stock

toMatchElement waits for an element for 30s by itself, hence waitForSelector usage was removed

* Improve the STOCK_STATUS_OPTIONS type handling

* Extract onDropdownChange function instead of inline arrow function

* Fix overlaping dropdown content with the wrapper when Filter by Stock was set to single

* Product Query: Add patterns (#7857)

* Product Query: First attempt at adding patterns

* Product Query: Update patterns and the default block template

* Product Query: And new and update existing patterns

* Product Query: Adjust layout of the Minimal Product Row pattern

* Product Query: Update pattern names

* Product Query: Polish spaces between blocks inside the patterns

* Product Query patterns: Link product titles and improve spacing between product elements

* Product Query patterns: Button font-size update

* Product Query patterns: Center the pagination

* Product Query patterns: Center the pagination for the default pattern

* Product Query patterns: Remove an empty column

* Product Query patterns: Remove an empty column from the product list with 1:1 images pattern

* Add dropdown version of Filter by Rating (#7771)

* Rename the setting section to match Filter by Attribute

* Add Display Style toggle to the block settings

* Set list as a default value of displayStyle for Filter by Rating

* Add dropdown variant of Filter by Rating

* Extend the Editor settings with selectType: single or multiple

* Adjust the styles of a FormTokenField to other dropdown

* Align Editor settings order and wording between Filter by Attribute and Rating

* Fix the issue with cut off corners of dropdown borders

* Provide translated screen reader messages and placeholder

* Revert the label property, which is necessary to display checkbox list

* Make classname for Rating component optional and remove styling in Filter by Rating

* Cover the case when filter with zero products needs string methods for comparison

* Handle Typescript errors and add ts-ignore annotations when necessary

* Remove explicit key prop assignment in Rating component

* Remove leftover property in type definition

* Refactor JSX element extension with custom properties to more robust way with object copy

* Filter by rating tests (#7845)

* Filter by Rating tests:
  - List single
  - List multiple
  - Dropdown single
  - Dropdown multiple

* Adjust the font-size of Filter by Rating dropdown to the rest of the filters

* Fix E2E tests after the Editor settings label has been changed

* Improve sorting in Filter by Rating dropdown

With this change the order of options is always descending: in the chips, suggestions, active filters and URL

* Change the name of the filter blocks in the test files

* Prevent single dropdown input to overflow the wrapper

The issue is fixed in three filters, hence a new shared styles file is created at the path assets/js/blocks/shared/styles/style.css

* Remove the unused styles of active options in Filter by Rating

Chosen options in Filter by Rating list have been bolded. That was the only filter that was doing it. Class was removed, but not the styles themselves which became obsolete. Removing the leftover styles then

* Change the approach of shared styles to fix the dropdown issue in filters

Instead of using direct classes, rewrite it to mixin and include in the filters

* Fix the Filter by Rating with Products block

The problem was with the Products block, that there was incorrect initial value of product ratings query

* Align the logic of getting the filters from URL for Filter by Rating with Filter by Stock

Co-authored-by: Luigi Teschio <[email protected]>

* Product Query - Enable "Inherit Query from template" option (#7641)

* Add Inherit Query from template option

* Update label

* Product Elements: Fix block settings (#7914)

* Product Elements: Fix block settings

* Rating: Fix inactive star color

* Product Rating: Fix color inheritance

* StyleAttributesUtils: Fix PHP notices and invalid CSS output (#7909)

* StyleAttributesUtils: Fix PHP notices and invalid CSS output. Closes #7899.

* StyleAttributesUtils: Fix border radius and width support

* StyleAttributesUtils: Fix border radius and border color support

* StyleAttributesUtils: Include additional checks to deal with PHP warnings

* StyleAttributesUtils: Improve the custom border array check

* Update MiniCart.php to fix price total amount on page load prices are including tax (#7832)

* Update MiniCart.php

Added an update to the '$cart_contents_total' variable on the 'get_cart_price_markup' function if $cart->display_prices_including_tax is active. Currently displaying wrong amount total on page load if items are already in the basket.

* Update MiniCart.php

Removed white spaces?

* Update MiniCart.php

Fixed IF statement

* Remove whitespace at end of line

Co-authored-by: Albert Juhé Lluveras <[email protected]>

* Product Query: implement compatibility with Filter by Rating block (#7792)

* Product Query: implement compatibility with Filter by Rating block #7631

Product Query: implement compatibility with Filter by Rating block

* address feedback

* address feedback

* add comment

* add new zip file link

* add missing class

* add testing instructions about #7947

* add new zip file link

* Update docs/internal-developers/testing/releases/911.md

Co-authored-by: Albert Juhé Lluveras <[email protected]>

* Update docs/internal-developers/testing/releases/911.md

Co-authored-by: Albert Juhé Lluveras <[email protected]>

* Update docs/internal-developers/testing/releases/911.md

Co-authored-by: Albert Juhé Lluveras <[email protected]>

* Update docs/internal-developers/testing/releases/911.md

Co-authored-by: Albert Juhé Lluveras <[email protected]>

* Update docs/internal-developers/testing/releases/911.md

Co-authored-by: Albert Juhé Lluveras <[email protected]>

* Bumping version strings to new version.

Co-authored-by: github-actions <[email protected]>
Co-authored-by: Daniel Dudzic <[email protected]>
Co-authored-by: Tung Du <[email protected]>
Co-authored-by: Luigi Teschio <[email protected]>
Co-authored-by: kmanijak <[email protected]>
Co-authored-by: Luke O'Regan <[email protected]>
Co-authored-by: Albert Juhé Lluveras <[email protected]>
gigitux added a commit that referenced this pull request Dec 21, 2022
* Empty commit for release pull request

* Update the readme file with 9.1.1 release changes

* Product Query: Add `Sorted by title` preset. (#7949)

* Add `Sort by title` preset.

* sorted, thanks @nerrad

* Update the readme file with #7949 changes

* 9.1.1 Release: Add testing docs

* Atomic Block: fix ancestor definition (#7947)

* Fix the incorrect layout of Rating and Price in Classic Template and Products block (#7932)

* Fix the incorrect layout of Rating and Price in Classic Template

There were styles required in Rating Filter that were added globally and influenced the layout of Rating in Products block as well as Classic template. The styles were moved to the Rating Filter block

* Add dropdown version of Filter by Stock Status (#7831)

* Extend Filter by Stock Editor options with dropdown and single/multiple choice

* Add dropdown implementation for Filter by Stock Status

* Adjust font-sizes to the rest of the filters

* Add tests to Filter by Stock: dropdown and list variants

* Change test file extension from .js to .tsx, so it handles types as well

* Add E2E test to Filter by Stock checking if display style can be toggled

* When typing in Filter by Stock dropdown, handle the space so it highlights the suggestions

* Change the name of the filter blocks in the test files

* Remove unnecessary waiting step in E2E test for Filter by Stock

toMatchElement waits for an element for 30s by itself, hence waitForSelector usage was removed

* Improve the STOCK_STATUS_OPTIONS type handling

* Extract onDropdownChange function instead of inline arrow function

* Fix overlaping dropdown content with the wrapper when Filter by Stock was set to single

* Product Query: Add patterns (#7857)

* Product Query: First attempt at adding patterns

* Product Query: Update patterns and the default block template

* Product Query: And new and update existing patterns

* Product Query: Adjust layout of the Minimal Product Row pattern

* Product Query: Update pattern names

* Product Query: Polish spaces between blocks inside the patterns

* Product Query patterns: Link product titles and improve spacing between product elements

* Product Query patterns: Button font-size update

* Product Query patterns: Center the pagination

* Product Query patterns: Center the pagination for the default pattern

* Product Query patterns: Remove an empty column

* Product Query patterns: Remove an empty column from the product list with 1:1 images pattern

* Add dropdown version of Filter by Rating (#7771)

* Rename the setting section to match Filter by Attribute

* Add Display Style toggle to the block settings

* Set list as a default value of displayStyle for Filter by Rating

* Add dropdown variant of Filter by Rating

* Extend the Editor settings with selectType: single or multiple

* Adjust the styles of a FormTokenField to other dropdown

* Align Editor settings order and wording between Filter by Attribute and Rating

* Fix the issue with cut off corners of dropdown borders

* Provide translated screen reader messages and placeholder

* Revert the label property, which is necessary to display checkbox list

* Make classname for Rating component optional and remove styling in Filter by Rating

* Cover the case when filter with zero products needs string methods for comparison

* Handle Typescript errors and add ts-ignore annotations when necessary

* Remove explicit key prop assignment in Rating component

* Remove leftover property in type definition

* Refactor JSX element extension with custom properties to more robust way with object copy

* Filter by rating tests (#7845)

* Filter by Rating tests:
  - List single
  - List multiple
  - Dropdown single
  - Dropdown multiple

* Adjust the font-size of Filter by Rating dropdown to the rest of the filters

* Fix E2E tests after the Editor settings label has been changed

* Improve sorting in Filter by Rating dropdown

With this change the order of options is always descending: in the chips, suggestions, active filters and URL

* Change the name of the filter blocks in the test files

* Prevent single dropdown input to overflow the wrapper

The issue is fixed in three filters, hence a new shared styles file is created at the path assets/js/blocks/shared/styles/style.css

* Remove the unused styles of active options in Filter by Rating

Chosen options in Filter by Rating list have been bolded. That was the only filter that was doing it. Class was removed, but not the styles themselves which became obsolete. Removing the leftover styles then

* Change the approach of shared styles to fix the dropdown issue in filters

Instead of using direct classes, rewrite it to mixin and include in the filters

* Fix the Filter by Rating with Products block

The problem was with the Products block, that there was incorrect initial value of product ratings query

* Align the logic of getting the filters from URL for Filter by Rating with Filter by Stock

Co-authored-by: Luigi Teschio <[email protected]>

* Product Query - Enable "Inherit Query from template" option (#7641)

* Add Inherit Query from template option

* Update label

* Product Elements: Fix block settings (#7914)

* Product Elements: Fix block settings

* Rating: Fix inactive star color

* Product Rating: Fix color inheritance

* StyleAttributesUtils: Fix PHP notices and invalid CSS output (#7909)

* StyleAttributesUtils: Fix PHP notices and invalid CSS output. Closes #7899.

* StyleAttributesUtils: Fix border radius and width support

* StyleAttributesUtils: Fix border radius and border color support

* StyleAttributesUtils: Include additional checks to deal with PHP warnings

* StyleAttributesUtils: Improve the custom border array check

* Update MiniCart.php to fix price total amount on page load prices are including tax (#7832)

* Update MiniCart.php

Added an update to the '$cart_contents_total' variable on the 'get_cart_price_markup' function if $cart->display_prices_including_tax is active. Currently displaying wrong amount total on page load if items are already in the basket.

* Update MiniCart.php

Removed white spaces?

* Update MiniCart.php

Fixed IF statement

* Remove whitespace at end of line

Co-authored-by: Albert Juhé Lluveras <[email protected]>

* Product Query: implement compatibility with Filter by Rating block (#7792)

* Product Query: implement compatibility with Filter by Rating block #7631

Product Query: implement compatibility with Filter by Rating block

* address feedback

* address feedback

* add comment

* add new zip file link

* add missing class

* add testing instructions about #7947

* add new zip file link

* Update docs/internal-developers/testing/releases/911.md

Co-authored-by: Albert Juhé Lluveras <[email protected]>

* Update docs/internal-developers/testing/releases/911.md

Co-authored-by: Albert Juhé Lluveras <[email protected]>

* Update docs/internal-developers/testing/releases/911.md

Co-authored-by: Albert Juhé Lluveras <[email protected]>

* Update docs/internal-developers/testing/releases/911.md

Co-authored-by: Albert Juhé Lluveras <[email protected]>

* Update docs/internal-developers/testing/releases/911.md

Co-authored-by: Albert Juhé Lluveras <[email protected]>

* Bumping version strings to new version.

* Remove feature flag from Products block (#8001)

* Remove feature flag from Products block

* Remove Products block from feature flags documentation

* Empty commit for release pull request

* Update changelog

* Add zip file link

* Bumping version strings to new version.

Co-authored-by: github-actions <[email protected]>
Co-authored-by: Daniel Dudzic <[email protected]>
Co-authored-by: Tung Du <[email protected]>
Co-authored-by: Luigi Teschio <[email protected]>
Co-authored-by: kmanijak <[email protected]>
Co-authored-by: Luke O'Regan <[email protected]>
Co-authored-by: Albert Juhé Lluveras <[email protected]>
gigitux added a commit that referenced this pull request Dec 22, 2022
* Empty commit for release pull request

* Update the readme file with 9.1.1 release changes

* Product Query: Add `Sorted by title` preset. (#7949)

* Add `Sort by title` preset.

* sorted, thanks @nerrad

* Update the readme file with #7949 changes

* 9.1.1 Release: Add testing docs

* Atomic Block: fix ancestor definition (#7947)

* Fix the incorrect layout of Rating and Price in Classic Template and Products block (#7932)

* Fix the incorrect layout of Rating and Price in Classic Template

There were styles required in Rating Filter that were added globally and influenced the layout of Rating in Products block as well as Classic template. The styles were moved to the Rating Filter block

* Add dropdown version of Filter by Stock Status (#7831)

* Extend Filter by Stock Editor options with dropdown and single/multiple choice

* Add dropdown implementation for Filter by Stock Status

* Adjust font-sizes to the rest of the filters

* Add tests to Filter by Stock: dropdown and list variants

* Change test file extension from .js to .tsx, so it handles types as well

* Add E2E test to Filter by Stock checking if display style can be toggled

* When typing in Filter by Stock dropdown, handle the space so it highlights the suggestions

* Change the name of the filter blocks in the test files

* Remove unnecessary waiting step in E2E test for Filter by Stock

toMatchElement waits for an element for 30s by itself, hence waitForSelector usage was removed

* Improve the STOCK_STATUS_OPTIONS type handling

* Extract onDropdownChange function instead of inline arrow function

* Fix overlaping dropdown content with the wrapper when Filter by Stock was set to single

* Product Query: Add patterns (#7857)

* Product Query: First attempt at adding patterns

* Product Query: Update patterns and the default block template

* Product Query: And new and update existing patterns

* Product Query: Adjust layout of the Minimal Product Row pattern

* Product Query: Update pattern names

* Product Query: Polish spaces between blocks inside the patterns

* Product Query patterns: Link product titles and improve spacing between product elements

* Product Query patterns: Button font-size update

* Product Query patterns: Center the pagination

* Product Query patterns: Center the pagination for the default pattern

* Product Query patterns: Remove an empty column

* Product Query patterns: Remove an empty column from the product list with 1:1 images pattern

* Add dropdown version of Filter by Rating (#7771)

* Rename the setting section to match Filter by Attribute

* Add Display Style toggle to the block settings

* Set list as a default value of displayStyle for Filter by Rating

* Add dropdown variant of Filter by Rating

* Extend the Editor settings with selectType: single or multiple

* Adjust the styles of a FormTokenField to other dropdown

* Align Editor settings order and wording between Filter by Attribute and Rating

* Fix the issue with cut off corners of dropdown borders

* Provide translated screen reader messages and placeholder

* Revert the label property, which is necessary to display checkbox list

* Make classname for Rating component optional and remove styling in Filter by Rating

* Cover the case when filter with zero products needs string methods for comparison

* Handle Typescript errors and add ts-ignore annotations when necessary

* Remove explicit key prop assignment in Rating component

* Remove leftover property in type definition

* Refactor JSX element extension with custom properties to more robust way with object copy

* Filter by rating tests (#7845)

* Filter by Rating tests:
  - List single
  - List multiple
  - Dropdown single
  - Dropdown multiple

* Adjust the font-size of Filter by Rating dropdown to the rest of the filters

* Fix E2E tests after the Editor settings label has been changed

* Improve sorting in Filter by Rating dropdown

With this change the order of options is always descending: in the chips, suggestions, active filters and URL

* Change the name of the filter blocks in the test files

* Prevent single dropdown input to overflow the wrapper

The issue is fixed in three filters, hence a new shared styles file is created at the path assets/js/blocks/shared/styles/style.css

* Remove the unused styles of active options in Filter by Rating

Chosen options in Filter by Rating list have been bolded. That was the only filter that was doing it. Class was removed, but not the styles themselves which became obsolete. Removing the leftover styles then

* Change the approach of shared styles to fix the dropdown issue in filters

Instead of using direct classes, rewrite it to mixin and include in the filters

* Fix the Filter by Rating with Products block

The problem was with the Products block, that there was incorrect initial value of product ratings query

* Align the logic of getting the filters from URL for Filter by Rating with Filter by Stock

Co-authored-by: Luigi Teschio <[email protected]>

* Product Query - Enable "Inherit Query from template" option (#7641)

* Add Inherit Query from template option

* Update label

* Product Elements: Fix block settings (#7914)

* Product Elements: Fix block settings

* Rating: Fix inactive star color

* Product Rating: Fix color inheritance

* StyleAttributesUtils: Fix PHP notices and invalid CSS output (#7909)

* StyleAttributesUtils: Fix PHP notices and invalid CSS output. Closes #7899.

* StyleAttributesUtils: Fix border radius and width support

* StyleAttributesUtils: Fix border radius and border color support

* StyleAttributesUtils: Include additional checks to deal with PHP warnings

* StyleAttributesUtils: Improve the custom border array check

* Update MiniCart.php to fix price total amount on page load prices are including tax (#7832)

* Update MiniCart.php

Added an update to the '$cart_contents_total' variable on the 'get_cart_price_markup' function if $cart->display_prices_including_tax is active. Currently displaying wrong amount total on page load if items are already in the basket.

* Update MiniCart.php

Removed white spaces?

* Update MiniCart.php

Fixed IF statement

* Remove whitespace at end of line

Co-authored-by: Albert Juhé Lluveras <[email protected]>

* Product Query: implement compatibility with Filter by Rating block (#7792)

* Product Query: implement compatibility with Filter by Rating block #7631

Product Query: implement compatibility with Filter by Rating block

* address feedback

* address feedback

* add comment

* add new zip file link

* add missing class

* add testing instructions about #7947

* add new zip file link

* Update docs/internal-developers/testing/releases/911.md

Co-authored-by: Albert Juhé Lluveras <[email protected]>

* Update docs/internal-developers/testing/releases/911.md

Co-authored-by: Albert Juhé Lluveras <[email protected]>

* Update docs/internal-developers/testing/releases/911.md

Co-authored-by: Albert Juhé Lluveras <[email protected]>

* Update docs/internal-developers/testing/releases/911.md

Co-authored-by: Albert Juhé Lluveras <[email protected]>

* Update docs/internal-developers/testing/releases/911.md

Co-authored-by: Albert Juhé Lluveras <[email protected]>

* Bumping version strings to new version.

* Remove feature flag from Products block (#8001)

* Remove feature flag from Products block

* Remove Products block from feature flags documentation

* Empty commit for release pull request

* Update changelog

* Add zip file link

* Bumping version strings to new version.

* Enable Product SKU and Product Stock Indicator in Core (#8009)

* Update changelog

* Update changelog

* Empty commit for release pull request

* Bumping version strings to new version.

Co-authored-by: github-actions <[email protected]>
Co-authored-by: Daniel Dudzic <[email protected]>
Co-authored-by: Tung Du <[email protected]>
Co-authored-by: Luigi Teschio <[email protected]>
Co-authored-by: kmanijak <[email protected]>
Co-authored-by: Luke O'Regan <[email protected]>
Co-authored-by: Albert Juhé Lluveras <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block-type: product-query Issues related to/affecting all product-query variations. type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Product Query [3]: Implement first set of patterns specific to the Product Query block
4 participants