Commit Graph

5986 Commits

Author SHA1 Message Date
dependabot[bot] f72fe33e6d Bump mockery/mockery from 1.6.5 to 1.6.6 (https://github.com/woocommerce/woocommerce-blocks/pull/10591)
Bumps [mockery/mockery](https://github.com/mockery/mockery) from 1.6.5 to 1.6.6.
- [Release notes](https://github.com/mockery/mockery/releases)
- [Changelog](https://github.com/mockery/mockery/blob/1.6.x/CHANGELOG.md)
- [Commits](https://github.com/mockery/mockery/compare/1.6.5...1.6.6)

---
updated-dependencies:
- dependency-name: mockery/mockery
  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>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
2023-09-04 15:23:36 -03:00
Tom Cafferkey 664f2e88bc Update release checklist for WC Core version bump. (https://github.com/woocommerce/woocommerce-blocks/pull/10829) 2023-09-04 14:38:34 +01:00
Thomas Roberts 4ad6cdb18d Ensure WooCommerce Core scripts are dequeued correctly (https://github.com/woocommerce/woocommerce-blocks/pull/10624) 2023-09-04 02:48:06 -07:00
Patricia Hillebrandt d751c3a469 Bump dev version to 11.1.0-dev 2023-09-04 11:17:06 +02:00
Lucio Giannotta 578ba4725e Fix customer account icon not scaling in certain environments (https://github.com/woocommerce/woocommerce-blocks/pull/10533)
Customer Account block icon size is based on the parent `font-size`
in order to make sure they stay harmoniously together.
However, the `box-sizing` could be set by some other actor
and mess with the size of the icon.
2023-09-02 16:07:01 +02:00
Alexandre Lara bda42f936c Product Gallery > Prevent error when "layout" is missing in block attributes (https://github.com/woocommerce/woocommerce-blocks/pull/10784) 2023-09-01 19:41:41 -03:00
Luigi Teschio 3e581e0372 bump @wordpress/env to 8.2.0 (https://github.com/woocommerce/woocommerce-blocks/pull/10808) 2023-09-01 17:54:35 +02:00
Tung Du 27e2d818cd Fix: use correct bump strategy for Assign Milestone workflow (https://github.com/woocommerce/woocommerce-blocks/pull/10805) 2023-09-01 17:31:34 +07:00
Karol Manijak ac7e115c3e Update @wordpress/env to 8.1.1 and re-enable PHP Unit Tests for PHP v 8.1 and 8.2 (https://github.com/woocommerce/woocommerce-blocks/pull/9875)
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2023-09-01 16:07:55 +07:00
Daniel W. Robert 70aa569254 Update lockfile for fresh installation. (https://github.com/woocommerce/woocommerce-blocks/pull/10785) 2023-08-31 17:56:08 -04:00
Daniel W. Robert 59f468f5ba Adjust `Follow us on social media` pattern icon alignment (https://github.com/woocommerce/woocommerce-blocks/pull/10709)
* Adjust column width and icon alignment.

Set new col width to `75%` / `25%` and set the icon flex-alignment
to `space-between`.

While this is not ideal, without any fine-grained control over
breakpoints, this seems to be marginally better than having the icons
remain right-aligned on mobile.

* Correct grammar for pattern title and heading.

Should be "on" not "in".
2023-08-31 16:55:38 -04:00
Luigi Teschio 22b9f6a952 Product Gallery Block: add support for the on Sale Badge block (https://github.com/woocommerce/woocommerce-blocks/pull/10764)
* Product Gallery: add support for On Sale Badge Block

* add align support

* Add E2E tests

* set margin via Block Styles

* disable experimental flag

* add next previous block

* restore support file

* fix TS error

* fix layout

* change product
2023-08-31 18:15:31 +02:00
Alexandre Lara e9ff849e08 Add woocommerce namespace to Product Gallery block (https://github.com/woocommerce/woocommerce-blocks/pull/10769) 2023-08-31 12:13:40 -03:00
Patricia Hillebrandt 0488824275 Update the testing instructions for woocommerce/woocommerce-blocks#10619 2023-08-30 17:27:51 +02:00
Patricia Hillebrandt e491c07e1b Update the changelog, testing steps and required versions after 11.0.0 release 2023-08-30 13:00:35 +02:00
Alex Florisca d632ffdfae Fix bug with wpautop for the empty cart (https://github.com/woocommerce/woocommerce-blocks/pull/10768) 2023-08-30 10:41:34 +01:00
Sam Seay 44f48e41e9 Refactor errors util to TypeScript, minor typing fixes (https://github.com/woocommerce/woocommerce-blocks/pull/10754) 2023-08-30 18:56:28 +12:00
Luigi Teschio 2d89f4892d add side_effects suffix to the Product Gallery Large Image Next Previous Block (https://github.com/woocommerce/woocommerce-blocks/pull/10766) 2023-08-29 16:19:20 +02:00
Patricia Hillebrandt 37b8a84f85 Add team members to the WordPress.org Contributors & Developers list for WooCommerce Blocks (https://github.com/woocommerce/woocommerce-blocks/pull/10746)
* Add the team to the list of contributors on .org's plugin directory.

* Add a few more teammates.
2023-08-29 12:43:19 +00:00
Paulo Arromba 4ab7828367 Fix/Template endpoint update for subpages (https://github.com/woocommerce/woocommerce-blocks/pull/10745)
* Updates endpoint logic for cart and checkout templates to match Wordpress URL guessing

* Revert wrongly committed file

* Revert wrongly committed file

* typo

* updated @since property
2023-08-29 11:05:14 +01:00
Alba Rincón 035d8249ab [Store Customization MVP] Verticals API client (https://github.com/woocommerce/woocommerce-blocks/pull/10687)
* Add the Verticals API client

* Add tests

* Refactor error handling
2023-08-29 10:13:25 +02:00
Lucio Giannotta 5c4a757b6e Convert `product-control` to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/10552)
The main aim of this PR was to convert the product-control component to TypeScript. However, since the component is coupled with many other parts (it is itself wrapped into 4 HOCs), many refactoring changes were needed to make the types work.

In particular:

* Add `convertProductResponseItemToSearchItem` utility function

The function allows to clean up the `ProductResponseItem` in order
to make its shape compatible with the `SearchListItem`, instead of
passing the entire object.

Because data from the object might need to be used in certain
circumstance (e.g. render functions), the data is now allowed to be
scoped within a `details` key.

This commit also converts `utils/products` to TypeScript.

* Fix `ProductResponseItem` type missing `slug`

The `slug` is returned by the API but didn't appear in the type def.

* Improve certain HOCs types

The `withSearchedProducts` and `withTransformSingleSelectToMultipleSelect`
HOCs are now typed in such a way that it is clear what incoming props
they expect and what they inject.

* Refactor `ProductAttrributeTermControl` for further type safety

Make sure that `count` is always a `number` as required by the
component types.

* Refactor `search-list-control.tsx` and `item.tsx`

The new `SearchItem` allows for the `details` key to be passed.
All the components are now aware of it.
2023-08-29 08:01:31 +02:00
Lucio Giannotta a898a5b5ee Fix inconsistent padding in Customer Account block (https://github.com/woocommerce/woocommerce-blocks/pull/10476) 2023-08-29 07:32:48 +02:00
Tung Du a92b8a432f E2E: ensure the shop page is created by creating it manually (https://github.com/woocommerce/woocommerce-blocks/pull/10744) 2023-08-29 08:00:29 +07:00
Luigi Teschio c126731347 Product Gallery Block: Next/Previous block (https://github.com/woocommerce/woocommerce-blocks/pull/10235)
* Add Product Gallery Next Previous block

* update description

* update registration

* improve style

* use context instead of attributes

* add eslint and ts lint exception

* improve CSS

* E2E Next Previous block (https://github.com/woocommerce/woocommerce-blocks/pull/10329)

* Add E2E tests

* fix e2e tests path after rebase

* add screenshots

* improve E2E test

* improve E2E test

* improve E2E test

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>

* fix webpack conf

* Next Previous Button block - Add layout support (https://github.com/woocommerce/woocommerce-blocks/pull/10668)

* Add layout support

* Product Gallery Next Previous: Fix block crashing in the editor when vertical alignment has not been customized yet

* Product Gallery Next Previous: Position fixes for the Next/Previous button both in the editor and frontend

* add E2E test

* fix import

---------

Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com>

* Next Previous Buttons: hide buttons when the product has only one image (https://github.com/woocommerce/woocommerce-blocks/pull/10743)

* Next Previous Buttons: hide buttons when the product has only one image

* update URL

* fix import

* set default value

* fix E2E test

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com>
2023-08-28 18:32:45 +02:00
Alex Florisca 24ddcb270e Update integration-interface.md
Minor changes to wording, where "both" was used to refer to 3 things
2023-08-28 15:43:27 +01:00
Paulo Arromba fb5ee53579 Display notices on cart/checkout FSE templates (https://github.com/woocommerce/woocommerce-blocks/pull/10151)
* Display notices on cart/checkout FSE templates

* revert space removal
2023-08-28 11:31:09 +01:00
Karol Manijak 31e9854316 Add Product Collection Full Grid pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10665)
* Add initial look of Full Grid Product Collection pattern

* Refactor textAlign property of Product Button so it uses flex rather than text-align

* Update Product Button text align after the fix

* Remove debug log (https://github.com/woocommerce/woocommerce-blocks/pull/10719)

* Add Product Collection Grid pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10660)

* Dispatch the `wc-blocks_render_blocks_frontend` event when rendering the empty cart block (https://github.com/woocommerce/woocommerce-blocks/pull/10619)

* E2E: Refactor Mini Cart to be ready for fully parallel (https://github.com/woocommerce/woocommerce-blocks/pull/10704)

* Revert dequeue add-to-cart-variation script which is needed to properly handle variable products in single product page (https://github.com/woocommerce/woocommerce-blocks/pull/10723)

* Update alignment options to new setting

---------

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2023-08-28 15:58:17 +05:30
Thomas Roberts 55f65cdf17 Move cart widget tests to playwright and ensure classic/block theme configs are executed correctly (https://github.com/woocommerce/woocommerce-blocks/pull/10669) 2023-08-28 03:04:28 -07:00
Alexandre Lara c718a056b8 Product Gallery block: Add support to Interactivity API (https://github.com/woocommerce/woocommerce-blocks/pull/10716)
* Add support to Interactivity API

* Fix php cs errors

* Rename numberOfThumbnailImages to numberOfThumbnails

* Use frontend.tsx with InteractivityAPI

* Replace viewScript in block.json
2023-08-25 15:42:31 -03:00
Karol Manijak dad3a41caa Fix UI misalignment of Filter by Price in TT1 theme (https://github.com/woocommerce/woocommerce-blocks/pull/10732)
* Fix UI misalignment of Filter by Price in TT1 theme

* Fix frontend Firefox styles

* Simplify the styles and fix them in Editor (Firefox/Safari)

* Align the background color and sizing in Firefox
2023-08-25 16:26:18 +02:00
Karol Manijak 95fb51be4d Enable Product Collection as a core feature (https://github.com/woocommerce/woocommerce-blocks/pull/10524)
* Enable Product Collection as a core feature

* Fix: disable product query title and summary variations from inserter in favour of Product Collection ones (https://github.com/woocommerce/woocommerce-blocks/pull/10548)

* Limit the scope of Product Query's Product Title and Product Summary

* Add missing piece after refactoring

* Enable manual migration of Products to Product Collection (https://github.com/woocommerce/woocommerce-blocks/pull/10655)

* Refactor block variation registration in product-collection (https://github.com/woocommerce/woocommerce-blocks/pull/10701)

This commit refactors the product-collection block's variation registration.

Changes:
- The `product-summary` and `product-title` variations have been encapsulated within their own respective functions: `registerProductSummaryVariation` and `registerProductTitleVariation`.
- Imported and invoked these new functions in the main `index.tsx` of the product-collection block, ensuring the variations are registered.

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2023-08-25 15:58:11 +02:00
Alexandre Lara 9936e4bb7a Update 1093 2023-08-24 19:16:22 -03:00
Alexandre Lara faa1f40a14 Update 1093.md 2023-08-24 19:15:32 -03:00
Alexandre Lara 28121715fd Add the testing notes for 10.9.3 2023-08-24 19:15:04 -03:00
Alexandre Lara e412dbf8e5 Add changelog to readme.txt 2023-08-24 19:14:57 -03:00
Karol Manijak 66d6154bff Revert dequeue add-to-cart-variation script which is needed to properly handle variable products in single product page (https://github.com/woocommerce/woocommerce-blocks/pull/10723) 2023-08-24 14:17:37 -03:00
Tung Du 69d5f47048 E2E: Refactor Mini Cart to be ready for fully parallel (https://github.com/woocommerce/woocommerce-blocks/pull/10704) 2023-08-24 20:33:20 +07:00
Thomas Roberts 542a04d282 Dispatch the `wc-blocks_render_blocks_frontend` event when rendering the empty cart block (https://github.com/woocommerce/woocommerce-blocks/pull/10619) 2023-08-24 01:37:14 -07:00
Karol Manijak eba1a5a19c Add Product Collection Grid pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10660) 2023-08-24 09:59:08 +02:00
Karol Manijak de625c7f48 Remove debug log (https://github.com/woocommerce/woocommerce-blocks/pull/10719) 2023-08-24 09:29:50 +02:00
Sam Seay a753a0f1d2 Add a generic arg to useCollection to improve typing of results. (https://github.com/woocommerce/woocommerce-blocks/pull/10696)
Closes woocommerce/woocommerce-blocks#5726
2023-08-24 04:49:41 +00:00
Tung Du e20c605408 E2E: Ensure the Shop page is created (https://github.com/woocommerce/woocommerce-blocks/pull/10695) 2023-08-24 08:09:59 +07:00
Alexandre Lara 705de55bb6 Update composer.lock and package-lock.json files (https://github.com/woocommerce/woocommerce-blocks/pull/10710) 2023-08-23 20:38:02 -03:00
Sam Seay 1dd1cfadf4 Use GITHUB_TOKEN as the env variable for the changelog script (https://github.com/woocommerce/woocommerce-blocks/pull/10697) 2023-08-24 01:30:35 +12:00
Alex Florisca 69bcc49585 Fix nightly builds (https://github.com/woocommerce/woocommerce-blocks/pull/10689)
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2023-08-23 11:39:37 +00:00
Sam Seay 9e24b0d91d Convert frontend-block.js to frontend-block.tsx and replace propTypes with TypeScript definitions (https://github.com/woocommerce/woocommerce-blocks/pull/10677) 2023-08-23 18:00:14 +12:00
Thomas Roberts 38594b3c9f Cart e2e test housekeeping (https://github.com/woocommerce/woocommerce-blocks/pull/10663) 2023-08-22 16:31:38 -07:00
Alexandre Lara 47c197d165 Product Gallery block: Add Pager block (https://github.com/woocommerce/woocommerce-blocks/pull/10320)
* Add block foundation

* Add block styles

* Add Dots Pager

* Move icons to the block folder

* Add block settings

* Add Pager to Product Gallery template

* Add setting to change Pager display mode

* Change the block description

* Fix the block icon color when selected

* Fix php cs errors

* Fix php cs errors

* Fix css lint errors

* Fix eslint error

* Move enum to its own file

* Remove unnused call to request context

* Add block template

* Fix php cs errors

* fix php cs errors

* improve docs

* Remove duplicate HTML element and added classnames for single product block (https://github.com/woocommerce/woocommerce-blocks/pull/10374)

* Show only products with rating (https://github.com/woocommerce/woocommerce-blocks/pull/10434)

* Add Product Gallery Thumbnails block (https://github.com/woocommerce/woocommerce-blocks/pull/10442)

* WIP Product Gallery: Add the Thumbnails block

* Product Gallery Thumbnails: Add block settings

* Add template for the Product Gallery block

* Add template for the Product Gallery block. Add the rest of the files.

* Product Gallery Thumbnails: Add context settings sharing between the Product Gallery and Thumbnails block.

* Product Gallery Thumbnails: Add UI functionality and frontend functionality. Add settings for the Thumbnails in both places - Product Gallery and the Thumbnails block.

* Product Gallery Thumbnails: Move the static template ouside of the component

* Make sure the context is set before accesing the array values

* Product Gallery Thumbnails: Move the setGroupAttributes() function outside of the component

* Product Gallery Thumbnails: Fix TS errors

* Product Gallery Thumbnails: Update the Features Flags and Experimental Interfaces doc

* Product Gallery Thumbnails: Fix TS error

* Product Gallery Thumbnails: Remove unused stylesheet

* Product Gallery Thumbnails: Fix TS errors

* Product Gallery Thumbnails: Remove unused context and fix the thumbnails bottom position styling on the frontend.

* Product Gallery Thumbnails: Allow the user to move the horizontal thumbnails above the large image and don't overwrite that automatically

* Product Gallery Thumbnails: Add code comments and remove the incorrect conditional check when moving thumbnails up and down

* Product Gallery Thumbnails: Fix the eslint dependency error

* Product Gallery Thumbnails: Refactor Product Gallery edit code and move the logic to a utils file

* Product Gallery Thumbnails: Update the utils file

* Product Gallery Thumbnails: Update the utils file. Fix comment indentation

* Product Gallery Thumbnails: Fix undefined variable html when only 1 product image is set

* Product Gallery: Rename clientId to productGalleryClientId

* Product Gallery Thumbnails: Combine the useEffect code having the same dependencies

* Product Gallery Thumbnails: Combine all useEffect code together

* Product Gallery Thumbnails: Add a ThumbnailsPosition enum

* Product Gallery Thumbnails: Update the thumbnailsPosition to an enum

* Product Gallery Thumbnails: Fix TS errors

* Product Gallery Thumbnails: Fix TS errors

* Product Gallery Thumbnails: Add missing dependency

* Product Gallery Thumbnails: Uppercase the enum and fix the thumbnails position bug when initially adding the Product Gallery block

* Product Gallery: Add crop, zoom and full-screen settings

* Product Gallery Thumbnails: Replace ts-ignore with ts-expect-error

* Product Gallery Thumbnails: Replace ts-ignore with ts-expect-error

* Product Gallery Thumbnails: Revert back to ts-ignore

* Revert "Product Gallery: Add crop, zoom and full-screen settings"

This reverts commit 840654197619e2611029b81990493387ae0b543d.

* Remove propTypes (https://github.com/woocommerce/woocommerce-blocks/pull/10432)

* Fix badge wrong spacing on the newest arrivals pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10446)

* Product Gallery: Add Crop, Zoom and Full-screen settings (https://github.com/woocommerce/woocommerce-blocks/pull/10445)

* WIP Product Gallery: Add the Thumbnails block

* Product Gallery Thumbnails: Add block settings

* Add template for the Product Gallery block

* Add template for the Product Gallery block. Add the rest of the files.

* Product Gallery Thumbnails: Add context settings sharing between the Product Gallery and Thumbnails block.

* Product Gallery Thumbnails: Add UI functionality and frontend functionality. Add settings for the Thumbnails in both places - Product Gallery and the Thumbnails block.

* Product Gallery Thumbnails: Move the static template ouside of the component

* Make sure the context is set before accesing the array values

* Product Gallery Thumbnails: Move the setGroupAttributes() function outside of the component

* Product Gallery Thumbnails: Fix TS errors

* Product Gallery Thumbnails: Update the Features Flags and Experimental Interfaces doc

* Product Gallery Thumbnails: Fix TS error

* Product Gallery Thumbnails: Remove unused stylesheet

* Product Gallery Thumbnails: Fix TS errors

* Product Gallery Thumbnails: Remove unused context and fix the thumbnails bottom position styling on the frontend.

* Product Gallery Thumbnails: Allow the user to move the horizontal thumbnails above the large image and don't overwrite that automatically

* Product Gallery Thumbnails: Add code comments and remove the incorrect conditional check when moving thumbnails up and down

* Product Gallery Thumbnails: Fix the eslint dependency error

* Product Gallery Thumbnails: Refactor Product Gallery edit code and move the logic to a utils file

* Product Gallery Thumbnails: Update the utils file

* Product Gallery Thumbnails: Update the utils file. Fix comment indentation

* Product Gallery Thumbnails: Fix undefined variable html when only 1 product image is set

* Product Gallery: Rename clientId to productGalleryClientId

* Product Gallery Thumbnails: Combine the useEffect code having the same dependencies

* Product Gallery Thumbnails: Combine all useEffect code together

* Product Gallery Thumbnails: Add a ThumbnailsPosition enum

* Product Gallery Thumbnails: Update the thumbnailsPosition to an enum

* Product Gallery Thumbnails: Fix TS errors

* Product Gallery Thumbnails: Fix TS errors

* Product Gallery Thumbnails: Add missing dependency

* Product Gallery Thumbnails: Uppercase the enum and fix the thumbnails position bug when initially adding the Product Gallery block

* Product Gallery: Add crop, zoom and full-screen settings

* Product Gallery Thumbnails: Replace ts-ignore with ts-expect-error

* Product Gallery Thumbnails: Replace ts-ignore with ts-expect-error

* Product Gallery Thumbnails: Revert back to ts-ignore

* Revert "Product Gallery: Add crop, zoom and full-screen settings"

This reverts commit 840654197619e2611029b81990493387ae0b543d.

* Product Gallery: Add crop, zoom and full-screen settings

* Product Gallery: Remove the redundant React Fragment

* Remove nested filled and empty cart blocks in cart template (https://github.com/woocommerce/woocommerce-blocks/pull/10447)

* improve migration to blockified templates (https://github.com/woocommerce/woocommerce-blocks/pull/10415)

* fix compatibility with WP 6.2 (https://github.com/woocommerce/woocommerce-blocks/pull/10449)

* Add Product Gallery Pager to template

* Add Pager settings to Product Gallery block

* Remove save function and rename icon

* Use nullish coalescing operator for the block context

---------

Co-authored-by: Roy Ho <roykho77@gmail.com>
Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2023-08-22 16:26:46 -03:00
Thomas Roberts d556d649ba Update changelog and release notes 2023-08-22 17:11:07 +01:00