Commit Graph

6993 Commits

Author SHA1 Message Date
Niels Lange d3574290b7
Fix regression of #48180 (#49580)
* Fix regression of #48180

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Fix one more bug in the dropdown styling (#49585)

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Sam Seay <samueljseay@gmail.com>
2024-07-16 21:46:39 +02:00
Albert Juhé Lluveras 6689e6e0d1
Add tests to verify Featured Product/Category image editor works (#49478)
* Add tests to verify Featured Product/Category image editor works

* Add changelog file
2024-07-16 13:23:09 +02:00
Thomas Roberts a71fb4d7a6
[Enhancement]: Add option to show price on the place order button (#49252) 2024-07-16 10:59:09 +01:00
Mike Jolley 77428b973d
Checkout: Add password strength meter to new field (#49164)
* Add validation message and fix rendering when account is required

* Adjust validation so we can change the label in messages with custom callback

* Add and style password meter

* Add validation feedback and zxcvbn support

* changelog

* Accessibility fixes

* Update lock file

* Fix initial state in safari

* Announce strength as you type

* Use React.ReactElement

* update lock file

* Update lock

* Downgrade local pnpm and recreate lock

* Feedback should only be shown when `showError` is true, not `hasError`

* Feedback should default to null
2024-07-15 16:22:42 +01:00
Mike Jolley 13d3e11d40
Checkout: Add password field to create account form (#48985)
* Add site title to account checkbox

* Add customer_password support to Store API

* Hide password nag if defining own password

* Add woocommerce_registration_generate_password option to block assets

* Change login prompt to just "log in"

* Add default styling to password inputs

* Reset line height for checkbox inputs

* Add customer password to store

* Add password field to contact information block

* Handle customer password in checkout processor

* Styling for new elements

* Update tests so they match new create account label

* Update log in link in tests

* Add e2e tests for password field

* Add validation message and fix rendering when account is required

* Changelog

* Add missing api to tests

* Remove console log

* rerender checkout

* Update log in link in test

* Adjust validation so we can change the label in messages with custom callback

* Use queryByText in test

* Make sure password generation is on in tests

* Create password if provided password is empty

* Skip "Place order" button translation test

* Revert "Skip "Place order" button translation test"

This reverts commit 7aed6137e88cdb3577f74f6f0c05258b531ed534.

* Update plugins/woocommerce-blocks/assets/js/blocks/checkout/inner-blocks/checkout-contact-information-block/block.tsx

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Update plugins/woocommerce-blocks/assets/js/data/checkout/reducers.ts

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Comment empty condition

* Update CSS classnames

* Return null in CreateAccountUI if nothing to display

* Linting: Return return param

* Document $password param

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2024-07-15 11:43:02 +01:00
Alba Rincón 6baddf6cd1
Update the `Customer Account` block icon for the line style (#49401)
* Update the customer icon for the line style

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Import Circle and Path and fix attribute case

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-15 08:53:47 +02:00
Sam Seay 9fa32b4f2b
Migrate StateInput, CountryInput and custom fields to native `<select>` (#48180) 2024-07-12 21:17:54 +00:00
Mike Jolley e0c62dce79
Extensibility: Format currency config so it can be consumed more easily (#48727)
* Export pre-formatted SITE_CURRENCY object from settings

* Fallback to SITE_CURRENCY

* Changelog

* Fix typedef

* Update mocks

* Inject site currency into cart preview data

* Update test

* Add currency formatting to preview data

* Mock currency in tests

* More currency mocking
2024-07-12 14:24:22 +01:00
Sam Seay e59decd222
Clean up unused files and dependencies from when WooCommerce Blocks was merged into the monorepo (#49319) 2024-07-12 16:40:07 +12:00
Adrian Moldovan 7e86b23761
[blocks e2e] Update config for retries and trace retention (#49416)
* Update config for retries and trace retention

* Add changelog

* Update maxFailures
2024-07-11 11:14:14 -07:00
Niels Lange 79786c5443
Revert #46362 (#49404)
* Revert #46262

* Remove pnpm-lock.yaml

* Revert "Remove pnpm-lock.yaml"

This reverts commit df4b87940d.

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Revert pnpm-lock.yaml

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-11 19:00:49 +02:00
Albert Juhé Lluveras ec95afc178
Fix sidebar attribute control in Products by Attribute block (#49351)
* Fix sidebar attribute control in Products by Attribute block

* Add changelog file

* Linting
2024-07-11 15:52:57 +02:00
Vladimir Reznichenko 9fef18cd0d
CI: missing jobs on changes in components package. (#49330)
This PR addresses issues in building a CI jobs matrix (resolving dependent packages and running CI jobs for them).
2024-07-11 14:36:56 +02:00
Vladimir Reznichenko f8c0e6e02f
E2E: enable reporting slow blocks test. (#49367) 2024-07-11 12:21:59 +02:00
piinthecloud cae3937ee6
Revert move docs (#49354)
* revert moving docs to main folder ahead of issues with subcategories

* add changelog

* add changelog
2024-07-10 17:33:15 +02:00
piinthecloud ec82b3f08f
move checkout docs with front matter to main folder (#49186)
* move checkout docs with front matter to main folder

* add manifest

* add core changelog

* Remove emojis, unsupported links and table of contents

* pr comments

* update folder name and remove toc

* title fix

---------

Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
2024-07-10 16:53:52 +02:00
Vladimir Reznichenko 4311640de2
Monorepo: caching deps per target package in GH actions (#49020)
In this PR, we are implementing per-package build and caching, which optimizes build and fetching cached dependencies times across our workflows.
2024-07-10 14:39:49 +02:00
Sam Seay eaf57e9f15
Create a separate bundle for cart and checkout (#48010) 2024-07-10 21:23:17 +12:00
Alex Florisca 56cc77fcef
Fix the mini cart items not being visible when zoomed in (#48384)
* Render an aria-label for the initial mini cart html

* FIx mini-cart items not visible when zoomed in

* Add changelog

* Fix linting issues

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Kick the GH actions

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* delete duplicate changelog file

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Delete plugins/woocommerce/changelog/48384-fix-43639-zoom-mini-cart

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-09 16:47:21 +01:00
Christopher Allford 7d71e2235a
Product Collection: Redesigned Collection Insertion Selection (#48911)
* Updated Collection Selection Buttons

Rather than using normal buttons we're going to replace these with cards
that we want to use instead.

* Reworked Product Catalog Creation

* Added Dropdown Collection Option

* Changelog

* Added Collection Dashicon Support

* Fixed Collection Change Modal

This is going to get replaced soon but it may as well look nicer than it
does right now.

* Type Fix

* Fixed `:focus` Hover Border

* Simplified Click Handler

* Style Fixes

* Gutenberg Style Fixes

* E2E Fixes

* Fixed E2E Test

* Added Dropdown Inserter E2E Support

* Logging

* Fixed Default Insertion Options

* Prevent Premature Rendering

* E2E Fix Attempt

* Lint Fix

* E2E Fix

* Fix test chaking if custom registred collections are available in the collection chooser

* Improve logic of choosing collection to cover both dropdown and placeholder

---------

Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-07-09 13:53:48 +02:00
Jonathan Lane 07c9d2b7b1
Update Playwright to 1.45.1 (#49202)
* Update Playwright to 1.45.1

* Update lockfile

* Add changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-07-08 15:22:13 -03:00
Adrian Moldovan 7b0f9457cf
[e2e tests] Add Allure reporter to Blocks e2e tests (#49228) 2024-07-08 15:02:31 +03:00
Vladimir Reznichenko 68532ce433
CI: update linting jobs to skip build step (#49193)
In this PR, we introduce changes to linting and PHPUnit jobs in order to speed them up: skip or minimize the build step.
2024-07-08 08:39:39 +02:00
Manish Menaria 2d6448d9b4
Product Collection: Fix alignment of the first item in Grid layout for WP 6.6 (#49096)
* Remove `__experimentalLayout` from Product Template block

This commit removes `__experimentalLayout` from Product Template block. This is because we don't want to use `layout` from Gutenberg for now. This change fixes the alignment of the first item in Grid layout.

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Fix linting errors in SCSS file

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-05 17:24:27 +05:30
Manish Menaria fa11141726
Expose `__experimentalRegisterProductCollection` in @woocommerce/blocks-registry Package (#48141)
* Expose registerProductCollection in @woocommerce/blocks-registry Package

This commit exposes the `registerProductCollection` function as part of the `@woocommerce/blocks-registry` package. This enhancement facilitates the registration of new product collections by 3PDs, promoting better modularity and extensibility within the WooCommerce Blocks ecosystem.

Changes include:
- Migration of `register-product-collection.tsx` to `packages/checkout/blocks-registry`.
- Export `registerProductCollection` from `@woocommerce/blocks-registry/index.ts`.
- Updated related imports and references to the new path.

This update enables 3PDs to register product collections more seamlessly, enhancing the extensibility of Product Collection block.

* Replace @woocommerce/blocks-checkout with @woocommerce/blocks-registry

* Add __experimental prefix

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Improve registerproductcollection for 3pds

* Set isDefault value to false

* Don't export all the types

* Update changelog

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add plugin to test __experimentalRegisterProductCollection

* Add E2E tests

* Fix Lint errors

* Improve E2E tests for __experimentalRegisterProductCollection

- Reduced preview timeout from 2000ms to 1000ms.
- Expanded E2E tests to cover new attributes and preview functionalities.

* Refactor code to improve readability and maintainability

- Added a warning comment to indicate that `__experimentalRegisterProductCollection` is an experimental API.
- Refactored variable names and imports in `register-product-collection.tsx` and `index.tsx` for clarity.
- Simplified and reorganized type definitions and imports in `types.ts` and `utils.tsx`.
- Renamed function in `register-product-collection-tester.php` for consistency.

* E2E: Also test the Frontend

* Use alias for import statement

* Don't pass isActive to registerProductCollection

Now it's handle by registerProductCollection itself.

* Update registerproductcollection API structure

Refactored the product collection block to enhance attribute management and ensure consistency in query defaults. This change includes:
- Importing `DEFAULT_QUERY` from constants and using it to set default query attributes.
- Removing `DEFAULT_ATTRIBUTES` from specific collections and directly defining required attributes.
- Ensuring `postType` and `isProductCollectionBlock` are set to default values in the query object.
- Setting `inherit` attribute to `false` by default in all collections.

* Hide inherit control in collections

Ensure the "inherit" control is always hidden, as collections should not be able to change this attribute. This includes:
- Adding `CoreFilterNames.INHERIT` to the `hideControls` set in `register-product-collection.tsx`.
- Adjusting the `hideControls` attribute in individual collection files to remove redundant hiding of the `INHERIT` control.

* Fix: Filters not showing in inspector controls

* Set inherit to false for all collections

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Product Collection: Add validation for `__experimentalRegisterProductCollection` arguments (#48513)

* Add validation for `__experimentalRegisterProductCollection` arguments

Introduced comprehensive validation for the `ProductCollectionConfig` object in `__experimentalRegisterProductCollection` to ensure correct data types and values, enhancing error handling and robustness.

- Added a new function `isValidProductCollectionConfig` to perform various checks on the `ProductCollectionConfig` object.
- Validates properties such as `name`, `title`, `description`, `category`, `keywords`, `icon`, `isDefault`, `innerBlocks`, `example`, `scope`, `isActive`, `attributes`, and `preview`.
- Ensures correct data types and provides detailed console error messages for invalid configurations.
- Updated `__experimentalRegisterProductCollection` to use the validation function before proceeding with the registration process.

**Impact**
- Improves stability and prevents invalid configurations from causing runtime errors.
- Provides clearer error messages for developers, aiding in quicker debugging and development.

* Fix typo

* Refactor: Replace console.error with console.warn

Updated the error logging in the isValidProductCollectionConfig function to use console.warn instead of console.error for invalid configuration properties. This address the feedback from the PR review.

- Replaced console.error with console.warn for various validation checks in isValidProductCollectionConfig.
- Removed redundant return statements after console.warn calls.
- Improved logging messages to better inform about invalid configuration properties without treating them as critical errors.
- Simplified the logic in __experimentalRegisterProductCollection by combining query and attribute properties and ensuring defaults are set properly.

* Refactor: Rename isValidProductCollectionConfig to isValidCollectionConfig

Updated the function name from isValidProductCollectionConfig to isValidCollectionConfig for better clarity and consistency. Also, renamed related variables for improved readability.

* Add validation for name property

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Title is required for new collection

* Update comments

* Fix E2E tests

* Address PR feedback

---------

Co-authored-by: github-actions <github-actions@github.com>

* Add README file for __experimentalRegisterProductCollection

* Add screenshots in README file

* Try to fix lint issue

* Docs: add example for collection with inner blocks

Enhanced the documentation for `__experimentalRegisterProductCollection` to include an example demonstrating how to define a collection with inner blocks. This example shows how to create a custom collection with nested blocks, including a heading and product elements, providing a clear guide for developers.

New content added:
- Example 4: Collection with inner blocks
- Sample code for defining a collection with inner blocks
- Tips and links to further resources on inner blocks and core collection definitions

* Fix Lint errors

* Address PR feedback

* Reduce number of JS files on /shop page

**Problem:** There was increase in number of JS files on /shop page after exposing `registerProductCollection` function in `@woocommerce/blocks-registry` package. This package is loaded on the frontend. For example, previously 45 JS files were loaded on /shop page but now 55 JS files are loaded on /shop page.

**Solution:**
1. After a bit of debugging I found out that constant file which we are importing i.e. `plugins/woocommerce-blocks/assets/js/blocks/product-collection/constants.ts` contain some heavy dependencies & it's not pure. Therefore, I decided to split this file into two files. I moved all the constants that are used in `registerProductCollection` function to a new file i.e. `plugins/woocommerce-blocks/assets/js/blocks/product-collection/constants-register-product-collection.ts`. This way, we don't need to load all the constants on the frontend i.e. /shop page.
  - This reduced 4 JS files i.e. 51 JS files are loaded on /shop page.

2. After some more investigation, I found out that importing `registerBlockVariation` function is increasing number of JS files on Frontend. Therefore, I decided to use global `wp` object to call `registerBlockVariation` function. This way, we don't need to import it. This reduced last 6 files i.e. 45 JS files are loaded on /shop page.

This way, I was able to reduce number of JS files on /shop page from 55 to 45, which is same as before this PR.

* Refactor: product collection constants

- Moved constants from `constants-register-product-collection.ts` to `constants.ts`
- Deleted `constants-register-product-collection.ts`
- Updated import paths in relevant files to reflect the changes
- Moved utility functions to `utils.ts`

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-05 16:55:35 +05:30
Chi-Hsuan Huang e59f4e406d
Fix the Coming Soon Site Page heading color is white after completing the CYS task (#49129)
* Fix site coming soon page heading color

* Add changelog
2024-07-05 10:51:30 +08:00
Roy Ho 780f27256f
Remove IE11 specific styles (#49027)
* Remove IE11 specific styles

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Remove unused mixin

* Remove additional IE/edge styles

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-04 05:28:26 -07:00
piinthecloud 025b5f1a8f
add front matter and cleanup docs in V1 migration for docs site (#49010)
* add front matter and cleanup docs in V1 migration for docs site

* add changelog entry and fix remaining HTML tables to markdown

* bypass linter rules

* update rule

* rever rule change for incorrect file

* rever rule change for incorrect file

* lint filtering-payment-methods.md rule

* address comments

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/hooks/migrated-hooks.md

Co-authored-by: Niels Lange <info@nielslange.de>

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/hooks/migrated-hooks.md

Co-authored-by: Niels Lange <info@nielslange.de>

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-payment-methods/payment-method-integration.md

Co-authored-by: Niels Lange <info@nielslange.de>

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-payment-methods/filtering-payment-methods.md

Co-authored-by: Niels Lange <info@nielslange.de>

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-block/available-filters/totals-footer-item.md

Co-authored-by: Niels Lange <info@nielslange.de>

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-block/available-filters/checkout-and-place-order-button.md

Co-authored-by: Niels Lange <info@nielslange.de>

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-block/available-filters/additional-cart-checkout-inner-block-types.md

Co-authored-by: Niels Lange <info@nielslange.de>

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-block/available-filters/cart-line-items.md

Co-authored-by: Niels Lange <info@nielslange.de>

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-block/additional-checkout-fields.md

Co-authored-by: Niels Lange <info@nielslange.de>

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-block/how-checkout-processes-an-order.md

Co-authored-by: Niels Lange <info@nielslange.de>

---------

Co-authored-by: Niels Lange <info@nielslange.de>
2024-07-04 13:54:43 +02:00
Amit Raj e562ed4ede
Add product count visibility option to mini cart block (#48545) 2024-07-04 13:52:01 +03:00
Niels Lange 0089b2359c
Use `createRoot().render()` instead of `render()` (#48858)
* Use createRoot().render() instead of render()

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Remove “ReactDOM.render is no longer supported” checks

* Add “ReactDOM.render is no longer supported” checks again

* Adjust JS unit tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-04 11:36:38 +02:00
Karol Manijak ab646ace8e
Product Collection: "Sync with current query" should only apear in archive context and not other places (#48917)
* Show Sync with current query option only in archive templates

* Add changelog

* Add e2e test

* Remove unused variable
2024-07-04 09:13:36 +02:00
Thomas Roberts 20e7128775
Update WC blocks wp-env to use WP 6.6 RC1 (#49037)
Co-authored-by: github-actions <github-actions@github.com>
2024-07-03 16:09:43 +01:00
Manish Menaria ab826271d3
Update revert button text and description (#48717)
* Update Revert button text and description

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add (Classic) as suffix instead of prefix

* Button text should be in center

* Fix: Button text isn't in center

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-03 19:31:50 +05:30
Albert Juhé Lluveras 1687d462fb
Initialize BlockTemplatesController for block themes only (#48905)
* Move `check_should_use_blockified_product_grid_templates` to `wc-template-functions.php`

* add changelog entry

* alias Blocks/Options as BlocksOptions

* Init `BlockTemplatesController` for block themes only

* Remove the `wc_current_theme_is_fse_theme()` check from BTC

* Streamline the option update logic a tad

* Revert "Streamline the option update logic a tad"

This reverts commit 54a965d9784df253f82533991e03c1112fd386ef.

* init BTC for themes that support block template parts

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

* init BTC for themes that support block template parts, p.2

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

* move the check to a new OptionsManager class

* make types consistent

* add classic theme with block template parts support

* tmp: add logs for debugging

* Initialize BlockTemplatesController on init

* Remove debugging code

* Prevent duplicate template parts appearing in the Site Editor in classic themes that support template parts

* Update e2e tests for classic themes that support template parts

* Fix Checkout header not being rendered

* Fix PHP tests

* Simplify WC_BLOCK_USE_BLOCKIFIED_PRODUCT_GRID_BLOCK_AS_TEMPLATE logic

* Rename OptionsManager class to TemplateOptions

* Change format of inline comment

* Use wc()->is_store_api_request()

* Update plugins/woocommerce/src/Blocks/TemplateOptions.php

Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>

* Update testing theme slugs

* Add strict_types to TemplateOptions file

* Refactor check_should_use_blockified_product_grid_templates()

* Don't update 'wc_blocks_use_blockified_product_grid_block_as_template' when switching between block themes

* Add extra unit test to make sure the option is not updated when switching between block themes

* Update strict_types format

* Remove unnecessary theme switch after tests finish running

* Replace .toHaveCount( 0 ) with .toBeHidden() in several tests

* Create a TestUtils to abstract logic to open Mini-Cart block

* Remove unnecessary import

* Replace .toHaveCount( 0 ) with .toBeHidden() in several tests (II)

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
2024-07-03 11:31:41 +02:00
Bart Kalisz f8011713a0
Fix e2e-guidelines.md syntax (#49018) 2024-07-03 11:01:14 +02:00
Thomas Roberts a032d4ff1c
Allow blocks with parents in the `woocommerce` namespace to be rendered as inner blocks (#48543) 2024-07-02 18:24:02 +01:00
Bhupesh Mishra 3d37c92c7c
Fix for tags overlapping divider line issue in "Filter by product category" (#48756)
* Fix for tags overlapping divider line issue in "Filter by product category"

Issue fixed where tags are overlapping divider line in "Filter by product category".

* Fix for tags overlapping divider line issue in "Filter by product category"

Issue fixed where tags are overlapping divider line in "Filter by product category".

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-02 06:33:52 -07:00
Alba Rincón 4dcaca793f
Add a new icon style to the Customer Account block (#48979)
* Add a new icon style to the Customer Account block

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Fix lint errors

* Improve svg margins

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-02 09:34:59 +02:00
Alexandre Lara 504799bcce
[Experimental] Product Filters Redesign > Filters: Implement Dynamic Block Title and Icon (#48638)
* Modify Product Filters block to use block variations

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add dynamic blocks icon and title

* Make Attribute Filter block title dynamic

* Add E2E tests for the Product Filters block

* Remove unnecessary block attribute

* Improve clarity of the comment text

* Add new icons for individual filters

* Dynamically set the title and heading of the block based on the selected attribute

* Add E2E test to check for block title and heading change on selecting an attribute

* Replace custom block variation type by BlockVariation type from @wordpress/blocks

* Replace variation `isActive` function by an array of strings

* Fix heading for each individual filter

* Add a default attribute name when there is no attributes registered in the store

* Fix i18n strings

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-01 17:46:00 -03:00
Thomas Roberts 06c98dee1b
Load mini cart scripts by default on touch-enabled (mobile) devices (#48769) 2024-06-28 13:23:32 +01:00
Manish Menaria c70750b85a
Fix: Show preview label only when Product Collection block is selected (#48795)
* Fix: Show preview label only when Product Collection block is selected

Updated the `ProductCollectionContent` component to display the preview label only when the Product Collection block itself is selected. Previously, the preview label was shown when either the block or any of its inner blocks were selected.

Key Changes:
- Removed the `isSelectedOrInnerBlockSelected` constant and its logic.
- Updated the condition to use `props.isSelected` directly to determine if the block is selected.

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Update E2E tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-28 16:48:11 +05:30
Tung Du 185a3d579c
[Experimental] Product Filters Overlay Navigation block (#48677)
* add: block scaffold

* add: block settings and editor preview

* chore: discard change to pnpm lock file

* add navigation block to the template part

* test: add basic E2E tests

* chore: changelog

* fix: no full width button

* test: remove layout check

* tweak: dynamically fetch button styles

* try: fontsizepicker

* remove: FontSizePicker dute to lack of ability to change label

* fix: use correct icon from the design

* address review feedback

* update class to follow naming convention. use explicit value to better indicate the navigation style

* fix: remove unnecessary style that breaks the global style

* fix: remove unnecessary style
2024-06-28 08:16:21 +00:00
Niels Lange 545ec78185
Make proceed to order button non sticky when zoom level is bigger than 100% (#48391)
* Make proceed to order button non sticky when zoom level is bigger than 100%

* Define sticky container based on media query

* Revert previous inline comment

* Update display logic

* Adjust threshold to stabilise visibility toggling

* Improve readability
2024-06-28 10:05:49 +02:00
Manish Menaria b0ef3886c0
Product Collection: Fix Preview badge border-radius and alignment (#48856)
* Fix Preview badge border-radius and alignment

The Preview badge's bottom left and right corners now have border-radius set to 0px to ensure they smoothly morph into the block's stroke. The badge is visually aligned with the furthest edge of the block's right border.

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Fix Lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-28 11:14:59 +05:30
Ilyas Foo 4eba3cb09a
Exclude coming soon patterns from block inserter (#48821)
* Exclude coming soon patterns from block inserter

* Changelog

* Remove coming soon block from inserter
2024-06-27 19:17:06 +08:00
Albert Juhé Lluveras e13ce86036
Add back revert template e2e tests (#48805)
* Add back revert template e2e tests

* Add changelog file
2024-06-26 15:15:38 +02:00
Albert Juhé Lluveras 0205513556
Fix Classic Template block registration on WP 6.6 (#48730)
* Fix Classic Template block registration on WP 6.6

* Update Compatibility Layer docs

* Add changelog file

* Remove unused function

* Simplify logic
2024-06-26 12:20:22 +02:00
Manish Menaria 9bdd6cc45b
Product Collection: Add comment for regression E2E tests (#48782)
* Add comment for regression E2E tests

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-26 11:03:11 +05:30
Bhupesh Mishra 3b9bd6d019
Update - Disable toggle by default and secondary enhancements (#48762)
* Update - Disable toggle by default and secondary enhancements

- Disabled toggle by default in Checkout blocks Return to cart button.

- Change Account options to Navigation options.

- Add a subtext to explain when to turn it on or off.

* set default value to false in attributes.tsx also

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Changelog

* Remove check for link from test suite—this is now hidden by default

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2024-06-25 16:47:31 +01:00
Mike Jolley c2783847c4
Fix: stack coupon fields on smaller screens (#48623)
* Wrap button and input using flexbox

* Use basis instead of size

* changelog
2024-06-25 16:19:49 +01:00
Paul Sealock 5a30d0b480
Settings Save button disable/enable (#47444) 2024-06-25 13:12:14 +12:00
Alexandre Lara 3b00882aed
[Experimental] Product Filters Redesign > Wrapper block: Fix icon (#48635)
* Fix Product Filters wrapper block icon

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-21 17:47:58 -03:00
Albert Juhé Lluveras b6d1cf4841
Make sure the correct block template file is used in the Site Editor for templates with fallback (#48621)
* Make sure the correct block template file is used in the Site Editor for templates with fallback

* Add tests

* Add changelog file

* Clean up unnecessary function

* Update plugins/woocommerce-blocks/tests/e2e/tests/templates/product-search-results.block_theme.spec.ts

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
2024-06-21 15:36:25 +02:00
Mike Jolley a80e3e8a56
Accessibility: Prevent shipping losing focus when making selections during checkout (#48370)
* Prevent duplicate update

* Style aria disabled radio input

* Disable keyboard navigation when options are being sent to server.

* Abort multiple requests to update shipping rates

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Update changelog

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-21 10:23:19 +01:00
Tung Du 921e86e6ab
[Experimental] Product Filters: add layout and block spacing support (#48429)
* add: layout and block spacing support

* chore: changelog

* add: vertical aligment controls

* fix: update test to check for inspector styles controls

* test: ensure the block spacing setting is visible

* test: ensure the layout settings is rendered

* test: default layout settings

* test: justification setting

* test: orientation

* test: block spacing

* test: remove unnecessary util

* test: store selector in blockData

* test: use layout matching
2024-06-21 04:37:46 +00:00
Roy Ho 8b956ea151
Fix e2e test for product filters overlay template part (#48659)
* Fix e2e test for product filters overlay template part

* Add changelog

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* fix: match actual template part, not template part area

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2024-06-20 17:57:07 +07:00
Roy Ho c29803dd03
EXPERIMENTAL: Product filters template part + overlay (#48472)
* Add overlay template part

* Add product filters overlay block

* Add changelog

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Add e2e tests to ensure the filters overlay template part exists

* Remove heredoc

* Add padding to the preview

* Add inpsector controls settings

* Update plugins/woocommerce-blocks/assets/js/blocks/product-filters-overlay/editor.scss

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>

* Add position label

* Remove unneeded panelbody

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
2024-06-19 12:11:51 -07:00
Albert Juhé Lluveras ff8b7c00ca
Update WC blocks e2e tests to WordPress 6.6 (#48436)
* Update WC blocks e2e tests to WordPress 6.6

* Add changelog file

* Small change

* Update @wordpress/e2e-test-utils-playwright package

* Fix admin.visitSiteEditor and editor.saveSiteEditorEntities

* Update pnpm-lock.yaml

* Fix template-customization.block_theme.spec.ts

* Fix Cart, Checkout and Legacy Templates tests

* Fix tests in product-gallery.block_theme.spec.ts

* Fix tests in page-content-wrapper.block_theme.spec.ts

* Fix tests in template-customization.block_theme.spec.ts

* Fix Checkout and Local pickup tests

* Make closing the welcome popup conditional

* Use editor.canvas instead of custom locator

* Remove closing the welcome popup conditional

* Update plugins/woocommerce-blocks/tests/e2e/tests/templates/template-customization.block_theme.spec.ts

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* Update to WP 6.6 beta 3

* Update plugins/woocommerce-blocks/tests/e2e/tests/templates/template-customization.block_theme.spec.ts

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
2024-06-19 18:31:43 +02:00
Luigi Teschio c3a2e275f1
Revert "Add To Cart Form: Add `Stepper` layout" (#48624)
* Revert "Add To Cart Form: Improve the default style and add the `Stepper` style (#47664)"

This reverts commit 0712c6037b.

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-19 16:28:56 +00:00
Karol Manijak 0608eb7542
Product Collection: Handpicked Products filter is broken on stores with high volume of products (#48379)
* Make the handpicked product filter in Product Collection usable for high product number stores

* Add changelog

* Include selected products in the search

* Limit the search result to 40 as 100 is unreadible anyway

* Replace fill with pressSequentially to better mimic users behaviour

* Apply two strategies for fetching products: small catalog up to 100 products and large catalog with refetching when typing

* Add comment explaining the logic

* Bring back the Loading placeholder

* Pass explicitly perPage 0 for a small catalog to fetch all the products
2024-06-19 13:35:53 +02:00
Alexandre Lara cac7e0dfe9
[Experimental] Product Filters Redesign > Parent block: Enable block customizations (#47594)
* Enable block customizations

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Enable background and color customization

* Add E2E tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-14 13:56:31 -03:00
Thomas Roberts 214d6341a0
Prevent checkout step divider overflowing causing horizontal scroll on mobile (#48464) 2024-06-14 14:20:03 +01:00
netzkollektiv c76438906b
clarify the `name` property needs to match between JS and PHP (#48219)
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-06-13 05:57:36 -07:00
Karol Manijak 1f4a86c7f1
Hide Product Summary (Product Elements) from Single Product block (#48253)
* Hide Product Summary (Product Elements) from Single Product block

* Add changelog

* Update comment
2024-06-13 09:58:06 +02:00
Karol Manijak d49db0486e
Update Compatibility Layer docs (#48456)
* Update compatibility layer docs to mention Product Collection

* Add changelog

* Update plugins/woocommerce-blocks/docs/internal-developers/blockified-templates/compatibility-layer.md

Improve my English

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

---------

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2024-06-13 09:57:51 +02:00
Niels Lange 6a0a9be504
Revert #47083 (#48423)
* Revert #47083

* Revert e2e test
2024-06-13 00:23:23 +02:00
Adrian Moldovan bc34fce4e9
Update @wordpress/env to 9.7.0 in blocks library (#48443) 2024-06-12 17:34:44 +00:00
Albert Juhé Lluveras fe611abc7e
Clean up theming sections in WooCommerce blocks docs (#48420)
* Clean up theming sections in WooCommerce blocks docs

* Add changelog file

* Change intro text

* Fix TOC
2024-06-12 16:29:42 +02:00
Karol Manijak c378a698ce
Hide Products (Beta) from inserter (#48204)
* Hide Products (Beta) from inserter

* Add changelog

* Update E2E test replacing Products with Product Collection block

* Add step to choose collection in E2E test

* Change fill PW method to pressSequentially so the inserter shows blocks

* Update changelog entry
2024-06-12 15:45:27 +02:00
Karol Manijak 635524b481
Replace Products (Beta) with Product Collection in product archive templates (#48112)
* Replace Products (Beta) with Product Collection block in blockified template

* Add necessary attributes that influences the look of blocks

* Replace Products (Beta) with Product Collection block in product search results

* Replace Products (Beta) with Product Collection block in products by attribute

* Replace Products (Beta) with Product Collection block in products by category

* Replace Products (Beta) with Product Collection block in products by tag

* Replace Products (Beta) with Product Collection when transforming from classic product archive

* Change the no results content in blockified search results template

* Replace Products (Beta) with Product Collection block in product search results

* Add product search in no results content of blockified product search result

* Add ts-ignore before createBlocksFromInnerBlocksTemplate imports

* Add changelog

* Remove step of replacing Products (Beta) with Product Collection in compatibility layer tests

* Remove step of replacing Products (Beta) with Product Collection in Product Collection tests

* Fix lint

* Update E2E tests of Product Collection

* Adjust Products (Beta) E2E tests

* Add Product Collection focus step in E2E tests

* Improve the way PC block is focused

* Further tests adjustments and new tests comparing classic template with Product Collection

* Bring back the click on body

* Include tips from reviewer

* Enter edit mode, step that I accidentally removde

* Bring the E2E test flow with updating product catalog

* Change the way of removing focus from PC block in tests

* Fix lint

* Improve the layout of search in No Results

* Use previous patterns in Product Search No Results to preserve translations

* Add Search button label in product search form pattern

* Fix lint

* Improve comment explanation

* Extract No Results content to separate pattern in order to make the content translatable

* Lint fix

* Add missing footer to the blockified Products by Tag template

* Exclude woocommerce/patterns from phpcs rules that dont apply there

* Make PC block responsive by default in product archive templates

* Fix typo

* Fix typo

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2024-06-12 15:45:09 +02:00
Albert Juhé Lluveras 54854f16cf
Document template parts used by the Classic Template block (#48183)
* Document template parts used by the Classic Template block

* Add changelog file

* More changes

* Change image

* More changes (II)

* Update plugins/woocommerce-blocks/docs/internal-developers/templates/README.md

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

* Update plugins/woocommerce-blocks/docs/internal-developers/templates/classic-template.md

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

* Make image smaller and centered

* Change PHP template parts section format

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2024-06-12 09:36:55 +02:00
Jonathan Lane e5e51a41b8
Update Playwright to 1.44.1 from 1.41.1 (#48291)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
2024-06-11 21:52:48 +03:00
Adrian Moldovan a7f634d5ef
[blocks e2e] Move Blocks e2e into ci.yml (#48224) 2024-06-11 19:57:23 +03:00
Albert Juhé Lluveras 545e48e05a
Expand block templates documentation (#48247)
* Expand block templates documentation

* Add changelog file

* New manifest

* Minor changes

* Add Page: Coming soon template
2024-06-11 10:04:48 +02:00
Niels Lange 1167b54a3d
Display return to cart link on mobile devices (#48103)
* Display return to cart link on mobile devices

* Add changelog entry
2024-06-10 16:25:47 +02:00
Karol Manijak 9b3879f7cf
Add "(Experimental)" suffix to experimental blocks (#48071)
* Add (Experimental) suffix to experimental blocks

* Add comments reminding to update feature flags doc

* Update feature flag doc

* Add changelog

* Provide links to all feature flags

* Add JS flag for Product Filter: Rating (Experimental)

* Bring back linting in PHP file

* Update block references

* Update variation names

* Update tests

* Update test

* Add notification that block is not available in inserter to block references doc

* Add missing feature flag

* Remove information about block not being exposed in inserter from block references

* Update block references
2024-06-10 15:12:10 +02:00
Thomas Roberts 89bcbc7915
Apply lint fixes to payment method integration documentation (#48226) 2024-06-07 04:26:09 -07:00
Tom Cafferkey 794562dd39
Product Rating: Hide rating stars and counter from the inserter (#48229)
* Hide rating stars and counter from the inserter

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-06 16:01:53 +00:00
Calvin Rodrigues 562e791978
Fix minicart icon cursor on hover in site navbar (#46996)
* Fix minicart icon cursor on hover in site navbar

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-06 16:54:48 +02:00
Manish Menaria 307d893549
WooCommerce Blocks: Added a GitHub Action to create issues for flaky E2E tests (#47758)
* Add flaky test reporting and issue creation for Blocks

This commit introduces the functionality for identifying and reporting flaky tests within our CI workflow.
- The reporter captures flaky test results and saves them to `flaky-tests` directory.
- If a test fails initially but passes upon retries, it is marked as flaky and a corresponding report is generated.
- The workflow creates GitHub issues for flaky tests, aiding in better visibility and tracking of these intermittent issues.

1. **Workflow Changes**:
   - **Archive flaky test reports**: Adds a step to archive flaky test reports generated during the test runs.
   - **Merge flaky test reports**: Introduces a new step to merge all flaky test reports from different shards.
   - **Create GitHub issues for flaky tests**: Implements a job that uses the `@wordpress/report-flaky-tests` package to create GitHub issues for detected flaky tests when a PR is not in draft state and flaky test reports are present.

2. **New Flaky Test Reporter**:
   - Adds `flaky-tests-reporter.ts` that defines a custom Playwright reporter for identifying and recording flaky tests.

3. **Playwright Configuration**:
   - Updates `playwright.config.ts` to include the new flaky tests reporter in the list of reporters when running in CI.

4. **Demo Tests**:
   - Adds `demo.spec.ts` containing sample tests to validate the flaky test reporting functionality.

Implementing this feature will help us track and address flaky tests more efficiently, ensuring more stable and reliable test suites.

* Remove draft condition for testing

* 'Merge failures artifacts' job shouldn't touch flaky test artifacts

* Try fixing if condition

* Add required permissions

* Let's try providing all the permissions

* Let's try providing all the permissions

* Create flaky tests issues when PR is merged with trunk

* Update if condition

* Run action for specific paths only

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Remove Demo file

* Remove Demo file

* Use commit hash to use exact version of the script

* Replace label with team: Kirigami & Origami

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-05 19:49:28 +05:30
Albert Juhé Lluveras f9281ae895
Only load 'productCount' and 'experimentalBlocksEnabled' settings in admin (#48152)
* Only load 'productCount' setting in admin

* Only load 'experimentalBlocksEnabled' setting in admin

* Add changelog file

* Update WcBlocksConfig types
2024-06-05 11:20:35 +02:00
Sam Seay 2d4295469d
Remove all usage of WOOCOMMERCE_BLOCKS_PHASE and introduce BUNDLE_EXPERIMENTAL_BLOCKS (#47807) 2024-06-05 20:14:16 +12:00
Karol Manijak 7d3309dc6c
Related Products: hide unusable options from Inspector Controls (#47845)
* Hide unusable options from Related Products block

* Add changelog

* Fix the dscription of Single Product template compatibility layer tests

* Add E2E test

* Replace editorUtils with editor in E2E tests

* Fix typo

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* Fix typo

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
2024-06-04 11:51:27 +02:00
Sam Seay 8696a2f17c
Fix an e2e test that was merged incorrectly in #47526 (#48122) 2024-06-04 18:14:31 +12:00
Alexandre Lara b702fb1288
[Experimental] Product Filters Redesign: Hide individual filter blocks from the Block Inserter (#47526)
* Hide individual filter blocks from the inserter

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Adjust E2E tests to check for hidden filters

* Fix file conflict

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: roykho <roykho77@gmail.com>
2024-06-03 12:26:21 -07:00
Lucio Giannotta 45cbc41f65
Move registration of block categories on the server side (#47836)
Previously, we registered block categories on the client-side, leading to them not
being available until client initialization. This meant, for example, that hooking
external blocks to our categories would result in a warning.

With this change, we register the categories server-side, and only update them
on the client-side to attach the SVG icon. This is the recommended approach
in the Gutenberg docs, to make sure we use the SVG primitive, which affords some
accessibility features.
2024-06-03 20:34:41 +02:00
Thomas Roberts bb92392d9f
Apply spacing improvements to the Checkout block (#47565) 2024-06-03 11:18:42 -07:00
Niels Lange 93214eeb2b
[Enhancement]: Block-based checkout input fields style updates (#46362)
* Adjust border and box-shadow color for textual inputs

* WIP: Style checkboxes

* Vertically center checkmark

* Adjust focus outline width

* Adjust selected checkbox background in light mode

* Adjust background color of selected radio button

* Add chevron icon to dropdown fields

* Add changelog

* Fix CSS lint issues

* Adjust outline width

* Revert checkbox styles

* Adjust input field height and label size

* Revert box-shadow styles

* Add spacing between coupon title and coupon code

* Simplify onFocus and onBlur

* Fix outline width when focusing combobox

* Ensure chevron points down after selecting value

* Adjust outline color of focused delivery option

* POC: Use currentColor for focus states
2024-06-03 18:46:08 +07:00
Bart Kalisz 44efb7ffac
Blocks E2E: Use layout-based selectors in Thumbnails block tests (#47904)
* Use layout-based selectors in Thumbnails block tests

* improve test readability

* add changelog entry
2024-06-03 10:26:27 +02:00
Roy Ho b85e1aa402
Use correct AND expression (#48011)
* Use correct AND expression

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-31 05:23:57 -07:00
Luigi Teschio 0712c6037b
Add To Cart Form: Improve the default style and add the `Stepper` style (#47664)
* Add To Cart Form: Improve the default style and add the Stepper style

* fix height button when no variation is selected

* not allow the user to set 0 as value of the input

* format css

* fix padding

* format css

* fix CSS

* unset margin to align with the button
2024-05-31 10:25:04 +02:00
Karol Manijak fe30778293
Increase product excerpt default length in Single Product template and block (#47651)
* Increase the length of Product Summary block (core/post-excerpt variation)

* Add changelog

* Bring back the Product Summary variation to original length

* Increase the Product Summary length to max 100 words in Single Product template and block

* Increase the Product Summary length to max 100 words in Single Product block

* Update tests

* Change the attribute type froms tring to niumber as expected
2024-05-31 08:19:06 +02:00
Patricia Hillebrandt 5dd7713346
[Performance]: Replace `classnames` usage with `clsx` (#47760)
* Replace classnames with clsx within woocommerce-blocks.

* Undo unnecessary change to getClassnames const.

* Replace classnames with clsx within woocommerce-admin.

* Add changelog.

* Update the pnpm lock file

* Address lint.

* Address lint errors for the block-library.
2024-05-31 05:49:36 +02:00
Manish Menaria 4bee1547b7
Fix: "On Sale" collection isn't displaying on Editor side (#47994)
* Fix the issue

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add E2E test to cover this regression

* Fix: On sale collection should be visible after refresh in Post

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-30 21:55:49 +05:30
Sam Seay 82f5b84a80
Remove isFeaturePlugin and flag code from FeatureGating class (#47866) 2024-05-30 02:50:09 +12:00
Manish Menaria bb3f38a3d8
Fix: Product Collection block does not display when editing template/post (#47871)
* Fix issue where Product Collection wasn't showing anything

- Moved queryId logic to a new `useQueryId` custom hook to encapsulate the logic.
- Simplified attribute setting in `useEffect` by using a default attributes value.
- Utilized `fastDeepEqual` to check for attribute equality

These changes fix the issue where the Product Collection block did not display properly in the template editor, ensuring consistent rendering of products.

* Add comment

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Remove leftover comment

* Add e2e tests for Product Collection block visibility after refresh

Added end-to-end tests to verify the visibility of the Product Collection block after page refresh in both Product Archive and Post contexts.

- Added tests to ensure the Product Collection block remains visible after refreshing the template or post editor.
- Updated existing tests to use `BLOCK_LABELS` for better readability and maintainability.

* Improve E2E tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-29 16:35:36 +05:30
Bart Kalisz df7bb8d7b9
Blocks E2E: Clean up eslint comments after rules update (#47875) 2024-05-28 15:44:06 +00:00
Bart Kalisz c5e1639dc8
Blocks E2E: Streamline the usage of WP CLI (#47869) 2024-05-28 17:09:28 +02:00
Niels Lange dec873926d
Partially revert #45767 (#47867)
* Partially revert #45767

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add test for description on checkout order summary block

* Add another test back in for order summary description

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2024-05-28 18:25:34 +07:00
Albert Juhé Lluveras fae960c7bf
Fix typo in some tests and comments: 'blockbased' > 'block-based' (#47851)
* Fix typo in some tests and comments: 'blockbased' > 'block-based'

* Add changelog file

* Add JSDocs types

* Replace 'block based' with 'block-based' in stock-reservation.md
2024-05-27 19:21:10 +02:00
Bart Kalisz 460d73eee0
Blocks E2E: Streamline E2E utils implementation (#47660) 2024-05-27 14:54:06 +00:00
Luigi Teschio 977f8289af
Remove checkstyle.xml file (#47844)
* Remove checkstyle.xml file

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-27 12:16:52 +00:00
Karol Manijak 92fec889f7
Specify Product Price ancestor and simplify Product Elements ancestors (#47802)
* Extend product elements sharedConfig ancestor with Product Collection and Products (Beta)

* Utilise sharedConfig ancestor in Image block

* Utilise sharedConfig ancestor in Price block

* Utilise sharedConfig ancestor in Rating block

* Utilise sharedConfig ancestor in Sale Badge block

* Utilise sharedConfig ancestor in SKU block

* Utilise sharedConfig ancestor in Stock Indicator block

* Add changelog

* Bring back original ancestors for Summary and Title blocks

* Remove Product Price from a test as it's no longer available in global context
2024-05-27 09:15:32 +02:00
Sam Seay 756bb8ccfa
Allow experimental blocks to be enabled WC Admin Features as part of removing WC_BLOCKS_PHASE (#47701) 2024-05-25 00:13:24 +12:00
Alexandre Lara 5d645d94e6
Product Gallery block: Fix error on revisiting template without reloading the page (#47636)
* Detect template ID from URL

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add E2E test to check if block is displayed after revisiting Single Product template

* Fix E2E tests

* Fix E2E tests

* Fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-23 13:39:31 -03:00
Karol Manijak c318bf50f8
Fix incompability of Query Pagination block with Product Collection (#47749)
* Amend Query Pagination parent OR ancestor array and include product collection

* Rename the function and amend comment

* Add changelog

* Remove some leftovers

* Tets if it's possible to insert multiple Pagination blocks in Product Collection

* Add awaits to expects

* Update plugins/woocommerce-blocks/assets/js/blocks/product-collection/utils.tsx

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

* Add comment explaining the condition

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2024-05-23 13:01:57 +02:00
Seghir Nadir 34f8c65f53
only make order summary sticky when it's not longer than view (#47680)
* only sticky summary when it's not longer than view

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* fix tests

* correctly check for height

* switch how to get top

* remove from editor

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-22 22:09:50 +00:00
Seghir Nadir 6c136e4e1a
normalize IDs for form fields in Checkout (#47650)
* normalize IDs for form fields and fix types

* update docs as well

* update rest of docs

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* fix linting for document

* also align classnames

* revert to correct classname

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-22 22:54:03 +02:00
Adrian Moldovan 13ab9007f6
[testing workflows] Add workflow_call trigger in CI workflow - support daily and other types of runs (#47612)
* Add workflow_call event

* Add tests-daily-run.yml

* Remove workflow version

* Update input value

* Remove secrets from caller workflow

* Rename job

* Check context

* Check context

* Check workflow_call inputs

* Override github.event_name with inputs.trigger

* Fix input name

* Add config for daily e2e tests with Gutenberg

* Update env commands for Gutenberg run

* Add disableHpos env variable in ci-utils

* Revert the trigger to push

* Revert the env variable setting in ci-jobs

* Revert the env variable setting in ci-jobs

* Rebuild utils

* Update test env start command

* Define the Gutenberg Playwright project

* Use path relative to workspace root

* Update events for test projects

* Update events for test projects

* Add changelogs

* Remove the e2e tests with Gutenberg tests from daily runs

* Set the schedule and workflow_dispatch triggers

* Add --project default flag to only run the default tests in CI

* Renamed snapshots to match the new Playwright project name
2024-05-22 11:04:44 -07:00
Seghir Nadir d2ac6ff953
Correctly attribute focus back when opening the mini cart several times (#47683)
* allow focusedOnMount element to be reset

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-22 17:03:22 +02:00
Thomas Roberts b7643b9b7a
Change Checkout form step numbering so it can only be toggled for all blocks, not individually per-step (#47479) 2024-05-22 07:03:48 -07:00
Karol Manijak f55e25b009
Filter by Attribute: fix potential reading property of undefined error (#47699)
* Fix reading from undefined error in attribute-filter

* Add changelog
2024-05-22 11:57:53 +02:00
Karol Manijak 313ab0eb74
Rename classic template blocks to avoid confusion (#44931)
* Rename  blocks to  to distinguish them from new blocks

* Add changelog

* Change the naming convention to XYZ (Classic)

* Update classic templates descriptions

* Fix package.json lint error
2024-05-22 10:53:43 +02:00
Alba Rincón 1d0ec79d43
Use the term attribute sort order for the "Filter by attribute" block (#47616)
* Use the term attribute sort order for the "Filter by attribute" block

* Allow `id` and `name_num` orderby values

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-21 15:44:08 +02:00
Niels Lange 5168a21920
Block-based checkout - Update address fields display logic (#47160)
* Add “Address line 2” toggle

* Allow apartment field to be required

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Rename “Apartment, suite, etc.” to “Address line 2”

* Remove unused dependency

* Add key to fragment

* Simplify keys

* Address failing e2e tests

* Change “Optional (Recommended)” to “Optional”

* Toggle address line 2 visibility in editor

* Add e2e tests

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Update e2e tests

* Update e2e tests

* Ensure the address 2 field stays open when the seller empties it

* Optimise hasAddress2FieldValue

* Move address 2 filed related functionality into separate component

* Rmove + sign from address 2 field links

* WIP: Introduce AddressField component

* Update AddressFields component

* Refactor AddressFields and Address2Field components

* Fix CSS lint error

* Fix JS lint error

* Fix failing e2e tests

* Fix typo in e2e tests

* Improve e2e selector

* Fix core e2e tests

* Use address line 2 label for the link text

* Lazy initialise the “isFieldVisible” state

* Remove obsolete code

* Add inline comments for clarity

* Fix JS lint error

* Improve e2e tests

* Revert "Remove obsolete code"

This reverts commit 027d6adc89.

* Adjust visibility toggle

* Delete obsolete changelog file

* Add inline comment

* Fix TS error

* Remove obsolete parts

* Solve TS warning

* Remove obsolete “fieldsRef”

* Remove obsolete “setHasFieldBeenModified”

* Address various TS warnings

* Fix link styling issue on mobile

* Fix JS lint error

* Refactor and simplify address components

* Optimise Address2Field component

* Improve inline docs

* Move ‘+’ from CSS to i18n

* Rename rest of values and pass correct onChange

* force component to remount

* remove unsed useEffect

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2024-05-21 15:48:24 +07:00
Karol Manijak 929564da82
Product Collection: remove Beta label (#47572)
* Remove Beta label from Product Collection

* Remove unnecessary dependency in Product Collection page object

* Add changelog

* Udpate block references
2024-05-21 08:36:40 +02:00
Ilyas Foo 7c1802fefa
Update coming soon pages to use cardo and inter fonts via editor (#47613)
* Add type safety, update coming soon entire site changes for fonts

* Add conditional font to support TT24 and other themes

* Revert unnecessary change

* Changelog

* Lint
2024-05-21 13:35:12 +08:00
Manish Menaria 3a3a386e34
Fix: Product Collection block should respects 'Out of stock visibility' setting (#47537)
* Fix: Ensure Product Collection Block Respects "Hide Out of Stock Items" Setting

- Added logic to include the "Out of stock visibility" setting in the Product Collection block.
- Modified `ProductTemplateEdit` component to use the `getDefaultStockStatuses` function.
- Ensured that out-of-stock products are hidden in the Product Collection block when the "Hide out of stock items from the catalog" option is enabled.

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-21 10:50:05 +05:30
Niels Lange 622f2d3805
Remove title from checkout page (#47529)
* Remove title Checkout page templates

* Fix checkout header site title padding

* Add changefile(s) from automation for the following project(s): woocommerce

* Fix failing e2e tests

* Fix failing e2e test

* Fix failing e2e test

* Substitute frameLocator in e2e tests

* Fix failing e2e tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-21 01:56:32 +07:00
Thomas Roberts d7ca80d6c8
Make shipping total in Cart/Checkout block order summaries show FREE if shipping price is 0 (#47553)
* Make shipping total show FREE if price is 0

* Make free text uppercase in order summary

* Add test to check free/paid shipping displays as free or shows price

* Add changelog

* Update E2E test to make sure shipping is selected correctly

* Update shipping cost e2e tests

* Further fixes to e2e tests
2024-05-20 18:42:54 +02:00
Sam Seay 8538ca3498
Make sure JS tests run in blocks when configs change (#47513) 2024-05-19 18:57:55 +12:00
Seghir Nadir 1ae7ca5179
Make checkout sidebar (order summary) sticky on desktop (#47376)
* Make sidebar sticky on desktop

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* limit sidebar sticky to cart only

* add useless new line

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-17 13:13:01 +02:00
Karol Manijak 40b43e8d9c
Prevent collection different than Product Catalog from being filtered (#45820)
* Prevent collection different than Produyct Catalog from being filtered

* Adjust Product Filters tests

* Split taxonomies filter into seperate filter per taxonomy

* Add changelog

* Improve onDeselect function

* Update Product Filter test handlebars so they all use Product Collection that inherits query from template

* Set Product Collection to inherit query from template in PHP unit tests

* Remove unnecessary empty space

* Add changelog

* Update tests

* Fix lint

* Update Product Collection attributes in filter E2E handlebars

* Update the Product Filters testing pages title

* Satisfy TS by returning single React element rather than array of elements

* Revert some incorrect changes

* Cleanup after accidental incorrect merge

* Add template utils to dynamic contents util

* Fix Attribute Filter tests

* Cleanup Attribute tests, refactor and fix types

* Add product filter on top of attirbute filter in handlebars

* Fix lint

* Update Rating filter tests to use Product Archive template instead of post

* Update Rating Filter handlebars

* Update Stock filter tests to use Product Archive template instead of post

* Update Stock Filter handlebars

* Add more granular util to update Produyct Catalog based on handlebar template

* Use Product Catalog util and simplify test scenarios

* Unify handlebar templates

* Fix Product Collection attributes in Product Filter handlebar templates

* Revert temporary timeouts increase

* Remove unused types

* Cleanup types

* Cleanup types

* Lint fix

* Rename updateTemplatesContent to updateTemplateContents to better depict its purpose

* Fix types

* Rename updateProductCatalogContent to updateProductCatalogTemplate to better depict its purpose

* Allow for beforeAll and afterAll in PW tests

* Use beforeAll and afterAll instead of using fixture in active filters test

* Use beforeAll and afterAll instead of using fixture in attribute filters test

* Use beforeAll and afterAll instead of using fixture in price filters test

* Use beforeAll and afterAll instead of using fixture in rating filters test

* Use beforeAll and afterAll instead of using fixture in stock status filters test

* Get rid of updateProductCatalogTemplate util as it's too specific

* Extract some constants

* Remove unused file probably added here by accident

* Adjust Attribute Filter block tests to the new logic

* Merge fix

* Bring back necessary handlebars file

* Merge fix

* Merge fix

* Update beforeAll

* Avoid relying on product collection page object in before all

* Bring back the original order of tests

* Switch Filter by Attribute tests to handlebars

* Fix typo

* Update test to new circumstances

* Fix hooks usage
We no longer use hooks other than `beforeEach` since we're resetting the DB for each test (#46125). Using other hooks was not caught by the linter (on this PR) because I accidentally removed the no-hooks rule in #47228 and restored it just now in #47500. 😅

* Fix the test

* Fix Price filter test

* Update attribute filter tests

* Share the handlebars between tests

* Update price filter tests

* Update rating filter tests

* Update stock filter tests

* Remove unnecessary product collection page object from filter tests

* Fix typo

* Fix Filter by Stock test

* Simplify Attribute filter test by remoiving one filter from page

* Try to wait for element to be visible

* Fix handlebars syntax for filters so it doesnt throw validation errors and warnings

* Wait for filters to be visible for sure before performing further part of test

* Wait for Site Editor canvas loader

* Fix linter error

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
2024-05-17 11:23:56 +02:00
Ron Rennick db50513c42
use valid repository url in blocks package (#46696)
* use valid repository url in blocks package

* add changelog file

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-05-16 13:32:41 -07:00
Seghir Nadir edb930e04b
Fix a11y issues in Cart/Checkout (#47470)
* return focus on drawer

* adjust notice button color

* adjust cart/checkout input label color

* return focus for shipping form button

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-16 18:32:22 +02:00
Seghir Nadir 4f348eb540
remove the generic incompatible notice from Checkout block. (#47475)
* remove the generic incompatible notice

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-16 16:52:06 +02:00
Seghir Nadir 9b1e9344e0
Turn Cart change address link to button (#47460)
* Turn Change address link to button

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* fix lint

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-16 16:51:03 +02:00
Bart Kalisz 90ee3f4ed9
Blocks E2E: Remove obsolete waitForSiteEditorFinishLoading util (#47547) 2024-05-16 16:39:30 +02:00
Bart Kalisz a7bbdb99a2
Blocks E2E: Wait for Site Editor canvas loader (#47541) 2024-05-16 14:49:32 +02:00
Sam Seay fcc421d550
Update cart/checkout usage of the @wordpress/components Slot Fill (#47105) 2024-05-16 21:46:24 +12:00
Manish Menaria a7a1264fec
Fix input clearing issue in PriceTextField with improved currency parsing (#47354)
* Fix input clearing issue in PriceTextField with improved currency parsing

This commit addresses a usability issue in the PriceTextField component, highlighted by @dinhtungdu, where the input field would clear itself if users omitted a space between the numeric value and the currency symbol when the currency is configured to appear on the right with a space (e.g., "20$" instead of "20 $"). The problem was rooted in the strict parsing logic that did not account for variations in user input related to currency formatting.

The fix involves an enhancement to the numeric parsing function, which now effectively handles various user inputs regardless of space or placement of the currency symbol. The revised parsing logic uses a regular expression to strip out any characters that are not numeric or the designated decimal separator, and then replaces the locale-specific decimal separator with a period for standard numeric conversion. This approach not only fixes the specific issue but also improves the robustness of the component against similar input variations.

* Refactor currency parsing and improve handling in PriceTextField

1. Renaming `formatValueAsCurrency` to `formatNumberAsCurrency` to better
   reflect its functionality.
2. Moving the `convertCurrencyStringToNumber` function outside of the
   PriceTextField component, enhancing readability and reusability.
3. Changing the internal state handling from `newValue` to `inputValue`,
   directly managing the string input and parsing it as needed for further
   processing. This will force input field to re-render.

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Fix: Handle empty string in price conversion to prevent 0 value

This commit fixes an issue where an empty string in the price conversion function resulted in a value of 0. Now, empty strings are properly handled and do not convert to a numerical value.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-16 13:23:47 +05:30
Manish Menaria 1233fb4745
Fix: handle undefined templateSlug in Product Collection tracking utils (#47504)
* fix: handle undefined templateSlug in Product Collection tracking utils

The modification introduces a check for templateSlug before attempting to access its properties or use it in further logic. This change addresses a bug that manifested when users tried to edit a synchronized Product Collection block, resulting in a JavaScript error because templateSlug could be undefined.

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Update types to better reflect reality

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-05-16 11:17:52 +05:30
Chi-Hsuan Huang a120b99d7d
Fix coming soon page mobile UI issues (#47491)
* Update styles for WooCommerce coming soon page

- Add min-width to container for better responsiveness
- Adjust padding for smaller screens
- Update font size and text wrapping for banner

* Add changelog

* Improve readability
2024-05-16 12:46:26 +08:00
Alexandre Lara 7abb996017
[Experimental] Product Filters Redesign: Add the Product Filters block (#47294)
* Add Product Filters block

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Add the blocks template for the Product Filters block

* Dynamically add the highest product count attribute to the block template

* wip: Add E2E tests for the Product Filters block

* Add E2E tests for the Product Filters block

* Add CSS file to Product Filters block

* Fix css error lint

* Fix lint error

* Fix lint errors

* Remove unnecessary styles for the Product Filters block

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-15 18:09:48 -03:00
Luigi Teschio 8c6efe072b
Blocks: Fix JS unit tests (#47516)
* Blocks: Fix JS unit tests

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* trigger CI

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-15 16:03:11 +00:00
Luigi Teschio 1af8e8a4d4
Blocks: Delete Jest-Puppeteer infrastructure (#46672)
* try db reset in page teardown

* move reset to setup step

* Use wp db cli

* Fix global setup
That part is overriding the logged in user state and wipes out the nonce and rootUrl fields.

* Try importing instead from a generated dump

* Revert "Try importing instead from a generated dump"

This reverts commit 987dc471c9.

* Revert "Revert "Try importing instead from a generated dump""

This reverts commit c8d008cb20.

* Don't bypass visitSiteEditor so that the Welcome Guide is closed

* use createNewPost

* Revert "Revert "Revert "Try importing instead from a generated dump"""

This reverts commit 2684273582.

* [Blocks]: Fix E2E tests (#46344)

* Load local pickup enabled setting as bool not string

* Add changelog

* Remove unused import

* Update plugins/woocommerce-blocks/assets/js/extensions/shipping-methods/pickup-location/utils.ts

Co-authored-by: Niels Lange <info@nielslange.de>

* Use strict equality test

* try now

* try now

* add a new sql file

* remove default.sql

* fix welcome guide tour

* fix E2E tests

* Fix the template revert tests
...where the template is unreachable due to pagination.

* Add changelog entry

* improve logic to closeWelcomeGuideModal

* fix cart checkout tests

* improve flakiness

* improve flakiness

* fix flaky test

* fix company field

* fix E2E test

* fix E2E tests

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* Replace beforeAll w/ beforeEach + remove all after* hooks

* Fix broken hooks

* Activate plugins via requestUtils API

* [Blocks - E2E]: Add `playwright/no-hooks` ESlint rule (#46432)

add ESLint configuration

* Clean up console logs

* Remove obsolete language setup steps

* Remove more unnecessary setup steps

* Remove even more obsolete setup steps

* tmp: add the LYS fix

* Try stabilizing the company field test

* Use canvas param instead of manually entering edit mode

* Remove double site editor redirect

* Revert "Use canvas param instead of manually entering edit mode"

This reverts commit 5e6cc17154.

* Revert "Remove double site editor redirect"

This reverts commit 69a57a82a8.

* Fix flaky products sorting test

* Blocks: Fix ESLint errors (#46595)

fix eslint error

* Fix ESLint errors (#46626)

* Fix ESLint errors

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>

* Blocks: Migrate multiple tests to Playwright

* fix path

* migrate other tests

* add product best sellers E2E tests

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* migrate jest-puppetter E2E tests to Playwright

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Blocks: Delete Jest-Puppeteer infrastructure

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Remove obsolete waitForLoadState call

* improve E2E tests

* fix E2E tests

* improve E2E tests

* remove old test

* remove not necessary test

* fix number product

* fix E2E test

* fix number of products

* fix product count

* refactor store notice E2E tests

* update string

* fix E2E test

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: github-actions <github-actions@github.com>
2024-05-15 14:22:36 +02:00
Bart Kalisz e765a717d2
Blocks E2E: Restore the no-hooks rule (#47500) 2024-05-15 13:05:52 +02:00
Sam Seay 3ef7a01840
Update blocks JS tests to React 18 (#47383) 2024-05-15 21:33:36 +12:00
Manish Menaria 9f5f93cba6
Product Collection: Implement Preview Mode (#46369)
* POC: Preview Mode using HOC

* Add explanation as comments

POC: Implement preview mode for Product Collection block in editor
- Added extensive commentary to clarify the mechanism and usage of the `handlePreviewState` function
- Implemented an internal state within `ProductCollectionContent` to manage preview status and messages, serving as a foundational example of how preview mode can enrich block functionality.
- Showcased the application of `handlePreviewState` by incorporating it as a prop in `BlockEdit`, illustrating the potential for extending the block's capabilities for dynamic and interactive previews.

This POC demonstrates a flexible approach to managing preview states within the editor, paving the way for further development and integration based on feedback and use-case analysis.

* Refactor preview state handling and collection registration

This commit introduces a centralized approach for registering product collection variations and managing their preview states. It abstracts the registration logic into a dedicated function and enhances the flexibility of preview state handling across different collection types.

* Rename file

* Minor improvements

* Don't pass previewState to handlePreviewState

I don't see any good use of it in handlePreviewState. Also, We will be going to call handlePreviewState only once
therefore, it will always have the same value as the initial value of the previewState. If in future, we decide to run it
multiple times then we can pass the previewState as an argument to handlePreviewState.

* Add comment

* Use JS closure to inject handlePreviewState

This commit introduces a refined approach for injecting the `handlePreviewState` function into product collection blocks, utilizing JavaScript closures to streamline the process. This method replaces the previous global registry mechanism, offering a more direct and efficient way to manage preview states.

Advantages of This Approach:
- Utilizing JavaScript closures for injecting `handlePreviewState` simplifies the overall architecture by directly modifying block edit components without relying on an external registry. This method enhances code clarity and reduces the cognitive load for developers.
- The conditional application of `withHandlePreviewState` ensures that the preview state handling logic is only added to blocks that require it, optimizing performance and maintainability.

* Refactor preview state management into custom hook

This commit enhances the organization and readability of the product collection content component by abstracting the preview state management into a custom hook named `usePreviewState`. This change streamlines the component's structure and aligns with React best practices for managing state and side effects.

Key Changes:
- Introduced `usePreviewState`, a custom hook responsible for initializing and managing the preview state (`isPreview` and `previewMessage`) of the product collection block. This hook encapsulates the state logic and its side effects, including the conditional invocation of `handlePreviewState`.
- Modified `ProductCollectionContent` to utilize `usePreviewState` for handling its preview state. This adjustment makes the component cleaner and focuses it more on presentation and behavior rather than state management details.

* Replace useEffect with useLayoutEffect

* Add cleanup function in handlePreviewState function

Based on [this discussion](https://github.com/woocommerce/woocommerce/pull/45703#discussion_r1535323883), I added a cleanup function support for handlePreviewState. `handlePreviewState` can return a function which will be called on cleanup in `useLayoutEffect` hook.

* Fetching random products in Preview mode

* Allow collection to set initial preview state

* Pass location & all attributes to handlePreviewState function

* Handling collection specific query for preview mode

- Consolidated `handlePreviewState` and `initialPreviewState` into a single `preview` prop in `register-product-collection.tsx` and `product-collection-content.tsx` to streamline prop passing and improve the component interface.
- Updated the `queryContextIncludes` in `constants.ts` to include 'previewState'
- Enhanced the `ProductCollection` PHP class to handle preview-specific queries more effectively, introducing a new method `get_preview_query_args` that adjusts query parameters based on the collection being previewed, thereby improving the relevance and accuracy of products displayed in preview mode.

* Always set initialPreviewState on load

* Refine preview state handling

- Renamed `HandlePreviewStateArgs` to `SetPreviewStateArgs` in `featured.tsx` to better reflect its purpose, which is now more focused on setting rather than handling states. The implementation details within `featured.tsx` have also been refined to include async operations and cleanup functions, demonstrating a more sophisticated approach to managing state.

Overall, these updates make the preview state logic more understandable and maintainable.

* Rename "initialState" to "initialPreviewState"

* Fix: Correct merging of newPreviewState into previewState attribute

This commit addresses an issue in the product-collection-content.tsx where the newPreviewState was not properly merged into the existing previewState attribute. Previously, the spread operator was incorrectly applied, leading to potential loss of existing state attributes. By changing the order of operations and correctly spreading the existing attributes before merging the newPreviewState, we ensure that all state attributes are preserved and updated correctly.

* Initial refactor POC code to productionize it

* Move `useSetPreviewState` to Utils

* Implement preview mode for Generic archive templates

Implemented a new useLayoutEffect in `utils.tsx` to dynamically set a preview message in the editor for product collection blocks located in generic archive templates (like Products by Category, Products by Tag, or Products by Attribute).

* Remove preview mode from Featured and On sale collection

* Remove preview query modfication for On Sale collection

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Fix: hide/show preview label based on value of "inherit"

If user change the toggle "Sync with current query", then it should reflect for the preview label as well.
- If the toggle is on, then the preview label should be shown.
- If the toggle is off, then the preview label should be hidden.

* Minor improvements

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Refactor: Simplify SetPreviewState type definition in types.ts

This commit refines the SetPreviewState type definition by eliminating the previously used intermediate interface, SetPreviewStateArgs. The change streamlines the type definition directly within the SetPreviewState type, enhancing readability and reducing redundancy.

* Update import syntax for ElementType in register-product-collection.tsx

This commit updates the import statement for `ElementType` from `@wordpress/element` to use the more modern and concise `import type` syntax. This change does not affect functionality but aligns with TypeScript best practices for importing types, ensuring that type imports are distinguished from regular imports. This helps in clarity and in optimizing the build process by explicitly indicating that `ElementType` is used solely for type checking and not included in the JavaScript runtime.

* Refactor: Update TypeScript usage in Product Collection

This commit introduces several TypeScript refinements across product-collection components:

1. **DEFAULT_ATTRIBUTES** in `constants.ts` now uses `Pick` to explicitly define its shape, ensuring only relevant attributes are included and typed accurately.
2. **ProductCollectionAdvancedInspectorControls** and **ToolbarControls** in the `edit` subdirectory now use `Omit` to exclude the 'preview' property from props, clarifying the intended prop usage and improving type safety.

These changes collectively tighten the type definitions and improve the codebase's adherence to best practices in TypeScript.

* Refactor: Update dependencies of useSetPreviewState hook in utils.tsx

This change enhances the stability and predictability of the hook's behavior, ensuring it updates its internal state accurately when its dependencies change, thus aligning with best practices in React development.

* Refactor preview button CSS and conditional rendering

1. **CSS Refactoring:** Moved the positioning styles of the `.wc-block-product-collection__preview-button` from inline styles in the JSX to the `editor.scss` file. This separation of concerns improves maintainability and readability, aligning the styling responsibilities solely within the CSS file.
2. **Conditional Rendering Logic:** Updated the rendering condition for the preview button. Now, it not only checks if `isPreview` is true but also if the block is currently selected (`props.isSelected`). This prevents the preview button from appearing when the block is not actively selected, reducing visual clutter and enhancing the user experience in the editor.

* Enhance: Update preview button visibility logic in ProductCollectionContent

This commit enhances the visibility logic of the preview button in the `ProductCollectionContent` component:

1. **Added `isSelectedOrInnerBlockSelected`:** Introduced a new `useSelect` hook to determine if the current block or any of its inner blocks are selected. This ensures that the preview button is visible when either the product collection block or any of its inner blocks are selected.
2. **Updated Conditional Rendering:** Adjusted the conditional rendering of the preview button to use the new `isSelectedOrInnerBlockSelected` value, providing a more intuitive user experience by ensuring the preview button remains visible when any relevant block is selected.

* use __private prefix with attribute name

* Add E2E tests for Preview Mode

1. **Template-Specific Tests:** Each template (tag, category, attribute) undergoes a test to ensure the preview button behaves as expected when replacing products with product collections in these contexts.
2. **Visibility Checks:** The tests verify that the preview button is visible when the block or its inner blocks are selected and hidden when the block is not selected. This helps confirm the correct implementation of the preview button visibility logic across different use cases.
3. **Interaction with Inner Blocks:** Additional checks are included to ensure the preview button's visibility toggles appropriately when interacting with inner blocks, reinforcing the dynamic nature of block selection and its effect on UI elements within the editor.

* Add setPreviewState to dependencies

* Add data-test-id to Preview button and update e2e locator

Modifications:
- Added `data-test-id="product-collection-preview-button"` to the Preview button in `product-collection-content.tsx`.
- Updated the corresponding e2e test locator in `product-collection.block_theme.side_effects.spec.ts` to use the new `data-test-id` instead of the class name.

By using `data-test-id`, we ensure that the e2e tests are not affected by changes in the styling or restructuring of the DOM that might alter CSS classes but do not affect functionality.

* Enhance: Localize preview message in useSetPreviewState hook

* Don't show shadow & outline on focus

* Make preview button font same as Admin

* Fix SCSS lint errors

* Add missing await keyword

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-15 13:18:43 +05:30
Thomas Roberts 35f07934a4
Remove bold text from selected payment method in Checkout block (#47412) 2024-05-14 02:00:30 -07:00
Bart Kalisz 1e1e7dd65d
Blocks E2E: Align ESLint and TS configs with Gutenberg (#47228) 2024-05-14 10:23:17 +02:00
Karol Manijak bf2d622a66
Product Collection: telemetry for filter usage (#46545)
* Create trackInteraction function and pass it to query Insprector Controls

* Add tracking to Attribute filter

* Add tracking to Created filter

* Add tracking to Featured filter

* Add tracking to Handpicked Products filter

* Add tracking to Inherit Query filter

* Add tracking to Keyqord filter

* Add tracking to On Sale filter

* Add tracking to Order By option

* Add tracking to Stock Statusoption

* Add tracking to Price Range filter

* Add tracking to Taxonomies filter

* Fix lint errors

* Add changelog

* Rearrange the logic of recognising the tracks location so it's more reliable
2024-05-14 09:45:33 +02:00
Christopher Allford b8aabe9005
Fixed Taxonomy Term Limit On Product Collection Filters (#47155)
In the interest of avoiding pagination this refactor swaps the current term loading with one that doesn't require a cache of all terms. We've removed the need for the cache by storing the ID and term name together in the token/suggestion list and using a display transformation to hide any unnecessary information.
2024-05-13 16:00:24 -07:00
Roy Ho f5dc46a385
Product Filters: add individual clear button (#47101)
* Product Filters: add individual clear button

* Remove unused style.scss

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Simplify searching for the tag

* Convert to use button instead of anchor

* Try using iAPI to show/hide clear button

* Use local context instead of global state

* Fix linting error

* Remove unneeded context

* Update clear button block description

* Fix frontend PHP error

* Add e2e tests for attributes filter clear button

* Add e2e tests for price filter clear button

* Add e2e tests for rating filter clear button

* Add e2e tests for stock status filter clear button

* Address feedback and use built in locators

* Address feedback and replace the use of timeouts

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 15:19:56 -03:00
Albert Juhé Lluveras 8da8a70839
Update docs about blocks styling to clearly state global styles are the recommended approach (#47269)
* Update docs about blocks styling to clearly state global styles are the recommended approach

* Markdown formatting fixes

* Add changelog file

* Add styling the Product Price block example

* Markdown formatting fixes (II)

* Update plugins/woocommerce-blocks/docs/designers/theming/README.md

Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>

* Update plugins/woocommerce-blocks/docs/designers/theming/README.md

Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>

---------

Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
2024-05-13 18:26:50 +02:00
Seghir Nadir ccba86a616
Update additional fields document's TOC and link to it from another document. (#47137)
* update docs

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* fix linting

* update manifest

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 15:46:46 +00:00
Seghir Nadir b5850bbfc1
Select a shipping rate after they load (#47120)
* select a shipping rate if there are no shipping rates on mount

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* move code and explain it

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 15:29:04 +00:00
Bart Kalisz 9a71f3ac5f
Blocks E2E: Remove the DB snapshot on env reset (#47416) 2024-05-13 17:19:15 +02:00
Seghir Nadir b256336176
reset state and postcode if it's not valid for the current country (#47369)
* reset state if it's not valid for the current country

* reset postcode as well

* Add changefile(s) from automation for the following project(s): woocommerce

* update logic so its in Checkout block instead of store api

* fix linting

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 16:46:08 +02:00
Paulo Arromba 98510fe9fd
Add woocommerce_order_received_verify_known_shoppers filter to order confirmation template (#46957)
* Adds filter `woocommerce_order_received_verify_known_shoppers` to allow known shoppers to access the order received page without being logged in in Order Confirmation template

* Added changelog

* Added filter docblock

* Refactored to apply the filter correctly for non-guests only.

* Restored comment.

* Added test

* Added test

* lint

* Change plugin package name

* Update plugin name (apparently slugs are formed from that)

* Added right prefix

* JS linting

* Refactored testing into a test.step()

* typo

* Fixed tests.

* Reverted change done by mistake.

* remove getByRole specificity

* Increase selector specificity specificity

* Change test prefix

* reduce test flakyness

* reduce test flakyness

* reduce test flakyness
2024-05-13 15:28:36 +01:00
Seghir Nadir 76a9e2eb27
Move country to top of form for all countries (#47375)
* Move country to top of form for all countries

* adjust styling

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 16:24:40 +02:00
Sam Seay 2db29164f9
Update to pnpm 9.1 (#47385)
* Update to pnpm 9.1 and fix a mini css bug

* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/product-editor, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/extend-cart-checkout-block, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/create-woo-extension, @woocommerce/create-product-editor-block, @woocommerce/components, @woocommerce/api, @woocommerce/ai, @woocommerce/admin-e2e-tests, woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai

* temporarily disable swallowing build output to diagnose issue with perf workflow

* Ignore some type issues that commonly resurface when deps slightly change

* Fix persistent type issues that have recurred many times

* Add more ignores

* Fix lint issue

* Revert change to swallow build error

* Improve access of the config that needs updated build dir.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 10:57:39 -03:00
Bart Kalisz 30756f74e3
Blocks E2E: Refactor configs and workflow (#46409) 2024-05-13 14:58:26 +02:00
Ramon Ahnert 49c379c5a7
Fix typo in the Exposing your data in the Store API documentation (#43488)
* Fix basic usage code snippet example in extend-rest-api-add-data.md

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 15:20:07 +07:00
Albert Juhé Lluveras 8b47443a1c
Remove unnecessary links to an ephemeral site (#47270)
* Remove unnecessary links to an ephemeral site

* Add changelog file

* Disable markdown lint in some lines
2024-05-08 15:24:25 +02:00
Niels Lange e7aff9428f
[Enhancement]: Block-based checkout - Pickup section updates (#47173)
* Change “Pickup options” to “Pickup locations”

* Always show pickup location and truncate pickup details

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Adjust spacing between pickup details and more link

* Hide pickup details of unselected pickup location

* Adjust line height of truncated text

* Show “Read more/less” instead of “more/less”

* Ensure both lines are equally filled with text

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-08 17:58:09 +07:00
Bart Kalisz 3ad9ebf52a
Blocks E2E: Fix flaky Product Collection tests (#47211) 2024-05-08 11:26:52 +02:00
Niels Lange 99bed6d7ba
Display price in place order button (#47083)
* WIP: Display price in place order button

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Fix JS lint error

* Update e2e tests

* Display default place order button including placeholder in page editor

* Update plugins/woocommerce-blocks/assets/js/blocks/checkout/inner-blocks/checkout-actions-block/constants.tsx

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>

* Optimise i18n using sprintf

* Wrap cart totals in “useSelect”

* Temporary skip failing e2e test

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-05-08 16:18:48 +07:00
Bart Kalisz c464afc7ad
Blocks E2E: Remove discouraged waitForTimeout from tests (#47214) 2024-05-08 10:14:24 +02:00
Bart Kalisz 2936c4eac8
Blocks E2E: Fix flaky block insertion tests (#47213) 2024-05-08 10:13:30 +02:00
Niels Lange b6d9b3a013
Fix broken checkout address forms layout (#47131)
* Fix broken checkout address forms layout

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-08 10:30:12 +07:00
Albert Juhé Lluveras f2bb11ffc3
Update block templates documentation (#47110)
* Update block templates documentation

* Add changelog file

* Linting

* Replace 'the' with 'a' to improve understandability
2024-05-06 11:06:40 +02:00
Sam Seay a8be4f3330
Checkout: fix a bug where the local pickup / shipping buttons are rendered incorrectly in the editor (#47157) 2024-05-06 20:57:52 +12:00
Luigi Teschio 2d87573a76
Product Reviews: not use useBlockProps twice (#47136)
* Product Reviews: not use useBlockProps twice

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-06 10:13:53 +02:00
ianlv 6ff0463f24
chore: remove repetitive words (#47158)
* chore: remove repetitive words

Signed-off-by: ianlv <sunlvyun@outlook.com>

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

---------

Signed-off-by: ianlv <sunlvyun@outlook.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-05-06 03:43:39 +00:00
Luigi Teschio 420207a1d7
Migrate Jest Puppeteer E2E tests to Playwright (#46671)
* try db reset in page teardown

* move reset to setup step

* Use wp db cli

* Fix global setup
That part is overriding the logged in user state and wipes out the nonce and rootUrl fields.

* Try importing instead from a generated dump

* Revert "Try importing instead from a generated dump"

This reverts commit 987dc471c9.

* Revert "Revert "Try importing instead from a generated dump""

This reverts commit c8d008cb20.

* Don't bypass visitSiteEditor so that the Welcome Guide is closed

* use createNewPost

* Revert "Revert "Revert "Try importing instead from a generated dump"""

This reverts commit 2684273582.

* [Blocks]: Fix E2E tests (#46344)

* Load local pickup enabled setting as bool not string

* Add changelog

* Remove unused import

* Update plugins/woocommerce-blocks/assets/js/extensions/shipping-methods/pickup-location/utils.ts

Co-authored-by: Niels Lange <info@nielslange.de>

* Use strict equality test

* try now

* try now

* add a new sql file

* remove default.sql

* fix welcome guide tour

* fix E2E tests

* Fix the template revert tests
...where the template is unreachable due to pagination.

* Add changelog entry

* improve logic to closeWelcomeGuideModal

* fix cart checkout tests

* improve flakiness

* improve flakiness

* fix flaky test

* fix company field

* fix E2E test

* fix E2E tests

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* Replace beforeAll w/ beforeEach + remove all after* hooks

* Fix broken hooks

* Activate plugins via requestUtils API

* [Blocks - E2E]: Add `playwright/no-hooks` ESlint rule (#46432)

add ESLint configuration

* Clean up console logs

* Remove obsolete language setup steps

* Remove more unnecessary setup steps

* Remove even more obsolete setup steps

* tmp: add the LYS fix

* Try stabilizing the company field test

* Use canvas param instead of manually entering edit mode

* Remove double site editor redirect

* Revert "Use canvas param instead of manually entering edit mode"

This reverts commit 5e6cc17154.

* Revert "Remove double site editor redirect"

This reverts commit 69a57a82a8.

* Fix flaky products sorting test

* Blocks: Fix ESLint errors (#46595)

fix eslint error

* Fix ESLint errors (#46626)

* Fix ESLint errors

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>

* Blocks: Migrate multiple tests to Playwright

* fix path

* migrate other tests

* add product best sellers E2E tests

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* migrate jest-puppetter E2E tests to Playwright

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Remove obsolete waitForLoadState call

* improve E2E tests

* fix E2E tests

* improve E2E tests

* remove old test

* remove not necessary test

* fix number product

* fix E2E test

* fix number of products

* fix product count

* refactor store notice E2E tests

* update string

* fix E2E test

* fix E2E tests

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: github-actions <github-actions@github.com>
2024-05-03 13:02:37 +02:00
Albert Juhé Lluveras b0ab7ba213
Fix Merchant → Mini Cart in FSE editor can only be inserted once test (#47134)
* Fix Merchant → Mini Cart in FSE editor can only be inserted once test

* Add changelog file
2024-05-03 11:58:53 +02:00
Luigi Teschio e750b0ff3a
Product Details: not use `useBlockProps` twice (#46785)
* Product Details: not use  twice

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-03 10:21:06 +02:00
Sam Seay 3a5721c0d8
Replace @wordpress/components Button, Radio, RadioGroup with Ariakit Button (#45974) 2024-05-03 15:28:39 +12:00
Niels Lange 6066c082b0
Relocate helper (child) themes (#47080)
* Relocate helper (child) themes

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Correct wrong template slugs

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-02 21:23:52 +07:00
Luigi Teschio bbcc73ebeb
Migrate Jest Puppeteer E2E tests to Playwright (#46644)
* try db reset in page teardown

* move reset to setup step

* Use wp db cli

* Fix global setup
That part is overriding the logged in user state and wipes out the nonce and rootUrl fields.

* Try importing instead from a generated dump

* Revert "Try importing instead from a generated dump"

This reverts commit 987dc471c9.

* Revert "Revert "Try importing instead from a generated dump""

This reverts commit c8d008cb20.

* Don't bypass visitSiteEditor so that the Welcome Guide is closed

* use createNewPost

* Revert "Revert "Revert "Try importing instead from a generated dump"""

This reverts commit 2684273582.

* [Blocks]: Fix E2E tests (#46344)

* Load local pickup enabled setting as bool not string

* Add changelog

* Remove unused import

* Update plugins/woocommerce-blocks/assets/js/extensions/shipping-methods/pickup-location/utils.ts

Co-authored-by: Niels Lange <info@nielslange.de>

* Use strict equality test

* try now

* try now

* add a new sql file

* remove default.sql

* fix welcome guide tour

* fix E2E tests

* Fix the template revert tests
...where the template is unreachable due to pagination.

* Add changelog entry

* improve logic to closeWelcomeGuideModal

* fix cart checkout tests

* improve flakiness

* improve flakiness

* fix flaky test

* fix company field

* fix E2E test

* fix E2E tests

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* Replace beforeAll w/ beforeEach + remove all after* hooks

* Fix broken hooks

* Activate plugins via requestUtils API

* [Blocks - E2E]: Add `playwright/no-hooks` ESlint rule (#46432)

add ESLint configuration

* Clean up console logs

* Remove obsolete language setup steps

* Remove more unnecessary setup steps

* Remove even more obsolete setup steps

* tmp: add the LYS fix

* Try stabilizing the company field test

* Use canvas param instead of manually entering edit mode

* Remove double site editor redirect

* Revert "Use canvas param instead of manually entering edit mode"

This reverts commit 5e6cc17154.

* Revert "Remove double site editor redirect"

This reverts commit 69a57a82a8.

* Fix flaky products sorting test

* Blocks: Fix ESLint errors (#46595)

fix eslint error

* Fix ESLint errors (#46626)

* Fix ESLint errors

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>

* Blocks: Migrate multiple tests to Playwright

* fix path

* migrate other tests

* add product best sellers E2E tests

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Remove obsolete waitForLoadState call

* improve E2E tests

* fix E2E tests

* fix E2E test

* remove not necessary changelog

* improve E2E tests

* remove not necessary folder

* fix test

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: github-actions <github-actions@github.com>
2024-05-02 10:36:51 +02:00
Niels Lange 1d93ba0b6a
Block-based checkout - Shipping section changes (#46083)
* Refactor shipping sections

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Refactor various files and adjust e2e tests

* Display expected styles for “Ship” and “Pickup” in the page editor

* Use exact selector

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-30 19:59:03 +07:00
Ilyas Foo 35c50ebdb4
Try wrapping entire coming soon page under cover block to fix layout issue (#46914)
* Refactor to wrap everything under cover block

* Changelog

* Cleanup and fix classic theme

* Wrap center with stack for ease of adding elements nearby

* Update styles

* Fix dynamic background color

* Style clean up
2024-04-30 16:56:59 +08:00
Sam Seay 75b7775e1b
Update Webpack in blocks to latest version (#46711) 2024-04-29 15:50:47 +12:00
Sam Seay 1e225f701f
Add aria label to the customer account block link (#46899) 2024-04-29 13:35:47 +12:00
dependabot[bot] f9a7ff04f0
Bump fast-xml-parser from 4.2.4 to 4.2.5 (#41982)
* Bump fast-xml-parser from 4.2.4 to 4.2.5

Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 4.2.4 to 4.2.5.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v4.2.4...v4.2.5)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add changelog

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-04-26 15:25:30 -07:00
Luigi Teschio ded320df95
[Blocks] Migrate stock filter to playwright (#46580)
* try db reset in page teardown

* move reset to setup step

* Use wp db cli

* Fix global setup
That part is overriding the logged in user state and wipes out the nonce and rootUrl fields.

* Try importing instead from a generated dump

* Revert "Try importing instead from a generated dump"

This reverts commit 987dc471c9.

* Revert "Revert "Try importing instead from a generated dump""

This reverts commit c8d008cb20.

* Don't bypass visitSiteEditor so that the Welcome Guide is closed

* use createNewPost

* Revert "Revert "Revert "Try importing instead from a generated dump"""

This reverts commit 2684273582.

* [Blocks]: Fix E2E tests (#46344)

* Load local pickup enabled setting as bool not string

* Add changelog

* Remove unused import

* Update plugins/woocommerce-blocks/assets/js/extensions/shipping-methods/pickup-location/utils.ts

Co-authored-by: Niels Lange <info@nielslange.de>

* Use strict equality test

* try now

* try now

* add a new sql file

* remove default.sql

* fix welcome guide tour

* fix E2E tests

* Fix the template revert tests
...where the template is unreachable due to pagination.

* Add changelog entry

* improve logic to closeWelcomeGuideModal

* fix cart checkout tests

* improve flakiness

* improve flakiness

* fix flaky test

* fix company field

* fix E2E test

* fix E2E tests

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* Replace beforeAll w/ beforeEach + remove all after* hooks

* Fix broken hooks

* Activate plugins via requestUtils API

* [Blocks - E2E]: Add `playwright/no-hooks` ESlint rule (#46432)

add ESLint configuration

* Clean up console logs

* Remove obsolete language setup steps

* Remove more unnecessary setup steps

* Remove even more obsolete setup steps

* tmp: add the LYS fix

* Try stabilizing the company field test

* Use canvas param instead of manually entering edit mode

* Blocks: Migrate stock filter to playwright

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Remove double site editor redirect

* remove not necessary file

* fix test

* Revert "Use canvas param instead of manually entering edit mode"

This reverts commit 5e6cc17154.

* Revert "Remove double site editor redirect"

This reverts commit 69a57a82a8.

* Fix flaky products sorting test

* Blocks: Fix ESLint errors (#46595)

fix eslint error

* improve E2E tests

* fix test

* Fix ESLint errors (#46626)

* Fix ESLint errors

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>

* address feedback

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: github-actions <github-actions@github.com>
2024-04-26 15:14:54 +02:00
Luigi Teschio 45a4817772
[Blocks] Migrate Attribute filter E2E tests to playwright (#46591)
* try db reset in page teardown

* move reset to setup step

* Use wp db cli

* Fix global setup
That part is overriding the logged in user state and wipes out the nonce and rootUrl fields.

* Try importing instead from a generated dump

* Revert "Try importing instead from a generated dump"

This reverts commit 987dc471c9.

* Revert "Revert "Try importing instead from a generated dump""

This reverts commit c8d008cb20.

* Don't bypass visitSiteEditor so that the Welcome Guide is closed

* use createNewPost

* Revert "Revert "Revert "Try importing instead from a generated dump"""

This reverts commit 2684273582.

* [Blocks]: Fix E2E tests (#46344)

* Load local pickup enabled setting as bool not string

* Add changelog

* Remove unused import

* Update plugins/woocommerce-blocks/assets/js/extensions/shipping-methods/pickup-location/utils.ts

Co-authored-by: Niels Lange <info@nielslange.de>

* Use strict equality test

* try now

* try now

* add a new sql file

* remove default.sql

* fix welcome guide tour

* fix E2E tests

* Fix the template revert tests
...where the template is unreachable due to pagination.

* Add changelog entry

* improve logic to closeWelcomeGuideModal

* fix cart checkout tests

* improve flakiness

* improve flakiness

* fix flaky test

* fix company field

* fix E2E test

* fix E2E tests

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* Replace beforeAll w/ beforeEach + remove all after* hooks

* Fix broken hooks

* Activate plugins via requestUtils API

* [Blocks - E2E]: Add `playwright/no-hooks` ESlint rule (#46432)

add ESLint configuration

* Clean up console logs

* Remove obsolete language setup steps

* Remove more unnecessary setup steps

* Remove even more obsolete setup steps

* tmp: add the LYS fix

* Try stabilizing the company field test

* Use canvas param instead of manually entering edit mode

* Remove double site editor redirect

* Blocks: Migrate attribute filter E2E tests to playwright

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Revert "Use canvas param instead of manually entering edit mode"

This reverts commit 5e6cc17154.

* Revert "Remove double site editor redirect"

This reverts commit 69a57a82a8.

* Fix flaky products sorting test

* Blocks: Fix ESLint errors (#46595)

fix eslint error

* update path

* Fix ESLint errors (#46626)

* Fix ESLint errors

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>

* address feedback

* fix visitSiteEditor

* fix description

* remove not necessary changelog

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: github-actions <github-actions@github.com>
2024-04-26 14:35:03 +02:00
Luigi Teschio 24c2832e4f
[Blocks] Migrate rating filter to playwright (#46583)
* try db reset in page teardown

* move reset to setup step

* Use wp db cli

* Fix global setup
That part is overriding the logged in user state and wipes out the nonce and rootUrl fields.

* Try importing instead from a generated dump

* Revert "Try importing instead from a generated dump"

This reverts commit 987dc471c9.

* Revert "Revert "Try importing instead from a generated dump""

This reverts commit c8d008cb20.

* Don't bypass visitSiteEditor so that the Welcome Guide is closed

* use createNewPost

* Revert "Revert "Revert "Try importing instead from a generated dump"""

This reverts commit 2684273582.

* [Blocks]: Fix E2E tests (#46344)

* Load local pickup enabled setting as bool not string

* Add changelog

* Remove unused import

* Update plugins/woocommerce-blocks/assets/js/extensions/shipping-methods/pickup-location/utils.ts

Co-authored-by: Niels Lange <info@nielslange.de>

* Use strict equality test

* try now

* try now

* add a new sql file

* remove default.sql

* fix welcome guide tour

* fix E2E tests

* Fix the template revert tests
...where the template is unreachable due to pagination.

* Add changelog entry

* improve logic to closeWelcomeGuideModal

* fix cart checkout tests

* improve flakiness

* improve flakiness

* fix flaky test

* fix company field

* fix E2E test

* fix E2E tests

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* Replace beforeAll w/ beforeEach + remove all after* hooks

* Fix broken hooks

* Activate plugins via requestUtils API

* [Blocks - E2E]: Add `playwright/no-hooks` ESlint rule (#46432)

add ESLint configuration

* Clean up console logs

* Remove obsolete language setup steps

* Remove more unnecessary setup steps

* Remove even more obsolete setup steps

* tmp: add the LYS fix

* Try stabilizing the company field test

* Use canvas param instead of manually entering edit mode

* Remove double site editor redirect

* Blocks: Migrate rating filter to playwright

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* remove not necessary changelog

* Revert "Use canvas param instead of manually entering edit mode"

This reverts commit 5e6cc17154.

* Revert "Remove double site editor redirect"

This reverts commit 69a57a82a8.

* Fix flaky products sorting test

* Blocks: Fix ESLint errors (#46595)

fix eslint error

* improve tests

* use visitSiteEditor util

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* use locator.fill

* Fix ESLint errors (#46626)

* Fix ESLint errors

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>

* address feedback

* remove not necessary changelog

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: github-actions <github-actions@github.com>
2024-04-26 12:53:07 +02:00
Luigi Teschio 417baee8ef
[Blocks] Migrate Price filter tests to Playwright (#46576)
* try db reset in page teardown

* move reset to setup step

* Use wp db cli

* Fix global setup
That part is overriding the logged in user state and wipes out the nonce and rootUrl fields.

* Try importing instead from a generated dump

* Revert "Try importing instead from a generated dump"

This reverts commit 987dc471c9.

* Revert "Revert "Try importing instead from a generated dump""

This reverts commit c8d008cb20.

* Don't bypass visitSiteEditor so that the Welcome Guide is closed

* use createNewPost

* Revert "Revert "Revert "Try importing instead from a generated dump"""

This reverts commit 2684273582.

* [Blocks]: Fix E2E tests (#46344)

* Load local pickup enabled setting as bool not string

* Add changelog

* Remove unused import

* Update plugins/woocommerce-blocks/assets/js/extensions/shipping-methods/pickup-location/utils.ts

Co-authored-by: Niels Lange <info@nielslange.de>

* Use strict equality test

* try now

* try now

* add a new sql file

* remove default.sql

* fix welcome guide tour

* fix E2E tests

* Fix the template revert tests
...where the template is unreachable due to pagination.

* Add changelog entry

* improve logic to closeWelcomeGuideModal

* fix cart checkout tests

* improve flakiness

* improve flakiness

* fix flaky test

* fix company field

* fix E2E test

* fix E2E tests

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* Replace beforeAll w/ beforeEach + remove all after* hooks

* Fix broken hooks

* Activate plugins via requestUtils API

* [Blocks - E2E]: Add `playwright/no-hooks` ESlint rule (#46432)

add ESLint configuration

* Clean up console logs

* Remove obsolete language setup steps

* Remove more unnecessary setup steps

* Remove even more obsolete setup steps

* tmp: add the LYS fix

* [Blocks]: Migrate Price Filter tests to Playwright

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* improve description

* Try stabilizing the company field test

* use Product Collection

* Use canvas param instead of manually entering edit mode

* remove blockData

* Remove double site editor redirect

* Revert "Use canvas param instead of manually entering edit mode"

This reverts commit 5e6cc17154.

* Revert "Remove double site editor redirect"

This reverts commit 69a57a82a8.

* Fix flaky products sorting test

* Blocks: Fix ESLint errors (#46595)

fix eslint error

* update test

* add missing import

* Fix ESLint errors (#46626)

* Fix ESLint errors

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>

* improve E2E tests

* remove not necessary changelog

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: github-actions <github-actions@github.com>
2024-04-26 12:07:00 +02:00
Bart Kalisz 5f7cc39330
Block E2E: Eliminate side effects through improved test isolation (#46125) 2024-04-26 11:39:11 +02:00
Paul Sealock d5d25d3bfe
[LYS] Comin soon block - Refactor and hide Styles block on Store Only (#46854) 2024-04-26 16:43:08 +12:00
Roy Ho d6a48ecaf5
Add autogeneration of block list reference documentation (#46479)
* Add autogeneration of block list reference documentation

* Fix typo

* Revert this change

* Fix typo

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add blanklines to surrounding markdown headings

* Generate blocks references markdown

* Add space to header markdown

* Add ancestor information

* Use native Object.keys instead of lodash

* Remove the use of fast-glob

* Revert pnpm lock file changes

* Update plugins/woocommerce-blocks/bin/gen-block-list-doc.js

Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>

* Update doc title

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-04-25 06:03:41 -07:00
Alex Florisca 7dc8dd63ba
Update Order Summary Design (#45767)
* Add border around order summary on cart & checkout

* Group subtotal, discount, fees, taxes and shiping block

* Move the coupon form in order summary

* Move the coupon form in order summary

* Manage state externally in Panel component and refactor Coupon form to use the Panel component

* Remove descriptions from order summary items

* increase font weight of order summary title

* Tidy up design for desktop and add separator back in for blocks on checkout order summary

* Remove border around order summary on mobile

* Revert "Move the coupon form in order summary"

This reverts commit 4a8044cdcf.

* Change heading styles for cart

* Change font weight to 500 of order summary heading on checkout block

* Remove padding and border between order summary totals items

* Refactor css for cart & checkout totals to work in the editor

* Adjust cart totals heading in the editor

* Last adjustment to checkout totals style to work in editor

* Add changelog

* Change the cursor to pointer for the panel component

* remove unused short and full description from OrderSummaryItem

* Fix failing e2e tests

* Fix lint issues

* Vertically align order summary title in the editor

* Fix e2e tests

* Fix linting issues

* Fix unit tests

* Remove changes from woocommerce.php

* Fix checkout block test

* fix eslint errors in checkout block test

---------

Co-authored-by: Niels Lange <info@nielslange.de>
2024-04-25 12:03:31 +07:00
Seghir Nadir 2054353f91
Add hooks when reading and writing additional fields (#46870)
* add new filters for reading and writing fields

* rename functions

* add test for action

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* update docs

* fix typo in test and linting issues

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-24 17:38:15 +02:00
Albert Juhé Lluveras 738bbb0078
Move logic to hide Template selector in Shop page into Product Catalog class and add e2e test (#46405)
* Move logic to hide Template selector in Shop page into Product Catalog class

* Add changelog file

* Update plugins/woocommerce-blocks/tests/e2e/tests/templates/shop-page.block_theme.spec.ts

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* Update plugins/woocommerce-blocks/tests/e2e/tests/templates/shop-page.block_theme.spec.ts

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* Fix linting

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
2024-04-24 15:57:02 +02:00
Seghir Nadir 0f621c8977
get settings in correct format for Local Pickup (#46799)
* get settings in correct format

* Add changefile(s) from automation for the following project(s): woocommerce

* expand test to also account for frontend

* remove added test

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-24 15:22:36 +02:00
Albert Juhé Lluveras c59dcbe925
Create update_template_data util and formatting improvements (#46408)
* Create update_template_data util

* Fix comment typo

* Formatting

* Remove unnecessary use of BlockTemplateUtils

* Add changelog file

* Create update_template_data util (II)
2024-04-24 14:57:18 +02:00
Seghir Nadir 742cbbda9d
Graduate Additional Fields to stable and rename it. (#46805)
* graduate woocommerce_blocks_register_checkout_field

* graduate filters

* Migrate Additional to Order and Other

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* fix markdown lint

* update tests to use old value

* fix lint issue

* pass field options by reference

* update test helpers

* update tests to use latest api

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-23 16:47:32 +02:00
Seghir Nadir 0f4e675fb5
Correctly serialize data in additional fields API (#46762)
* fix data sanitization on session

* add changelog
2024-04-23 15:34:31 +02:00
Bart Kalisz 190c972332
Blocks: Isolate performance tests from e2e tests (#46773)
* Isolate (cart) performance tests from e2e tests

* Add changelog entry
2024-04-23 13:11:46 +02:00
Sam Seay 97595ce95d
Fix crashes in mini-cart by externalizing the wc types package. (#46814) 2024-04-23 20:18:37 +12:00
Paul Sealock b9a1b67991
[LYS] Reapply styles from 46619 (#46813)
* copy styles over from 46619

* Fix header padding

* login/out

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* typo

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-23 19:26:35 +12:00
Paul Sealock 89c330f03e
[Launch Your Store] Use Block to handle template styles (#46751) 2024-04-23 16:07:56 +12:00
Bart Kalisz 007a4238c3
Blocks E2E: Provide correct expected translation (#46756) 2024-04-20 13:23:55 +02:00
Leif Singer d1be68b88c
Update @woo.com email addresses to @woocommerce.com (#46387)
* update @woo.com email addresses

* update %40woo.com email address

* add changelog file

* update docs manifest
2024-04-19 21:11:01 +00:00
Raluca Stan f165667632
Prevent checkout blocks breakage for stores using similar number separators (#46241)
* Add a safety check for the numbers with the same value for the separators

This case breaks the library we are using for number formatting. This is not documented on their end and can't be fixed by passing a different configuration.
We are fixing it on our end by overwriting the thousand separator.
This change will only surface in the checkout blocks, at they are the only blocks doing formatting via React (the products blocks use php).
This will not apply to the order confirmation.
This change is preventing a fatal error thrown by the library and allowing users to see the content of the cart.
It's an edge case, because it happens only why people have the same values for the separators, which is an non-standard way to format.

* Add unit tests and changelog

* Add a safety check for the numbers with the same value for the separators

This case breaks the library we are using for number formatting. This is not documented on their end and can't be fixed by passing a different configuration.
We are fixing it on our end by overwriting the thousand separator.
This change will only surface in the checkout blocks, at they are the only blocks doing formatting via React (the products blocks use php).
This will not apply to the order confirmation.
This change is preventing a fatal error thrown by the library and allowing users to see the content of the cart.
It's an edge case, because it happens only why people have the same values for the separators, which is an non-standard way to format.

* Add unit tests and changelog

* Improve tests

* "Improve tests"
2024-04-18 15:17:30 +03:00
Thomas Roberts 9e0fab4ebc
Reset shipping rate font size to match other elements (#46345) 2024-04-17 13:54:43 -07:00
Bart Kalisz 8da0396b34
Blocks E2E: Fix basic role-based tests (#46684) 2024-04-17 18:50:37 +02:00
Alex Florisca 3089b1888e
Refactor the Order Summary of the Cart & Checkout blocks (#46386)
* Added new OrderSummaryTotals Block

* Refactor order summary and totals block to contain the inner children

* Add migration for Order Summary Block

* Migration to handle older order summary without totals block

* Remove empty lines from order summary migration

* block editor migration for order summary

* Fix isEligible function

* Update Totals title

* Add checkout totals

* Remove echos and dies

* replace individual checkout blocks with totals block

* Change parent of totals inner blocks and add totals block to innerBlockAreas map

* change CART_ORDER_SUMMARY_TOTALS to CHECKOUT_ORDER_SUMMARY_TOTALS

* Fix linting issues

* fix lint warnings

* Add  changelog

* Lock movement of the taxes block in attributes.tsx

* Less indentation in the render function of CartOrderSummaryBlock and CheckoutOrderSummaryBlock

* Rename webpack chunkName for order summary totals
2024-04-17 10:28:30 +01:00
Raluca Stan 466b3a8d06
Can only be inserted once test excludes the mini-cart template button (#46478)
* Can only be inserted once test excludes the mini-cart template button

* Use function for testing disabled state

* Account for blocks advertise and change selector
2024-04-16 17:15:38 +03:00
Thomas Roberts ab60527d6b
Update `PackageRates` component to show single rates as a radio button (#46284)
* Show a single shipping option as radio button

* Add changelog

* Update unused dependency
2024-04-16 13:39:55 +01:00
Luigi Teschio 7d41472206
[Blocks]: remove skipped tests (#46594)
* remove skipped tests

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-16 11:26:58 +02:00
Thomas Roberts fb481bdce5
Increase shipping/payment borders to prevent half pixel issues on high-resolution screens (#46525)
* Replace pixel box shadow with em to prevent half pixels

* Add changelog

* Apply 2px border

* Make padding around shipping options bigger
2024-04-16 09:50:54 +01:00
Wesley Rosa fed46ed1e7
Adding support for co-branded credit cards (#45903) 2024-04-15 22:59:05 +01:00
Brent MacKinnon 8fc82e9bfd
Fix broken links from issue #46336 (#46381)
* Fixing broken links

* Update docs/payments/payment-gateway-api.md

Co-authored-by: Leif Singer <leif@automattic.com>

* Update docs/contributing/common-issues.md

Co-authored-by: Néstor Soriano <konamiman@konamiman.com>

* Update docs/payments/payment-gateway-api.md

Co-authored-by: Leif Singer <leif@automattic.com>

* Update writing-high-quality-testing-instructions.md

* Add changefile(s) from automation for the following project(s): @woocommerce/components, woocommerce-blocks, woocommerce

* ignore MD029 rule (1/2/3) as the linebreaks that are needed for the code block confuse its numbering

* update the docs manifest

`pnpm utils md-docs create docs woocommerce -o docs/docs-manifest.json`

---------

Co-authored-by: Leif Singer <leif@automattic.com>
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Leif Singer <git@singer.sh>
2024-04-15 14:30:37 +02:00
Ron Rennick d69a36b1d5
Remove follow-redirects from dev dependencies (#46503)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-04-15 12:00:02 +01:00
Ron Rennick 4fa2e3822c
Update the monorepo to node v20 (#45148)
* test bumping node to v18

* remove community contributor condition from review assignment

* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/extend-cart-checkout-block, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/create-woo-extension, @woocommerce/create-product-editor-block, @woocommerce/components, @woocommerce/api, @woocommerce/admin-e2e-tests, woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai

* bump node to v20

* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/extend-cart-checkout-block, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/create-woo-extension, @woocommerce/create-product-editor-block, @woocommerce/components, @woocommerce/api, @woocommerce/admin-e2e-tests, packages/php/remote-specs-validation, woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai

* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/extend-cart-checkout-block, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/create-woo-extension, @woocommerce/create-product-editor-block, @woocommerce/components, @woocommerce/api, @woocommerce/admin-e2e-tests, woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai

* add blocks eslint-plugin-woocommerce to project workspace

* add e2e-environment as a peer to e2e-utils

* restore version on @woocommerce/api

* update lock file

* move e2e-environment to devDependencies

* add undefined location check to admin js test

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-04-12 13:49:55 -03:00
Luigi Teschio 8653d4c4fe
Blocks - E2E: Fix visibility store (#46521)
* Blocks - E2E: Fix visibility store

* add changelog
2024-04-12 11:26:12 +00:00
Karol Manijak de54195c3a
Enable Classic Template Products by Tag test (#46428)
* Enable Product Tag template test

* Add changelog
2024-04-11 08:58:01 +02:00
Karol Manijak 7efd3d4652
Product Collection: break taxonomies filter into multiple menu items per each taxonomy (#46160)
* Split taxonomies filter into seperate filter per taxonomy

* Add changelog

* Improve onDeselect function

* Update tests

* Fix lint

* Satisfy TS by returning single React element rather than array of elements

* Remove unused variable
2024-04-11 08:13:42 +02:00
Alexandre Lara 87f31f8ed0
Bump eslint-import-resolver-typescript from 3.2.4 to 3.6.1 (#45910)
* Bump eslint-import-resolver-typescript from 3.2.4 to 3.6.1

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-10 13:54:12 -03:00
Alexandre Lara 060befe8e8
Bump dataloader from 2.1.0 to 2.2.2 (#45906)
* Bump dataloader from 2.1.0 to 2.2.2

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-10 12:14:04 -03:00
Roy Ho deef144a43
Add translation context to ambiguous words (#46382)
* Add translation context to ambiguous words

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-10 06:17:14 -07:00
Thomas Roberts 255a45911c
Update shipping and payment radio controls to use borders on selected items (#46150) 2024-04-10 02:54:05 -07:00
Bart Kalisz b8df34659c
Blocks E2E: Ensure legacy template slugs are supported (#46269) 2024-04-10 10:38:55 +02:00
Bart Kalisz 7f6d21395e
Blocks E2E: Fix template revert tests (#46373) 2024-04-09 17:03:00 +02:00
Thomas Roberts e111784e60
Ensure local pickup "enabled" setting is read correctly on client-side (#46334)
Co-authored-by: Niels Lange <info@nielslange.de>
2024-04-09 06:31:04 -07:00
Seghir Nadir afee75f871
Use individual meta keys for Additional fields. (#46091)
* add regression tests

* Refactor to using single meta key per field

* Add changefile(s) from automation for the following project(s): woocommerce

* refactor rest of code

* keep set_array_meta same

* use correct function in condition

* fix spacing

* add docs

* fix markdown issues

* handle false bool meta

* adjust admin keys

* fix merchant tests

* handle checkboxes in checkout response

* address feedback

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-block/additional-checkout-fields.md

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-block/additional-checkout-fields.md

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-block/additional-checkout-fields.md

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-block/additional-checkout-fields.md

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-block/additional-checkout-fields.md

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* update ledt places and reduce abstractions

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2024-04-09 12:48:27 +01:00
Leif Singer 8ee74ede0e
Update Woo.com references to WooCommerce.com (#46259)
* replace capitalized Woo.com with WooCommerce.com

* replace http URLs

* replace https URLs

* replace developer.woo.com

* add missing version in `@since` tag

* unslash the HTTP_REFERER

* WordPress.Security.ValidatedSanitizedInput.InputNotSanitized

* add changelog file

* add more changelog files

* address linter errors

* address more linter errors

* fix test

* more linter errors
2024-04-09 09:50:15 +01:00
Sam Seay 803a62c50a
Remove all references to the product add to cart block. (#46220) 2024-04-09 14:01:32 +12:00
Thomas Roberts 9f159f7141
Use address format from server in address card (#45852) 2024-04-08 01:43:42 -07:00
Sam Seay f9c4b284ce
Remove the base tabs component from blocks. It is no longer used. (#46219) 2024-04-06 15:03:07 +13:00
Sam Seay be93d94130
Fix blocks e2e test for `additional-fields.merchant.block_theme.side_effects.spec.ts` (#46258)
* Wait for DOMContentLoaded to ensure that scripts are run when we try click edit shipping details.
2024-04-06 14:54:46 +13:00
Tung Du 11ec7c6255
Fix: broken contract in StoreAPI ProductCollectionData endpoint (#45247)
* revert: use original implementation

* fix: price query clause

* chore: changelog

* fix: passing full query state to get the correct count and avoid cache issue

* Replace references to woo-gutenberg-products-block

* fix php cs error

* fix php cs error

* Fix e2e tests for attributes count

* Separated out and/or query type tests for attrs count

---------

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: roykho <roykho77@gmail.com>
2024-04-05 15:50:19 -03:00
Karol Manijak 0c1e4efc89
Rename the "other" location from `generic` to `site` (#46228)
* Rename the useGetLocation generic option to site

* Add changelog

* Adjust tests to change
2024-04-05 15:54:56 +02:00
Karol Manijak 1c4b793f06
Product Collection: fix "Reset All" button in Editor filters (#46226)
* Add deselect callabck to attribute filter

* Add deselect callabck to created filter

* Add deselect callabck to featured filter

* Add deselect callabck to handpicked filter

* Cleanup deselect callabck to keyword filter

* Add deselect callabck to on salefilter

* Add deselect callabck to order by option

* Add deselect callabck to stock status filter

* Add deselect callabck to price range filter

* Add deselect callabck to price taxonomies filter

* Call all the reset filer callbacks on reset

* Add changelog

* Remove unused variable

* Replace hardcoded default filter values with the DEFAULT_FILTERS constant
2024-04-05 13:16:00 +02:00
Ron Rennick bfb376abea
Sync stylelint, classnames, wp-prettier, sass-loader versions (#45597)
* bump husky, remove remnants from blocks

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* add @playwright/test to syncpack

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* update pnpm-lock.yaml

* add github-label-sync to syncpack

* add stylelint to syncpack

* add classnames to syncpack

* manually sync wp-prettier

* sync sass-loader version

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-04-04 09:48:54 -07:00
Sam Seay ff102c4921
Add vendor bundling of blocks frontend bundle to improve cart/checkout performance (#45859) 2024-04-04 15:31:02 +13:00
Alexandre Lara 90a9ef0392
Product Filter: Price block - Add E2E tests (#45855)
* Add E2E tests for Product Filter: Price block

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Use web first assertions

* Replace `toB` by `toHaveValue` in E2E tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-03 16:15:10 -03:00
Luigi Teschio b4e359ee71
E2E test env: use WordPress 6.5 stable version (#46155)
* E2E test env: use WordPress 6.5 stable version

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Revert "Wait for notice text to be visible instead of checking data store"

This reverts commit f26892a646.

* Revert "Fix linting errors"

This reverts commit eaf90e4890.

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2024-04-03 14:33:04 +02:00
Karol Manijak 92e99d4cad
Product Collection: telemetry choosing collection (#45827)
* Use templateSlug context in Product Collection

* Implement util recognising the location for track events

* Implement the track event when user chooses a collection in Product Collection

* Add changelog

* Remove incorrect import

* Cover cases with specific Product or Specific Taxonomy

* Update event name

* Adjust Product Filters tests

* Revert wrong commit
2024-04-02 14:12:20 +02:00
Thomas Roberts 893c7ddb04
Sync Local Pickup title between Checkout block and shipping settings UI and vice/versa (#45720) 2024-04-02 11:34:32 +00:00
Karol Manijak 1f49f712b5
Unify Product Elements inserter category to "WooCommerce Product Elements" (#46064)
* Unify the category for all Product Elements

* Add changelog

* Bring back category to product elements that don't use shared confiug

* Add specific category to some Product Elements blocks registered only for Single Product template
2024-04-02 13:04:13 +02:00
Karol Manijak 5d47c769a4
Recognise if Product Collection is located inside Cart or Checkout blocks (#46059)
* Recognise if Product Collection is inside Cart or Checkout blocks

* Upgrade priority block recognition over templates

* Update the comments to better depict the flow

* Add changelog

* Simplify the logic
2024-04-02 09:05:17 +02:00
Ron Rennick 0b376ee6b3
clean up woocommerce-blocks package.json (#45230)
* clean up woocommerce-blocks package.json

* update from feedback

* move entry to original location

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-04-01 14:27:25 -03:00
Manish Menaria a1a0128904
Product Collection: fetch all products for hand-picked products control (#45931)
* Fetch all products for hand-picked products control

This commit modifies the `getProducts` function usage within the Hand-Picked Products control, aiming to fetch all products regardless of catalog size.

The change involves explicitly setting `queryArgs` to include `per_page: 0` in the function call. This adjustment overrides the default behavior based on the `isLargeCatalog` condition, ensuring that all available products are fetched from the Store API for selection within the control.

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-01 14:17:12 +05:30
Roy Ho e3b1dd6a10
Remove clickable cursor on post title (#45998)
* Remove clickable cursor on post title

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Update plugins/woocommerce-blocks/assets/js/blocks/product-collection/edit/editor.scss

Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>

* Add missing semicolon

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-03-29 08:35:01 -07:00
Luigi Teschio 6e87869200
[Blocks - E2E] Update WordPress version (#46053)
* update WordPress version

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-29 16:11:33 +01:00
Niels Lange cad1aa6c2b
Ensure that each <CheckboxControl> component has a unique ID (#45655)
* Ensure that each <CheckboxControl> component has a unique id

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Optimise setup and teardown settings

* Wrapping setup and teardown in act()

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-29 12:46:13 +01:00
Thomas Roberts dbf0938fdd
Fix styling bug with saved payment methods in Checkout block (#46019) 2024-03-29 02:30:55 -07:00
Niels Lange 5cde8c5efe
Add e2e tests for virtual orders (#45824)
* Add e2e tests for virtual orders and refactor test names

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Optimise setup and teardown

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-27 21:28:54 +07:00
Tom Cafferkey 271da399cc
Customer Account block: Remove margin-left from label (#45934)
Co-authored-by: github-actions <github-actions@github.com>
2024-03-27 10:24:11 +00:00
Luigi Teschio 66b5481590
Fix E2E tests for WordPress 6.5 (#44593)
* Add sharding to Blocks e2e tests

* Changelog

* Push a change to Blocks README to trigger tests

* Fix syntax

* Fixed again

* Try again

* Trying to get the shard number

* Shard names

* fix E2E test

* use wordpress 6.5 as test env

* update util

* fix Mini Cart Block E2E test

* add editor dependency

* fix E2E tests

* fix E2E tests

* fix E2E tests

* restore global setup file

* fix E2E tests

* fix global setup

* try now

* try now

* fix E2E test

* fix E2E test

* fix mini cart E2E test

* add changelog

* complete all the jobs

* update playwright

* fix E2E tests

* fix E2E test

* try now

* fix E2E test

* not show welcome guide for the post editor

* update configuration

* fix guest storage state

* fix E2E tests

* check now

* fix E2E tests

* fix command

* improve selector

* use WordPress 6.5 beta 2

* use WordPress 6.5 beta 3

* fix canvas use

* wait for button

* fix E2E test

* fix E2E test

* fix product button

* fix product collection tests

* fix wp build link

* use beforeEach

* fix E2E tests

* use WordPress RC2

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* trigger CI

* fix E2E tests

* fix E2E tests

* fix E2E test

* fix E2E tests

* add timeout

* Fix flaky locator assertions
...by replacing them with dedicaed auto-waiting ones.

* Apply correct use of waitForRequest/Response and remove where unnecessary

* Remove obsolete waitUntils

* Fix accidentally isolated test

* Replace saveTemplate with core's saveSiteEditorEntities

* Fix findProductRow util

* Restore necessary request waiters

* Use activateTheme util instead of cli call

* Remove unused import

* Fix request destructured call
Request properties cannot be destructured (todo: create upstream issue)

* Revert some waitForRequest changes
These need to be investigated for heavy bleeding from side-effects

* Fix failing cart checkout test

* Set navigation timeout to 10s
We need this so that API like page.goto or page.waitForURL doesn't take 100 seconds (global timeout) to throw.

* Do not close the page in the page fixture override
The page will be closed anyway, and by closing it explicitly in the teardown phase of the fixture we create a flaky race condition where the page might be closed before the action/navigation timeout is reached, resulting in "page closed!" error instead of, e.g. "locator.fill timed out".

* Revert product collection tests due to conflicts

* Try fixing E2E test

* Remove some random change

* Revert to programmatic blur 🤷

* Fix additional checkout fields test

* Add a waitForRequest safety check in case it's debounced

* Fix price filter test

* Fix flaky visitTemplateEditor util

* Remove obsolete code from global setup

* Revert "Fix flaky visitTemplateEditor util"

This reverts commit 227336f265.

* update to WordPress RC3

* Add waitForCustomerDataUpdate function

* Don't wait for requests and use data store instead

* Try with new wait condition

* Re-add wait condition

* Wait for customer update in guest checkout test

* Add changelog

* fix lint error

* fix some E2E tests

* disable welcome guide

* remove beforeAll

* add timeout

* add another timeout

* increase timeout

* Add call to waitForSiteEditorFinishLoading when editing the theme template

* remove timeout

* remove not necessary comment

* clean changelog

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* remove changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2024-03-27 10:54:44 +01:00
Paul Sealock 619804cff3
Stylelint: Update config to double quotes (#45607)
* Add eslint override

* bump versions stylelint config

* re pnpm install

* fix config

* move to double quotes in scss

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* lint fix new scss files

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-26 10:41:34 -03:00
Tom Cafferkey 0cb3b4a9ad
Block Hooks API: Add CustomerAccount block to header (#43267)
Co-authored-by: github-actions <github-actions@github.com>
2024-03-26 08:38:06 +00:00
Ron Rennick 1a03a64248
Sync husky, @playwright/test, github-label-sync (#45551)
* bump husky, remove remnants from blocks

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* add @playwright/test to syncpack

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* update pnpm-lock.yaml

* add github-label-sync to syncpack

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-03-25 15:05:09 -03:00
Alexandre Lara 207a5b43d2
Single Product Block: Add missing allowed inner blocks to fix nesting placement restrictions (#45530)
* Add missing allowed inner blocks to Single Product block

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Remove unnecessary attribute from Single Product block template

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-25 10:59:57 -03:00
Marco Almeida 39ecfece30
Fix "add_action" accepted args (#45862)
* Fix "add_action" accepted args

Fixing the "add_action" accepted args on the examples

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-25 12:13:44 +00:00
Thomas Roberts c1d644dc16
Try fixing additional checkout fields E2E test (#45789)
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-03-25 03:56:55 -07:00
Seghir Nadir 401737994f
Use state name in Checkout block address card (#45799)
* Use state name in address card

* fix linting issue

* remove extra check for checkout endpoint

* address review feedback
2024-03-22 15:14:14 +01:00
Manish Menaria ca7aed0a95
Product Collection: Don't show publicly non-queryable taxonomies (#45781)
* Don't show publicly non-queryable taxonomies

The main enhancement involves adding a visibility filter to the taxonomies query. Now, the query considers the `publicly_queryable` property of each taxonomy. Only taxonomies marked as publicly queryable are included in the final list returned by the `useTaxonomies` hook. This change ensures that the Product Collection block's taxonomy controls only display taxonomies relevant and accessible to the public, enhancing both the usability for content creators and the relevance of taxonomy selections for site visitors.

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-22 15:01:58 +05:30
Christopher Allford b8bd480faf
Ensure Product Collection Block's `queryId` Uniqueness (#44522)
Since we don't need it to be _perfectly_ stable,
we can just set the `queryId` to the instance ID
on every component mounting. This is fine and
won't mark the attribute as dirty unless a
collection block is added, deleted, or moved
in just the right way. The exception to this
is collection blocks in sync patterns.
In this case the ID cannot change
because it can cause update loops in some
cases that freeze the browser.
2024-03-22 01:40:15 -07:00
Christopher Allford 5002b62d00
Reset Product Collection Pagination When Filtering (#45693)
Since we can't be sure that a page exists once the filters have been
changed we should reset the page when they do.
2024-03-21 14:03:13 -07:00
Roy Ho 5aac82b0fe
Consolidate and move password protected product test (#45752)
* Consolidate and move password protected product test

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Move test to non side effect and remove remaining empty test file

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-21 07:44:30 -07:00
Roy Ho 5acef655b8
Add gap between quantity field and add to cart button when stacked (#45758)
* Add gap between quantity field and add to cart button when stacked

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add specificity to quantity

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-20 15:41:10 -07:00
Niels Lange be63107c92
Improve local pickup flow (#45614)
* Update shipping calculation copy

* Update shipping calculation copy

* Update shipping calculation copy

* Update legacy local pickup copy

* Remove ‘target="_blank"’ and ‘rel="noopener noreferrer"’

* WIP: Conditional message and display of legacy local pickup option

* Make util function static

* Make texts translatable

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Fix PHPCS errors

* Fix PHPCS errors

* Update plugins/woocommerce/includes/class-wc-shipping.php

Co-authored-by: Gerhard Potgieter <potgieterg@gmail.com>

* Remove duplicate helper method

* Improve helper method

* Replace “esc_html__” with “wp_kses” to keep URL clickable

* Optimise is_legacy_local_pickup_active() method

* Adjust CSS definitions

* Refactor is_cart_block_default() and is_checkout_block_default()

* Ensure that Rest of the World shipping methods are available

* Remove obsolete space

* Adjust text spacing

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Gerhard Potgieter <potgieterg@gmail.com>
2024-03-20 14:54:12 +00:00
Roy Ho 3ef4fc88a5
Rating filter: fix misaligned count (#45674)
* Rating filter: fix misaligned count

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-20 05:24:47 -07:00
Niels Lange fa49848cf9
Fix broken CSS classes and update JS unit snapshots (#45732)
* Fix broken CSS classes and update JS unit snapshots

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-20 17:42:05 +07:00
Erik Golinelli 49b92070cc
Removes the star icon font (#31670)
* removes the star font
The WooCommerce font can hold many other icons there isn't the reason to load a font for a single icon

* updates custom templates stylesheets

* adds woff2 font format to themes customized stylesheets

* fix the star font size diff

* removes WooCommerce.eot and SVG file that are no longer needed and updates the template style in order to import from font.scss

* Optimized font import
Unifies the import of fonts by extending it to the twenty-twenty-three theme

* Add changefile(s) from automation for the following project(s): woocommerce

* Add changefile(s) from automation for the following project(s): woocommerce

* Svg font minification (WooCommerce.svg)

* Add changefile(s) from automation for the following project(s): woocommerce

* "star" font phasing out
The font family 'star' was replaced in all files. However, it continues to remain physically in the repo but not in the style files

* Removes the `.eot` font file since nowdays it's completely useless

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-20 11:28:27 +01:00
Paulo Arromba 0a3cf74c06
Validate and present custom error for not in allowed emails coupons (#43872)
* Removed deprecated WC_COUPON::is_valid() method usage from CartController.php

* Reverted wrongly changed line.

* Added validate_coupon_allowed_emails() to WC_Discounts

* Added soft validation for allowed emails coupons, with custom notice via WC_Coupon::add_coupon_message()

* Fixed log warning

* Refactored add_coupon_message()

* Prevent duplicate coupon notices.

* Changed coupon soft validation notice type.

* Tweaks

* Run coupon soft validations only on cart validation.

* Reverted soft validation, and added email information for coupon validation

* Removed unused coupon message

* PHP lint fixes.

* Added changelog.

* PHP lint fix

* Updated allowed coupon validation error message

* Updated PW tests

* Updated PW tests

* Updated email restricted coupon message.

* Small change for readability.

* Different error messages for shortcode cart and shortcode checkout

* Simplified CartApplyCoupon::get_post_route_response()

* Revert "Simplified CartApplyCoupon::get_post_route_response()"

This reverts commit 43f185b59a.

* Expose additional error data in error API response

* Simplified AbstractCartRoute::get_route_error_response()

* Linting

* Restored comment deleted by mistake.

* Introduced API context based coupon errors

* Fixed Doc Block

* Linting

* Reverted deprecated method removal

* Reverted deprecated method removal

* WIP

* Display context based errors on cart and checkout for allowed emails coupons.

* Small code fixes.

* Removed coupon_error_code from api response.

* Tweaks and used 'details' on the API response

* Fixed indent.

* Set coupon errors using the validation store rather than local state

* Revert import to original state.

* Updated tests.

* Updated tests.

* Simplified comments

* Added testing for Cart page

* Lint fixes

---------

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2024-03-20 10:19:06 +00:00
Karol Manijak 6cb52c00c0
Product Collection: add e2e tests with all product elements included (#45623)
* Prepare test cases

* Shorten out the test description

* Add first test in a post with dummy expect

* Verify all content is displayed

* Add the test in Product Archive and Home Page

* Add changelog

* Add tag to Beanie product

* Switch to Beanie which is on sale to verify on sale badge

* Add comments to explain the expects

* Adjust the expected content

* Switch to lower case in expect

* Switch from woocommerce/product-summary to core/post-excerpt

* Adjust products.sh

* Improve method waiting for products to show so it;'s deterministic

* Refresh locators in template

* Remove unnecessary check

* Eslint disable: expects are extracted to function so disable eslint compaining there's no expect

* Adjust other test after amending products setup

* Change the verify happening in a wrong place

* Tests adjustments

* Revert Blog Home template before performing a test

* Fix other tests
2024-03-19 08:59:58 +01:00
Roy Ho 72f5db9b6d
Change checkbox label to be inline-flex to limit the width to the content (#45603)
* Change checkbox label to be inline-flex to limit the width to the content

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Fix changelog entry

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-18 13:05:49 -07:00
Karol Manijak 5a54dd6527
Product Collection: Disable client side navigation if blocks incompatible with Interactivity API are detected (#45435)
* Add dummy Force Page Reload control to Inspector Advanced Control

* Add enhancedPagination attribute that decides if client side navigation is enabled

* Consume the enhancedPagination attribute

* Force client side navigation when incompatible blocks detected

* Dummy util to detect incompatible blocks

* Detect incompatible blocks in the Editor

* Switch to WordPress Interactivity package in Product Collection

* Add initial implementation of the incompatible blocks detection in frontend

* Remove leftover

* Revert to using internal version of interactivity API

* There's no Interactivity store config available in the internal Interactivity implementation so remove it

* Disable client side navigation if the incompatible block is detected

* Add default attribute value

* Switch from enmhancedPagination attribute to forcePageReload

* Fixed some misclicked line order change

* Switch from enhancedPagination to forcePageReload in PHP code

* Apply the correct filter

* Fix the incorrect condition to detect incompatible block

* Initial implementation of orange dot to bring attention

* Cleanup

* Remove the orange dot indicator

* Refactor checking for unsupported blocks

* Add changelog

* Fix PHP lint errors

* Bring back empty line at the end of pnpm-lock

* Bring pnpm-lock.yaml file to original state

* Fix incorrect function call

* Add visibility description to function

* Switch private method to public

* More linted fixes
2024-03-18 08:24:03 +01:00
Alexandre Lara 21f2a15e97
Product Filter: Price (Beta) block - Disable block interactions within the editor (#45602)
* Disable block interactions within the editor

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 17:18:25 -03:00
Alexandre Lara 85ec4a8cc1
Product Filter: Attribute (Beta) block - Fix block preview (#45558)
* Pass isPreview prop to inner blocks of the Product Filter block

* Add logic to render preview block when in Preview mode

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 16:27:01 -03:00
Bart Kalisz 1c1dc10958
Blocks E2E: Fix guest user handling in checkout tests (#45624) 2024-03-15 17:23:19 +00:00
Christopher Allford 23a148aa18
Added Result Count Client Navigation (#45556)
Since the product collection block uses the interactivity router,
it reloads the page in the background and replaces sections
with a `data-wc-navigation-id` set. This adds the attribute
to the count block so that it can also live reload regardless
of where it is in the tree.
2024-03-14 09:48:02 -07:00
Thomas Roberts 5cbb0ad5bf
[Experimental] Add E2E tests for Additional Checkout Fields (#43836)
* Add additional-checkout-fields-test-helper wp-env plugin

* Ensure Checkout page waits for email to be visible before filling

* Handle additional fields in checkout page utils

* Add test for filling additional checkout fields

* Add additional check for gov-id validation

* Close context used for plugin-checking

* Update types for additional fields to be key/value objects

* Check billing gov-id is different to shipping one

* Move additional fields plugin to inline with checkout tests

* Use additional fields plugin from local dir

* Await email input to check Checkout block is loaded

* Add test to verify error message shows when leaving a field blank

* Update comment

* Add test for checking/unchecking checkboxes

* Update check in additional field test plugin

* Change fields multiple times in one test

* Add server-side validation tests

* Get exact matches for checkout form fields

* Remove unnecessarily translated strings

* update hook in test plugin to compare to confirmation gov id

* Fill in gov ID confirmation field

* Register a field of each type in each location

* Don't validate field unless both are filled

* Fill additional fields and check their values

* Fill additional fields

* Check select values in order confirmation

* Change the values of all field types multiple times

* Make checkout wait until not calculating before submitting

* Update tests to use all additional field types

* Blur after editing select box

* Add customer area checks

* Check shipping isn't calculating before submitting

* Add merchant-side tests for additional checkout fields

* Ensure customer data is done updating before submitting

* use waitForFunction to check for updating shipping

* Add changelog

* Ensure fields are blurred before pressing button

* Update validation error check

* Add test for logged out shopper

* make specific function to wait for checkout to be finished updating

* Add test to ensure fields are saved across orders

* Add sanitize and validate callbacks to gov id fields

* Make purchase type select field required

* Add sanitization test

* Use experimental function in test plugin

* Add standalone sanitization filter test

* Update testing plugin to use new and renamed filters

* Fix typo

* Move empty value test to logged out shopper block and check empty val

* Update tests to include tests for new validation/sanitization filters

* Add verifyAdditionalFieldsDetails function to checkout page

* Use new verifyAdditionalFieldsDetails function to improve readability

* Update second test to use new function to improve readability

* Update third test to improve readability

* Update fourth function to improve readability

* Update fourth test to improve readability

* Update guest shopper test to be more readable

* Update helper function to only return value not assert

* Remove check causing test to fail in CI

* Make check for guest shopper same as logged in

* Move guest shopper tests to their own file

* Ensure unchecking checkbox works OK
2024-03-14 13:39:30 +01:00
Niels Lange a7383579be
Allow usage of block notice templates when using classic themes (#45164)
* Allow block notice templates in classic themes

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Fix e2e constants file

* Improve inline comments

* Add filter and enhance e2e tests

* Adjust test names

* Adress PHP lint errors

* Adress PHP lint errors

* Adress PHP lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-14 19:33:33 +07:00
Tung Du 50beebe3e5
[Experimental] Display the formatted price in price filter text input fields (#45409)
* fix: display the formatted price in price filter text input fields

* chore: changelog

* Display formatted price within the Product Filter: Price input fields

---------

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
2024-03-13 09:47:36 -03:00
Niels Lange 6b07ca44f5
Add totalValue filter (#45170)
* Add totalValue filter

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Remove nowrap to prevent text overflow

* Start docs for ‘totalValue’ filter

* Fix *.md lint issues

* Ignore .md lint errors for now

* Update code example and add screenshots

* Fix failing JS unit tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-13 00:42:24 +07:00
Sam Seay 4cd89e4beb
Blocks Playwright tests: Add tests for the new attribute filter block (#45333) 2024-03-13 00:15:05 +13:00
Alexandre Lara b162c9fab0
[Experimental] Product Filter: Price (Beta) block: Prevent invalid price range selection in Product Filter Price block (#45403)
* Prevent invalid price range selection in Product Filter Price block

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-08 16:08:20 -03:00
Bhupesh Mishra 319408bb67
changed filter by attribute filter options order (#44799)
* changed filter by attribute filter options order

In filter by attribute, order of the filter conditions "ALL" and "ANY" reversed as requested.

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-08 13:45:53 +01:00
Karol Manijak a3811fa007
Product Collection: Set initial value of Created filter for New Arrivals collection (#45355)
* Set initial vlaue of Created filter for New Arrivals collection

* Add changelog

* Remove a check for products in tests as they may not really be displayed

* Adjust the New Arrivals test

* Adjust the tests logic after the change

* Bring back previous formatting

* Bring back function closure removed by mistake
2024-03-08 08:33:21 +01:00
Niels Lange ba85f36219
Unskip Mini Cart i18n test (#45371)
* Unskip Mini Cart i18n test

* Install language packs before each i18n-related test suite

* Delete translations.sh

* Add changelog

* Replace deprecated WP-CLI command

* Remove obsolete WP-CLI command
2024-03-08 12:39:22 +07:00
Bart Kalisz 8ff89fa6db
Blocks E2E: Do not report slow tests (#45375) 2024-03-07 12:57:48 +01:00
Alexandre Lara 8163b83bf7
Price Filter: Fix styling issue when Inline input fields is enabled (#45197)
* Fix styling issue in the Editor when Inline input fields is enabled

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Fix styling issue on the Frontend when Inline input fields is enabled

* Fix css lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-06 17:10:12 -03:00
Alexandre Lara be9b3ab4f0
Filter blocks: Add block preview (#45258)
* Add block preview to filter blocks

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-06 16:55:04 -03:00
Luigi Teschio 26c19fa1f8
Revert "[e2e tests blocks] Configure the number of shards for each ma… (#45324)
* Revert "[e2e tests blocks] Configure the number of shards for each matrix project (#45212)"

This reverts commit 72789656cf.

* trigger CI

* run E2E tests

* restore ci.yml file

* trigger E2E tests

* disable E2E tests about mini cart translations

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Fix the setupAndFetchQueryContextURL utility

* add comment

* Remove obsolete test

* Blocks E2E: Update timeout values (#45353)

Set timeout values same as core

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
2024-03-06 16:52:37 +00:00
Christopher Allford e2ed2a9fdb
Removed Product Collection Unique ID (#44625)
With the availability of other unique characteristics
for identifying collection blocks, it is no longer necessary
to keep this attribute. Since it has not been used it is safe
to remove it without a deprecation cycle.
2024-03-05 14:08:17 -08:00
Seghir Nadir 9f7a6779f6
Fix styling for select in Site Editor (#45252)
* Fix styling for select in Site Editor

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-05 14:49:33 +01:00
Tung Du 91272dde6f
[Experimental] Fix: regression introduced in #44757 that breaks the inspector settings of the new attribute filter block (#45276)
Fix: regression introduced in #44757 that breaks the inspector settings of the new attribute filter block
2024-03-05 11:09:36 +07:00
Ron Rennick 4fd7273088
More block package cleanup (#45256)
remove nvmrc, add to gitignore

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-03-04 10:27:58 -08:00
Seghir Nadir 914c801f52
Link to discussion in custom fields API (#45193)
* Link to discussion in custom fields API

This adds the discussion link in custom fields docs.

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-01 16:44:34 +01:00
Ron Rennick ccef3d22f8
clear out unneeded github files from block folder (#44895)
* clear out unneeded github files from block folder

* copy changelog to woocommerce folder

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-02-29 13:30:56 -04:00
Sam Seay 49dbebfd0f
Refactor review blocks e2e tests to remove redundant html templates and add more scenarios (#44880) 2024-02-29 15:43:59 +13:00
Niels Lange a668cf942e
Add e2e tests for notice templates (#44612)
* Add e2e tests for notice templates

* Add changelog entry

* Minor refactor

* Remove child theme zip files

* Generate child theme zip files on the fly
2024-02-27 13:46:31 +01:00
Alexandre Lara 9d57f891eb
With Product Variations HOC > Convert to TypeScript (#44785)
* Add with-product-variations.tsx

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add types for ProductVariationItem

* Fix ESLint errors

* Remove JS file

* Replace Product with ProductResponseItem interface

Initially, a Product interface was created to add the required types; however,
it was pointed out that the @woocommerce/types alias already provided an interface
for products (the ProductResponseItem interface).

* Remove returning types definition

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-26 10:26:21 -03:00
Nitish Upadhyay-1176 9a046ea285
Update collections.md (#45118)
* Update collections.md

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-26 13:36:05 +01:00
Karol Manijak 4b69fc7b84
Improve the Compatibility Layer docs to minimise confusion (#44924)
* Improve the Compatibility Layer docs to avoid confusion

* Add changelog

* Add punctuation
2024-02-26 09:03:03 +01:00
Bart Kalisz 8b4bacc2bf
[E2E] Refactor blocks global setup (#44843) 2024-02-23 11:17:46 +01:00
Alexandre Lara 56e6772af5
Reviews by Product > No Reviews Placeholder: Refactor component from JavaScript to TypeScript (#44664)
* Refactor No Reviews Placeholder component from JavaScript to TypeScript

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Fix file import

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-22 22:23:53 -03:00
Adrian Moldovan 54ad039310
Remove mariaDB image tag workaround (#44881)
* Remove sed commands in postinstall

* Add changelog
2024-02-22 09:53:58 -08:00
Adrian Moldovan 4b2f949231
Fix pnpm postinstall temp workaround (#44853) 2024-02-21 10:32:24 -06:00
Adrian Moldovan 34a71f3963
Force mariadb docker image tag (#44841) 2024-02-21 16:06:44 +02:00
Bart Kalisz 045df6f3e7
[E2E] Stabilize Product Collection "on sale" tests (#44796) 2024-02-21 13:44:07 +01:00
Sam Seay ccb1fb3d76
[Experimental] Fix a bug in new attribute filter where we didn't set the attribute from content panel (#44757) 2024-02-21 19:53:15 +13:00
Bart Kalisz b8d2136aa2
[E2E] Setup block theme without opening browser (#44702) 2024-02-20 16:52:53 +01:00