woocommerce/plugins/woocommerce-blocks/assets/js/blocks/product-collection
Karol Manijak 8bdc78c777
Product Collection: Trigger `wc-blocks_product_list_rendered` JS event (#50166)
* Dispatch JS event about PC being rendered

* Revert format changes

* Write the callback

* Add functions descriptions

* Add changelog

* Remove empty line

* Add tests

* Rename test cases

* Replace waiting for page load with more reliable expect.poll

* Remove leftover step

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* Fix typo in function name

* Add collection name to default Product Collection block

* Expect collection name in the event

* Expose the collection name through IAPI context

* Send the collection name with the event

* Trigger event also on page change

* Remove unused CUSTOM collection type

* Provide documentation

* Update TOC

* Update tests that verify the event payload

* Improve E2E tests further

* Don't add a Product Catalog collection type to default collection

* Avoid repeating the same piece of code by extracting some function on tag processor

* Rename function to better depict its purpose

* Move the documentation to the right place

* Remove the unused variable

* Add example to dom-events doc

* Update documentation

* Update docs manifest

* Attach default collection name

* Add the default collection context in PHP so it covers all the cases

* Prevent exposing product catalog collection name in event

* Update docs

* Update test

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
2024-08-13 12:29:04 +02:00
..
collections Product Collection: add control to toggle whether block is filterable in non archive context (#49627) 2024-07-24 11:51:53 +02:00
edit Product Collection: Remove automatic migration code (#50440) 2024-08-13 11:29:07 +02:00
inner-blocks/no-results New flow of adding Product Collection and basic set of Collections (#42696) 2023-12-27 11:07:27 +01:00
variations Restructure Product Collection editor files (https://github.com/woocommerce/woocommerce-blocks/pull/11981) 2023-12-06 15:50:24 +01:00
block.json Product Collection: Enable Context-Aware Previews by Adding `usesReference` to `registerProductCollection` (#49796) 2024-08-01 15:33:27 +05:30
constants.ts Product Collection: add control to toggle whether block is filterable in non archive context (#49627) 2024-07-24 11:51:53 +02:00
frontend.tsx Product Collection: Trigger `wc-blocks_product_list_rendered` JS event (#50166) 2024-08-13 12:29:04 +02:00
icon.tsx Foundation of New Product Collection Block (https://github.com/woocommerce/woocommerce-blocks/pull/9352) 2023-05-15 08:51:49 +00:00
index.tsx Fix incompability of Query Pagination block with Product Collection (#47749) 2024-05-23 13:01:57 +02:00
save.tsx Foundation of New Product Collection Block (https://github.com/woocommerce/woocommerce-blocks/pull/9352) 2023-05-15 08:51:49 +00:00
style.scss Improve Accessibility in Product Collection Navigation (#44599) 2024-02-19 11:35:14 +05:30
tracks-utils.ts Fix: handle undefined templateSlug in Product Collection tracking utils (#47504) 2024-05-16 11:17:52 +05:30
types.ts Product Collection: Trigger `wc-blocks_product_list_rendered` JS event (#50166) 2024-08-13 12:29:04 +02:00
utils.tsx Product Collection: Trigger `wc-blocks_product_list_rendered` JS event (#50166) 2024-08-13 12:29:04 +02:00