This PR is meant to improve the UI and UX behind the Attributes filter
within the Inspector Controls of the “Products (Beta)“ block.
Also included:
* Refactor `useProductAttributes` hook
* Move it into the shared hooks.
* Fetch both terms AND attributes via the API (previously,
we got the attributes from the settings, but we'd get
partial objects compared to the API? Maybe a follow-up
to this could be to check why the attributes stored in
the settings are incomplete?)
* Make sure the return values match the ones expected
from search items.
* Remove attribute-related types from PQ directory
* Improve functionality of `SearchListControl`
* Allow the search input to be a Token based input.
* Allow for search input to search even collapsed properties.
* Use core `CheckboxControl` instead of radio buttons for
items having children (includes undeterminated state).
* Enable removal of tokens from the input
* Improve styles:
* Refactor classnames for `SearchItem`.
* Add more semantic classes.
* Align count label and caret to the right.
* Make caret switch direction on expanded.
* `cursor: pointer` on collapsible items.
* Indent children of collapsible items.
* Correctly pass through class names to search item
* Enable keyboard navigation for collapsible items
* Add link to manage attributes
* Change label inside the inspector controls
* Make search list attached when token type
* Implement more sophisticated behavior of parent checkbox
* If indeterminate or unchecked, it will check all children.
* If checked, it will uncheck all children.
* Remove hardcoded `isSingle` from `expandableSearchListItem`
* Remove old view switcher component (not used)
* Switch in list view
* useSelect
* Optional selection of parent block on changing view
---------
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* Add tests for pushChanges and dirty props
* Update assets/js/data/cart/test/push-changes.ts
Co-authored-by: Mike Jolley <mike.jolley@me.com>
---------
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* use correct path when running php unit tests
* Update package.json
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
---------
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
* Merge tax_query of attributes and visibility taxonomies when building Products query
* Add tests confirming the tax_query is merged correctly
* Improve syntax after code review
* Update release steps mentioning the version on the WooCommerce.com plugin page takes some hours to update
* Replace 'tomorrow' with 'the following day'
* Make the customer account icon bigger to match the mini-cart one
* Add variation to increase the icon size for new blocks
* Improve class name
* Add variation explanation
* Add default attributes
* Check if WordPress version is 6.1.1 and higher to allow for template conversion
* Change the version the conversion is available from, from 6.1.1 to 6.1
* Empty commit for release pull request
* update 9.7.0 changelog for readme.txt
* bump WC versions
* 9.7.0 testing notes
* Update 970.md
* remove 7945 and update 8489 testing note
* Remove 8264 testing notes
* remove 8482 from testing instructions
* Fix alignment of Add to Cart form block (https://github.com/woocommerce/woocommerce-blocks/pull/8578)
* update testing zip after cherry-picking 8578
* update changelog
* Move testing steps woocommerce/woocommerce-blocks#8438 to experimental section (https://github.com/woocommerce/woocommerce-blocks/pull/8580)
* Fix image is not showing at correct position (https://github.com/woocommerce/woocommerce-blocks/pull/8585)
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
* fix 8478 testing note
* fix md error cause the last section hidden
* Add to Cart Form Block > Ensure the editor preview is properly displayed with the Gutenberg plugin disabled (https://github.com/woocommerce/woocommerce-blocks/pull/8582)
* Update the editor styles for the add to cart form button so it is properly displayed with the Gutenberg plugin disabled.
* update for the input height.
* update the min-height
* update testing zip link
* Bumping version strings to new version.
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: kmanijak <karol.manijak@automattic.com>
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
* Update the editor styles for the add to cart form button so it is properly displayed with the Gutenberg plugin disabled.
* update for the input height.
* update the min-height
* Update the editor styles for the add to cart form button so it is properly displayed with the Gutenberg plugin disabled.
* update for the input height.
* update the min-height
* Update Interactivity API
* Change `wp` prefixes to `woo`
* Use `woo` prefix for the directives runtime bundle
* Update Interactivity API runtime
* Hardcode php from interactivity API
* Temporarily add gutenberg plugin as dependency
* Exclude Interactivity API files from phpcs checks
* Update Interactivity API js files
* Update Interactivity API php files
* Remove gutenberg from wp-env plugins
* Fix registered runtime paths
* Fix prefixes when getting attributes in directives
* Fix directive prefix in constants
* Avoid a Fatal error when importing `wp-html`
* Remove TODO comments from Interactivity API files
* Add missing prefix to some global functions
* Use true as value for boolean attributes
* Add `wp-html` file
* Change requires in `wp-html` with includes
* Add minimum structure for Single Product Details block
* Add Product Image Gallery woocommerce/woocommerce-blocks#8233
Add Product Image Gallery
* Add tests for Single Product Details block
* Add the initial basis for the Add to Cart button
* Trigger the single product add to cart action for each product type.
* wip: create block structure and add initial styles
* Add block details to the SingleProductDetails.php file
* Rename the block from add-to-cart-button to add-to-cart-form
* Update to use the cart icon.
* Implement the skeleton for the editor preview.
* Render tabs title with empty content
* Use woocommerce_output_product_data_tabs function to retrieve tabs data
* Update styles and add Notice for the display in the Editor.
* Update CSS.
* Add base tests for the new Add to Cart Form component.
* Add Product Image Gallery block
* remove support global styles
* remove support global styles
* Update the button CSS.
* Remove customizations for the Single Product Details block
* Update styles for the cart form.
* update td style.
* Update divs and CSS.
* Use conventional input instead of the experimental InputControl
* address CSS feedback
* add support for the custom classname
* remove save function
* Remove unnecessary console.log from the Edit.tsx file
* Remove block classname from block wrapper
* Remove unnecessary WooCommerce tabs filter from the BlockTemplatesController
* Remove attributes property from the block registration
* Remove isExperimental flag for the Single Product Details block
* Remove get_classes_and_styles_by_attributes method from SingleProductDetails block
* Prevent Single Product Details block from apppearing in Pages or Posts
* add second parameter to the subscribe function
* Implement the new design and copy provided for the editor.
* Make the notice compatible with dark themes.
* Some additional CSS tweaks
* adjust the padding for the input
* wrap the Single Product Template in a div with the product class
* Fix PHP Coding Standards warnings
* improve logic and increase coverage of unit test
* improve logic and increase coverage of unit test
* fix test
* format HTML
* fix edge case
* update @types/wordpress__data package
* update placeholder, icon and description
* update tsconfig
* update block name
* fix SCSS linter error
* address feedback
* create SingleProductTemplateCompatibility class
* Add Hooks compatibility
* remove not used file
* remove not used files
* Add compatibility layer for the Single Product template
* fix check
* address feedback
* remove unused import
* double empty line
* remove logic in the constructor
* remove hook
* generate the docs
* add missing hooks
* fix docs
* address feedback
* fix linter
* fix import
* Disable compatibility layer when the WooCommerce Product Grid Block block and WooCommerce Single Product Block are used (https://github.com/woocommerce/woocommerce-blocks/pull/8538)
* disable compatibility layer via hook
* update docs
* generate the docs
* fix version
* fix import
* fix code after merge
---------
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
* Add Store Breadcrumbs block to the blockified archive-product and product-search-results templates
* Make Product Title a link by default
This has been changed in the Products block, so it should be relfected here as well
* Move get_local_pickup_method_ids to LocalPickupUtils file
This is because we need it to be accessible by other classes.
* Remove pickup_location strings & get all collectable methods dynamically
---------
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
* Empty commit for release pull request
* Add changelog in readme.txt
* Add testing notes
* Remove change from testing notes
This requires AvaTax credentials for testing. So, we'll test for
regressions instead
* Check for null session before going forward (https://github.com/woocommerce/woocommerce-blocks/pull/8537)
* Fix Payment Options settings crash in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/8535)
* Ensure express payment buttons are visible next to each other (https://github.com/woocommerce/woocommerce-blocks/pull/8548)
* Update ZIP file
* Bumping version strings to new version.
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Niels Lange <info@nielslange.de>
* Empty commit for release pull request
* update readme
* Switch to select instead of resolveSelector (https://github.com/woocommerce/woocommerce-blocks/pull/8356)
* Mini Cart block - Fix the drawer content height to allow checkout button to show. (https://github.com/woocommerce/woocommerce-blocks/pull/8351)
* Add max-height to Mini Cart drawer.
By giving the Mini Cart contents a max height with the
-webkit-fill-available property, we can ensure that the browser chrome
is accounted for on mobile devices.
* Add `dvh` and keep `vh` as a fallback for height.
By adding `dvh`, we also account for non-webkit mobile browsers that
have the same hidden button issue.
See
https://github.com/woocommerce/woocommerce-blocks/pull/8351#pullrequestreview-1278867767
Keeping `vh` as a fallback, along with `-webkit-fill-available` gives us
the widest range of support.
* update readme with changelog
* add testing steps
* add pr links to readme
* Bumping version strings to new version.
* Check for null session before going forward (https://github.com/woocommerce/woocommerce-blocks/pull/8537)
* add testing instructions
* Empty commit for release pull request
* add zip link
* Update zip link
* update zip link for testing
* Bumping version strings to new version.
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: Daniel W. Robert <danielwrobert@users.noreply.github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
* Extract a blockified Product Archive Template to the templates
* Add templates to tsconfig.json so the files are resolved as part of the core code
* Add a encouragement note to use blockified version IF migration is available
* Add a Row block wrapping Product Results Count and Catalog Sorting blocks
* Move blockified product-archive from templates/ to assets/ directory
* Remove unnecessary margin from Product Results Count block
When used in a Row block in a blockified Archive Product template, Product Results Count had additional unnecessary margin which caused misalignment with the Catalog Sorting block
* Update the description of the Classic Template Editor placeholder
* Remove unnecessary entry in tsconfig.json to include templates directory
It was added couple of commits earlier, since the template was kept there, but it was decided to move it to assets directory, so entry is no longer necessary
* Differentiate the Classic Template placeholder description depending on the availability to convert to Products block
* Set margin for Catalog Sorting to 0, so it aligns properly when used in blockified Archive Product template
* Make the blockification config, so it covers the Product Archive as well as Single Product templates
* Move the product-archive specific functions from classic-template/index.tsx to the product-archive.ts
* Add alignment option to the Store Notices block and make the blockified template blocks aligned wide
That is required, so the Classic Template layout is preserved
* Create single-product.ts file which is a placeholder for the blockified Single Product template
* Make Blockified Product Archive template inherit the align attibute
* Simplify the interface of blockified templates
Expose function instead of two functions for allowing and disallowing conversion
* Add a BlockifiedTemplate type
* Rename and simplify the function checking if conversion of classic template to block version is possible
* Align the variable naming to use instead of
* Pass the Classic Template attributes to the blockified template instead of getting it from data store
* Include Breadcrumbs block in the Blockified Product Archive Template
* Consume alignment attributes of Catalog Sorting in the PHP render function
* Consume alignment attributes of Breadcrumbs in the PHP render function
* Remove align support from Catalog Sorting and add to Store Notices block
* Extend the get_classes_and_styles_by_attributes method with align and text_align attributes
* Add Archive Title block to the Blockified Classic Template
* Minor getRowBlock function refactor
* Add property to the classic templates and base the config on it instead of placeholder
* Add separate blockified template for a Product Search Results
* Pass attribute from classic template to No Results block in Product Search Results
* Extract the common functions between blockified archive-template and product-search-results to utils
* Enable 'Inherit query from template' in Products block by default when converting the Classic Template to blockified one
* Improve the naming of BlockifiedTemplateConfig type
* Differentiate Product Catalog and Products By * templates. The latter include Term Description block
* Change unclear ProductsBy to ProductTaxonomy in regards to classic template conversion
* Revert the margin fix which was added already on trunk
* Move the surrounding blocks as inner blocks of Products
* Hide the conversion behind the experimental build flag (as it was before)
* Restrict usage to the single product template.
* Update class prefix from wc to wp
* Move the add-to-cart-form block to atomic blocks so it is aligned with the updated structure adopted for single product related blocks.
* Address CR
* ditch woocommerce class.
* remove attributes key
* Add new styles to account for the removal of the .summary and .entry-summary selectors
* Narrow down the styles to the add-to-cart-form class.
* Wait for push changes before clicking place order
* Blur last field and wait for network requests when entering addresses
* Use correct quote style
* Add address_2 to fake test address
* Use correct property names when filling test address
* Use correct comment style
* Update address values to reflect what is in the config file
* Remove unnecessary waits
* Improve batch request checking when filling shipping and billing address
* Wait for network idle before selecting shipping address
* Add checkCustomerPushCompleted function
* Override checkout data with test email
* Fill in the checkout data when testing for terms and conditions text
* Improve comments
---------
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
* Fix notice persistence after dismissal
- This fix applied to the `incompatible payment gateway notice`.
- We used the same dismissal logic in the `sidebar compatibility notice`
* Get incompatible payments when initialized
We initially get the list of `globalPaymentMethods` shared from
the back-end as incompatible payments, because the front-end
`availablePaymentMethods` is empty before the
`paymentMethodsInitialized` state
* Introduce advanced notice dismissal handling
We want to display a dismissed incompatible gateways notice, when the
list of incompatible gateways is updated (e.g., a new incompatible
gateway is enabled)
* Use the full block name for the `Cart` & `Checkout`
* Update variable name for comprehension
* Fix TS errors
* Remove unused imports
* Add workflow to check valid links in all documentations
* Disable issue create link
* Correct storybook multiple components link
* Fix links
* Limit checks to certain paths
* Revert changes to contributors readme
* Empty commit for release pull request
* Add changelog to readme.txt
* Unset default customer state if it doesn't match country (https://github.com/woocommerce/woocommerce-blocks/pull/8460)
* Unset default state
* add controller for customers
* rename validation file
* explain fix inline
* address feedback
* revert back state logic
* Update src/StoreApi/Utilities/ValidationUtils.php
Co-authored-by: Mike Jolley <mike.jolley@me.com>
---------
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Update readme.txt
* Add testing notes
* Update testing notes
* Fix Customer account sidebar link incorrect margin in WP 6.2 (https://github.com/woocommerce/woocommerce-blocks/pull/8437)
* Fix Customer account sidebar link incorrect margin in WP 6.2
* Update class name to match the guidelines
* Prevent cart from breaking when item_data contains an array (https://github.com/woocommerce/woocommerce-blocks/pull/8440)
* Ensure array item data is removed
* Remove unused key
* Clean up code and add comments
* Check for null instead of empty
* Use plain foreach to filter and map arrays
* Add minimum height to Mini Cart Contents block in the Style Book (https://github.com/woocommerce/woocommerce-blocks/pull/8458)
* Update testing notes zip file
* Update testing notes
* Update testing notes file
* Bumping version strings to new version.
* Empty commit for release pull request
* Empty commit for release pull request
* disable compatibilty layer (https://github.com/woocommerce/woocommerce-blocks/pull/8507)
* update changelog and testing instructions
* add zip link
* Bumping version strings to new version.
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
* pin node version in nighlty build
* trigger action for this PR
* move step to its own file
* remove workflow_dispatch
* revert original trigger
---------
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
* wip: update blockified archive templates
* Update product archive title to Shop
* Update product search template to blockified version
* new default templates, all blocks are Products block inner blocks
* revert change to fallack eligible archive templates
* remove unneccessary translated strings
* only filter the archive title on the shop page
* add missing categories header for patterns
* remove the term description block on the fly
* explain the reason for removing the term description block
---------
Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
* Fix e2e tests which use the insertBlock function
* Move more instances of insertBlock to insertWCBlock
* Ensure block inserter is open before searching for a block
* Get rid of openWidgetsEditorBlockInserter
* Rename insertWCBlocks to insertBlockDontWaitForInsertClose
* Fix e2e tests of the Product Details block
* Migrate to insertBlockDontWaitForInsertClose instead of insertBlock
* Go to single product template
* Fix Product Details classname and slug in tests
* Replace usage of 'foo' variable name
* Fix typo in 'can not be inserted in a post' test
* Product Rating and Price: Re-add alignment controls in the All Products context.
* Add default values to align attributes for price and rating product elements
---------
Co-authored-by: tjcafferkey <tjcafferkey@gmail.com>
* Fix product categories & keyword filter not working
* Fix Product tags filter not working
* Make code readable by creating functions for the different parts of the query.
Functions:
- get_filter_by_product_categories_or_tags_query
- get_filter_by_keyword_query
Also rename the function `get_queries_by_attributes` to `get_queries_by_custom_attributes` to make it more clear what it does.
* Make function generic by including all taxonomies
As user can add custom taxonomies, we need to make sure that we include all taxonomies in the query.
To fetch all product taxonomies, I used following function:
```php
get_taxonomies( array( 'object_type' => array( 'product' ) ), 'names' )
```
* Minor improvements based on PR feedback
* Move null check for tax_query to function
* Update ataylorme/eslint-annotate-action to use node 16
* Update preactjs/compressed-size-action to use node 16
* Update actions/upload-artifact to v3
* Fix e2e tests which use the insertBlock function
* Move more instances of insertBlock to insertWCBlock
* Ensure block inserter is open before searching for a block
* Get rid of openWidgetsEditorBlockInserter
* Rename insertWCBlocks to insertBlockDontWaitForInsertClose
* Empty commit for release pull request
* Add changelog to readme.txt
* Unset default customer state if it doesn't match country (https://github.com/woocommerce/woocommerce-blocks/pull/8460)
* Unset default state
* add controller for customers
* rename validation file
* explain fix inline
* address feedback
* revert back state logic
* Update src/StoreApi/Utilities/ValidationUtils.php
Co-authored-by: Mike Jolley <mike.jolley@me.com>
---------
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Update readme.txt
* Add testing notes
* Update testing notes
* Fix Customer account sidebar link incorrect margin in WP 6.2 (https://github.com/woocommerce/woocommerce-blocks/pull/8437)
* Fix Customer account sidebar link incorrect margin in WP 6.2
* Update class name to match the guidelines
* Prevent cart from breaking when item_data contains an array (https://github.com/woocommerce/woocommerce-blocks/pull/8440)
* Ensure array item data is removed
* Remove unused key
* Clean up code and add comments
* Check for null instead of empty
* Use plain foreach to filter and map arrays
* Add minimum height to Mini Cart Contents block in the Style Book (https://github.com/woocommerce/woocommerce-blocks/pull/8458)
* Update testing notes zip file
* Update testing notes
* Update testing notes file
* Bumping version strings to new version.
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Ensure array item data is removed
* Remove unused key
* Clean up code and add comments
* Check for null instead of empty
* Use plain foreach to filter and map arrays
* WIP
* Deprecate isPaymentPristine and undeprecate isPaymentStarted
* Set payment status to FAILED or SUCCESS when the storeAPI fetch returns
* Remove FINISHED as a status
* Remove ready status
* Revert "Remove FINISHED as a status"
This reverts commit 38d66ed1d9565756d2373533c7a7c5b107a68ddd.
* Add payment status READY
* Removed payment statuses pristine, failed and success
* Remove deprecated selectors and update docs
* Rename the checkout events
* Merge conflicts
* Update test observer
* Update deprecation notice
* deprecation versions
---------
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Ensure array item data is removed
* Remove unused key
* Clean up code and add comments
* Check for null instead of empty
* Use plain foreach to filter and map arrays
* Add support for woocommerce_loop_add_to_cart_args filter in Products block
* Reuse placeholder
* Use isset() instead of array_key_exists() to keep code consistent
* Add aria-label attribute to Add to Cart button
* Add the initial basis for the Add to Cart button
* Trigger the single product add to cart action for each product type.
* Rename the block from add-to-cart-button to add-to-cart-form
* Update to use the cart icon.
* Implement the skeleton for the editor preview.
* Update styles and add Notice for the display in the Editor.
* Update CSS.
* Add base tests for the new Add to Cart Form component.
* Update the button CSS.
* Update styles for the cart form.
* update td style.
* Update divs and CSS.
* Use conventional input instead of the experimental InputControl
* Implement the new design and copy provided for the editor.
* Make the notice compatible with dark themes.
* Some additional CSS tweaks
* adjust the padding for the input
* Update the icon for the block to match the core icon button
* Add minimum structure for Single Product Details block
* Add tests for Single Product Details block
* wip: create block structure and add initial styles
* Add block details to the SingleProductDetails.php file
* Render tabs title with empty content
* Use woocommerce_output_product_data_tabs function to retrieve tabs data
* Remove customizations for the Single Product Details block
* Remove unnecessary console.log from the Edit.tsx file
* Remove block classname from block wrapper
* Remove unnecessary WooCommerce tabs filter from the BlockTemplatesController
* Remove attributes property from the block registration
* Remove isExperimental flag for the Single Product Details block
* Remove get_classes_and_styles_by_attributes method from SingleProductDetails block
* Prevent Single Product Details block from apppearing in Pages or Posts
* Fix PHP Coding Standards warnings
* update block name
* fix SCSS linter error
* move blocks into product-elements folder and rename to product-details
* avoid 404 error
* disable js asset enqueue
---------
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
* Empty commit for release pull request
* Add the changelog entries to readme.txt
* Remove internal change from testing notes
* Add testing notes for the release
* Update docs/internal-developers/testing/releases/960.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update docs/internal-developers/testing/releases/960.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update docs/internal-developers/testing/releases/960.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update docs/internal-developers/testing/releases/960.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update testing notes (960.md)
* Update images size in release notes (960.md)
* Update release notes (960.md) — images size
* Checkout/Store API - Allow partial pushes without country (https://github.com/woocommerce/woocommerce-blocks/pull/8425)
* Support partial push without country field
* Increase timeout to prevent excessive pushes
* Push on focusout
* Only flush inputs
* change debounce timer to 1s
---------
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
* Add link to PR that deprecated experimental functions (https://github.com/woocommerce/woocommerce-blocks/pull/8430)
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
* Update ZIP link after cherry-picking
* Add testing notes for the cherry picked PR
* Add changelog entry of the cherry picked PR
* Bumping version strings to new version.
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Support partial push without country field
* Increase timeout to prevent excessive pushes
* Push on focusout
* Only flush inputs
* change debounce timer to 1s
---------
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
* Support partial push without country field
* Increase timeout to prevent excessive pushes
* Push on focusout
* Only flush inputs
* change debounce timer to 1s
---------
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
* wrap the Single Product Template in a div with the product class
* improve logic and increase coverage of unit test
* improve logic and increase coverage of unit test
* fix test
* format HTML
* fix edge case
* address feedback
* fix name block and fix check
* wrap single product template only on the frontend
* Add Product Image Gallery woocommerce/woocommerce-blocks#8233
Add Product Image Gallery
* Add Product Image Gallery block
* remove support global styles
* remove support global styles
* address CSS feedback
* add support for the custom classname
* remove save function
* add second parameter to the subscribe function
* update @types/wordpress__data package
* update placeholder, icon and description
* update tsconfig
* WIP
* Change payment status from pristine to idle
* Deprecate isPaymentStarted and isPaymentFinished
* Correct comments
* Deprecate isPaymentPristine and undeprecate isPaymentStarted
* Set payment status to FAILED or SUCCESS when the storeAPI fetch returns
* Remove FINISHED as a status
* Remove ready status
* Revert "Remove FINISHED as a status"
This reverts commit 38d66ed1d9565756d2373533c7a7c5b107a68ddd.
* Add payment status READY
* Update use-payment-interface
* Removed payment statuses pristine, failed and success
* Remove deprecated selectors and update docs
* Deprecate isPaymentStarted in favour of isExpressPaymentStarted
* Fix tests
* Update assets/js/base/context/providers/cart-checkout/payment-events/index.tsx
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Mikes suggestions
* Change since version
* Fix tests
---------
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Reset margin on result count block
* Reset margin for catalog sort block
* reset margin and other fixes for breadcrumb block.
* Move styles to relevant files
* Remove newsletter repo example from the docs
The newsletter is not maintained anymore and we use the @woocommerce/extend-cart-checkout-block to showcase our extensibility points
* Update docs/README.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
---------
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Set inherit default to true when products is inserted on archive products templates
* Create new query attributes object
Co-authored-by: kmanijak <karol.manijak@automattic.com>
* Extract the products registration to a separate function
* Bring back variation name
* Move variation name
* Unregister the block before registering it again
* Use subscribe only on the site editor
* Undo change
* Try fixing tests
* Fix test
* Revert test only
---------
Co-authored-by: kmanijak <karol.manijak@automattic.com>
* Allow observers to set billingAddress by returning billingData
This is required since we didn't correctly deprecate billingData when we changed the name to billingAddress
* Add tests for shippingAddress and paymentMethodData
* Add mocked __internalSetPaymentMethodData to correct object
It was in registry, but should be in dispatch as the action is on the same store as the thunk. Registry is used for actions on other stores.
* Re-add FieldValidationStatus type
* Add FieldValidationStatus back
* Remove empty file
* Import FieldValidationStatus from correct place
* Remove import of deleted types file
* Add isObserverResponse type guard
* Use error constant instead of magic string in event emitter
* Remove composite project tsconfig
* Add ObserverResponse type
* Add types to emitEventWithAbort
* Check if paymentmethod data is an object before dispatching
* Set types on observer responses
* Add validationErrors type guards
* Add tests for validation typeguards
* Add validation errors as option on observer response
* Add more granular observer response types
* Check observer response has correct types before dispatching actions
* Force type on deprecated billingData and shippingData
* Remove unnecessary comment
* Add wrapper for __experimentalRegisterCheckoutFilters and deprecate it
* Update internal references from __experimentalRegisterCheckoutFilters
* Add wrapper for deprecated __experimentalApplyCheckoutFilter
* Update references from `__experimentalApplyCheckoutFilter`
With WordPress 6.2, the inspector controls are going to be
tabbed into a “Styles” and “Setting” section (where applicable).
Previously, in order to display our Feedback Prompt at the bottom
of the controls, we had hooked it into the “Colors” section
as a temporary/hacky solution to the problem.
Now that the styles sections are all moved, the problem
doesn't really exist anymore, and we can just place it
at the bottom of the controls.
* Prevent coupon error disappearing on blur if value unchanged
* Check for inline selector on coupon error
* Prevent coupon error disappearing on blur if value unchanged
* Check for inline selector on coupon error
* Update selector for coupon E2E test
* Empty commit for release pull request
* update readme
* Switch to select instead of resolveSelector (https://github.com/woocommerce/woocommerce-blocks/pull/8356)
* Mini Cart block - Fix the drawer content height to allow checkout button to show. (https://github.com/woocommerce/woocommerce-blocks/pull/8351)
* Add max-height to Mini Cart drawer.
By giving the Mini Cart contents a max height with the
-webkit-fill-available property, we can ensure that the browser chrome
is accounted for on mobile devices.
* Add `dvh` and keep `vh` as a fallback for height.
By adding `dvh`, we also account for non-webkit mobile browsers that
have the same hidden button issue.
See
https://github.com/woocommerce/woocommerce-blocks/pull/8351#pullrequestreview-1278867767
Keeping `vh` as a fallback, along with `-webkit-fill-available` gives us
the widest range of support.
* update readme with changelog
* add testing steps
* add pr links to readme
* Bumping version strings to new version.
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: Daniel W. Robert <danielwrobert@users.noreply.github.com>
- Revert the label change to "Add a coupon" so that it will be merged to WC Core and translation for the new string will be available.
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
* Capture notices from hidden block into siblings block
* switch to using a single context
* make change bwc
* support context as array in StoreNotice
* Handle single context use cases
* Capture notices from hidden block into siblings block
* switch to using a single context
* make change bwc
* add tests
* support context as array in StoreNotice
* move filter logic to Notice component
* Fix the alert icon's name
* Add "status" to the Alert's API
* Update the incompatible gateways notice's design
* Set the list's bullet points from CSS
Currently, the Cart block doesn't fully support Global Styles,
so, in orderto avoid providing the users with a confusing
or broken experience, we have decided to remove it
for the time being, until proper support has been added.
* Add get_collectible_method_ids function
* Add collectibleMethodIds to asset data registry
* Check whether method id is pickup_location/in collectibleMethodIds
* Allow selectShippingRate to be called without a package id
* Prevent collectible methods showing in the main shipping area
* Remove unnecessary pluck and add pickup_location to returned array
* No longer insert pickup_location in collectibleMethodIds
* Allow third party methods to influence low/high collection price
* Update useShippingData to consider any collectible method
* Add hasSelectedLocalPickup to shipping types
* Add dependency to selectShippingRate in useShippingData
* Register collectibleMethodIds as a callback
This is so the shipping methods get change to register before this is called. Passing a callback to `add` means it won't be called until just before it is output.
* Update supports key to 'local_pickup'
* Rename utils/shipping-rates to TS
* Convert to TS, add isPackageRateCollectible & hasCollectableRate
* Add tests for hasCollectableRate and isPackageRateCollectible
* Update shipping controller to output only method names
* Make PickupLocation shipping method support local_pickup
* Set prefersCollection based on rate ID being collectible
* Remove need to retrieve settings and use helper function instead
* rename hasCollectableRate to hasCollectibleRate
* Use array_reduce and update comments in get_local_pickup_method_ids
* Switch order of array_unique and array_values
* Remove unneeded dependency
* Hyphenate local-pickup so it follows the same format as other features
* Update use of collectible to collectable
* Change supports feature to be hyphenated
* Update __internalSetExtensionData to require namespaces
* Test coverage for __internalSetExtensionData
* Rename of select is no longer needed
* Update doc
* Global Styles: Add support for text settings
* StyleAttributesUtils: Change function order
* Global Styles: Remove redundant isFeaturePluginBuild() from useTypographyProps().
* Add max-height to Mini Cart drawer.
By giving the Mini Cart contents a max height with the
-webkit-fill-available property, we can ensure that the browser chrome
is accounted for on mobile devices.
* Add `dvh` and keep `vh` as a fallback for height.
By adding `dvh`, we also account for non-webkit mobile browsers that
have the same hidden button issue.
See
https://github.com/woocommerce/woocommerce-blocks/pull/8351#pullrequestreview-1278867767
Keeping `vh` as a fallback, along with `-webkit-fill-available` gives us
the widest range of support.
* Store breadcrumbs block: Gate global styles added via experimental flags to the feature plugin.
* Rename the const to featurePluginSupport and invoke it on block registration.
* Address CR
* Initial structure for the breadcrumbs block
* ditch inline comment
* Fine-tune the store breadcrumbs
* Disable the breadcrumbs block for regular posts & pages
* Update the breadcrumbs block details.
* Add tests
* rely on sprintf to render the breadcrumb
* Ditch usesContext.
* Add a link to the breadcrumb editor preview
* Disable all pointer-events for the breadcrumb link in the editor preview
* Add the align attribute
* Use the Disabled component to prevent interactions and update the copy for the block description.
* Subscribe only to changes on core/block-editor
* Improve performance of useForcedLayou
This is because by the time we reach this line, innerBlocks will be an empty array (or we wouldn't make it this far) and if nextBlocks contains ANY items it will, by definition be unequal, so a length check is simpler and more performant. Also we can remove the dependence on yet another lodash function by doing it this way.
* Check if templates synced before doing it again in useForcedLayout
* Style Book: Fix Featured Product and Featured Category Blocks
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
* Subscribe only to changes on core/block-editor
* Improve performance of useForcedLayou
This is because by the time we reach this line, innerBlocks will be an empty array (or we wouldn't make it this far) and if nextBlocks contains ANY items it will, by definition be unequal, so a length check is simpler and more performant. Also we can remove the dependence on yet another lodash function by doing it this way.
* Check if templates synced before doing it again in useForcedLayout
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
* Empty commit for release pull request
* add testing instructions
* add zip file for testing
* update readme
* upload new zip
* Bumping version strings to new version.
* Empty commit for release pull request
* Remove feature flag from Element variations (https://github.com/woocommerce/woocommerce-blocks/pull/8297)
Removes feature flag from:
* Product Summary
* Product Template
* Product Title
* Empty commit for release pull request
* add testing instructions
* add zip link for testing
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com>
* Add Interactivity API scripts
* Enqueue scripts if Products exists for testing
* Test client-side transitions
* Remove script enqueue
* Remove hpq dependency
* Update Interactivity scripts to latest version
* Remove interactivity scripts from core entries
* Create webpack config for interactivity api
A plugin for optional chaining is required as the repo uses Webpack 4 for now.
* Enqueue the directives runtime
* Updated wp directives code
* Use a filter to enque the directives runtime
* Remove base-interactivity alias for now
* Add path for modules inside base-interactivity
* Revert "Remove base-interactivity alias for now"
This reverts commit 7c6cbee372c65e430590d98c1819b6b4b0a97d93.
* Remove unnecessary filter and enqueue
* Update router code
* Update Interactivity location and alias
* Use hook `init` for script registering
Co-authored-by: Mario Santos <santosguillamot@gmail.com>
Co-authored-by: Luis Herranz <luisherranz@gmail.com>
* Refresh on back
* Move refresh code to a hook in useStoreCart
* Load mini cart scripts when page is invalid
* Update code comments
* refreshDataIfPersisted->refreshCachedCartData
* Avoid deprecated code
* Only notify if cart resolution has finished
* Fix tests to check for cart resolution
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* Make Notice component color black
The Notice component text is not legible in dark themes since the background color
is light and and the text color is too. With this change we are setting the color
always to black for our blocks, so it's always legible.
* Make the text black for notices displayed on the editor
* Import editor.scss
* Fixes a bug where cart response only reflects variation data submitted and not full variation data with default values.
* Sort variation data by attribute alphabetically
* PHP unit test for checking variation data.