Commit Graph

5955 Commits

Author SHA1 Message Date
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
Tung Du 1868b62ba0 E2E: Improve the setup script (https://github.com/woocommerce/woocommerce-blocks/pull/10611) 2023-08-22 17:32:05 +07:00
Hritik Chaudhary 4199533688 Fixed newly detected broken links (https://github.com/woocommerce/woocommerce-blocks/pull/10537)
* Update check-doc-links.yml

* Update check-doc-links.yml

* Update check-doc-links.yml

* Update check-doc-links.yml

* POC: Exclude releases folder from MD link check using “ignorePatterns”

* Update check-doc-links.yml to use tcort/markdown-link-check

* Update check-doc-links.yml to use existing config

* reverted check-doc-links-config.json

* fixed broken links

* fixed broken links and generated docs

* updated docs

---------

Co-authored-by: Niels Lange <info@nielslange.de>
2023-08-22 11:51:18 +02:00
Manish Menaria c925c11f25 Update testing notes for 10.9.1 & 10.9.2 2023-08-22 14:34:03 +05:30
Alexandre Lara 2f65c6cdd4 Product Gallery block: Fix 404 errors occurring on frontend (https://github.com/woocommerce/woocommerce-blocks/pull/10555)
* Prevent block from loading frontend scripts

* Fix issue with Product Gallery not being registered on the Editor

* Fix php cs error
2023-08-21 20:20:48 -03:00
Raluca Stan 40a7a755f2 Update README.md 2023-08-21 18:43:19 +02:00
Paulo Arromba efb6136a70 Fix/10530 Inconsistent new install behaviour for templates when using block themes (https://github.com/woocommerce/woocommerce-blocks/pull/10608)
* Skipped requests regarding WP/WC setup, to avoid issues with the pages not existing yet when migrating page content to templates.

* Skipped requests regarding WP-CLI to avoid issues with the pages not existing yet when migrating page content to templates.

* Added check for woocommerce_db_version option

* Add check for occurred migration to skip template injection

* corrected if clause

* Update src/BlockTemplatesController.php

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

* Added maintenance mode to migration exception. Added trace value to has_migrated options

* Merge with new migration logic.

* Set correct post terms for wp_template content

* updated comment

---------

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2023-08-21 14:48:51 +01:00
Alba Rincón 85ae77d10d [Store Customization MVP] Create the new patterns dictionary (https://github.com/woocommerce/woocommerce-blocks/pull/10674)
* Create the new patterns dictionary

* Fix prompts and keys
2023-08-21 14:23:11 +02:00
Karol Manijak cdd5c4e68b Make View Cart link displayed below the Add to Cart button (https://github.com/woocommerce/woocommerce-blocks/pull/10675) 2023-08-21 13:52:08 +02:00
Alexandre Lara 94c5dcefce Fix icon color when block is selected in List View (https://github.com/woocommerce/woocommerce-blocks/pull/10652) 2023-08-18 18:03:53 +00:00
Mike Jolley 0054d24f5c Fix: Made migration migrate block templates in the current theme (https://github.com/woocommerce/woocommerce-blocks/pull/10641)
* Fix: Made migration migrate block templates in the current theme

* Update src/BlockTemplatesController.php

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>

* Move migration and status codes to BlockTemplateMigrationUtils

---------

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2023-08-18 17:45:28 +01:00
Luigi Teschio d1a1b9d5f9 Load Interactivity API in `bootstrap.php` (https://github.com/woocommerce/woocommerce-blocks/pull/10657)
* load Interactivity API in Bootstrap.php file

* fix comment

* update visibility function

* remove blank line

* remove comment

* remove logic to not load Interactivity API
2023-08-18 12:40:35 +00:00
Daniel Dudzic 601adc6e1f Product Gallery Large Image: Add E2E test (https://github.com/woocommerce/woocommerce-blocks/pull/10482) 2023-08-18 14:02:06 +02:00
Karol Manijak 2bd1d31602 Add logic of Upgrade Notice after upgrading Products to Product Collection (https://github.com/woocommerce/woocommerce-blocks/pull/10267)
* WIP of Upgrade Notice state

* Extend the state options with seeing option

* Move the logic to the dedicated folder

* Subscribe only if not reverted

* Refactor the way UpgradeNotice is rendered

* Simplify the logic of keeping the Upgrade Notice state in local storage

* Improve types organisation

* Lift the functions interacting with local storage to the Inspector Controls of Product Colelction

* Simplify logic of showing Upgrade Notice

* Disable auto migration

* Refactoring

* Use useLocalStorageState hook

* Fix incorrect merge

* Final improvements

* Allow to display Upgrade Notice after revert and manual upgrade

* Fix incorrect merge

* Improve the unsubscribe process

* Trigger auto-update from Product Collection only

* Remove weird console.log

* Abstract manual update from Product Query

* Fix the taxQuery migration from Product Collection to Products

* Product Collection - logic to hide upgrade notice (https://github.com/woocommerce/woocommerce-blocks/pull/10494)

* Add timestamp to each upgrade notice status change

* Revert back only Product Collections converted from Products block

* Make the time threshold configurable

* Add logic that hides the Upgrade Notice after some amount of displays

* Fix the taxQuery migration from Product Collection to Products

* Change the way to count Product Collection entries

* Fix the problem of multiple display counter increments with Product Collection

* Update Upgrade Notice visibility conditions

* Add contiions to unmark Product Collection as converted from Products

* Change variable name

* Change variable t to time name for better readibility. Improve types

* Replace useState with useRef

* Remove unecessary props passed to UpgradeNotice
2023-08-18 08:25:15 +02:00
Patricia Hillebrandt f88a7e984d Testimonials Single Pattern > Update the image format and content width (https://github.com/woocommerce/woocommerce-blocks/pull/10600)
* Testimonials Single Pattern: Update the styles for the image and add and alt text.

* Update the layout type of the comlumn iwth the content to constrained and update padding to 32px for the columns wrapper.

* Vertical align image to the center.
2023-08-17 15:28:58 +00:00
Mike Jolley d46e286bf7 Fix: sync_endpoint_with_page should use a matching slug if it exists instead of creating a new page (https://github.com/woocommerce/woocommerce-blocks/pull/10640) 2023-08-17 16:26:49 +01:00
Patricia Hillebrandt 4290a948a6 Ensure the My Account text size matches other texts in the footer. (https://github.com/woocommerce/woocommerce-blocks/pull/10614) 2023-08-17 15:04:56 +00:00
Alba Rincón 748015b675 Fix "On sale" badge class (https://github.com/woocommerce/woocommerce-blocks/pull/10634)
* Fix "On sale" badge class for shop

* Add class to sale badge
2023-08-17 15:46:11 +02:00
Manish Menaria f40131c33e Remove client side navigation from Products beta block (https://github.com/woocommerce/woocommerce-blocks/pull/10636)
* Remove client side navigation from Products beta block

Changes:
- Removed the `add_navigation_id_directive` method and its associated filter. This method previously added a `data-wc-navigation-id` attribute to the query block for client-side navigation, which is no longer required.
- Removed the `add_navigation_link_directives` method and its associated filter. This method previously added interactive directives to pagination links inside the Query Pagination block. This specific functionality has been removed as it is no longer needed.
- Introduced a new method `mark_block_as_interactive`, which is designed to mark the Product Query as an interactive region so that interactive elements can work inside it. This is achieved using the 'data-wc-interactive' attribute.

* add data-wc-interactive to product button block

* Remove unnecessary code

As we have added `data-wc-interactive` on Product button therefore we don't need to add it in Product Query block.

* Boolean attribute doesn't need explicit value equal to true

* Skip failing i18n-related E2E tests

* Skip failing i18n-related E2E test

---------

Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Niels Lange <info@nielslange.de>
2023-08-17 15:45:59 +02:00
Tom Cafferkey efec0bbd02 Update to PR template (https://github.com/woocommerce/woocommerce-blocks/pull/10549) 2023-08-17 12:16:14 +01:00
Alba Rincón ee9b93a026 Remove `queryId` parameter from patterns (https://github.com/woocommerce/woocommerce-blocks/pull/10616) 2023-08-17 09:06:48 +02:00
Seghir Nadir 98e4259482 fix missing use statment (https://github.com/woocommerce/woocommerce-blocks/pull/10592) 2023-08-16 16:08:59 +01:00
Tom Cafferkey 981ac612f5 Update WooCommerce Blocks brand assets (https://github.com/woocommerce/woocommerce-blocks/pull/10622) 2023-08-16 14:15:20 +01:00
Niels Lange c374b13c2b Update versions to 11.0.0-dev 2023-08-16 15:08:14 +02:00
Niels Lange c957c5e7a8 Release: 10.9.0 2023-08-16 15:05:23 +02:00
Roy Ho c9f32707d0 Product-details: Add margin spacing controls (https://github.com/woocommerce/woocommerce-blocks/pull/10440)
* Product-details: Add margin spacing controls

* Add additional div to allow custom styling
2023-08-16 05:48:18 -07:00
Karol Manijak 1d3cffff42 Add E2E tests for Product Collection with Compatibility Layer (https://github.com/woocommerce/woocommerce-blocks/pull/10540)
* Add E2E tests for Product Collection with Compatibility Layer

* Remove unnecessary changes

* Rename the file so it covers side effects and improve imports

* Rename the file to the correct suffix - side_effects instead of side-effects
2023-08-16 11:54:09 +02:00
Karol Manijak f290966ddf Open links from the Editor in the top frame, not editor iframe (https://github.com/woocommerce/woocommerce-blocks/pull/10515)
* Open links from the Editor in the top frame, not editor iframe

* Remove leftover

* Change the _top to _blank for external links
2023-08-16 11:03:50 +02:00
Tung Du 97b22cc17a Better handling tests with global side effects (https://github.com/woocommerce/woocommerce-blocks/pull/10508) 2023-08-16 12:23:43 +07:00
Mike Jolley 6b083aa641 Convert product tag control to functional component (https://github.com/woocommerce/woocommerce-blocks/pull/10529) 2023-08-15 17:40:05 +01:00
Niels Lange 320286b69e Update release-initial-checklist.md 2023-08-15 18:25:52 +02:00
Niels Lange 8b9a8b3864 Update patch-initial-checklist.md 2023-08-15 18:24:34 +02:00