Commit Graph

5920 Commits

Author SHA1 Message Date
Mike Jolley 3fed0831f8 Check endpoint was preloaded before returning it. (https://github.com/woocommerce/woocommerce-blocks/pull/11128) 2023-10-05 15:43:29 +00:00
Luigi Teschio 74c6287485 return (https://github.com/woocommerce/woocommerce-blocks/pull/11143) 2023-10-05 14:14:54 +00:00
Alba Rincón 592db8df43 Store Customization > Homepage Template 3: Review layout and spacing in between patterns (https://github.com/woocommerce/woocommerce-blocks/pull/11131)
* Add padding and headers to patterns

* Fix centering when GB enabled
2023-10-05 13:49:26 +02:00
Alba Rincón 4716d7483e Store Customization > Homepage Template 2: Review layout and spacing in between patterns (https://github.com/woocommerce/woocommerce-blocks/pull/11129)
* Add titles to patterns and set the aligment to Wide

* Add paddings

* Replace product query patterns with product collection ones

* Fix pattern title
2023-10-05 13:14:53 +02:00
Mike Jolley eb383203f0 validateInput when the value in the store changes (https://github.com/woocommerce/woocommerce-blocks/pull/11108) 2023-10-05 10:27:10 +01:00
Patricia Hillebrandt 04e298050c Store Customization > Replace patterns based on the Products (Beta) block with an equivalent based on the Product Collection block (https://github.com/woocommerce/woocommerce-blocks/pull/11134)
* Introduce the new Product Collection 4 Columns pattern as a replacement for 1:1 Image 4-Column Product Row

* Introduce the new Product Collection 5 Columns pattern as a replacement for Minimal 5-Column Product Row

* Update the slug for the Product Collection 5 Columns pattern

* Introduce the new Product Collection 3 Columns pattern as a replacement for 3-Column Product Row

* Ditch the block types from the docblock

* Introduce the new Product Collection: Featured Products 5 Columns pattern as a replacement for Featured Products 5-Item Grid

* Update the patterns dictionary.

* remove block types from the Product Collection: Featured Products 5 Columns pattern

* Remove outdated patterns.

* Remove unnecessary queryId
2023-10-05 08:36:18 +00:00
Tom Cafferkey 661b7031dd Store Customization > Add default image to Just Arrived pattern (https://github.com/woocommerce/woocommerce-blocks/pull/11130) 2023-10-05 09:05:59 +01:00
Luigi Teschio ad80598ab8 Pattern: fetch product id on the JS side (https://github.com/woocommerce/woocommerce-blocks/pull/11138)
* Pattern: fetch product id on the frontend side

* fix TS type
2023-10-05 07:30:50 +00:00
Alexandre Lara dec4e4fc75 Product Gallery > Pager block: Add E2E tests for the block (https://github.com/woocommerce/woocommerce-blocks/pull/11001)
* Add e2e tests for Pager block

* Fix e2e tests for Product Gallery Pager

* Fix e2e tests
2023-10-04 19:11:34 +02:00
Alba Rincón 22fd4512d8 Remove object cast (https://github.com/woocommerce/woocommerce-blocks/pull/11082) 2023-10-04 14:55:25 +02:00
Patricia Hillebrandt 4d82186495 Store Customization > Wireframe and adjust width for the Just Arrived Full Hero pattern (https://github.com/woocommerce/woocommerce-blocks/pull/11115)
* Update the width; Add the button text to the patterns dictionary; adjust the width to wide.

* Remove unnecessary space before the title.
2023-10-04 12:47:19 +00:00
Patricia Hillebrandt 8f421d551e Store Customization > Add the Featured Category Cover Image pattern (https://github.com/woocommerce/woocommerce-blocks/pull/11109)
* Reintroduce the Featured Category Cover Image pattern.

* Update styles for the pattern to match the new ones.

* Update the patterns dictionary to include the Featured Category Cover Image.

* Remove bold from h3 tag

* remove the fonts customization for the button

* Drop the medium fontsize for the paragraph.
2023-10-04 11:17:28 +00:00
Tom Cafferkey 9805a665ab Remove opinionated styles from the Hero Product 3 Split pattern (https://github.com/woocommerce/woocommerce-blocks/pull/11110) 2023-10-04 12:03:52 +01:00
Luigi Teschio 9dd8dd321f Product Button: use setTimeout when requestIdleCallback isn't available (https://github.com/woocommerce/woocommerce-blocks/pull/11125) 2023-10-04 10:58:23 +02:00
Luigi Teschio c47babe628 Product Gallery: fix 'Block woocommerce/product-gallery-large-image is already registered' error (https://github.com/woocommerce/woocommerce-blocks/pull/11124) 2023-10-04 10:57:45 +02:00
Raluca Stan b9f4044361 Update payment-method-integration.md 2023-10-03 11:58:07 +02:00
dependabot[bot] 7a761f5633 Bump @babel/cli from 7.22.9 to 7.23.0 (https://github.com/woocommerce/woocommerce-blocks/pull/11093)
Bumps [@babel/cli](https://github.com/babel/babel/tree/HEAD/packages/babel-cli) from 7.22.9 to 7.23.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.0/packages/babel-cli)

---
updated-dependencies:
- dependency-name: "@babel/cli"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 16:48:24 +00:00
Luigi Teschio 29fe7cdce0 Product Gallery: Polish Gallery in full view mode (https://github.com/woocommerce/woocommerce-blocks/pull/10947)
* Product Gallery: add support for On Sale Badge Block

* add align support

* Add E2E tests

* set margin via Block Styles

* disable experimental flag

* add next previous block

* restore support file

* fix TS error

* fix layout

* change product

* change product

* Product Gallert Block: Add zoom on hover

* set to true by default

* remove block is already registered error

* remove unecessary await

* Improve zoom logic

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

* Product Gallery Full view mode: Add the logic to render the dedicated template

* use template-part instead template

* add E2E tests

* update selectors

* add feature flag product gallery template part

* fix E2E tests

* remove not necessary file

* polish the dialog

* fix: dialog show always the selected product

* fix: not open the dialog when the user click on icon

* rename handleClick to handleCloseButtonClick

* improve style

* fix overlay css

* fix registration

* improve logic

* improve default template

---------

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
2023-10-02 14:36:48 +02:00
Niels Lange 60e5943c53 Update the sidebar notice we show for incompatible extensions (https://github.com/woocommerce/woocommerce-blocks/pull/10877)
* Adkust text of sidebar notice

* Adjust text of sidebar notice

* Rename folder to “incompatible-extension-notice”

* Rename main component and interface

* Rename constants

* Add new files for splitting logic

* WIP: Semi-hardcoded solution

* WIP: Add new data store

* Fetch incompatible extensions dynamically

* Fix broken dismiss notice functionality

* Minor refactor

* Remove data store

* Remove console.log

* Remove obsolete data store fragment

* Update package-lock.json and composer.lock

* Change wording from “might be” to “may be”

* Show single incompatible extension within notice instead of as list

* Fix *.md linting error
2023-09-29 17:39:57 +07:00
Daniel Dudzic 0406dfd462 Product Gallery: Remove additional wrapper (https://github.com/woocommerce/woocommerce-blocks/pull/11031) 2023-09-29 08:01:20 +00:00
Niels Lange 7289bbb01f Update shipping.md 2023-09-29 14:43:37 +07:00
Alexandre Lara 218e47f37a Product Gallery > Pager block: Fix classname to adhere to the Coding Guidelines (https://github.com/woocommerce/woocommerce-blocks/pull/11035)
* Improve regex for directive parsing

* Fix classname when page is selected and active

* Remove unnecessary commit
2023-09-29 09:42:05 +02:00
larsenlarsson 76752dfedb woocommerce/woocommerce-blocks#11053 added fee id (https://github.com/woocommerce/woocommerce-blocks/pull/11054) 2023-09-29 13:34:55 +07:00
dependabot[bot] a0e246eb52 Bump phpunit/php-code-coverage from 9.2.27 to 9.2.29 (https://github.com/woocommerce/woocommerce-blocks/pull/11044)
Bumps [phpunit/php-code-coverage](https://github.com/sebastianbergmann/php-code-coverage) from 9.2.27 to 9.2.29.
- [Changelog](https://github.com/sebastianbergmann/php-code-coverage/blob/9.2.29/ChangeLog-9.2.md)
- [Commits](https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.27...9.2.29)

---
updated-dependencies:
- dependency-name: phpunit/php-code-coverage
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-28 20:21:18 -07:00
dependabot[bot] f3ce00a709 Bump automattic/jetpack-config from 1.15.3 to 1.15.4 (https://github.com/woocommerce/woocommerce-blocks/pull/11047)
Bumps [automattic/jetpack-config](https://github.com/Automattic/jetpack-config) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/Automattic/jetpack-config/releases)
- [Changelog](https://github.com/Automattic/jetpack-config/blob/trunk/CHANGELOG.md)
- [Commits](https://github.com/Automattic/jetpack-config/compare/v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: automattic/jetpack-config
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-28 20:10:43 -07:00
Saad Tarhi be2d0e8a43 Fix failing Playwright E2E tests (https://github.com/woocommerce/woocommerce-blocks/pull/11055)
* Revert woocommerce/woocommerce-blocks#11029 to fix failing E2E tests

* Revert woocommerce/woocommerce-blocks#10032

* Reapply changes from woocommerce/woocommerce-blocks#10032

* Skip failing E2E test

* Skip Price Filter Block failing tests

* Apply back changes from woocommerce/woocommerce-blocks#11029

* Fix Checkout template E2E tests
2023-09-28 22:02:02 +01:00
roykho af562369f0 Add 11.1.2 version infomation 2023-09-28 12:53:01 -07:00
Saad Tarhi 6e9ad08124 Fix Markdown linting error 2023-09-28 02:16:22 +01:00
Tarun Vijwani 77a3b12842 Update changelog, testing notes and version number post 11.2.0 release.
- Add change log of 11.2.0 release
- Add testing notes of 11.2.0 release
- Update version number to 11.3.0-dev
2023-09-27 22:25:04 +04:00
Niels Lange f73edcc8d2 Update coupons.md 2023-09-27 23:15:48 +07:00
Mike Jolley 241984a265 Fix downloads block visibility (https://github.com/woocommerce/woocommerce-blocks/pull/11056) 2023-09-27 11:56:24 +00:00
Niels Lange 7f7ff60406 Update cross-browser.md 2023-09-27 11:13:04 +07:00
Daniel W. Robert e3ccb230d1 Update escaping for Featured Item product image 2023-09-26 16:17:21 +02:00
dependabot[bot] 56a037a8c8 Bump @wordpress/base-styles from 4.14.0 to 4.33.0 (https://github.com/woocommerce/woocommerce-blocks/pull/11049)
Bumps [@wordpress/base-styles](https://github.com/WordPress/gutenberg/tree/HEAD/packages/base-styles) from 4.14.0 to 4.33.0.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/base-styles/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/base-styles@4.33.0/packages/base-styles)

---
updated-dependencies:
- dependency-name: "@wordpress/base-styles"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-26 05:43:52 -07:00
dependabot[bot] 4cb54370e2 Bump @playwright/test from 1.32.3 to 1.38.1 (https://github.com/woocommerce/woocommerce-blocks/pull/11050)
Bumps [@playwright/test](https://github.com/Microsoft/playwright) from 1.32.3 to 1.38.1.
- [Release notes](https://github.com/Microsoft/playwright/releases)
- [Commits](https://github.com/Microsoft/playwright/compare/v1.32.3...v1.38.1)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-25 14:41:14 -07:00
dependabot[bot] 1093ca6aef Bump eslint-plugin-import from 2.26.0 to 2.28.1 (https://github.com/woocommerce/woocommerce-blocks/pull/10883)
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.26.0 to 2.28.1.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.26.0...v2.28.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-25 13:39:28 -07:00
Hritik Chaudhary 91c5ff83ca Remove data attributes from being saved in html of All products block (https://github.com/woocommerce/woocommerce-blocks/pull/10032)
* Remove data attributes from being saved in html of All products block

* added old save in deprecated

* Addressed review comments

---------

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Roy Ho <roykho77@gmail.com>
2023-09-25 07:57:59 -07:00
Hsing-yu Flowers 72ebfbf3dd Remove order and checkout order endpoints experimental flag (https://github.com/woocommerce/woocommerce-blocks/pull/11022)
* Remove order and checkout order endpoint feature flag

* Remove Order Route and Checkout Order Route from experimental flag list

* Remove order and checkout order endpoint feature flag

* Remove Order Route and Checkout Order Route from experimental flag list

* Update e2e tests selector

* Revert "Update e2e tests selector"

This reverts commit 2a6b561a883c701be1da2ffc39200cd19a85f1e3.

---------

Co-authored-by: Niels Lange <info@nielslange.de>
2023-09-25 21:37:22 +07:00
Mike Jolley 963be4ea7a Make default heading level for cart and checkout templates a h1 (https://github.com/woocommerce/woocommerce-blocks/pull/11029) 2023-09-25 11:00:58 +01:00
Alba Rincón e2d5175c65 Ensure the content of the patterns is also AI-generated (https://github.com/woocommerce/woocommerce-blocks/pull/10997)
* Fix bug, it was always returning {'ai_content_generated':true} even in case of error

* Refactor PatternImages to extract static helper method to PatternImagesHelper and rename to PatternUpdater

* Fix use on patterns

* Update the pattern content using AI as well

* Make API requests in parallel

* Fix prompt and update patterns with generated content

* Return default content if patterns content is empty

* Fix patterns and failed responses

* Add timeout to the request multiple function

* Replace square by landscape

* Remove todo

* Return error on content update error

* Ensure the pattern content exists within the wc_blocks_patterns_content option: if it doesn't exist, fetch the default content from the default dictionary instead.

---------

Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
2023-09-25 09:48:52 +00:00
Alexandre Lara f4424f541c Improve regex for directive parsing (https://github.com/woocommerce/woocommerce-blocks/pull/11034) 2023-09-22 18:26:36 -03:00
Daniel Dudzic b6d374a275 Product Gallery Pager: Remove the Pager markup if there's only one image (https://github.com/woocommerce/woocommerce-blocks/pull/10998)
* Product Gallery Pager: Hide the Pager if there's only one image in the gallery

* Product Gallery Pager: Add an empty return
2023-09-22 19:34:16 +00:00
Daniel Dudzic 0bab8f2067 Product Gallery: Add support for custom wrapper class parameter in the get_product_gallery_images() function. Fix the Product Gallery Thumbnails on click. (https://github.com/woocommerce/woocommerce-blocks/pull/11032) 2023-09-22 21:04:01 +02:00
Saad Tarhi 13024c88e6 Fix crash in WooExpress Cart & Checkout Editor (https://github.com/woocommerce/woocommerce-blocks/pull/11024) 2023-09-22 19:10:50 +01:00
Daniel Dudzic a7b5812703 Product Gallery Large Image: Add wrapper to fix zoom (https://github.com/woocommerce/woocommerce-blocks/pull/11023)
* Product Gallery Large Image: Add wrapper to fix zoom

* Product Gallery: Fix E2E test
2023-09-22 13:48:51 +02:00
Karol Manijak 25bac5f030 Add condition to register blocks and variation in single product temp… (https://github.com/woocommerce/woocommerce-blocks/pull/10978)
* Add condition to register blocks and variation in single product template

* Improve the fix by providing default ancestor value to block registered for single product

* add E2E test

* add insert block

---------

Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2023-09-22 08:27:12 +02:00
Alexandre Lara f8fcc41c5a Product Gallery > Pager block: Add support to interactivity API (https://github.com/woocommerce/woocommerce-blocks/pull/10736)
* Add interactivity API to the Pager block

* Replace Large Image when clicking on page

* Fix php cs errors

* Fix php cs errors

* Fix php cs errors

* fix php cs errors

* Remove unnecessary code and fix block classes

* Fix error when clicking on page in Pager block

* Fix php cs errors

* Fix styles for the block

* Fix styles and php cs errors
2023-09-21 16:35:25 -03:00
Tom Cafferkey c60e6d838b BlockTemplateController: Remove unncessary PHP variable (https://github.com/woocommerce/woocommerce-blocks/pull/11006) 2023-09-21 12:54:42 +01:00
Daniel Dudzic 8b470177f4 Product Gallery: CSS styling tightening up (https://github.com/woocommerce/woocommerce-blocks/pull/10867)
* Product Gallery: Fix conflicts between block settings and CSS

* Product Gallery: Final CSS polishes

* Product Gallery: Minor CSS refactor

* Product Gallery: Revert the minor css refactor

* add custom class on the main div

* Product Gallery: Combine inner block styles and optimize them

* Product Gallery Inner Blocks: Remove imports to no longer existing stylesheet files

* Product Gallery: Change all references from wp-block to wc-block

* Product Gallery Inner Blocks: Remove loading of non-existent inner blocks stylesheet files

* Product Gallery: Add additional class to ensure correct width for single product gallery despite of the Next/Previous mode selected

* Product Gallery: Add final polishing

* fix zoom

* Product Gallery Thumbnails: Fix css

* Product Gallery Large Image Next Previous Buttons: Skip failing tests

---------

Co-authored-by: Luigi <gigitux@gmail.com>
2023-09-21 11:31:16 +00:00
Alexandre Lara 3ecd34e01a Upgrade webpack to version 5 (https://github.com/woocommerce/woocommerce-blocks/pull/8013)
* Upgrade terser-webpack-plugin to version 4.2.3

* Upgrade webpack-bundle-analyzer to 4.7.0

* Upgrade to Webpack version 5

* Upgrade @wordpress/dependency-extraction-webpack-plugin to 4.6.0

* Upgrade dependency copy-webpack-plugin to version 11.0.0

* Upgrade dependency terser-webpack-plugin to version 5.3.6

* Replace webpack-rtl-plugin with the new @automattic/webpack-rtl-plugin

* Replace module.issuer with the new ModuleGraph API

There is a warning appearing in the console when running the application. This is due to the fact that the module.issuer has been deprecated on Webpack 5 and replaced with the new ModuleGraph API. This commit replaces the deprecated API with the new one.

* Upgrade babel and babel plugins to latest version

* Replace jsonpFunction with the new uniqueName property

Add a unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals. It defaults to output.library name or the package name from package.json in the context, if both aren't found, it is set to an ''.

* Replace cacheDirectory inline configuration with options.cacheDirectory

* Upgrade @wordpress/e2e-tests dependency to version 5.6.0

* Remove babel-plugin-transform-react-jsx dependency

Remove babel-plugin-transform-react-jsx dependency because it is already included in @wordpress/babel-preset-default

* Remove unnecessary Babel dependencies

Remove some unnecessary babel dependencies that are already included in the @babel/preset-env package.

* Upgrade puppeteer dependency to version 16.2.0

* Remove caret from package.json dependencies

* Fix Storybook build error

This commit fixes the Storybook build error that was being caused because of Storybook by default uses Webpack 4, but since we are currently upgrading our webpack to version 5, we need to install some required dependencies and also explicitly tell Storybook to use Webpack 5.

* Fix package-lock.json after merging with trunk

* Add own webpack-rtl-plugin implementation to the project

Before upgrading Webpack to version 5, we were using the original `webpack-rtl-plugin` released by Romain Berger; unfortunately, this plugin is not compatible with Webpack 5, so we replaced it with `@automattic/webpack-rtl-plugin`. The problem is that `@automattic/webpack-rtl-plugin` by default generates files with the '.rtl.css' suffix and does not provide a way to change that.

This commit adds our own implementation of the `webpack-rtl-plugin` (adapted from `@automattic/webpack-rtl-plugin`) that is compatible with Webpack 5 and allows us to change the suffix of the generated files to follow the recommended way defined by Wordpress (https://codex.wordpress.org/Right-to-Left_Language_Support)

* Change conditional clause to be multiline

* Fix package-lock.json after merge with trunk

* Fix package-lock.json after merge with trunk

* Rename files to fix ESLint errors

This commit renames files that have the .js extension but contain JSX code. This is causing ESLint to throw errors because by default our Eslint configuration expects only files with the .jsx extension to contain JSX code.

* Fix package-lock.json file

* Add is-plain-obj module to the transformIgnorePatterns of jest config

* Update package-lock.json

* Fix package-lock.json

* Upgrade @wordpress/i18n dependency to version 4.31.0

* Update package-lock.json

* Update composer lock file

* Fix Webpack config for Webpack 5

* Add the package-lock.json

* Remove unsupported config from webpack

* Fix error with Webpack build

* Add wait for network idle to the tests

* Attempt to fix e2e test

* Restore promise.all

* Upgrade puppeteer to v17.1.3

* Upgrade expect-puppeteer

* Update expect-puppeteer

* Downgrade expect-puppeteer

* Revert "Upgrade puppeteer to v17.1.3"

This reverts commit 61ed52a56f131961f3970b6fb22cdd8b540bada3.

* Upgrade Puppeteer to version 17.1.3

* Fix executionContext.frame is not a function error

* Fix e2e tests

* Remove isExperimentalBuild from Product Gallery inner blocks

* Upgrade Webpack and Webpack-cli to latest version

* Upgrade postcss and mini-css plugins

* Fix error with mini-cart block

* Fix styling error with filter blocks

* Fix issue when running unit tests

* Fix storybook script not loading

* Fix a11y issue in Storybook

* Fix error when multiple isExperimentalBuild was being used

* Prevent error when layout is not present in the attributes object

* Update `chunkIds` to `named` in Webpack

* Add cache groups to the Webpack configs
2023-09-20 17:31:52 -03:00