-
Notifications
You must be signed in to change notification settings - Fork 221
MVP: Attribute filter block powered interactivity API #11749
Conversation
Note: we also need to do this with `/page/x`
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.
The code is looking good. For some reason in testing I couldn't see front-end rendering. Not sure what is going on, I will debug tomorrow.
Anyway for the code aspect everything looks pretty good to me. I had one mention about the deepEqual. I will leave to you what you think is best to do there.
assets/js/blocks/collection-filters/inner-blocks/attribute-filter/edit.tsx
Show resolved
Hide resolved
@samueljseay I added some notices to inform merchant when there isn't any products has the selected attribute as well as when there is no attribute selected. Can you please take another look at 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.
Nit pick from me, otherwise looks good 🚢
|
||
export const AttributesPlaceholder = ( { | ||
children, | ||
}: React.PropsWithChildren ) => ( |
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 utility type is for optional children, is children optional here?
If children is mandatory and also you have no other props this could just be typed as:
}: React.PropsWithChildren ) => ( | |
}: { children: ReactNode } ) => ( |
What
Partial fixes #10812
This PR adds the initial version of the new attribute filter block powered by Interactivity API. This MVP supports:
Testing Instructions
Please consider any edge cases this change may have, and also other areas of the product this may impact.
Collection Filters
block to theProduct Collection
block.Collection Attribute Filter
block to theCollection Filters
block.WooCommerce Visibility
Required:
Checklist
Required:
[type]
label or a[skip-changelog]
label.Conditional:
[skip-changelog]
label is not present).Changelog