Commit Graph

5696 Commits

Author SHA1 Message Date
Luigi Teschio 97474e4040 Create wc-all-block-styles chunk with all the styles for classic themes (https://github.com/woocommerce/woocommerce-blocks/pull/10543) 2023-08-11 14:12:34 +02:00
Mike Jolley 566513e3ed Simplify code path and remove todo (https://github.com/woocommerce/woocommerce-blocks/pull/10526) 2023-08-11 10:44:50 +01:00
Patricia Hillebrandt edbfa8d35e Store Customization > Add placeholder images for the Alternating Image and Text pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10479)
* Add placeholder images and update text styles for the Alternating Image and Text pattern.

* Address code review.

* add spacing.

* streamline the styles.
2023-08-11 09:33:54 +02:00
Manish Menaria 56fd1165a6 Product Collection: Use Interactivity API for pagination (https://github.com/woocommerce/woocommerce-blocks/pull/10361)
* Update router to hydrate only interactive regions

* Rename link directive to navigation-link

* Add navigation directives to Query and Pagination blocks

* Enable the Interactivity API by default

* Remove client-side navigation meta tag

* Cache initial regions

* Move data-wc-interactive from query to query-pagination

* Add woo prefix to navigation id

* Add keys and move wc-interactive back to the query block

* Reuse root fragments for each interactive region

* Fix navigation-id retrieval

* Introduce interactivity to Product Collection block and navigation enhancements

This commit brings significant improvements to the ProductCollection block.

1. A new property `parsed_block` is added to the class to hold the block with its attributes before it gets rendered. This allows for more complex manipulations of the block and its attributes.

2. Interactivity has been added to the product collection block. The block is marked as an interactive region so it can be updated during client-side navigation. The `add_navigation_id_directive` method is responsible for adding this functionality. This ensures better UX as users navigate through the products.

3. Navigation links inside the Query Pagination block are also made interactive. The `add_navigation_link_directives` function is responsible for this. All anchor tags in the pagination are given the `data-wc-navigation-link` attribute with relevant navigation payload. This includes prefetching and scroll behavior. The pagination links are given unique keys for 'previous' and 'next' navigation.

4. The `render_block` filter hook has been used to add these functionalities to the product collection and query pagination blocks during render.

* Disable scroll

---------

Co-authored-by: David Arenas <david.arenas@automattic.com>
2023-08-11 11:37:55 +05:30
Tung Du 40d8eb8ac9 Fix: Adjust Playwright E2E tests for WP 6.3 (https://github.com/woocommerce/woocommerce-blocks/pull/10516)
Co-authored-by: Luigi <gigitux@gmail.com>

- Updates the `@wordpress/e2e-test-utils-playwright` package to use the npm release.
- Removes hard-coded WP version in `.wp-env.json` to use the latest Core release.
- Fixes failing Playwright tests when using WP 6.3.
- Pins the core version (6.2.2) for Jest E2E tests so they can keep passing. We decided not to fix those tests because we're moving to Playwright.
2023-08-11 06:28:38 +07:00
Patricia Hillebrandt 75acbba85f Featured Products: Fresh & Tasty pattern > Enhance mobile view and optimize images (https://github.com/woocommerce/woocommerce-blocks/pull/10521)
* Update wrapping on mobile view

* Update styling for images and size.

* remove e2e-pw changes

* Remove font style.

* Remove custom styling from images.
2023-08-10 14:33:31 +00:00
Luigi Teschio b90e0ffdc9 Interactivity API and Product Button (https://github.com/woocommerce/woocommerce-blocks/pull/10006)
* Update Interactivity API JS files

* Disable TS checks in the Interactivity API for now

* Add new SSR files

* Replace wp_ prefixes with wc_ ones

* Replace wp- prefix with wc-

* Replace guternberg_ prefix with woocommerce_

* Remove file comments from Gutenberg

* Rename files with `wp` prefix

* Fix code to load Interactivity API php files

* Remove TODO comments

* Replace @wordpress with @woocommerce

* Update Webpack configuration

* Fix directive prefix

* Remove interactivity folder from tsconfig exclude

* Add client-side navigation meta tag code

* Remove unneeded blocks.php file

* Fix store tag id

* Register Interactivity API runtime script

* Fix Interactivity API runtime registering

* Remove all files related to directive processing in PHP

* Move json_encode to Store's render method

* WIP

* WIP

* WIP

* WIP

* Preserve previous context

* Ignore Minicart block on client-side navigation

* Refresh page on store updatRefresh page on store updatee

* Refactor logic

* Add console error when a path is missing

* fix PHP lint error

* WIP store

* use store approach

* update jest configuration

* restore Mini Cart changes

* move cart store subscription to interactivity package

* move interactivity flag

* format HTML

* move addToCartText to the context

* Load product-query stylesheet when rendering the Products block

* update sideEffects array

* fix catch

* rename moreThanOneItem to isThereMoreThanOneItem

* improve how scripts are enqueued

* update default value for the filter woocommerce_blocks_enable_interactivity_api

* Update assets/js/atomic/blocks/product-elements/button/block.json

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

* Update assets/js/interactivity/cart/cart-store.ts

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

* fix block.json

* remove updateStore function

* restore interactivity api changes

* import cart store

* show notice when there is an error

* add logic to dequeue script on classic themes and block themes

* imrpove logic about notice

* Interactivity API: add `afterLoad` callbacks to `store()` function (https://github.com/woocommerce/woocommerce-blocks/pull/10338)

* show notice when there is an error

* Add initial implementation for store callbacks

* Run `afterLoad` callbacks after `init`

* Move cart state subscription to Product button

* Remove cart-store from Interactivity API internals

* Change callbacks with options and save only afterLoad callbacks

* ProductButton: Add animation (https://github.com/woocommerce/woocommerce-blocks/pull/10351)

* implement animation

* improve logic

* refactor logic

* refactor code

* address feedback about code style

* add support for woocommerce_add_to_cart_quantity

* Fix animation flickering

* Introduce wp-effect, reduce the amount of numberOfItem variables to 2 and consolidate animation status

* add support for added class

* Remove unnecessary selector

* Don't fetch cart if it was already fetched

* remove added class

---------

Co-authored-by: Luis Herranz <luisherranz@gmail.com>

---------

Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Luis Herranz <luisherranz@gmail.com>

* update deepsignal

* remove added class

* update deepsignal

* Interactivity API and Product Button: Add E2E tests (https://github.com/woocommerce/woocommerce-blocks/pull/10036)

* Add FrontendUtils class

* fix conflicts

* use locator

* restore click usage

* Product Button: Add E2E test

* fix util

* fix E2E tests

* remove comment

* Add E2E test to ensure that woocommerce_product_add_to_cart_text works

* update sideEffects array

* add zip and unzip as package

* fix wp-env configuration

* fix E2E test

* add report

* try now

* try now

* try now

* fix E2E test

* E2E: Add documentation for testing actions and filters. Fixes woocommerce/woocommerce-blocks#10135 (https://github.com/woocommerce/woocommerce-blocks/pull/10206)

* update description

* fix label

* rename files

* make requestUtils private

* remove page.goto

* use toHaveCount

* use productsToDisplay variable

* fix E2E tests

* rename class utils

---------

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

---------

Co-authored-by: David Arenas <david.arenas@automattic.com>
Co-authored-by: Luis Herranz <luisherranz@gmail.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com>
2023-08-10 14:02:33 +00:00
David Arenas 4771c70fc9 Disable scroll in pagination links (https://github.com/woocommerce/woocommerce-blocks/pull/10522) 2023-08-10 12:06:25 +02:00
Mike Jolley 4fd16267be Refactor Push Changes Readability and Performance (https://github.com/woocommerce/woocommerce-blocks/pull/10315)
* Add local state to address-form

* Update test with valid postcode and required fields

* Push changes refactoring

* Avoid loops due to retrying same data

* Callbacks to prevent rerenders

* Move validation functions

* Filter incoming values to only those included as fields to prevent errors

* Keep track of country changes to prevent excessive updates of addressFormFields.

* Use helpers in test

* Fill company

* Revert local state in address form

* Update address form to remove validation handling for postcode (country clears the field).

* Revert "Update test with valid postcode and required fields"

This reverts commit 718a6006df24f6e957297ad4d1ef9d6f690793bd.

* Clear postcode when country changes if invalid

* Revalidate fields when country changes

* Comment for pick

* Revert unneccessary test change

* Revery moving of functions to reduce diff size

* Increase push timeout in tests

* Revert test changes
2023-08-09 18:24:51 +01:00
Thomas Roberts f3bdfaee98 Update E2E util to allow adding to cart by name from the shop page (https://github.com/woocommerce/woocommerce-blocks/pull/10507)
* Allow adding to cart by name from the shop page

* Remove networkidle
2023-08-09 16:17:05 +02:00
Luigi 76e36a2691 Merge branch 'release/10.8.0' of https://github.com/woocommerce/woocommerce-blocks into trunk 2023-08-09 13:54:17 +02:00
github-actions[bot] 10620a7517 Release: 10.8.2 (https://github.com/woocommerce/woocommerce-blocks/pull/10517)
* Revert woocommerce/woocommerce-blocks#10509 (https://github.com/woocommerce/woocommerce-blocks/pull/10513)

* Revert "Revert "Performance: Cache script data in a transient for production builds" (https://github.com/woocommerce/woocommerce-blocks/pull/10509)"

This reverts commit 5bcf8657ee.

* keep WP 6.2.2 as env to run E2E tests

* Empty commit for release pull request

* update changelog and testing instructions

* bump version to 10.8.2

* update zip link

---------

Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
2023-08-09 13:47:39 +02:00
Luigi Teschio 79b62a3bd3 Revert woocommerce/woocommerce-blocks#10509 (https://github.com/woocommerce/woocommerce-blocks/pull/10513)
* Revert "Revert "Performance: Cache script data in a transient for production builds" (https://github.com/woocommerce/woocommerce-blocks/pull/10509)"

This reverts commit 5bcf8657ee.

* keep WP 6.2.2 as env to run E2E tests
2023-08-09 12:36:54 +02:00
Alba Rincón 9804a35596 Revert "Show only products with rating (https://github.com/woocommerce/woocommerce-blocks/pull/10434)" (https://github.com/woocommerce/woocommerce-blocks/pull/10512)
This reverts commit 76e68dddfd.
2023-08-09 10:53:14 +02:00
Luigi d3fdc6d036 add changelog and testing instruction for the release 10.6.5 2023-08-09 10:41:53 +02:00
Luigi Teschio 5bcf8657ee Revert "Performance: Cache script data in a transient for production builds" (https://github.com/woocommerce/woocommerce-blocks/pull/10509)
* Revert "Performance: Cache script data in a transient for production builds (https://github.com/woocommerce/woocommerce-blocks/pull/9120)"

This reverts commit 496fac8386.

* fix WordPress version

* fix version
2023-08-09 07:31:15 +00:00
Mike Jolley 2b80d3e830 Rename commands and directories for Playwright and JEST e2e tests (https://github.com/woocommerce/woocommerce-blocks/pull/10493)
* Move e2e to e2e-jest

* Move e2e-pw to e2e

* Update e2e usage + scripts

* Missed some directory renames

* Update gitignore

* Remove test results as its in gitignore
2023-08-08 17:58:12 +01:00
Luigi Teschio be1cefc4b4 Add ESLint `eslint-plugin-playwright` package (https://github.com/woocommerce/woocommerce-blocks/pull/10487)
* Add eslint playwright plugin configuration

* replace networkidle with commit

* address  Unnecessary await expression. This method does not return a Promise error

* address 'Unexpected usage of not.toBeVisible(). Use toBeHidden() instead' error

* address 'Unexpected use of the .skip()  annotation.' error

* address 'toHaveCount' must be awaited or returned' error

* address ''page' is defined but never used '

* address ''toBeVisible' must be awaited or returned'

* address 'Unexpected use of element handles'

* address 'Unnecessary await expression. This method does not return a Promise'

* address 'Test has no assertions'

* address 'Unexpected use of page.waitForTimeout()'

* address 'Avoid having conditionals in tests'
2023-08-08 13:25:45 +00:00
dependabot[bot] 5a84f82425 Bump mockery/mockery from 1.6.4 to 1.6.5 (https://github.com/woocommerce/woocommerce-blocks/pull/10495)
Bumps [mockery/mockery](https://github.com/mockery/mockery) from 1.6.4 to 1.6.5.
- [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.4...1.6.5)

---
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>
2023-08-08 14:12:39 +02:00
Mike Jolley ab945e4a98 Performance: Optimise select shipping API calls (https://github.com/woocommerce/woocommerce-blocks/pull/10472)
* Support disabled inputs with styling

* Remove 1000ms debounce on selecting shipping rates and disable input when selecting

* Optimise rest api loading

* Fix analytics init

* Comments

* Unused after refactor

* More robust switching to prevent loop

* revert shipping controller change

* Remove ShippingAssets

* update test

* Comments
2023-08-08 11:56:19 +01:00
Thomas Roberts 8e79fdcc45 Preliminary work to add Playwright E2E tests for the Cart block & merchant cart tests (https://github.com/woocommerce/woocommerce-blocks/pull/9739)
* Add cartCheckout project

* Add navigation utils

* Add global block inserter utils to EditorUtils class

* Add initial Cart block tests

* Add slug to block data type

* Get block editor selector when navigating in editor

* add test for inner block filtering

* Update navigation util to use block name instead of title

* Add view switcher test

* Update block name/title

* Run only cart/checkout tests in cartCheckout project

* Remove old comment

* Update selector to use locator instead

* Revert selector type change

* Fix TS issues

* Remove unnecessary admin state

* Update tests to use editorUtils and fix TS issue with selector

* Replace string concatenation with template

* Rename cart test to contain block_theme suffix

* Change page to editor.page and use canvas where necessary

* Rename directory to cart-checkout

* Wait for editor response before continuing

* Remove cartcheckout playwright project

* Remove typecast and switch to .toNotBeHidden

* Remove double comment

* Force click the empty cart button

* Wait for empty cart button for longer

* Isolate test to run in CI

* Dispatch click event instead of simulating click

* Remove timeouts

* Revert "Isolate test to run in CI"

This reverts commit 28af5a50700476639d0a4f12fca9800a4a5aed91.
2023-08-07 08:59:06 -07:00
github-actions[bot] 1a80d70250 Release: 10.8.1 (https://github.com/woocommerce/woocommerce-blocks/pull/10485)
* Empty commit for release pull request

* classicBlock: add defensive type handling (https://github.com/woocommerce/woocommerce-blocks/pull/10475)

* Update check for active cart template and migration routine (https://github.com/woocommerce/woocommerce-blocks/pull/10462)

* Update cart/checkout endpoints

* Remove updating option on every page load

* Check placeholder page vs current page

* Check placeholder page vs current page

* Switch from Rest to PHP for migrating templates

* Existing page used for migration must contain post-content to be suitable

---------

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Version bumping & documentation for release 10.8.1

The primary changes include:

1. **Version Bumping**: Updated the version from 10.8.0 to 10.8.1 in several files including `composer.json`, `package-lock.json`, `package.json`, `readme.txt`, `src/Package.php`, and `woocommerce-gutenberg-products-block.php`.

2. **Documentation**:
   - Added a new testing notes file for release 10.8.1 (`docs/internal-developers/testing/releases/1081.md`). This file provides testing procedures for two bug fixes introduced in this release.

3. **Changelog**: Updated the `readme.txt` to include the bug fixes in the 10.8.1 changelog section.

This release focuses on enhancing stability and user experience by addressing critical bugs.

* Update readme file

* Add zip file for testing

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2023-08-07 17:12:16 +05:30
Manish Menaria bc868cb667 Port 10.8.1 release changes to trunk 2023-08-07 17:05:31 +05:30
Mike Jolley 427fe33af3 Fix wcSettings inconsistent property naming style (https://github.com/woocommerce/woocommerce-blocks/pull/10439)
* Mass convert all snake case settings keys to camel case

* Handling for payment method data props
2023-08-07 11:30:53 +01:00
Mike Jolley e0d110ccf0 Prevent notices due to missing properties (https://github.com/woocommerce/woocommerce-blocks/pull/10369) 2023-08-07 10:18:01 +01:00
dependabot[bot] bfd97ffa6a Bump @dnd-kit/sortable from 7.0.1 to 7.0.2 (https://github.com/woocommerce/woocommerce-blocks/pull/10419)
Bumps [@dnd-kit/sortable](https://github.com/clauderic/dnd-kit/tree/HEAD/packages/sortable) from 7.0.1 to 7.0.2.
- [Release notes](https://github.com/clauderic/dnd-kit/releases)
- [Changelog](https://github.com/clauderic/dnd-kit/blob/master/packages/sortable/CHANGELOG.md)
- [Commits](https://github.com/clauderic/dnd-kit/commits/@dnd-kit/sortable@7.0.2/packages/sortable)

---
updated-dependencies:
- dependency-name: "@dnd-kit/sortable"
  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-08-07 10:11:10 +02:00
dependabot[bot] bd9c75f743 Bump @preact/signals from 1.1.2 to 1.1.5 (https://github.com/woocommerce/woocommerce-blocks/pull/10421)
Bumps [@preact/signals](https://github.com/preactjs/signals/tree/HEAD/packages/preact) from 1.1.2 to 1.1.5.
- [Release notes](https://github.com/preactjs/signals/releases)
- [Changelog](https://github.com/preactjs/signals/blob/main/packages/preact/CHANGELOG.md)
- [Commits](https://github.com/preactjs/signals/commits/@preact/signals@1.1.5/packages/preact)

---
updated-dependencies:
- dependency-name: "@preact/signals"
  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-08-07 09:54:31 +02:00
dependabot[bot] 45328756d9 Bump @testing-library/dom from 9.3.0 to 9.3.1 (https://github.com/woocommerce/woocommerce-blocks/pull/10417)
Bumps [@testing-library/dom](https://github.com/testing-library/dom-testing-library) from 9.3.0 to 9.3.1.
- [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.0...v9.3.1)

---
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-08-07 09:52:21 +02:00
dependabot[bot] 881eefefc0 Bump phpdocumentor/reflection from 3.0.0 to 3.0.1 (https://github.com/woocommerce/woocommerce-blocks/pull/10416)
Bumps [phpdocumentor/reflection](https://github.com/phpDocumentor/Reflection) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/phpDocumentor/Reflection/releases)
- [Commits](https://github.com/phpDocumentor/Reflection/compare/3.0.0...3.0.1)

---
updated-dependencies:
- dependency-name: phpdocumentor/reflection
  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-08-07 09:50:53 +02:00
Patricia Hillebrandt bdf6e64b75 Releases > Include PRs with complex testing instructions in a separate section within the Release Notes (https://github.com/woocommerce/woocommerce-blocks/pull/10276)
* Propose changes for the Release Testing process.

* Update spacing

* Update wording for the experimental flag check.

* Reintroduce the 'Do not include in the Testing Notes' check.

* Update the release and patch release instructions.

* remove whitespace
2023-08-07 08:37:09 +02:00
Luigi 881fe935f1 add testing instructions for the release 10.6.4 2023-08-04 17:57:46 +02:00
Thomas Roberts 4ba3dd050b Update check for active cart template and migration routine (https://github.com/woocommerce/woocommerce-blocks/pull/10462)
* Update cart/checkout endpoints

* Remove updating option on every page load

* Check placeholder page vs current page

* Check placeholder page vs current page

* Switch from Rest to PHP for migrating templates

* Existing page used for migration must contain post-content to be suitable

---------

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2023-08-04 16:05:39 +01:00
Luigi Teschio 48493a8fbb classicBlock: add defensive type handling (https://github.com/woocommerce/woocommerce-blocks/pull/10475) 2023-08-04 16:16:19 +02:00
Lucio Giannotta 76b82000b3 Fix border color class names not being applied correctly (https://github.com/woocommerce/woocommerce-blocks/pull/10468) 2023-08-04 14:04:24 +02:00
Daniel Dudzic c411137ba4 E2E: Product Gallery Thumbnails block tests (https://github.com/woocommerce/woocommerce-blocks/pull/10370)
* 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

* E2E: Add tests for the Product Gallery Thumbnails block

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

* Product Gallery Thumbnails: Add failure handling

* Product Gallery Thumbnails: Fix the eslint dependency error

* Product Gallery Thumbnails: Add inner blocks to the sideEffects array

* 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 failing tests

* Revert unrelated package.json changes

* Product Gallery Thumbnails: Further package.json reverts

* Product Gallery Thumbnails: Rename the test screenshots

* 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 Thumbnails: Fix E2E tests

* Product Gallery Thumbnails: Remove unused function from frontend utils

* Product Gallery Thumbnails: Remove unused screenshots and config amendment

* Product Gallery Thumbnails: Add check for the order of block on the frontend

* 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

* Product Gallery E2E: Simplify and combine the tests
2023-08-04 13:07:31 +02:00
Tung Du e016b169c3 fix: compatibility layer doesn't work when Products block is the top level block (https://github.com/woocommerce/woocommerce-blocks/pull/10455) 2023-08-04 16:21:58 +07:00
Karol Manijak d5b250aa81 Enable Compatibility Layer for Product Collection (https://github.com/woocommerce/woocommerce-blocks/pull/10332)
* Enable Compatibility Layer for Product Collection

* Add another condition to recognise shop item

* Enable multiple blocks to be assigned to single hook in Compatibility Layer

* Move core/null block name assignment before the hooks assignment which is based on the block name

* Make array operations safer

* Unify hooks interface between templates

* Fix typo

* Update comment describing set_hook_data to reflect new interface
2023-08-04 10:07:02 +02:00
Hritik Chaudhary 869528a330 remove proptypes from payment-method-card and payment-method-error-bo… (https://github.com/woocommerce/woocommerce-blocks/pull/9817)
* proptype removal

* updated payment-method-error-boundary.tsx

---------

Co-authored-by: Niels Lange <info@nielslange.de>
2023-08-03 12:06:52 +01:00
Mike Jolley 2d530a7d5e Refactor ValidatedTextInput and AddressForm usage (https://github.com/woocommerce/woocommerce-blocks/pull/10309)
* Refactor ValidatedTextInput and AddressForm usage

* Remove formatting from onChange

* update useeffect dependencies

* Update validation text

* Style fields without floats (https://github.com/woocommerce/woocommerce-blocks/pull/10310)
2023-08-03 12:02:20 +01:00
Manish Menaria 535f2d066c Update versions to 10.9.0-dev 2023-08-03 16:00:05 +05:30
Thomas Roberts 3a62bf9d94 Invalidate script data cache when site URL, scheme, or plugin name changes (https://github.com/woocommerce/woocommerce-blocks/pull/10278)
* Add function to generate a hash for script data cache busting

* Store the script data hash if cache is not disabled

* Change transient key if accessed via https

* Update hardcoded transient key to use class variable

* Add generated hash to transient script data value

* Add check to ensure JSON is valid before proceeding

* Move JSON error check to other conditional

* Change formatting on long if

* Ensure hash is checked to invalidate cache
2023-08-03 03:16:58 -07:00
Manish Menaria 9c0abf377d Port changes from release/10.8.0 branch to trunk 2023-08-03 15:45:50 +05:30
Manish Menaria 2c7a0dc131 Update 1080.md 2023-08-03 14:41:12 +05:30
Paulo Arromba e2ccc8d28f $post validation on Cart and Checkout template (https://github.com/woocommerce/woocommerce-blocks/pull/10410)
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2023-08-03 14:34:48 +05:30
Karol Manijak d5d5a36f56 Compatibility Layer - Return raw content without hooks if the content is empty (https://github.com/woocommerce/woocommerce-blocks/pull/10453) 2023-08-03 11:01:46 +02:00
David Arenas 84f4cec592 Interactivity API: Update interactive regions during client-side navigation (https://github.com/woocommerce/woocommerce-blocks/pull/10200)
* Update router to hydrate only interactive regions

* Rename link directive to navigation-link

* Add navigation directives to Query and Pagination blocks

* Enable the Interactivity API by default

* Remove client-side navigation meta tag

* Cache initial regions

* Move data-wc-interactive from query to query-pagination

* Add woo prefix to navigation id

* Add keys and move wc-interactive back to the query block

* Reuse root fragments for each interactive region

* Fix navigation-id retrieval
2023-08-03 10:55:13 +02:00
Manish Menaria 7058969895 Update 1080.md 2023-08-03 14:12:20 +05:30
Luigi 41e5f068b5 add testing instructions for the release 10.6.3 2023-08-03 09:43:30 +02:00
Manish Menaria e66f6576eb Update 1080.md 2023-08-03 12:19:38 +05:30
Manish Menaria a7c5c8f640 Update zip file 2023-08-03 12:02:40 +05:30