Commit Graph

55 Commits

Author SHA1 Message Date
Nathan Silveira d2636f55f8
Add HOC to hide inventory collapsible block when nothing is inside it (#43228)
* Add expression-evaluation package

* Export useEvaluationContext

* Add HOC to hide collapsible block when nothing is inside it

* Add changelog

* Create a separate place for WP hooks and move existing hook to it

* Reintroduce line deleted automatically

* Refactor to useSelect
2024-01-05 15:01:12 -03:00
Nathan Silveira 0dac985d8e
Prepare @woocommerce/product-editor for 1.2.0 release (#42991)
* Prepare @woocommerce/product-editor for 1.2.0 release

* Fix typo
2023-12-20 11:46:12 -03: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 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 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 6c8207541a Resolved Type Errors 2023-12-09 12:08:16 -08:00
Christopher Allford bc65f9687b Updated Syncpack Dependencies 2023-12-09 07:16:39 -08:00
Christopher Allford 3a88cc739a Updated Dependencies 2023-12-09 07:12:20 -08:00
Damián Suárez bcd6669721 add hooks dependency 2023-12-07 19:35:05 -03: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
louwie17 882527fe05
Prep both admin-layout and product editor (#41764) 2023-11-28 16:23:08 -04:00
louwie17 68e0a6404a
Remove invaild react-hooks dev dependency (#41712)
* Remove invaild react-hooks dev dependency

* Add changelog
2023-11-27 16:14:47 -04:00
louwie17 8397478c61
Package release preperation for product-editor package (#41706) 2023-11-27 11:45:43 -04: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
Nathan Silveira 2a30735b28
[Product Block Editor] Show onboarding tour within description block editor (#41161)
* Copy WelcomeGuide from gutenberg

* Remove CSS copied from guide component since it's not influencing the product Welcome Guide and it's interfering with the block editor welcome guide

* Fix issue with box-sizing

* Fix lint issues

* Show guide only when modal is open

* Add changelog

* Remove template and fix issue with component not re-rendering

* Add comment

* Add additional changelog

* Rename component
2023-11-06 16:38:33 -03: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
Matt Sherman 1e35d45c99
Template API: Expose template block id and order to client (#40263)
* Update unit tests to handle _templateBlockId and _templateBlockOrder

* Refactor get_formatted_template

* Initial @woocommerce/block-templates package

* Add block-templates to admin webpack

* Add block-templates to dependency-extraction-webpack-plugin

* Add block-templates to admin assets

* Add block-templates dependency

* Update name block

* Update syncpack

* Update regular price block

* Update tab block

* Update section block

* Add @wordpress/deprecated to package

* Deprecated initBlock

* Update attributes block

* Update catalog visibility block

* Update checkbox block

* Update conditional block

* Update collapsible block

* Allow additional props to be passed to useWooBlockProps

* Update inventory sku block

* Update inventory quantity block

* Update inventory email block

* Update images block

* Update description block

* Update radio block

* Update pricing block

* Update password block

* Update notice block

* Update shipping dimensions block

* Update shipping class block

* Update schedule sale block

* Update sale price block

* Update toggle block

* Update taxonomy block

* Update tag block

* Update summary block

* Update variations block

* Update variations options block

* Update variation items blocks

* Changelog

* Changelog

* Changelog

* Changelog

* Changelog

* Add test for registerWooBlockType

* Add @testing-library/react-hooks to devDependencies

* Add test for useWooBlockProps

* Document API

* Fix linting issues in README.md

* Fix tabs tests by mocking useWooBlockProps

* Allow header duplication under different nesting

* Remove unused import (fixes lint error)

* Update lock file
2023-09-27 13:38:56 -07:00
Sam Seay 45c49dc232
Add a workflow to separate out eslint and annotate PRs. (#39704) 2023-08-15 18:21:51 +12:00
Sam Seay e8c3808527
Upgrade TypeScript to v5.1 (#39531) 2023-08-08 16:35:31 +12:00
Joel Thiessen 3679f019bb
Adding attributes block to product block editor. (#38051) 2023-05-02 21:13:48 -07:00
Joshua T Flowers ebe879d5dd
Add IframeEditor component to product editor (#37570)
* Add initial modal editor

* Add in iframe editor styles

* Convert components to TS

* Sync dependencies

* Remove unused components and props

* Set min height to avoid jumpiness during resize

* Fix up private APIs dependency version

* Update ModalEditor name to IframeEditor

* Add changelog entry

* Remove IframeEditor from details block

* Update frozen lock file

* Add support for missing gutenberg assets function

* Fix lock file after rebase

* Use default editor settings when none are provided

* Remove currently unused editor styles

* Remove unused private apis package

* Fix php lint errors

* Remove unused import

* Pin keycodes version

* Remove another unused import from testing

* Add WC changelog entry
2023-04-18 10:52:28 -07:00
Joel Thiessen fb12ad20fd
Replacing rest_namespace modification with middleware due to blocks issues (#37621) 2023-04-13 08:45:50 -07:00
Maikel David Pérez Gómez 8354ae2792
Create schedule sale pricing block (#37567)
* Create schedule sale pricing block

* Add auto show/hide and clean fields depending on the initial values

* Add validations to From and To dates fields

* Add changelog files

* Align block with the figma design

* Revert linter replacement in the editor global style.scss file

* Fix some words typos

* Move and rename schedule sale block to the blocks folder

* Load datetime format from @wordpress/date instead of using the woo options datastore

* Remove the min difference using by moment to compare dates from 'minute' to undefined

* Make sure the dates are normalized for comparison
2023-04-11 10:53:37 -04:00
Joshua T Flowers 85080f642b
Add block related assets entry points to product editor build (#37318)
* Add editorStyle properties to blocks

* Rename style.scss files to editor.scss

* Get block entry points for block related assets

* Copy block assets to core assets build folder

* Remove unusable dependency

* Add changelog entries

* Fix up RTL style builds for block assets

* Update copy-webpack-plugin dependency and lock file

* Fix up lock file after rebase

* Fix order of webpack rtl stylesheet builds to prevent additional stylsheets

* Fix up lock file after rebase

* Fix tsconfig
2023-03-31 10:36:40 -07:00
Joshua T Flowers 681391a50a
Add product images block to product editor (#37455)
* Add images block to the product editor

* Allow html in section block descriptions

* Add changelog entry

* Add client changelog entry

* Remove SVG related changes

* Fix up lock file after rebase

* Remove unused import

* Fix up php lint errors

* Move sanitize function to utils folder
2023-03-30 11:22:07 -07:00
Matt Sherman eab7750208
Move product-editor CES-related components and utilities (#37131)
* Update package.json and lock file
* Move ProductMVPFeedbackModal to @woocommerce/product-editor
* Move ProductMVPFeedbackModalContainer to @woocommerce/product-editor
* Move ProductMVPCESFooter and useProductMVPCESFooter to @woocommerce/product-editor
* FIx mock of __experimentalUseProductMVPCESFooter in test
2023-03-28 13:38:08 -04:00
louwie17 bc42b853d8
Update product editor interpolate components (#37453)
* Remove use cases of `interpolateComponents`

* Remove from package json

* Add changelog
2023-03-28 04:15:17 -03:00
Christopher Allford 67cde87fd1
Enforce Strict `@types` Dependencies (#37351) 2023-03-23 18:02:20 -07:00
Christopher Allford 3d614cd862
Removed TypeScript Incremental Build Support (#37374) 2023-03-23 11:25:42 -07:00
Joel Thiessen 4ae467af9e
Adding more menu with items using slot fill (#37255)
* Refactored, adding slot fill, basic working via common components

* Pinning plugins dep

* More menu style tweaks

* Fixing merge issues

* Adding product header item slotfill to support more menu modal

* Fixing moved imports

* Adding changelogs

* Adding hover state for more menu toggle btn

* Fixing typo

* Refactoring to use WooHeaderItem instead of adding new slot-fill

* Removing unneeded fragment

* Adding admin layout changelog

* PR feedback

* Fix up lock file after rebase

---------

Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
2023-03-22 07:30:06 -03:00
Maikel David Pérez Gómez b9df0e09f0
Create a helper hook for field validation (#37196)
* Add custom hook to validate product fields within blocks

* Add changelog file

* Add unit tests

* Fix non working tests

* Fix linter errors

* Add changelog file

* Fix async validation rejection

* Solve conflicts after rebasing

* Revert false negative lint errors

* Move the hook to its own folder and add the readme.md file
2023-03-20 23:12:09 -03:00
louwie17 345ad58919
Add product pricing block (#37211)
* Adding initial pricing block

* Have price block render in form

* Make sure price is loaded correctly and fix template rendering

* Make pricing block abstract and add list and sale price to template

* Add changelogs

* Revert changes in wc/data package

* Fix lint issues

* Fix type error

* Add styling

* Fix styling lint issues

* Revert config change missed in rebase

* Make use of base control help text for field info

* Allow additional callbacks for onFocus and onKeyUp
2023-03-17 14:03:10 -03:00
Joshua T Flowers 31ec8d8352
Add tab blocks to the blocks product editor (#37174)
* Add initial tab block and tabs render

* Add tabs styling

* Set initially selected tab on render

* Set initial tab based on query param

* Add template placeholder with tabs

* Add changelog entry

* Allow multiple tab and section blocks

* Add changelog entry for wc

* Fix up arrow alignment

* Fix up block configuration type

* Add missing navigation dependency to product editor
2023-03-13 15:00:50 -07:00
Joel Thiessen 4dff6db40f
Adding test name block with support for entity data store (#37132)
* Adding test name block with support for entity data store

* Adding changelog

* Changing block.ts to block.json and amending TS config to support

* Experiment in loading blocks from settings template

* Enable the use of templates with the block editor

* Fix dependency

* Add changelog

* Fix lint error and remove unused utils

* Fix tests by fixing mocks

---------

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2023-03-13 11:45:25 -03: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
Maikel David Pérez Gómez 3ded2b46e9
Create editor skeleton on add/edit product pages (#37023)
* Add required dependencies

* Create the block editor component

* Create the header component

* Create the sidebar component

* Create the editor component

* Remove comments

* Export the block editor from its package

* Enqueue wp-edit-site

* Create the new block mode product page

* Register the new ProductPage component in /add-product route

* Add temporal layout styles

* Fix rebasing conflicts

* Fix linter errors

* Redirect to the new product-editor page when edit

* Add changelog files

* Fixing dependencies conflicts and ignoring some non running test

* Add comment suggestions

* Fix conflicts after rebasing

* Add comment suggestions
2023-03-08 05:51:59 -04:00
Joel Thiessen 2332c7c813
Migrating details fields to product-editor package (#36945) 2023-03-06 14:33:10 -08:00