woocommerce/docs/product-collection-block
Manish Menaria e28b0aa9ea
Product Collection: Support registering product collection that isn't displayed in Collection Chooser (#52057)
* Filter product collection variations by 'block' scope

This commit updates the product collection feature to only show variations
with the 'block' scope in the collection chooser. To achieve this:

1. Added 'block' to the scope array for various product collection variations
   (best-sellers, featured, hand-picked, new arrivals, on-sale, related,
   top-rated, and upsells).
2. Modified the collection chooser logic to filter variations based on the
   'block' scope.

* Product Collection: Hide collection chooser toolbar for non-block scoped collections

This commit modifies the ToolbarControls component in the Product Collection block to conditionally render the CollectionChooserToolbar. The toolbar is now only displayed for collections with a scope that includes 'block'.

* Add scope property to product collections in E2E tests

This commit adds the 'scope' property to all registered product collections
in the E2E test plugin. The 'scope' is set to ['block'] for each collection.

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Rename isShowCollectionChooserToolbar to showCollectionChooserToolbar
for better readability.

* Add documentation and refactor for product collection scope

This commit introduces the following changes:

1. Update documentation to explain the `scope` argument for product collections
2. Refactor Collection Chooser and toolbar controls to handle default scope
3. Remove explicit `scope` from test collections to align with default behavior

* Add E2E tests for Product Collection scope argument

This commit adds E2E tests to verify the behavior of Product Collections
registered with different scopes. It includes:
- Tests for collections with 'inserter' and 'block' scopes
- Verification of visibility in Collection Chooser
- Checks for 'Choose collection' button visibility

* Generate manifest file

* Generate manifest file

* docs: Remove unsupported emojis from product collection documentation

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-22 14:02:32 +05:30
..
README.md create product collection category and move to main docs folder (#50368) 2024-08-05 11:51:32 -04:00
dom-events.md Update Markdown lint allowing the same headings if they're not siblings (#51438) 2024-09-17 12:44:15 +02:00
register-product-collection.md Product Collection: Support registering product collection that isn't displayed in Collection Chooser (#52057) 2024-10-22 14:02:32 +05:30

README.md

category_title category_slug post_title
Product Collection Block product-collection Product collection block