Commit Graph

1464 Commits

Author SHA1 Message Date
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
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
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
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
Sam Seay 5ecea1b8c2
Support testing many variants of a block at runtime via dynamically generated templates (#44223) 2024-02-17 01:00:36 +13:00
Christopher Allford 8b4efc9c03
Added Missing Blocks Linting Change Trigger (#44233)
* Added Missing LInting Changes

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-02-08 13:48:03 -08:00
Christopher Allford db8da8d712
Properly Configured Wireit Production Builds (#43716) 2024-01-22 10:13:45 -08:00
Albert Juhé Lluveras 6c3f8cb6fb
Add e2e tests to verify block templates can be customized if the theme has its own custom templates (#43650)
* Update commands to run e2e tests

* Capitalize Product Catalog template name

* Create tests with block theme with templates

* Create Block Theme with Templates test environment

* Update classic theme commands

* Code cleanup

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

* Code cleanup (II)

* Add config to blocks-playwright.yml and remove unnecesssary .github/workflows/playwright.yml file

* Remove unnecessary imports from product-catalog-template.block_theme_with_templates.spec.ts

* Update blocks e2e commands to pnpm

* Replace hardcoded strings with a variable

* Unify all 'block theme with templates' tests in a parameterized test

* Create a testData object for the Mini-Cart template part test

* Fix some code styling issues

* Create a testData object for the Mini-Cart template part test (II)

* Remove duplicate userText variable

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 11:39:24 +01:00
Manish Menaria 8c284a5074
[Product Collection] Add unique ID attribute (#43314)
* Add unique ID attribute to Product Collection block

In this update, we introduced a unique identifier for each instance of the Product Collection block. This change involves several key modifications:

1. **Block JSON Update**: Added a new `id` attribute in `block.json` to store the unique identifier for each block instance.

2. **Product Collection Content Update**: In `product-collection-content.tsx`, we utilized the `uuid` library to generate a unique ID. This is done in a `useEffect` hook, ensuring that each block instance receives a distinct ID upon initialization.

3. **Type Definitions**: The `ProductCollectionAttributes` interface in `types.ts` was updated to include the new `id` attribute, aligning with our enhanced data structure.

4. **Package Dependencies**: To support this feature, `@types/uuid` and `uuid` were added to `package.json`, ensuring we have the necessary tools for ID generation.

This enhancement is pivotal for uniquely identifying each Product Collection block, paving the way for more robust and individualized block handling in the future.

* Rename uniqueId to id

* Add lock file

* Add 'id' context to product collection and template

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

* Merge trunk with 42861-introduce-a-unique-identifier-for-each-product-collection-block

* Regenerate the lockfile

* Remove autogenerated change in plugins/woocommerce/package.json

* Regenerate lock file

* Rerun CI actions

* Delete pnpm-lock.yaml file & regenerate it using pnpm install command

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 15:30:57 +05:30
Christopher Allford 95bc1189e5
Update `wireit` & Optimize Builds (#43595)
This bumps the version to 0.14.3 so that we can take advantage of some
upstream improvements. It also makes some changes to the way our
builds and watches work to minimize the number of unnecessary
Node processes involved in the execution.
2024-01-15 14:06:55 -08:00
Christopher Allford 31c170f80c
Added Missing Lint Build (#43665)
Unfortunately, it looks like we need to build in order
to be able to lint. This makes sense since some
projects will lint imports from others that haven't
been built yet.
2024-01-15 12:30:54 -08:00
Christopher Allford 758df4854d
Use `ci-jobs` Utility For `ci.yml` Matrix (#43532)
This adds support for using the `pnpm utils ci-jobs` command in our `ci.yml` file. One of the bigger benefits to this change too is that we're now distributing a bundled version of the utils tool. This lets us run it without actually having to install the repo and will let us speed up any workflows that currently do.
2024-01-12 20:32:14 -08:00
Christopher Allford bf29119032
Updated PNPM to ^8.12.1 (#42860) 2023-12-18 20:31:49 +13:00
Jonathan Lane 1bf35ac737
Playwright test workflow migration from Blocks repo (#42804)
* First pass at Playwright test migration

* Set working directory

* Remove exec

* Configure the environment before testing

* Remove filter

* Update paths for tests

* Try explicitly stating working-directory

* Change tests directory

* Try running all tests

* Uncommented project

* Update commands to run tests

* Comment out env config

* Uncomment

* Changelog

* Set up multiple test configurations

* Update failing test

* Update paths for artifacts

* Update path to artifacts

* Path to results

* remove unnecessary file

* Skip translation E2E tests

Skipping translation tests until we fix the missing translations issues after we changed the domain to "woocommerce"

* Update the artifacts path

* Fix lint errors

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
2023-12-15 09:34:29 -08:00
Ron Rennick a2812bdb59
remove PHP related scripts from blocks package.json (#42722)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2023-12-12 13:46:53 -08:00
Christopher Allford 4c4e89bc98
Enhance Build Watching (#42712)
Similarly to `build:project`, a new `watch:build:project`
script will watch individual projects for changes. The
`watch:build` script has been updated so that it does
a deep watch in the same vein as `build`. We have also
hooked up tool-level watching for faster performance.
2023-12-12 12:43:48 -08:00
Christopher Allford 1c635cda6f
Optimized `wireit` Fingerprinting File Inputs (#42684)
Having an explicit `"files"` definition will allow us to fingerprint
dependencies in `wireit` more granularly. This avoids problems
that can be caused by different source files and directories that
trigger a rebuild in a dependee before a dependent finishes.
2023-12-11 16:21:35 -08:00
Christopher Allford 05d398c8d3 Fixed Blocks CSS Linting 2023-12-10 14:11:32 -08:00
Christopher Allford ea6a39dbc1 Fixed Blocks PNPM `run` & Env Var Usage 2023-12-10 12:44:44 -08:00
Christopher Allford 245fbadc51 Added Missing Blocks Build Output 2023-12-10 12:32:29 -08:00
Christopher Allford e580d27afd Added Missing Block Dependencies 2023-12-10 12:24:20 -08:00
Christopher Allford a8fd8fafa5 Applied Linting Fixes 2023-12-09 23:32:45 -08:00
Christopher Allford 87b5ee54eb Removed Blocks PHP Linting 2023-12-09 22:41:21 -08:00
Christopher Allford dc5aa18f35 Wireit Added: `@woocommerce/block-library` 2023-12-09 22:35:11 -08:00
Christopher Allford 403e2919ee Merge branch 'trunk' into refactor/task-infrastructure 2023-12-09 21:51:43 -08:00
Christopher Allford 0514069d7b Added Missing Blocks Dependencies 2023-12-09 18:14:26 -08:00
Christopher Allford df32d8e967 Added `wireit` Dependency
We're adding this to _every_ package since they have their own
configuration and scripts to run. This also keeps them
isolated so that they can operate independently.
2023-12-09 13:11:15 -08:00
Christopher Allford 3a88cc739a Updated Dependencies 2023-12-09 07:12:20 -08:00
Christopher Allford 8ae34f1f3e Excluded Blocks From Syncpack 2023-12-09 05:22:40 -08:00
Christopher Allford a59009dbec Removed Blocks NPM Hooks
Since we've pulled it into the monorepo these hooks don't need to
be here anymore.
2023-12-09 05:17:49 -08:00
dependabot[bot] fd8443cb80 Bump @wordpress/wordcount from 3.13.0 to 3.47.0 (https://github.com/woocommerce/woocommerce-blocks/pull/12094)
Bumps [@wordpress/wordcount](https://github.com/WordPress/gutenberg/tree/HEAD/packages/wordcount) from 3.13.0 to 3.47.0.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/wordcount/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/wordcount@3.47.0/packages/wordcount)

---
updated-dependencies:
- dependency-name: "@wordpress/wordcount"
  dependency-type: direct:production
  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-12-08 14:28:16 +00:00
Karol Manijak 4d72c559d3 Unify the @typescript-eslint/parser version with eslint-plugin and what's in Core (https://github.com/woocommerce/woocommerce-blocks/pull/12066) 2023-12-06 20:28:48 +07:00
Albert Juhé Lluveras 38fbb179d9 Update versions to 11.8.0-dev 2023-12-05 10:58:14 +01:00
Sam Seay c5ad636e35 Upgrade TypeScript to 5.3.2 (https://github.com/woocommerce/woocommerce-blocks/pull/11926)
* Also add skipLibCheck option to TS Config.
2023-12-05 18:17:04 +13:00
Paulo Arromba 9a63503008 Update/11.6.0 changelog and testing instructions (https://github.com/woocommerce/woocommerce-blocks/pull/11904)
* Updated changelog and added testing instructions

* Updated changelog.

* Updated versions.

* Updated tested up to

* Updated tested up to

* Uploaded testing zip

* Removed woocommerce/woocommerce-blocks#11287 from testing instructions

* Added testing instructions and changelog for woocommerce/woocommerce-blocks#11858

* Updated testing zip

* Testing instructions for woocommerce/woocommerce-blocks#11862 and woocommerce/woocommerce-blocks#11860

* Updated testing zip

* New testing zip with woocommerce/woocommerce-blocks#11872 🍒

* Updated versions to 11.7.0-dev

* Updated composer.lock
2023-11-22 15:19:17 +00:00
Luigi Teschio 3302b24313 Update @wordpress/e2e-test-utils-playwright package (https://github.com/woocommerce/woocommerce-blocks/pull/11866)
* update @wordpress/e2e-test-utils-playwright package

* don't update node version

* remove waitForSiteEditorFinishLoading function

* use visitSiteEditor util
2023-11-22 09:19:00 +01:00
Thomas Roberts 143f493097 Add Storybook entries for `TextInput`, `ValidatedTextInput`, and `ValidationInputError` (https://github.com/woocommerce/woocommerce-blocks/pull/11794) 2023-11-20 13:08:16 +00:00
dependabot[bot] 471b9a1b60 Bump @wordpress/icons from 6.1.1 to 9.36.0 (https://github.com/woocommerce/woocommerce-blocks/pull/11611)
* Bump @wordpress/icons from 6.1.1 to 9.36.0

Bumps [@wordpress/icons](https://github.com/WordPress/gutenberg/tree/HEAD/packages/icons) from 6.1.1 to 9.36.0.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/icons/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/icons@9.36.0/packages/icons)

---
updated-dependencies:
- dependency-name: "@wordpress/icons"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* Add sparkles icon to codebase

* Fix failing JS-unit tests

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
2023-11-16 17:40:53 +00:00
Alexandre Lara c8ef0fb3af Product Gallery block: Restrict block to be available only on the Single Product template or the Product Gallery template part (https://github.com/woocommerce/woocommerce-blocks/pull/11664)
* WIP: experimenting with strategy pattern for block registration

* Add TemplateChangeDetector to BlocksRegistrationManager

* Handle blocks registration

* Fix issue causing blocks to be registered multiple times

* Allow register/unregister blocks when on pages or posts

* Add BlockRegistrationStrategy logic

* Fix import error

* Add doc comments for BlockRegistrationManager class

* Add doc comments to TemplateChangeDetector class

* Fix eslint errors

* Import domReady from @wordpress/dom-ready

* Prevent error when using blockName for registerBlockType function

* Add e2e tests to check for block availability in different contexts

* Add e2e tests to cover block availability on different contexts
2023-11-16 15:03:58 +00:00
Thomas Roberts b2efba9fef Add `SortSelect` to Storybook (https://github.com/woocommerce/woocommerce-blocks/pull/11618) 2023-11-08 11:13:49 +00:00
Mike Jolley fa74c79a25 11.6.0-dev bump (https://github.com/woocommerce/woocommerce-blocks/pull/11653) 2023-11-07 14:05:16 +00:00
dependabot[bot] 7b146c018f Bump @wordpress/i18n from 4.31.0 to 4.45.0 (https://github.com/woocommerce/woocommerce-blocks/pull/11572)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-03 07:23:03 -07:00
dependabot[bot] ad489cff36 Bump @wordpress/element from 4.20.0 to 5.22.0 (https://github.com/woocommerce/woocommerce-blocks/pull/11548)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-03 05:28:53 -07:00
dependabot[bot] 8a946cfa08 Bump @wordpress/dependency-extraction-webpack-plugin from 4.6.0 to 4.28.0 (https://github.com/woocommerce/woocommerce-blocks/pull/11549)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-03 04:32:19 -07:00
Mike Jolley ba09750661 Add Notices Documentation to Storybook and upgrade to Storybook 7 (https://github.com/woocommerce/woocommerce-blocks/pull/11524)
* Rename stories

* MDX guidelines

* dedupe and fix dependencies

* Notice Banner Docs

* Fix root elements and icon library docs

* Fix ProductPrice stories

* Organise storybook structure

* Fix error placeholder story

* Snackbar docs

* Missing dotenv dependency

* Update storybook/main.js

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>

* Update assets/js/base/components/snackbar-list/docs/docs.mdx

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>

* Update assets/js/base/components/notice-banner/docs/docs.mdx

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>

* Update assets/js/base/components/snackbar-list/docs/docs.mdx

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>

* Update assets/js/base/components/snackbar-list/docs/docs.mdx

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>

* Update assets/js/base/components/snackbar-list/docs/docs.mdx

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>

* Update assets/js/base/components/snackbar-list/docs/docs.mdx

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>

* Update assets/js/base/components/snackbar-list/docs/docs.mdx

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>

* Update assets/js/base/components/snackbar-list/docs/docs.mdx

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>

* Update package lock

* update snaps

* fix json error check

---------

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2023-11-02 13:01:42 +00:00
dependabot[bot] 41e5ac31b1 Bump @wordpress/base-styles from 4.33.0 to 4.35.0 (https://github.com/woocommerce/woocommerce-blocks/pull/11499)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-01 13:42:52 -07:00
dependabot[bot] d7f079908f Bump fs-extra from 10.1.0 to 11.1.1 (https://github.com/woocommerce/woocommerce-blocks/pull/10498)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-01 12:07:51 -07:00
Alexandre Lara eed3c076e5 Playwright: Add eslint rule to prevent import `test` or `expect` from playwright library (https://github.com/woocommerce/woocommerce-blocks/pull/11475)
* Add eslint rule to prevent import from playwright lib

* Fix path for the rules folder
2023-10-30 11:23:40 -03:00