Commit Graph

282 Commits

Author SHA1 Message Date
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
Nathan Silveira 5fbd502a17
Enable inline actions in the variations table for images (#47065)
* Increment ProductVariationImage type

* Allow adding images to variations from the main product screen through a button

* Add changelog

* Add changelog

* Change showSuccess parameter to optional
2024-05-03 15:26:22 -03:00
Damián Suárez 8d2f88da71
[Product Block Editor]: update the attributes list optimistically when a new attribute is created (#46717)
* tweak optimisticQueryUpdate type

* sort items optimistically

* update attributes list optimistically

* do not invalidate when creating a new attribute

* changelog

* changelog

* update tests

* update options param in test

* wait for the promise when creating new attribute

* fix the rest of tests
2024-04-26 07:53:13 -04:00
Damián Suárez a0aa4724df
Tidy and update product attribute TypeScript types (#46907)
* rename ProductAttribute with ProductProductAttribute

* introduce ProductAttribute to define actions

* update importing attribute types

* fix select item type

* export ProductAttribute TS type

* update attribute-input-field component

* changelog

* update jsdoc block

* update test
2024-04-25 07:30:02 -04:00
RJ fd52f18f6b
Move LYS coming soon initialization to core profiler flow (#46708)
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-04-22 14:49:59 +08:00
Damián Suárez b0e3e31cbe
Data: introduce optimisticQueryUpdate item option (#46343)
* add a CustomActionDispatchers for createProductAttribute action

* add optional options to createItem() fn

* update items object when optimisticQueryUpdate is defined

* reduce itemsCount when creating a new item

* polish TS types

* update reducer tests

* clean unused type

* clean dirty code

* add optimisticQueryUpdate test

* changelog

* minor improvement

* options could be undefined

* compute items and itemsCount based on data

* fix TS error

* changelog
2024-04-18 01:27:40 -04: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
Fernando Marichal d8037dd154
Add menu item to Publish button with copy to draft (#46294)
* Add duplicate product store

* Add copyToDraft method

* Add copy to draft button

* Modify success notice

* Add changelogs

* Update name before saving product

* Add comment to code
2024-04-12 10:19:12 -03:00
Ron Rennick c6048b5c49
Add glob, rimraf, and uuid to Syncpack (#46278)
* add uuid to syncpack

* add rimraf to syncpack

* add glob to syncpack

* 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/integrate-plugin, @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/components, @woocommerce/block-templates, @woocommerce/ai, @woocommerce/admin-layout, @woocommerce/admin-e2e-tests, woocommerce

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-04-11 12:52:49 -03:00
Nathan Silveira e2eaa55b7d
Apply filter to add metadata for generated variations (#45953)
* Add meta_data parameter in generateProductVariations

* Apply filter to get meta_data to generate variations

* Add meta_data parameter in generate variations endpoint

* Update name and add documentation

* Fix useEntityRecord in blockEditor
2024-04-02 05:25:01 -03:00
Damián Suárez 65d71fa1e2
Data: reduxify suggested products (#44043)
* use Thunks in wc/admin/products store

* first implementation

* changelog

* fixing tests

* remove unused __meta prop

* update constant name

* fix eslint issue
2024-01-24 16:56:41 -04:00
Matt Sherman 1ea439fb61
[Product Editor] Variation quick actions succeed when sku is inherited from parent (#44017) 2024-01-24 09:50:00 -05:00
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 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
Damián Suárez d0d056c60e
Data: add selector to get related products (#43489)
* add getRelatedProducts to get related products

* changelog

* add a resolver to pull the related products

* minor jsdoc enhancement

* query Product params should be optional

* fix ES issue

* minor TS enhancement

* use createSelector() helper
2024-01-11 12:56:59 -03:00
Damián Suárez 17c8354ad9
[Product Block Editor]: Be able to dismiss AdviceCard instances (#43124)
* introduce packages/js/data/src/user/types.ts pref

* be able to dismiss the Upsells advice

* rename user pref key

* typify product_advice_card_dismissed prop

* store is dismissed state in the user pref

* delegate the dismiss state to the component

* changelog

* remove console.log :'(

* fix TS issue

* fix TS issue

* changelog
2024-01-04 12:17:03 -03:00
Ron Rennick 8550da9959
bump php version in packages/js/*/composer.json (#42020)
* bump php version in packages/js/*/composer.json

* add package changelogs

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-01-04 10:18:34 -04:00
Damián Suárez b6f8ab94f5
[Woo beta tester]: add User Preference panel (#43125)
* introduce UserPreference panel

* render user preference panel

* expose UserPreferences type

* introduce force mode to update user pref

* rename global object with `__wcbt`

* changelog

* changelog
2024-01-03 17:42:18 -03:00
Christopher Allford bf29119032
Updated PNPM to ^8.12.1 (#42860) 2023-12-18 20:31:49 +13:00
Christopher Allford e46d6bd207
Fixed `watch:build` Race Conditions (#42802)
There's currently a bug with `wireit` that makes the watch crash.
Swiching over to `nodemon` until that is resolved will
keep that from happening.
2023-12-13 18:25:16 -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 4e89debd0c
Fix Jest Preset (#42707)
When using a preset we need to keep in mind that the transformation
paths are relative to the preset, not the consuming package. We get
around this by using `<rootDir>` in the transform paths. However,
doing this means fixing the root directory for all of the jest tests.
This keeps the tests working in the same way but lets us fix the
preset too.
2023-12-12 09:58:13 -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
Nathan Silveira 120a3dba87
Add meta_data type to Product (#41961) 2023-12-11 14:45:00 -03:00
Christopher Allford a8fd8fafa5 Applied Linting Fixes 2023-12-09 23:32:45 -08:00
Christopher Allford 96af36bf1f Locked `wireit` Version 2023-12-09 21:56:12 -08:00
Christopher Allford d244662669 Synchronized Dependencies 2023-12-09 14:40:16 -08:00
Christopher Allford fa011a431b Removed Unnecessary `run` From `pnpm` 2023-12-09 14:36:22 -08:00
Christopher Allford fb6424e6f2 Applied Consistent Outputs 2023-12-09 14:26:36 -08:00
Christopher Allford d015950e86 Wireit Dependencies Set 2023-12-09 14:24:51 -08:00
Christopher Allford e729417335 Revised Test Command
We will never run all tests concurrently so this is better.
2023-12-09 14:14:47 -08:00
Christopher Allford 40852f2fb6 Fixed Test Commands 2023-12-09 14:13:32 -08:00
Christopher Allford 97b5cc48fd Add Wireit: Lots of packages! 2023-12-09 14:05:39 -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 c936b5339e Removed Unnecessary `.gitignore` Files 2023-12-09 13:01:12 -08:00
Christopher Allford 6c8207541a Resolved Type Errors 2023-12-09 12:08:16 -08:00
Christopher Allford 3a88cc739a Updated Dependencies 2023-12-09 07:12:20 -08:00
Christopher Allford 8c6b414fe0
Revert "Refactoring Task Infrastructure" (#41928)
Revert "Refactored Task Infrastructure (#41202)"

This reverts commit 96a973b9fa.
2023-12-06 11:36:12 -08:00
Christopher Allford 96a973b9fa
Refactored Task Infrastructure (#41202)
* Fixed NPM packages with invalid names.
* Renamed plugin packages.
* Standardized package NPM scripts.
* Replaced Turborepo with Wireit.
2023-12-06 09:32:32 -08:00
Christopher Allford 88969742f2
Regenerate PNPM Lock File & Fix Errors (#41830) 2023-12-05 00:36:30 -08:00
Christopher Allford c6b74ddafa
Revert "Resolve PNPM Lock File Errors" (#41828)
Revert "Resolve PNPM Lock File Errors (#41800)"

This reverts commit 2550558a13.
2023-11-30 14:55:35 -08:00
Christopher Allford 2550558a13
Resolve PNPM Lock File Errors (#41800)
This makes the lock file constraints more specific to prevent the
backward incompatible types from WordPress types using the caret
constraint.
2023-11-30 09:33:34 -08:00
Fernando Marichal 4a0db06321
Modify notice for legacy local attributes (#41646)
* Modify notice for legacy local attributes

* Rename variable

* Add changelogs

* Rename local_attributes_notice_dismissed_ids
2023-11-23 12:00:17 -03:00
Fernando Marichal bed99d0705
Add error state to variation list (#41525)
* Refactor table-empty-state component

* Add error image

* Add error handling in product-variation-helper

* Add error handling to use-variations

* Add rename

* Fix link

* Fix error cleaning

* Add changelog

* Add generateProductVariationsError selector

* Clean error on success

* Use generateProductVariationsError instead of catch

* Add changelog
2023-11-21 13:37:43 -03:00
RJ 7d465c406a
dev: edited package.json lint scripts to output to console (#41498)
* edited package.jsons to output to console

* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/product-editor, @woocommerce/onboarding, @woocommerce/number, @woocommerce/navigation, @woocommerce/integrate-plugin, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/components, @woocommerce/block-templates, @woocommerce/api, @woocommerce/ai, @woocommerce/admin-layout, @woocommerce/admin-e2e-tests

* empty commit to trigger CI

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-11-21 11:16:08 +08:00
Maikel David Pérez Gómez 6b44a969d0
Add filters to Variation table (#40978)
* Create product variations filter component

* Add slug to the product and variation attributes
This is needed to be able to filter variations by specific attribute slugs

* Add support to filter variations by many attribute options

* Integrate attribute options filter in variations table

* Fix rebase conflicts

* Set initial filter values

* Improve intial filter values and cache invalidation

* Add changelog files

* Fix linter errors

* Fix unit tests

* Change the min amount of options to show the search input

* Fix invalid cache key generation for the datastore

* Fix unit tests

* Fix linter errors

* Fix js tests

* Add terms pagination for varition filters

* Load terms on demand plus pagination

* Show selected option names as the dropdown button toggle text

* Fix invalida state when reset and on close the popover

* Revert adding selected options as part of the dropdown toggle text

---------

Co-authored-by: Fernando Marichal <ultimoround@gmail.com>
2023-10-31 13:29:48 -04:00
RJ e01e6f8b2a
add: core profiler email marketing opt in (#40869)
* add: core profiler email marketing opt in

* tests

* changed mailchimp feature flag

* fix: made experiment name static

* lint
2023-10-24 17:07:26 +02:00
Maikel David Pérez Gómez 985d9596d6
Add Delete variation item to the editor actions menu (#40672)
* Create DeleteVariationMenuItem to be added to the Header's MoreMenu

* Move registration menu item fills to each product/variation page

* Export RemoveConfirmationModal from the product editor package

* Request for variation deletion

* Show notice when deleting variation

* Redirect to parent product page after deleting the variation

* Add tracking event

* Manage isRemoving state under RemoveConfirmationModal

* Add changelog files

* Fix linter error

* Fix delete variation modal title

* Add tracking events

* Use the right prop to get the variation name

* Add name and parent_id to the ProductVariation type definition

* Add changelog file

* Feedback modal should get the correct product id when editing a variation

* Fix rebase conflicts

* Fix unit test
2023-10-12 15:59:13 -04:00
Christopher Allford 1c30563ffc
Separate PHP and JS Unit Tests (#40639)
Since some projects might have both kinds of tests we are
going to have a `test:php` and a `test:js` script for each.
2023-10-06 15:41:47 -07:00
louwie17 247b8990d2
Add default price support to product variations (#40343)
* Optimize crud totalCount queries to avoid two requests

* Make use of same request params for totalCount as getVariations

* Add support for default_values when generating product variations

* Add test for default_values

* Add changelogs

* Only use default values of first variation

* Address some PR feedback

* Update types
2023-09-22 11:39:35 -03:00