-
Notifications
You must be signed in to change notification settings - Fork 219
Product Query: implement compatibility with Filter by Rating block #7792
Conversation
The release ZIP for this PR is accessible via:
|
TypeScript Errors ReportFiles with errors: 429 🎉 🎉 This PR does not introduce new TS errors. |
Size Change: 0 B Total Size: 975 kB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is testing well on my end! 🎉 I left some comments about the code reuse and E2E tests, please take a look at the review comments for more details.
src/BlockTypes/ProductQuery.php
Outdated
* @return array | ||
*/ | ||
private function get_filter_by_rating_query() { | ||
$filter_rating_values = get_query_var( RatingFilter::RATING_QUERY_VAR ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use rating_filter_query_args
from get_query_vars_from_filter_blocks()
here so we can centralize the references of filter query variable constants?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No strong opinion. Other methods (e.g:get_filter_by_price_query
) don't use get_query_vars_from_filter_blocks
. I'm happy to refactor them!
if ( empty( $filter_rating_values ) ) { | ||
return array(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should move the early return condition to after the $filter_rating_values
declaration so that we can save unnecessary wc_get_product_visibility_term_ids()
calls that call get_terms()
under the hood.
@@ -26,6 +26,8 @@ import { | |||
waitForCanvas, | |||
} from '../../utils'; | |||
|
|||
import { saveOrPublish } from '../../../utils'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can import saveOrPublish
from @woocommerce/blocks-test-utils
to avoid multiple levels of relative imports.
src/BlockTypes/ProductQuery.php
Outdated
|
||
$rating_query = array_map( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think $rating_terms
better explains the value of this variable.
$rating_query = array_map( | |
$rating_terms = array_map( |
src/BlockTypes/ProductQuery.php
Outdated
'tax_query' => array( | ||
array( | ||
'field' => 'term_taxonomy_id', | ||
'terms' => $rating_query, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'terms' => $rating_query, | |
'terms' => $rating_terms, |
src/BlockTypes/ProductQuery.php
Outdated
'field' => 'term_taxonomy_id', | ||
'terms' => $rating_query, | ||
'operator' => 'IN', | ||
'rating_filter' => true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add taxonomy
property here as well, to match with the query used by WC core?
'taxonomy' => 'product_visibility',
it( 'should render', async () => { | ||
await expect( page ).toMatchElement( block.class ); | ||
} ); | ||
|
||
it( 'should render products', async () => { | ||
const products = await page.$$( | ||
selectors.frontend.queryProductsList | ||
); | ||
|
||
expect( products ).toHaveLength( 5 ); | ||
} ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we have the same E2E tests for Product Query, I don't think we need these tests here, in the Filter by Rating test suite.
await page.waitForXPath( | ||
block.selectors.editor.filterButtonToggle | ||
); | ||
|
||
const [ filterButtonToggle ] = await page.$x( | ||
selectors.editor.filterButtonToggle | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
page.waitForXPath()
returns an element, so we can combine these calls into one, something like:
await page.waitForXPath( | |
block.selectors.editor.filterButtonToggle | |
); | |
const [ filterButtonToggle ] = await page.$x( | |
selectors.editor.filterButtonToggle | |
); | |
const filterButtonToggle = await page.waitForXPath( | |
block.selectors.editor.filterButtonToggle | |
); |
By the way, we introduced some new utilities to interact with inspector settings, can you take a look at them to see if we can use them here?
woocommerce-blocks/tests/e2e/specs/backend/product-query/advanced-filters.ts
Lines 149 to 155 in 8c857e2
await setCheckbox( | |
await getToggleIdByLabel( 'Show only products on sale' ) | |
); | |
expect( await getPreviewProducts() ).toHaveLength( saleCount ); | |
await unsetCheckbox( | |
await getToggleIdByLabel( 'Show only products on sale' ) | |
); |
const parsedURL = new URL( pageURL ); | ||
|
||
expect( isRefreshed ).toBeCalledTimes( 1 ); | ||
expect( products ).toHaveLength( FIVE_STAR_PRODUCTS_AMOUNT ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assertion can be false positive, as we have 5 products in total, and they have the same rating. We should improve the test products to have different rating data for some products. I feel that improving the test data is a bit of out scope for this PR, so I think it's better to create an issue for it and continue working there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I created #7853
|
||
it( 'should refresh the page only if the user click on button', async () => { | ||
await page.goto( editorPageUrl ); | ||
await openBlockEditorSettings(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we call openBlockEditorSettings()
below, this isn't necessary to call it here.
@@ -54,7 +57,7 @@ const goToShopPage = () => | |||
waitUntil: 'networkidle0', | |||
} ); | |||
|
|||
describe.skip( `${ block.name } Block`, () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure we wanna re-enable this test here? Based on #7744 it sounds like we are waiting on the next release of Gutenberg to do so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still skip tests related to deleteAllTemplates
so it doesn't conflict with #7744. However, we should comment there to inform people about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this, and I disabled only the test regarding the PHP Classic Template (the only one that requires deleteAllTemplates
function).
My idea is to open a PR for doing the same thing for other filters too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! I also agree with @dinhtungdu 's suggestion of registering this info on the relevant issue for our future reference.
Script Dependencies ReportThe
This comment was automatically generated by the |
0b6c0ef
to
db8d8d8
Compare
db8d8d8
to
461af72
Compare
…ocks into add/filter-by-review-product-query
Thanks for the review! I address your feedback except for this one. If we decide to refactor, it makes sense do for all the methods! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for the udpate! 🚢
If we decide to refactor, it makes sense do for all the methods!
We should do this in a separate PR IMO.
I'm not sure anymore that it makes sense to re-use |
Make sense! Let's keep it as it is for now. If later we want to refactor, we need to improve that piece of code, maybe saving it as a class property, to avoid unnecessary calculations. |
* 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 <gigitux@gmail.com> * 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 <contact@albertjuhe.com> * 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 <contact@albertjuhe.com> * Update docs/internal-developers/testing/releases/911.md Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update docs/internal-developers/testing/releases/911.md Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update docs/internal-developers/testing/releases/911.md Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update docs/internal-developers/testing/releases/911.md Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Bumping version strings to new version. Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com> Co-authored-by: Tung Du <dinhtungdu@gmail.com> Co-authored-by: Luigi Teschio <gigitux@gmail.com> Co-authored-by: kmanijak <karol.manijak@automattic.com> Co-authored-by: Luke O'Regan <oregan.luke@gmail.com> Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* 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 <gigitux@gmail.com> * 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 <contact@albertjuhe.com> * 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 <contact@albertjuhe.com> * Update docs/internal-developers/testing/releases/911.md Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update docs/internal-developers/testing/releases/911.md Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update docs/internal-developers/testing/releases/911.md Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update docs/internal-developers/testing/releases/911.md Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * 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 <github-actions@github.com> Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com> Co-authored-by: Tung Du <dinhtungdu@gmail.com> Co-authored-by: Luigi Teschio <gigitux@gmail.com> Co-authored-by: kmanijak <karol.manijak@automattic.com> Co-authored-by: Luke O'Regan <oregan.luke@gmail.com> Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* 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 <gigitux@gmail.com> * 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 <contact@albertjuhe.com> * 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 <contact@albertjuhe.com> * Update docs/internal-developers/testing/releases/911.md Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update docs/internal-developers/testing/releases/911.md Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update docs/internal-developers/testing/releases/911.md Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update docs/internal-developers/testing/releases/911.md Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * 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 <github-actions@github.com> Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com> Co-authored-by: Tung Du <dinhtungdu@gmail.com> Co-authored-by: Luigi Teschio <gigitux@gmail.com> Co-authored-by: kmanijak <karol.manijak@automattic.com> Co-authored-by: Luke O'Regan <oregan.luke@gmail.com> Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
This PR adds support for the Filter By Rating block.
Fixes #7631
Testing
Automated Tests
User Facing Testing
WooCommerce Visibility
Performance Impact
Changelog