* fix bug with add to cart
* prettier
* migrate to Event
* prettier
* Update assets/js/atomic/components/product/button/index.js
update to fix on sequential adds
Co-Authored-By: Albert Juhé Lluveras <aljullu@gmail.com>
* Avoid dispatching cart update event on initial mount
* add condition to check if Event is defined
* Add context for collection data query
* Introduce useCollectionData hook
* Implement hook in filter blocks
* Update API to handle nuances of counts instead of client side
* Clone requests so original is untouched
* Prevent dupe requests is working
* Cleanup
* Update assets/js/base/hooks/use-collection-data.js
Co-Authored-By: Albert Juhé Lluveras <aljullu@gmail.com>
* Update assets/js/base/hooks/use-collection-data.js
Co-Authored-By: Albert Juhé Lluveras <aljullu@gmail.com>
* Feedback
* Remove context
* Helper to get namespace routes from the REST Api
* Add routes to store settings
* HydrateRestApiData component
* Correct usage of useSelect
* Remove lodash
* Move code to HOC
* Remove language files and po2json generation scripts
* Add action filter and function to load core translations
* Use pre_load_script_translations
* Remove script actions
* docblock
There was no need to have a const for the default state and also needed to make sure we’re not mutating it because it would result in the mutation of the default state. This in turn meant that on the initial reducing action, the default state in the store would have a ghost value.
* Only do instant updates if filter button is disabled
* Update assets/js/blocks/price-filter/block.js
Co-Authored-By: Albert Juhé Lluveras <aljullu@gmail.com>
* Remove minConstraint and maxConstraint from price filter state
* Remove 'useMemo' from minConstraint and maxConstraint
* Make sure minConstraint and maxConstraint are numbers before updating min/max prices
* Make sure non-valid price constraints don't make it to usePrevious
* Remove again track min/max constraint useEffect
* All Products block with filters: avoid showing loading placeholders if there are no results
* Hide sort select and show message when no products are available
* Add no result templates
* Remove product-grid
* Move images to assets dir
* Update images
* Switch functions to Components
* Capitals
* add missing context
* Add reviews to Category endpoint
* add option to show categories with reviews
* update label text if we're using reviews for counting
* update reviews count to use raw sql
* add flag before querying review count
* add review_count to collection data & schema
* fix PR code review problems
* update tests to it expects the new collection param
* add note about review_count is schema
* Use same query for headers collection
* All Products: avoid pagination disappearing when switching pages/changing sort value (take 2)
* Cleanup
* fixes after rebase
* Make it work after last rebase
* only do page change when queryState.page has changed.
* Fixwoocommerce/woocommerce-blocks#1198 again
* Remove previousPage and isInitialized checks
* Enable preview for price filter block
Using the defaults works fine, so no options required.
* Attribute preview via block attribute
* Add sample content for preview
* remove unnecessary key
* remove unneeded export