Commit Graph

205 Commits

Author SHA1 Message Date
louwie17 aec4dfd3bd
Update product editor package (#36830)
* Add missing dev packages to product-editor package

* Create components folder for organization

* Move product field, section and tab slots over to product-editor package

* Move use of product slot fills to product-editor package

* Sync dependencies

* Add changelogs

* Update README's and add constant for default values

* Update README's in product-editor package
2023-02-24 09:37:53 -04:00
Joshua T Flowers 87d79f15a3
Move product editor utils to product editor package (#36730)
* Move product editor utils to product editor package

* Add changelog entries

* Move remaining utils

* Move util import/exports to separate index file
2023-02-23 09:48:49 -08:00
nigeljamesstevenson 3b58651bd6
Playwright 1.30.0 update (#36789) 2023-02-17 10:31:06 +00:00
Tomek Wytrębowicz c5cbc8d4ab
Update `config@3.3.7` (from `3.3.3`) (#33828)
* Update `config@3.3.7` (from `3.3.3`)

Add it to syncpack, to avoid `ReferenceError: node_env_var_name is not defined` when external extension imports and transforms the `admin-e2e-tests` directly from `node_modules`.

Include https://github.com/node-config/node-config/pull/642
2023-02-14 18:34:00 +13:00
github-actions[bot] fb3183d2c4
Prepare Packages for Release (#36814)
Automated change: Prep @woocommerce/create-woo-extension for release.

Co-authored-by: psealock <psealock@users.noreply.github.com>
2023-02-14 04:12:09 +13:00
Jon Lane f9f14f5b00 Update Playwright 1.28.0 -> 1.30.0 2023-02-08 10:52:54 +01:00
Leif Singer d0a2b582fe
Consolidate eslint versions (#36700)
* pin eslint in .syncpackrc

run `pnpm run sync-dependencies` to ensure pinned version is used across projects, then run `pnpm install` to update `pnpm-lock.yaml`

* add changelog files

ran `pnpm run --no-bail --filter='[HEAD^1]' changelog add --significance=patch --type=dev --entry='Update eslint to 8.32.0 across the monorepo.'`

* re-run `pnpm install` to fix what broke while merging
2023-02-02 23:25:04 +13:00
Sam Seay e4a18edf64
Update turborepo to 1.7.0 (#36677)
Update turbo to 1.7.0
2023-02-02 04:44:37 +13:00
louwie17 5f0572664f
Add new `@woocommerce/product-editor` JS package (#36600)
* Bootstrap product-editor package

* Move product section components over to product editor package

* Add changelogs

* Remove unused import leftover from rebase
2023-01-31 09:38:28 -04:00
Matt Sherman 43a42eac27
Include CSS for experimental tree control (#36517)
* Add @wordpress/base-styles as dependency to @woocommerce/components

* Import experimental tree control styles

* Calc padding-left for tree item in CSS instead of JS

* Force resolution of 7.0.2 react and install base styles.

* Update lock file

Co-authored-by: Sam Seay <samueljseay@gmail.com>
2023-01-26 14:45:14 -05:00
Sam Seay d181008ac4
Fix TS issues and lint the release post tool by running `tsc` (#36412) 2023-01-18 18:43:22 +13:00
Fernando Marichal a9005c58f0
Fix moving list item also moves image gallery item (#36262)
* Fix list id

# Conflicts:
#	pnpm-lock.yaml

* Add changelog

* Add package changelog

* Remove changelog

* Add `-` between the item `index` and `id`

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-01-06 08:53:33 -03:00
Sam Seay 302dab0521
Update browserslistconfig for legacy JS assets (#36264) 2023-01-04 11:22:15 +13:00
github-actions[bot] 4823a284dc
Prepare Packages for Release (#36084)
Automated change: Prep @woocommerce/create-woo-extension for release.

Co-authored-by: psealock <psealock@users.noreply.github.com>
2022-12-20 21:33:51 +13:00
Paul Sealock 3d0e8d500d
Rename package from create-extension to create-woo-extension (#35947)
* Rename package from create-extension to create-woo-extension

* update lock file
2022-12-15 17:45:28 +13:00
Sam Seay dedbf7b492
Migrate uses of ::set-output in code-analyzer to setOutput. (#35895)
* Migrate uses of ::set-output to setOutput.
2022-12-12 19:41:00 +13:00
Maikel David Pérez Gómez 788b3ef59b
Add async filtering support to the select-control component (#35839)
* Add async filtering support to the select-control component

* Apply comment suggestions

* Apply more comment suggestions
2022-12-07 14:24:32 -03:00
Chi-Hsuan Huang 1fbe5d330d
Add @babel/plugin-proposal-class-properties to run storybook (#35867)
* Add @babel/plugin-proposal-class-properties to run storybook

* Add @babel/plugin-proposal-class-properties to webpack config and remove storybook env from babel config

* Add changelog
2022-12-07 22:26:02 +08:00
Chi-Hsuan Huang 2a56407ba1
Migrate `@woocommerce/components/search` to TS (#35724)
* Migrate search component to TS

* Add @types/prop-types to @woocommerce/components

* Update search types

* Add changelog

* Update pnpm-lock.yaml

* Update ts doc comments
2022-12-06 13:21:10 +08:00
Sam Seay 978604d0f1
Introduce live branches UI page to WooCommerce Beta Tester (#35643)
* Add basic classes to register the Live Branches page
* Add API endpoint to load live branch manifest
* TS/JS tooling, prettier tooling
2022-11-30 14:17:27 +13:00
Nathan Silveira 121bfe3a29
Add tracks event for "View product" and dismiss action after update (#35582)
* Record an event 'product_view_product_click' when the 'View Product' link is clicked after creating or updating a product

* Add product_view_product_dismiss tracks events (WIP, not currently working)

* Add changelog

* Fix whitespace in addEventListener and remove console.logs

* Change link tag id to be more specific and comply with CSS guidelines
Move HTML code out of translation function

* Run phpcs in class-wc-admin-post-types

* Add tinyMCE types to add global tinymce variable in typescript code

* Add additional data in getProductData

TODO: I'm not sure if it's possible, or if it makes sense, to include stock_quantity_update in the object

* Add code review suggestions, including:

* Create isElementVisible function to backfill jQuery implementation
* Fix wrong value for is_downloadable, is_virtual, manage_stock
* Fix wrong radix
* Update menu_order implementation
* Add missing ? to weight

* Add stock_quantity_update implementation which is not working as intended

Since the page reloads after product update, the initialStockValue is updated as well

* Remove stock_quantity_update property and adjust is_downloadable, is_virtual, and manage_stock for consistency
2022-11-28 22:01:10 -03:00
Jonathan Lane fd7fc355fa
Fix/e2e environment test failures (#35679) 2022-11-22 16:16:42 -07:00
Sam Seay 03dbab0edd
Fix some bugs in syncpack configuration (#35651)
* Fix syncpack config

* Loosen the matched version for typescript eslint

* Add changelog entries

* Update lockfile
2022-11-22 12:06:47 +13:00
Joel Thiessen 5b1296fe45
Adding attribute edit modal for products MVP (#35269) 2022-11-03 08:20:29 -07:00
github-actions[bot] a72e68ea65
Prepare Packages for Release (#35277)
Automated change: Prep @woocommerce/components for release.

Co-authored-by: chihsuan <chihsuan@users.noreply.github.com>
2022-10-24 16:37:07 +08:00
Jonathan Lane a94eecc910
Playwright 1.27.1 (#35106)
* Update Playwright to 1.27.1

* Add changelog

* Try adding retry action to github actions workflow

* Revert "Try adding retry action to github actions workflow"

This reverts commit 6196a5dd21.

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2022-10-21 15:16:00 -06:00
rodelgc 64320a2c5c
Migrate Daily smoke tests to Playwright (#35114)
* Checkout updated files

* Checkout more files

* Remove invalid php-version input

* Add changelog

* Update pnpm-lock.yaml

* Re-add accidentally deleted filter value

* Remove unnecessary TODO comment
2022-10-21 09:07:53 -07:00
github-actions[bot] 3d78fd24ee
Prepare Packages for Release (#35205)
Automated change: Prep @woocommerce/components for release.

Co-authored-by: chihsuan <chihsuan@users.noreply.github.com>
2022-10-20 13:21:11 +08:00
Joshua T Flowers 3c6681054a
Add product management description (#34961)
* Add label prop to rich text editor

* Create feature class and enqueue styles

* Add description editor and parsing

* Fix up incorrect context for product data

* Add styling to rich text editors in product form

* Fix editor initialization on new product

* Add changelog entries

* Use trunk lock file

* Add component changelog entry

* Update lock file

* Register block store provider in tests

* Fix up phpcs errors in product feature file
2022-10-18 08:55:31 -07:00
Joshua T Flowers 618cc54a3f
Add RichTextEditor component using native block editor toolbar (#34865)
* Add initial rich text editor component

* Use fixed toolbar and add base formatters

* Add link as formatter option

* Fix up references to core/link block

* Add quote transform

* Add changelog entry

* Add text alignment toolbar

* Remove references to checkbox list

* Update toolbar button organization

* Remove unused rtj format types

* Create unique instance for editor writing flow

* Add registry provider for storybook examples

* Update styling for editor

* Rebase and fix lock file

* Add packages and type dependencies

* Move component to experimental

* Fix up formatting

* Update editor to use default GB toolbar

* Prefix names with woocoommerce

* Create block on initialization so toolbar is visible

* Rely on insertBlock to handle selection

* Update text editor to use setting instead of BlockList prop

* Fix up lock file after rebase

* Handle PR feedback

* Move logic for force rerender

* Fix up pnpm lock file

* Use trunk lock file

* Update lock file

* Add missing semicolon

* Use Pauls lock file and package file
2022-10-12 14:15:55 -07:00
Fernando Marichal 98162b9d42
Images Product management MVP 1.0 (#34769)
* Add image section

# Conflicts:
#	plugins/woocommerce-admin/client/products/add-product-page.tsx

* Add `keepSpaceWhenDragging` to sortable

# Conflicts:
#	packages/js/components/src/sortable/sortable-item.tsx
#	packages/js/components/src/sortable/sortable.tsx

# Conflicts:
#	packages/js/components/src/sortable/sortable.tsx

* Export ImageGalleryItem

* Add props to `image-gallery`

# Conflicts:
#	packages/js/components/src/image-gallery/image-gallery-item.tsx
#	packages/js/components/src/image-gallery/image-gallery.tsx

* Changed `media-uploader` label

* Add changelogs

* Fix image-gallery and sortable components

# Conflicts:
#	packages/js/components/src/sortable/sortable-item.tsx
#	packages/js/components/src/sortable/sortable.tsx

# Conflicts:
#	packages/js/components/src/image-gallery/image-gallery.tsx
#	packages/js/components/src/sortable/sortable.tsx

* Set gallery min-height

* Add onOrderChange

* Show images section edit-product

# Conflicts:
#	plugins/woocommerce-admin/client/products/edit-product-page.tsx

# Conflicts:
#	plugins/woocommerce-admin/client/products/edit-product-page.tsx

# Conflicts:
#	plugins/woocommerce-admin/client/products/edit-product-page.tsx

* Fix styles

* Fix styles

* Fix image alt

* Fix TS any

* Add prop `onDragOver`

# Conflicts:
#	packages/js/components/src/image-gallery/image-gallery.tsx

* Fix styles

* Fix padding

* Fix image area min-height

* Fix subtitle copy

* Fix image margin

* Change `draggedImageId`

* Fix `setDraggedImageId` reset

* Rename `isRemoveZoneVisible`

* Add `CardBody` and remove redundant `setValue`

* Fix card styles

* Remove `getUniqueImages`

* Use url as a key when there is no image id

* Fix `orderedImages`

* Add hover to gallery images

* Fix gallery arrows and set cover problems

* Altering blur handler to prevent toolbar closure on media modal

* Fix toolbar drag and drop

* Add replace fn

* Restoring modal class for blur function

* Fix storybook

* Ensuring onBlur doesn't happen while dragging, resolving issue in Firefox

* Adding expected event object to drag callbacks

* Fix image size

* Fix lint

* Another fix lint

* Update plugins/woocommerce-admin/client/products/sections/images-section.tsx

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Fix `draggedImageId` default value

* Fix toolbar icon style

* Rename consts

* Update pnpm-lock.yaml

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joel <dygerati@gmail.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-10-12 15:16:22 -03:00
Sam Seay 55b49cb50a
Fix and consolidate linting across the monorepo (#35012) 2022-10-12 15:05:01 +13:00
Jonathan Lane aa438e5741
Fix/update playwright and test fixes (#34790)
* Update Playwright 1.22.1 -> 1.26.0

* Update page title locator

* Wait for View cart link after adding to cart

* Add a wait when applying second coupon

* Fix flakey coupon test

* Ensure Store is in US

* Add changelog

* Revert lock file commit

This reverts commit b75192f53c.

* Updated lock file

* Added command for Playwright test execution

* Resolve merge conflict

* Resolve merge conflict

* Fixed pnpm-lock.json

* Update PW Selectors (#34959)

* Updated PW selectors

* Updated selector

* Removed extra command

* Ensure Billing country is set

* Fix failing payment setup test

* Old test is still running in actions

* Adds colour output for Playwright in GH Actions

* Fix payment test

* Lock file update

* Skipping a test for now

Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: jamelreid <jnoelreid@gmail.com>
Co-authored-by: Jamel Noel Reid <MrJnrman@users.noreply.github.com>
2022-10-07 12:39:39 -06:00
Matt Sherman 739ce306e1
Update pnpm-lock.yaml lockfile (#34995) 2022-10-07 11:58:22 -04:00
Paul Sealock c87f5ce79b
Storybook: Add react and react-dom dependencies (#34950)
add react and react-dom
2022-10-07 15:18:10 +13:00
Joshua T Flowers 3fd736c72f
Update plugins installer component to TS, Fix TS bugs and Syncpack TypeScript (#34787) 2022-09-30 10:59:07 +13:00
Sam Seay 8af6b7bff0
Fix TS errors in monorepo-merge (#34772) 2022-09-23 11:17:18 +12:00
Joshua T Flowers b65d473796
Add Sortable component accessibility (#34539)
* Add key event handlers

* Track selected item and focus

* Fix selected indexes on up down selection and drop

* Consolidate update item order logic

* Hide horizontal items on drag

* Update naming of ordering persistence

* Announce keyboard events to screen readers

* Consolidate reset method

* Simplify drop index numbers and conditions

* Fix up announcements

* Add tests around new utils

* Fall back for item name in announcement from aria label or alt text

* Update lock file

* Add changelog entry

* Handle PR feedback

* Fix up lock file after rebase

* Update lock file

* Update lock file again

* Update lock file after pnpm7

* Use trunk lock file

* Update lock file with a11y package

* Try new lock file

* Try lock file with pnpm add

* pnpm add from root

* Fix itemToString in SelectControl

* Downgrade a11y to v3.5.0
2022-09-22 12:08:26 -07:00
Paul Sealock 0b62bf85bd
Storybook: Fix after update to PNPM 7 broke build (#34724)
* Add package.json to storybook

* use @woocommerce/storybook name
2022-09-20 12:39:31 +12:00
Sam Seay 04b74c1053
Upgrade to pnpm 7 (#34661)
* Remove -- -- from scripts that fixed issue in pnpm 6, fix a couple TS issues in sep packages
* Minor fixes to analyzer scripts and doco based on pnpm 7
* Add dompurify types to data package to avoid TS errors
* Remove pnpx in favor of pnpm exec
* Modify the code analyzer to respect pnpm version if present.
* Update instructions for running recursive lint, add comments to explain
2022-09-16 09:21:42 +12:00
Paul Sealock e3ca9364a4
Version bump: Add README and Logger (#34636) 2022-09-13 06:28:37 +12:00
Sam Seay 614d98ff60
Extract the scanning functionality from code-analyzer, move common code into a separate package (#34600)
Also add contributor command and auto tagging to release-post-generator (#34608)
2022-09-11 09:55:53 +12:00
Paul Sealock fa2e7f7e96
Version Bump: Add CLI utility (#34555) 2022-09-08 19:48:01 +12:00
Christopher Allford 341880b79b
Fixed Asset Output Caching (#34606)
This updates Turborepo and adjusts the output caching for `woocommerce/client/legacy` and `woocommerce/client/admin`. The result is that build outputs in `plugins/woocommerce/assets` should be stored correctly.
2022-09-07 13:57:15 -07:00
Jamel Noel Reid 18fd9b8108
Fix pnpm-lock.yml (#34593)
Fix lockfile
2022-09-06 11:46:15 -06:00
Tomek Wytrębowicz a86e387667
Update/unify jest@27 across all packages (#34322)
* Update `jest-puppeteer@5.0.4` (from `4.4.0`)

to be albe to run with jest 28.

* Update `jest` and `ts-jest@^27` (from `25`),

to match `e2e-environment` needs.

* Update api-core-tests' `jest@^27` (from `25`),

to unify the used version across the stack.

* Update e2e-env's `jest@^27` & co.  (from `25`),

to unify the used version across the stack.

* Update e2e-env's `@jest/test-sequencer@^27`  (from `25`),

to unify the used version across the stack.

* Update admin-e2e-tests' `@jest/globals@^27`  (from `26`),

to unify the used version across the stack.

* Update woocommerce's `jest@^27.5.1`  (from `25`),

to unify the used version across the stack.

* Replace `mocked` from `ts-jest` to the one from `jest`,

Update `@types/jest@27.4.1` from `27.0.2`.
Try to fix broken tsc build.

* Update `e2e-core-tests`' `@jest/globals@^27.5.1`

from `^26.4.2`.

* Remove changelog entry for bumpin jest in `api-core-tests`

It was already covered in `trunk`.

Addresses https://github.com/woocommerce/woocommerce/pull/34322#discussion_r956019567

* Updated package-lock.yaml

* Updated timeout

* Added changelogs

Co-authored-by: jamelreid <jnoelreid@gmail.com>
2022-09-06 09:29:45 -05:00
Sam Seay 4ca9c5225d
Port the release generator from Woorelease extensions to tools (#34496) 2022-09-06 15:51:28 +12:00
Chi-Hsuan Huang e687a48abf
Update dependencies and jest config to pass admin tests for pnpm 7 (#34428)
* Update @wordpress/data version to ^6.15.0

* Update jest.config.js to transform is-plain-obj js

* Update pnpm-lock.yaml

* Add changelog

* Add babel configs and update jest config

* Update tsconfig.json to exclude babel.config.js

* Add missing @types packages

* Add changelog

* Update pnpm-lock.yaml

* Update pnpm-lock.yaml

* Fix DateTimePickerControl type errors
2022-08-31 12:06:51 +08:00
Tomek Wytrębowicz eeb090ddf8
Update `jest-puppeteer@5.0.4` (from `4.4.0`) (#33827)
to be albe to run with jest 28.
2022-08-29 12:22:30 -06:00
Tomek Wytrębowicz ea8b44115b
chore: Unify imports syntax in admin-e2e, add missing dependencies (#33901)
* Unify test spec helpers `export` syntax to ESM,

to make it possible to impor them locally.

* Unify import syntax to ESM

* Install missing dependencies of admin-e2e-tests

* Do not import `expect` from `@jest/globals` in admin-e2e-tests

Let typescript pick the puppeteer extension from global.
Address https://github.com/woocommerce/woocommerce/pull/33901#issuecomment-1221650234

* Map unknown types in `admin-e2e-tests` to make tsc happy.

* Add changelog entry

* Use the angle-bracket syntax instead of type assertions

Address https://github.com/woocommerce/woocommerce/pull/33901#discussion_r955591953

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2022-08-29 10:36:36 +08:00