Commit Graph

1054 Commits

Author SHA1 Message Date
Matt Sherman af24637439
Create @woocommerce/admin-layout package (#37094)
* Initial admin-layout package skeleton

* Changelog files

* Use createOrderedChildren and sortFillsByOrder from @woocommerce/components for WooFooterItem

* Move WooFooterItem to @woocommerce/admin-layout

* Use WooFooterItem from @woocommerce/admin-layout

* Suppress errant TS lint errors

* Exports for @woocommerce/admin-layout

* Fill updates and eslint suppression

* Changelogs

* Remove suppression of tslint errors

* Fix react and @types/react versions

* Load @woocommerce/admin-layout script and styles

* Move WooHeaderItem, WooHeaderNavigationItem, and WooHeaderPageTitle to @woocommerce/admin-layout

* Regenerate lock file post-rebase

* Remove duplicate import post-rebase

* Add wc-admin-layout to app style dependency

* Fix jest mock of @woocommerce/admin-layout

* Fix spacing.

* Export slot names

* Fix typo in .npmrc

* Update lock file

* Try updating lock file

* Update lock file

* Update lock file

* Update to latest lock file from trunk

* Update lock file

* Sync dependencies of @woocommerce/admin-layout

* Manually sync @wordpress dependencies
2023-03-10 09:58:02 -05:00
Sam Seay bec3ec18ac
Update Syncpack and use it to pin @wordpress packages to wp-6.0 (#37034) 2023-03-09 10:13:25 +13:00
louwie17 2ef4f8a9da
Fix create wc extension script (#36917)
* Run create-extension for create-wc-extension script

* Add changelog

---------

Co-authored-by: Sam Seay <samueljseay@gmail.com>
2023-02-24 04:28:07 -04: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
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
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
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
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
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
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 aec442139f
Update pnpm once again to fix issues with auto-install-peers (#35007) 2022-10-10 16:59:51 +13:00
Sam Seay 59e0c80f3c
Update the pnpm constraint to 7.12.2+ now auto-install is fixed. (#34872) 2022-10-03 10:52:42 +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 c0fe3ec18f
Fix pnpm version to 7.11.0 in engines and in CI (#34773) 2022-09-27 11:30:52 +13:00
Paul Sealock a0c13abd83
pnpm 7 update: Remove unused dashes (#34754)
* remove unused dashes in pnpm scripts calling other pnpm commands

* changelog
2022-09-21 15:34:24 +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
Christopher Allford 6457348a97
Validate React Admin Changelog Files (#34520)
This maps the changelog command of the React Admin in order to ensure that they're validated and able to be added.
2022-09-05 13:02:00 -07: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
Paul Sealock e651a46fb6
Turbo: Avoid caching result of `build:feature-config` (#34296) 2022-08-22 16:28:57 +12:00
Chi-Hsuan Huang 58ff656764
Remove @wordpress/eslint-plugin from woo admin package.json (#34240)
* Remove @wordpress/eslint-plugin from woo admin package.json

* Add changelog

* Update pnpm-lock.yaml
2022-08-10 14:45:40 +08:00
RJ f3e436f991
fix: type definition issues related to pnpm hoisting rules in preparation for pnpm 7 upgrade (#34154)
- added missing TS definition dependencies
2022-08-05 15:19:08 +08:00
Sam Seay 5becf47d60
Simplify turbo commands (#34055)
* Change package json commands and turbo repo config to allow for greatly simplifying running turbo
* Remove require-turbo script which was causing caching issues
* Colorize CI output from scripts
* Add missing changelog script to extend-cart-checkout-block
2022-08-05 12:03:17 +12:00
louwie17 383c96f0ca
Update woocommerce admin scripts to align more with turborepo (#33982)
* Update woocommerce admin scripts to align more with monorepo

* Add changelog

* Add dev script back in

* Add install-if-deps-outdated back into build script

* Remove --force from dev script and add WC_ADMIN_PHASE to turbo cache key

* Remove install-if-deps-outdated from build

* Add composer install step to pr unit tests workflow

* Remove old install scripts, that are not needed anymore

* Make sure client changes are part of the cache hit

* Add composer install to code coverage and code sniff as well

* Add composer_no_dev input to install-build workflow

* Add sass dependency to woocommerce/admin/client turbo cache
2022-07-22 08:32:03 -03:00
Chi-Hsuan Huang 2e167ca088
Fix borken react admin commands (#33649)
* Fix admin build:packages and test:packages

* Add changelog
2022-06-29 13:02:56 +08:00
jonathansadowski d48a0b2d90
Add helper tool for making sure build, lint, and test are run through Turborepo (#33573)
* Add helper tool for making sure build, lint, and test are run through Turborepo

* Update node version for require-turbo
2022-06-28 13:17:05 -05:00
Chi-Hsuan Huang 93c15e9f7d
Switch to ESLint to fix admin lint command (#33577)
* Switch woo admin lint command from wp-script to eslint

* Add changelog
2022-06-23 12:00:28 +08:00
Christopher Allford c0b76f70cc
Rename @woocommerce/admin-library (#33460)
This commit changes it to woocommerce/client/admin. This is an invalid NPM package name and an invalid Composer package name. This will prevent conflicts but also identify it as a component of Core.
2022-06-17 13:28:34 -07:00
Christopher Allford b7931409f2
Migrate From Nx to Turborepo (#33079)
This replaces all `nx` commands with `turbo` commands and removes Nx from the repository. All of the `project.json` files have been removed and any commands that broke with Turborepo have been adjusted.
2022-06-09 14:40:07 -07:00
Christopher Allford bb320a935a
Removed `@woocommerce/notices` Internal Prefix (#33283)
Since we're exposing the package in some form,
we cannot rename it since that would break backwards
compatibility.  This commit changes it back.
2022-06-03 16:05:26 -07:00
Christopher Allford 112b9ac67a
Prefixed Private JS Packages (#33218)
In order to ease the identification of private packages within the monorepo, this adds an `internal-` prefix to all of the current private packages. This makes it immediately clear when reviewing `packages/js` what is and isn't a private package.
2022-05-31 15:42:00 -07:00
RJ b051ed88db
Update react-router-dom to v6 for woocommerce-admin (#33156) 2022-05-30 14:51:33 +08:00
Chi-Hsuan Huang 4a6c6e739c
Update woocommerce-admin `test:watch` command (#33202)
* Update woocommerce-admin test:watch command

Only watch admin ./client folder

* Add changelog
2022-05-27 10:08:34 +08:00
moon 8adcae1072 Remove @types/history -- it is part of history 5.3.0 2022-05-12 18:34:13 -07:00
moon aa7853edbd Update history package to the latest 5.3.0 version 2022-05-12 18:28:43 -07:00
Moon 9720874f50
Merge pull request #32954 from woocommerce/update/32883-update-react-dates-dependency
Update react-dates to 21.8.0
2022-05-11 12:49:16 -07:00
moon 15ecfd9b16 Update react-dates to 21.8.0 2022-05-10 18:12:32 -07:00
Chi-Hsuan Huang 43af801d46 Remove memoize-one from wca & update it to ^6.0.0 for woo components 2022-05-10 14:17:03 +08:00
Christopher Allford 0519045d20 Added Missing Dependencies
Some kind of branch switching related mishap it seems.
2022-05-06 14:58:33 -07:00
Christopher Allford 31d7249080 Removed "prebuild" Script
PNPM does not execute "pre" and "post"
scripts for user-defined scripts. This removes
the "prebuild" from the React Admin's build.
2022-05-06 12:16:57 -07:00
Roy Ho ad0d71dcff
Merge pull request #32795 from woocommerce/fix/standardize-lint-woocommerce-plugin
Standardize linting: plugins
2022-04-29 06:01:37 -07:00
moon dc00aff77e Run dev after clean command 2022-04-28 14:28:01 -07:00
moon 082f55bee1 Run clean before running build commands 2022-04-28 13:42:06 -07:00
Paul Sealock 4275eb002b admin fix scripts 2022-04-28 11:04:20 +12:00
Paul Sealock 6100df9a04
Storybook: Move code to `tools/` (#32729) 2022-04-28 09:54:54 +12:00
Paul Sealock e70b75cf81
Update `create-extension` to work in monorepo context (#32514)
* Update create-wc-extension to work in monorepo context

* update lock file
2022-04-26 08:51:35 +12:00
Chi-Hsuan Huang 0c554fddad Add @wp/plugins, data, compose types dev deps to woo admin
Add their type definitions and remove them from index.d.ts declare module
2022-04-15 17:08:31 +08:00
Chi-Hsuan Huang e66b78b892 Add @types/testing-library__jest-dom to fix client ts errors 2022-04-15 17:04:53 +08:00
Chi-Hsuan Huang 3ead227cdc
Merge branch 'trunk' into update/admin-docs 2022-04-15 11:53:08 +08:00
Chi-Hsuan Huang 5a74e9cba6 Add WC_ADMIN_PHASE=core to build:feature-config 2022-04-14 17:25:29 +08:00
Chi-Hsuan Huang 30a2fc18d6 Pass WC_ADMIN_PHASE=core to build commands 2022-04-14 17:13:23 +08:00