Commit Graph

6037 Commits

Author SHA1 Message Date
Thomas Roberts dbcb867141 Move `SortSelect` to components package (https://github.com/woocommerce/woocommerce-blocks/pull/11411) 2023-10-26 04:55:34 -07:00
Thomas Roberts a1a6b2130f Fix Storybook after webpack 5 upgrade (https://github.com/woocommerce/woocommerce-blocks/pull/11456) 2023-10-26 03:33:04 -07:00
Alba Rincón 76cb3fa7e8 Make groups to adapt better to mobile views (https://github.com/woocommerce/woocommerce-blocks/pull/11463) 2023-10-26 12:18:40 +02:00
Alba Rincón bcdc9489f7 [CYS Woo Express] Fix essential header (https://github.com/woocommerce/woocommerce-blocks/pull/11449)
* Fix essential header

* Fix spacing
2023-10-26 09:33:29 +02:00
Niels Lange 934c72e28d Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336)
* Update data store docs

* Link related docs to /docs/third-party-developers/extensibility/data-store

* Improve data store overview

* Remove obsolete entry

* Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md

* Update TOCs

* Update link titles

* Replace primary key with import statement

* Optimise Validation Store description

* Keep store IDs in title

* Correct wrong key

* Optimise data store docs overview

* Explain the difference between cart and checkout store

* Add example to Validation Store

* Add example to Validation Store

* Add overview text to collections.md

* Add example to store-notices.md

* Update TOC of store-notices.md

* Update overview description of store-notices.md

* Add code snippets for displaying the validationError message

* Update data store docs

* Link related docs to /docs/third-party-developers/extensibility/data-store

* Improve data store overview

* Remove obsolete entry

* Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md

* Update TOCs

* Update link titles

* Replace primary key with import statement

* Optimise Validation Store description

* Keep store IDs in title

* Correct wrong key

* Optimise data store docs overview

* Explain the difference between cart and checkout store

* Add example to Validation Store

* Add example to Validation Store

* Add overview text to collections.md

* Add example to store-notices.md

* Update TOC of store-notices.md

* Update overview description of store-notices.md

* Add code snippets for displaying the validationError message

* Mention full link in assets/js/data/cart/README.md

* Changed Store-Notices to Store Notices
2023-10-26 09:37:13 +07:00
Tarun Vijwani 503b2c8dbb Display shipping calculator link for guests shopper (https://github.com/woocommerce/woocommerce-blocks/pull/11442)
* Display shipping calculator when formatted address is present

- Earlier, shipping calculator was getting displayed based on the isAddressComplete value.
- For the scenarios where address was incomplete but formatted address was present shipping calculator was not getting displayed.
- This made shipping calculator not getting displayed for guest shoppers.
- With this, conditions are changed from isAddressComplete to formatShippingAddress to display shipping calculator if formatted address is present.
- Add unit test case for the condition for formatted address.

* Update comments to explain the condition to hide shipping calculator

- Update the comments to add the reason to hide shipping calculator.
- When there is no default customer location in the store and the customer has not entered their address, but there is a default shipping method available for all locations, then we will hide the shipping calculator.
2023-10-25 22:50:13 +04:00
Karol Manijak d74b0423e1 Remove authors filter from Product Collection block (https://github.com/woocommerce/woocommerce-blocks/pull/11427)
* Remove authors filter from Product Collection block

* Remove author filed in query

* Add back the author query argument in the final query builder

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2023-10-25 19:11:56 +02:00
Daniel Dudzic 9cc4146c4d Version bump to 11.5.0-dev and stable tag to 11.4.1 2023-10-25 16:36:33 +02:00
Daniel Dudzic 5a6ffe5212 Releases 11.4.0 and 11.4.1: Update changelog, testing instructions and required versions 2023-10-25 16:31:30 +02:00
Alba Rincón c706e9b885 Remove the fontSize for the button (https://github.com/woocommerce/woocommerce-blocks/pull/11433) 2023-10-25 12:36:38 +02:00
Alba Rincón e409cb4765 [Store Customization MVP] Ensure the AI-generated content in patterns is updated on plugin update (https://github.com/woocommerce/woocommerce-blocks/pull/11210)
* Update the patterns content after updating the plugin

* Remove unused variable and use statement

* Schedule action for updating the patterns content on plugin update (for both WooCommerce and WooCommerce Blocks.)

* Update condition to remove the plugin folder name

* Remove the update function from bootstrap.php

* Remove unused use

* Fix the condition, since $options['plugin'] is an array

* Remove pattern file

This was left empty by mistake in a merge, we need to remove the file or we get an error

---------

Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
2023-10-25 12:29:34 +02:00
Alba Rincón 6fa2617589 Fix outer space and title (https://github.com/woocommerce/woocommerce-blocks/pull/11434) 2023-10-25 10:59:25 +02:00
Thomas Roberts e6272d0aee Move `Textarea` to components package (https://github.com/woocommerce/woocommerce-blocks/pull/11384) 2023-10-25 01:53:24 -07:00
Tom Cafferkey d71e0274f3 Patterns > Upload optimized version of placeholder image (https://github.com/woocommerce/woocommerce-blocks/pull/11441) 2023-10-25 09:12:21 +01:00
Tarun Vijwani d6b802d5c1 Revert "Display shipping calculator when formatted address is present"
This reverts commit 5731a4cc75.
2023-10-25 11:52:49 +04:00
Tarun Vijwani 5731a4cc75 Display shipping calculator when formatted address is present
- Earlier, shipping calculator was getting displayed based on the isAddressComplete value.
- For the scenarios where address was incomplete but formatted address was present shipping calculator was not getting displayed.
- This made shipping calculator not getting displayed for guest shoppers.
- With this, conditions are changed from isAddressComplete to formatShippingAddress to display shipping calculator if formatted address is present.
- Add unit test case for the condition for formatted address.
2023-10-25 11:51:30 +04:00
dependabot[bot] 40005ae808 Bump rimraf from 3.0.2 to 5.0.5 (https://github.com/woocommerce/woocommerce-blocks/pull/11274)
Bumps [rimraf](https://github.com/isaacs/rimraf) from 3.0.2 to 5.0.5.
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/rimraf/compare/v3.0.2...v5.0.5)

---
updated-dependencies:
- dependency-name: rimraf
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 15:05:43 +01:00
Patricia Hillebrandt 70a379a2d6 Store Customization > Update products with AI generated content (https://github.com/woocommerce/woocommerce-blocks/pull/11155)
* Introduce the ProductUpdater class.

* Update the image assignment for the default products content.

* Update the default products content.

* Introduce the generate_content and get_placeholder_products methods.

* Update the get_placeholder_products method and introduce the new create_new_product method.

* Verify the hash of the product content and compare it with the hash of the ai generated content to ensure we wont override products modified by the store owner.

* Add docblocks and update the structure for the ProductUpdater class.

* Pass the vertical images as a param for the PatternUpdater and the ProductUpdater.

* Update the provided variable to the PatternUpdater class.

* Update the ProductUpdater class to include the requirements for usage of the media_sideload_image method outside the wp-admin area (via API) and other adjustments to the products generation and hashes

* remove unnecessary calls to post/product images.

* Update the loop for generating products.

* Further adjustments to the Product Updater.

* Provide the business_description as a param for the generate_content ProductUpdates

* Update the default timeout for the AI connection; update the path to the default image. Add a limit of 6 when quering the total products created by the store owner.

* Add new neutral placeholder images for products and patterns.

* Update the prompt and the logic for the placeholder images.

* Remove placeholder images.

* Increase max execution time

* Update the products query.

* Move the media_sideload_image function dependencies to outside of the loop and add comment.

* Update text content.

* Address code review.

* bail early if no business description provided.

* Add an extra safety check in case of query errors.

* Address CR.
2023-10-24 13:33:55 +00:00
Alba Rincón 65b093309f Improve vars name and remove duplicated user name (https://github.com/woocommerce/woocommerce-blocks/pull/11430) 2023-10-24 15:24:05 +02:00
dependabot[bot] 175e3a15b8 Bump postcss from 8.4.27 to 8.4.31 (https://github.com/woocommerce/woocommerce-blocks/pull/11140)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.27 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.27...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 14:07:22 +01:00
Alba Rincón 2d0ee28a97 Add overlay with 30% opacity (https://github.com/woocommerce/woocommerce-blocks/pull/11428) 2023-10-24 14:57:42 +02:00
dependabot[bot] 559f7b50d5 Bump automattic/jetpack-connection from 1.58.1 to 1.58.2 (https://github.com/woocommerce/woocommerce-blocks/pull/11416)
Bumps [automattic/jetpack-connection](https://github.com/Automattic/jetpack-connection) from 1.58.1 to 1.58.2.
- [Release notes](https://github.com/Automattic/jetpack-connection/releases)
- [Changelog](https://github.com/Automattic/jetpack-connection/blob/trunk/CHANGELOG.md)
- [Commits](https://github.com/Automattic/jetpack-connection/compare/v1.58.1...v1.58.2)

---
updated-dependencies:
- dependency-name: automattic/jetpack-connection
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 13:08:42 +01:00
Alba Rincón 7043156159 [Store Customization] Update the "Footer with 3 Menus" (https://github.com/woocommerce/woocommerce-blocks/pull/11379)
* Fix search bar, spacing and show text in one line

* Set site log width

* Adjust margins and search bar

* Make the search bar fill space on mobile

* Update column sizes

* Remove width from site logo
2023-10-24 13:49:49 +02:00
dependabot[bot] 3c7ef1b14c Bump @babel/traverse from 7.22.11 to 7.23.2 (https://github.com/woocommerce/woocommerce-blocks/pull/11326)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.11 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 12:08:12 +01:00
dependabot[bot] b9292ec31e Bump @testing-library/dom from 9.3.1 to 9.3.3 (https://github.com/woocommerce/woocommerce-blocks/pull/11097)
Bumps [@testing-library/dom](https://github.com/testing-library/dom-testing-library) from 9.3.1 to 9.3.3.
- [Release notes](https://github.com/testing-library/dom-testing-library/releases)
- [Changelog](https://github.com/testing-library/dom-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/dom-testing-library/compare/v9.3.1...v9.3.3)

---
updated-dependencies:
- dependency-name: "@testing-library/dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 12:05:35 +01:00
dependabot[bot] cabb89e8e8 Bump phpunit/phpunit from 9.6.10 to 9.6.13 (https://github.com/woocommerce/woocommerce-blocks/pull/11095)
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.10 to 9.6.13.
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.13/ChangeLog-9.6.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.10...9.6.13)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 11:56:22 +01:00
dependabot[bot] 6b5dfe356f Bump react-devtools-core from 4.28.0 to 4.28.4 (https://github.com/woocommerce/woocommerce-blocks/pull/11385)
Bumps [react-devtools-core](https://github.com/facebook/react/tree/HEAD/packages/react-devtools-core) from 4.28.0 to 4.28.4.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/HEAD/packages/react-devtools-core)

---
updated-dependencies:
- dependency-name: react-devtools-core
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 11:54:35 +01:00
Karol Manijak 8c76a1a712 Add a safe guard that the variable is set before accessing it (https://github.com/woocommerce/woocommerce-blocks/pull/11424) 2023-10-24 12:41:19 +02:00
Saad Tarhi ebfa1acc51 Always show the `Enable the shipping calculator on the cart page` option in WC Admin (https://github.com/woocommerce/woocommerce-blocks/pull/11421)
* Always show `Enable the shipping calculator ...`

Always show the `Enable the shipping calculator on the cart page` option
no matter of what is used for the cart page.

* Update remove_shipping_settings docblock to accurately describe its purpose.

---------

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2023-10-24 11:08:28 +01:00
Alba Rincón af6bfd2bbf [CYS Woo Express] Update large footer (https://github.com/woocommerce/woocommerce-blocks/pull/11413)
* Update large footer

* Update space between icons

* Remove with from site logo
2023-10-24 11:23:14 +02:00
dependabot[bot] 143efd681b Bump wp-types from 3.61.0 to 3.63.0 (https://github.com/woocommerce/woocommerce-blocks/pull/11418)
Bumps [wp-types](https://github.com/johnbillion/wp-json-schemas) from 3.61.0 to 3.63.0.
- [Release notes](https://github.com/johnbillion/wp-json-schemas/releases)
- [Commits](https://github.com/johnbillion/wp-json-schemas/compare/3.61.0...3.63.0)

---
updated-dependencies:
- dependency-name: wp-types
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 17:36:26 +00:00
Thomas Roberts ef2a129502 Move `FormStep` to the components package (https://github.com/woocommerce/woocommerce-blocks/pull/11246) 2023-10-23 08:57:45 -07:00
Alex Florisca e3f378d990 Move `RadioControl`and `RadioControlAccordion` components to components package (https://github.com/woocommerce/woocommerce-blocks/pull/11312)
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2023-10-23 15:59:19 +01:00
Roy Ho 77f371e8d3 Product Gallery: Add keyboard access (https://github.com/woocommerce/woocommerce-blocks/pull/11373)
* Product Gallery: Add keyboard access

* Add optional chaining to guard against undefines and update delay logic

* Use enums for key codes
2023-10-23 07:53:58 -07:00
Karol Manijak 493613a2fe Product Collection - shrink columns to fit (https://github.com/woocommerce/woocommerce-blocks/pull/11320)
* Add Toggle to inspector controls allowing shrinking number of columns

* Add logic to allow columns to shrink in Product Collection

* Rename SCSS variable

* Make sure the value provided to component is a boolean

* Rename onChange callback name to better reflect its purpose
2023-10-23 14:28:17 +02:00
Luigi Teschio c095dd617d Improve Just Arrived Full Hero pattern (https://github.com/woocommerce/woocommerce-blocks/pull/11406) 2023-10-23 14:07:57 +02:00
Seghir Nadir 8bf13a7f4f Add Local Pickup event and Cart/Checkout page views events (https://github.com/woocommerce/woocommerce-blocks/pull/11225)
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2023-10-23 10:23:38 +00:00
Paulo Arromba 70e727e1af Preparation for including Blocks as the default checkout experience in WC 8.3 (https://github.com/woocommerce/woocommerce-blocks/pull/11372) 2023-10-23 10:41:46 +01:00
Sneha Saxena 9bcff3cd07 fix typo (https://github.com/woocommerce/woocommerce-blocks/pull/11374) 2023-10-23 10:56:19 +02:00
Thomas Roberts e8e6c3cbe7 Move `Label` component to components package (https://github.com/woocommerce/woocommerce-blocks/pull/11275) 2023-10-20 07:03:00 -07:00
Roy Ho b87aafebe0 Product Gallery: Fix justification not saving correctly (https://github.com/woocommerce/woocommerce-blocks/pull/11324) 2023-10-20 05:42:48 -07:00
Alba Rincón d6df0d451b Update Large footer: social links, columns, logo size, spacing (https://github.com/woocommerce/woocommerce-blocks/pull/11381) 2023-10-20 13:34:05 +02:00
Thomas Roberts fc104dad31 Move `Spinner` to components package (https://github.com/woocommerce/woocommerce-blocks/pull/11317) 2023-10-20 04:26:09 -07:00
Seghir Nadir 114f0b4059 Copy shipping phone to billing phone if sync is checked (https://github.com/woocommerce/woocommerce-blocks/pull/10603) 2023-10-20 17:41:57 +07:00
Tarun Vijwani b5ccc358a6 Add decoding to site title to allow quotes (https://github.com/woocommerce/woocommerce-blocks/pull/11334) 2023-10-20 03:13:55 -07:00
Luigi Teschio face8d2b57 Product Gallery: Add animation when large image changes (https://github.com/woocommerce/woocommerce-blocks/pull/11113)
* Add slide animation

* Remove placeholder and pagination (https://github.com/woocommerce/woocommerce-blocks/pull/11145)

* Add titles to patterns and set the aligment to Wide

* Replace product query patterns with product collection ones

* Remove pagination and no results query from product query patterns

* Add aspect ratio to the product image attributes

* Add portrait aspect ratio to product X column and product gallery patterns

* improve animation

* improve naming

* fix regression

* fix css

* improve code style

* remove check on tag image

* align image

* fix crash when zoom is disabled

* fix E2E tests

* improve CSS

---------

Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
2023-10-20 09:42:39 +02:00
Mike Jolley 9ba4f34d31 Cart and Checkout block transforms for classic shortcodes (https://github.com/woocommerce/woocommerce-blocks/pull/11228)
* Add transforms for checkout block

* Block to shortcode switcher in notice

* cart transforms

* Fix target block for switching

* Remove switcher UI for classic cart/checkout

* Set isPreview when generating block preview in switcher

* Onboarding task

* Action on click

* Focus on block after replacement

* Update notice styling and wording

* Undo functionality

* Look for woocommerce/classic-shortcode when determining if task list item should display

* Enable focus on the cart/checkout block when visiting from the task list

* Classic Cart/Checkout Updated Title

* Add missing translations

* Refactor modal content to avoid sprintf

* Improve pickBlockClientId

* Tracks events for switching to classic shortcode block

* TaskList support for non-block themes

* Updated placeholder to work on non-white page backgrounds

* Find blocks using findBlock utility

* Add TabbableContainer for buttons

* Add align to wrapper

* Update modal content

* Update modal usage

* Removed undo link when converting from classic shortcode

* Check if block was selected

* Revert "Removed undo link when converting from classic shortcode"

This reverts commit 2babbab4c1e69861a0371ff745e85d80ff6bbab1.

* update snackbar text
2023-10-19 16:43:43 +01:00
Alba Rincón da8bd0d713 Change the structure to allow aligning left the icons on mobile (https://github.com/woocommerce/woocommerce-blocks/pull/11355) 2023-10-19 16:35:51 +02:00
Alba Rincón 55faf5222f Decrease spacing between menu items (https://github.com/woocommerce/woocommerce-blocks/pull/11356) 2023-10-19 16:35:28 +02:00
Alba Rincón 499a7f2145 Re-enable the `Product Hero 2 Column 2 Row` pattern (https://github.com/woocommerce/woocommerce-blocks/pull/11346) 2023-10-19 13:59:11 +02:00