Commit Graph

5665 Commits

Author SHA1 Message Date
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
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
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
Luigi 41e5f068b5 add testing instructions for the release 10.6.3 2023-08-03 09:43:30 +02:00
Luigi Teschio bd082541a3 fix compatibility with WP 6.2 (https://github.com/woocommerce/woocommerce-blocks/pull/10449) 2023-08-02 15:58:39 +00:00
Luigi Teschio ea69b3749b improve migration to blockified templates (https://github.com/woocommerce/woocommerce-blocks/pull/10415) 2023-08-02 15:12:05 +02:00
Thomas Roberts ac50d9e42d Remove nested filled and empty cart blocks in cart template (https://github.com/woocommerce/woocommerce-blocks/pull/10447) 2023-08-02 04:17:05 -07:00
Daniel Dudzic 6dc1deef9e 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
2023-08-02 10:43:08 +00:00
Alba Rincón a9d29407eb Fix badge wrong spacing on the newest arrivals pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10446) 2023-08-02 11:06:57 +02:00
Alba Rincón a8873c3fa3 Remove propTypes (https://github.com/woocommerce/woocommerce-blocks/pull/10432) 2023-08-02 09:48:26 +02:00
Daniel Dudzic d6e4dd5eb3 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.
2023-08-02 07:09:51 +00:00
Alba Rincón 76e68dddfd Show only products with rating (https://github.com/woocommerce/woocommerce-blocks/pull/10434) 2023-08-02 08:49:58 +02:00
Roy Ho 62268b7017 Remove duplicate HTML element and added classnames for single product block (https://github.com/woocommerce/woocommerce-blocks/pull/10374) 2023-08-01 12:24:35 -07:00
Daniel Dudzic 69f1c53a41 Revert "Add Product Gallery Thumbnails block (https://github.com/woocommerce/woocommerce-blocks/pull/10247)" (https://github.com/woocommerce/woocommerce-blocks/pull/10441)
This reverts commit 51344c3fed.
2023-08-01 19:03:12 +02:00
Daniel Dudzic 51344c3fed Add Product Gallery Thumbnails block (https://github.com/woocommerce/woocommerce-blocks/pull/10247)
* 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
2023-08-01 12:23:53 +00:00
Mike Jolley 3cfcdd0646 Refactor Store API hydration logic and prevent fatal errors from session class usage (https://github.com/woocommerce/woocommerce-blocks/pull/10373)
* Refactor hydration logic

* spacing
2023-08-01 12:13:18 +01:00
Alba Rincón b3adae504f Run `phpcs` on all files (https://github.com/woocommerce/woocommerce-blocks/pull/10429)
* Run php on all files

* Run phpcs on all files

* Ignore warning
2023-08-01 11:32:56 +02:00
Alba Rincón 2df75990e3 Catch all the PHPCS errors only on changed files (https://github.com/woocommerce/woocommerce-blocks/pull/10402)
* Commit a php lint warning

* Add param to show php warnings

* Print exit code

* Test

* test 2

* Add back cs2pr

* Add checkstyle

* Remove exit code

* Test without report

* Add checkstyle

* Fix php

* Test changed files

* Print changed files

* Introduce error

* More errors

* Fix errors

* Test

* Test all cases

* Fix php lint errors

* Rename readme

* Show all files

* Test new action

* Test

* Try other actions

* Add errors

* Remove actions

* More errors

* Fix git diff

* Fix all php errors

* Remove git fetch

* Add error

* Fix error and action
2023-08-01 10:25:12 +02:00
Alexandre Lara 720f65ca36 Fix color when selecting Large Image block (https://github.com/woocommerce/woocommerce-blocks/pull/10425) 2023-07-31 17:04:10 -03:00
Luigi 263ceac505 add testing instructions for the release 10.6.2 2023-07-31 17:19:39 +02:00
Patricia Hillebrandt 54cfff4644 Add new GH Action for ensuring the correct labels are added to PRs (https://github.com/woocommerce/woocommerce-blocks/pull/10412)
* Add new GH Action for ensuring the correct labels are added to PRs.

* Update Pull Request Template instructions for labels.

* Update validation.

* Update the validation for the type.
2023-07-31 15:54:17 +02:00
Luigi Teschio e0296c15fd fix unit test (https://github.com/woocommerce/woocommerce-blocks/pull/10409) 2023-07-31 12:26:20 +00:00