Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Product Filter: Attribute (Beta) block - Fix block preview (#45558)
* Pass isPreview prop to inner blocks of the Product Filter block * Add logic to render preview block when in Preview mode * Add changefile(s) from automation for the following project(s): woocommerce-blocks --------- Co-authored-by: github-actions <github-actions@github.com>
- Loading branch information
1 parent
1c1dc10
commit 85ec4a8
Showing
5 changed files
with
85 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...ommerce-blocks/assets/js/blocks/product-filter/inner-blocks/attribute-filter/constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
export const attributeOptionsPreview = [ | ||
{ | ||
id: 23, | ||
name: 'Blue', | ||
slug: 'blue', | ||
attr_slug: 'blue', | ||
description: '', | ||
parent: 0, | ||
count: 4, | ||
}, | ||
{ | ||
id: 29, | ||
name: 'Gray', | ||
slug: 'gray', | ||
attr_slug: 'gray', | ||
description: '', | ||
parent: 0, | ||
count: 3, | ||
}, | ||
{ | ||
id: 24, | ||
name: 'Green', | ||
slug: 'green', | ||
attr_slug: 'green', | ||
description: '', | ||
parent: 0, | ||
count: 3, | ||
}, | ||
{ | ||
id: 25, | ||
name: 'Red', | ||
slug: 'red', | ||
attr_slug: 'red', | ||
description: '', | ||
parent: 0, | ||
count: 4, | ||
}, | ||
{ | ||
id: 30, | ||
name: 'Yellow', | ||
slug: 'yellow', | ||
attr_slug: 'yellow', | ||
description: '', | ||
parent: 0, | ||
count: 1, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...ns/woocommerce/changelog/45558-fix-45491-incorrect-product-filter-attribute-block-preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: fix | ||
|
||
Add block preview to Product Filter: Attribute (Beta) block |