Commit Graph

974 Commits

Author SHA1 Message Date
Paul Sealock da1dce8f19
Package Release: handle initial release case (#36922) 2023-02-28 09:36:38 +13:00
Maikel David Pérez Gómez e5d8b61373
Add custom rendering logic to the item label (#36476)
* Add type definitions

* Add custom rendering logic to the item label

* Add stories

* Add changelog file

* Fix rebase merge issue

* Fix up stories after rebase

---------

Co-authored-by: Matt Sherman <matt@jam123.com>
2023-02-24 17:00:32 -03:00
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
RJ d26dd4c772
Add: shipping plugins in shipping task based on location (#36873)
Co-authored-by: moon <moon.kyong@automattic.com>
2023-02-20 21:32:14 +08:00
Chi-Hsuan Huang 3c113d1b79
Add `fills` prop to `useSlot` return object to fix task list bugs in WP 6.2 (#36887)
Add fills prop to useSlot return object for backwards compatibility
2023-02-20 17:07:58 +08:00
Moon e297821a9f
Support opening direction prop for ExperimentalCollapsibleList component (#36806)
* Support direction prop

* Update story with direction control

* Add changelog

* Change possible direction value to up or down
2023-02-17 14:11:33 -08:00
louwie17 23d5c4d074
Update product editor packages (#36815)
* Add product section components back to Components package

* Fix imports

* Add a deprecated message

* Add changelog.
2023-02-16 10:43:23 -04:00
louwie17 f615c58714
Fix create ordered children helper function (#36831)
* Still pass injectProps into child props for slot fill helper

* Add changelog
2023-02-16 10:42:41 -04:00
Matt Sherman 465b3d0dd5
Use createSelector for getPermalinkParts selector to cache result (#36848) 2023-02-16 09:13:00 -05:00
Matt Sherman e05a191156
Use products data store for getPermalinkParts selector (#36706)
* Add generated_slug and permalink_template to Product

* Update getPermalinkParts to use products data store instead of posts data store

* Remove ts-expect-error directive

* Changelog

* Add resolver for getPermalinkParts
2023-02-15 11:02:55 -05:00
Matt Sherman 993f1f4879
Fix SelectControl and TreeControl styles (#36718)
* Change TreeItem background hover/focus color to $gray-100

* Remove errand importing of native colors

* Changelog
2023-02-15 09:12:21 -03: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] a3e26fe9ea
Prepare Packages for Release (#36825)
Automated change: Prep @woocommerce/onboarding for release.

Co-authored-by: chihsuan <chihsuan@users.noreply.github.com>
2023-02-14 09:43:17 +08: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
Fernando Marichal f6e325bfab
Refactor createOrderedChildren (#36707)
* Refactor createOrderedChildren

* Add changelog

* Add getChildrenAndProps method

* Change method comments

* Change comment

* Change comment `injectProps`

* Add comment to explain check

---------

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-02-13 04:42:26 -04:00
Moon f1c2b28608
Add codistoconnect to pluginNames (#36766)
* Add codistoconnect to pluginNames

* Add changelog
2023-02-06 18:10:25 -08: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
Barry Hughes 463082fb28
Revert/36294 (#36714)
* Revert "Update spelling of Cancelled to Canceled for US English. (#36294)"

This reverts commit e588c560bf.

* Changelog note
2023-02-01 13:59:42 -06:00
Maikel David Pérez Gómez 5570f6a3e8
Add tree-control expand/collapse on click the expander button or by a custom logic (#36434)
* Add tree-control expand/collapse on click the expander button or by a custom logic

* Update changelog

* Clean up styles

* Update isItemExpanded code doc

* Rename expanded props

* Destructure expander

* Update shouldItemBeExpanded code doc

* Remove useCallback from story

* Remove useCallback from shouldItemBeExpanded code doc

---------

Co-authored-by: Matt Sherman <matt@jam123.com>
2023-02-01 12:04:50 -05: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
Joel Thiessen c080886262
Implementation of separate variant slots via refactored components (#36646)
* Adding contants, renaming files, wiring up shipping section with discrete slots for variants and non-variants

* Refactoring pricing section to give discrete slots for variant and non-variant forms

* Refactoring inventory fills to give discrete slots for variant and non-variant products

* Adding additional slot to pricing -> taxes -> advanced

* Renaming api fields component file

* Refactoring images, details and attributes to match others

* Ensure variant field IDs are distinct, organize all product field fill IDs

* Adding changelog

* Simplifying IDs used for slots

* Minor refactor of pricing taxes class field

* Give api fill exports their own registerPlugin scope

* Refactoring WooProductFieldItem to generate unique IDs

* Adding components changelog
2023-01-31 07:19:21 -04:00
Joel Thiessen 79c596cbd0
Updating section and field product fills to support multiple slots (#36592) 2023-01-27 08:42:51 -08: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
Nathan Silveira b7fd3d9e76
Move registerFill call to inside an useEffect (#36623)
That call was causing a React error (Cannot update a component while rendering a different component)
2023-01-26 13:59:52 -03:00
Nathan Silveira a274057a6e
Create PHP helper functions for adding new tabs (#36583)
* Update documentation on how to add a new field through FormFactory

* Add method to add_tab through FormFactory

* Update ProductForm definition and add Tabs

* Add changelog

* Add test to add_tab and get_tabs methods

* Add changelog for @woocommerce/data

* Add tabs to reducer actions and initial state

* Remove unused function

* Fix unit test

* Increment Tabs TypeScript definition

* Add required fields to Tab class and refactor to reduce lines of code

* Change from filter to action in doc example

* Update method documentation

* Add required fields to test

* Change productform_field test

* Fix form-factory unit test

* Update wrong comment
2023-01-25 18:21:41 -03:00
louwie17 bcdf2518e6
Refactor product tabs and add product tab slot fills (#36551) 2023-01-24 15:37:21 -08:00
Joel Thiessen 4341a53144
Migrating pricing section in product editor to slot fills (#36500)
* Adding changelogs

* Migrating pricing section in product editor to slot fills

* Adding slot and plugarea to variation form

* Removing obsolete pricing section files
2023-01-24 04:24:45 -04:00
Paul Sealock 0beb6b7503
Create woo extension: Update Woo version (#36567)
* Update woocommerce version

* changelog
2023-01-24 21:08:59 +13:00
Joshua T Flowers 372208be41
Always show comments for product feedback form (#36484)
* Always show comments for product feedback form

* Add changelog entry

* Add CES changelog entry

* Fix up lint errors

* Add default for shouldShowComments in CustomerFeedbackModal
2023-01-23 17:36:48 -08:00
Fernando Marichal f13564419b
Add feedback modal and product mvp feedback modal components (#36532)
* Add FeedbackModal component

* Add ProductMVPFeedbackModal package

* Add ref

* Fix `Send feedback` button type

* Add changelog

* Rename a few props

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-01-23 20:19:37 -03:00
Ilyas Foo 30a4bdefd8
Add Tasklist extensibility and WooOnboardingTaskListHeader SlotFill (#36519)
* Add experimental onboarding_tasklist PHP filter

* Add WooOnboardingTaskListHeader and woocommerce_onboarding_task_list_header Slot to task list

* Changelog

* Fix header task logic

* Remove React FC types

* Update changelog

* Fix comment
2023-01-21 15:19:20 +08:00
Moon 0d67a6aaf1
Migrate Table component to TS (#36370)
* Migrate table component to TS

* Revert pnpm-lock to orig

* Revert pnpm-lock to orig

* Fix eslint errors

* Update packages/js/components/src/table/empty.tsx

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

* Update packages/js/components/src/table/empty.tsx

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

* Remove unnecessary empty space and convert comment stlye

* Update packages/js/components/src/table/index.tsx

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

* Remove unnecessary type casting

* Type defaultOnQueryChange func correctly

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-01-19 13:05:12 -08:00
Maikel David Pérez Gómez eca891df09
Create tree-control component (#36432) 2023-01-19 13:59:08 -05:00
Joel Thiessen 2fae3537a7
Experimental SlotContext for managing slot fill interactions (#36333)
* Adding Slotcontext component and adding support to product slot fill components

* Passing inject props correctly to non-function components.
2023-01-19 05:52:45 -04:00
louwie17 fc1745b03b
Add/36075 render fields sections from php config (#36414)
* Add initial component to auto load fills from API config

* Add changelog

* Update logic to make use of new store and re-usable components

* Add changelog

* Add loading state for product form data to add/edit product pages
2023-01-19 04:52:02 -04:00
Joshua T Flowers 1337a6d36e
Add product tour to new product management experience (#36428)
* Add product tour container and modal

* Fix modal open class name

* Add product tour

* Add changelog entry

* Move product tour state logic into hook

* Fix tour selectors for pricing and actions

* Add tests around product tour container

* Add tests around useProductTour hook

* Make tour responsive

* Use tabs instead of spaces

* Fix more scss lint errors

* Remove extra whitespace
2023-01-18 11:11:02 -08:00
Chi-Hsuan Huang e9a4d6c9ba
Add an optional "InputProps" to experimental SelectControl component (#36470)
* Add inputProps to experimental SelectControl component so we can pass custom props to the input

* Add changelog
2023-01-18 11:56:33 +08:00
Joel Thiessen d9daad3e9c
Converting product details section to utilize slot fills (#36368)
* Working prototype of product details via slotfill

* Raising default order for product slot-fills

* Move logic to details field name component

* Adding order prop to all fills.

* Adding components changelog

* Adding changelog

* Deleting obsolete product details section files

* Reducing spacing between slot filled fields
2023-01-17 05:04:58 -04:00
louwie17 8fc9c5cc09
Add basic fields for rendering of Product MVP (#36392) 2023-01-16 12:50:30 -08:00
Joshua T Flowers 0d6af37a66
Add requesting state, actions, and selectors to CRUD data stores (#36297)
* Add requesting state, actions, and selectors to CRUD data stores

* Allow resource specific selectors for requesting status

* Use constants for action names in reducer

* Add tests around new utils

* Add changelog entry

* Use getResourceName instead of getRequestKey in reducer

* Rename and use getRequestIdentifier to avoid ambiguity with resource names

* Sanitize and replace ID query with key in resolution selectors

* Fix up crud action names and remove camel casing

* Fix missing ID in ID query check

* Fix up tests around request identifier

* Add additional tests around utils

* Clean up imports

* Add missing selectors to tests
2023-01-16 07:54:33 -08:00
Joel Thiessen 2dce575449
Adding ProductForm data store (#36430)
* Removing overriding functions in Section.php

* Adding changelog

* Adding product form data store

* Adding data package changelog
2023-01-16 08:13:55 -04:00
Moon c3d62f113a
Migrate product image component to TS (#36305)
* Convert product-image to ts

* Add changelog

* Remove unused ts-expect-error

* Allow arbitrary properties for product

* Remove propTypes

* Update packages/js/components/src/product-image/index.tsx

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

* Update packages/js/components/src/product-image/index.tsx

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

* Update packages/js/components/src/product-image/index.tsx

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

* Update packages/js/components/src/product-image/index.tsx

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

* Remove unused import

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-01-12 19:19:01 -08:00
Moon 4ff99a8555
Migrate Section component to TS (#36298)
* Convert to ts

* Add changelog

* Fix style

* Remove propTypes

* Remove unused import

* Only allow false

* Update packages/js/components/src/section/section.tsx

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

* Update packages/js/components/src/section/section.tsx

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

* Update packages/js/components/src/section/section.tsx

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

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-01-12 13:57:15 -08:00
louwie17 b8c25b49bf
Initial product form field store (#36362)
* Add initial product fields registry store and helper functions

* Add changelog

* Change edit to render and address PR feedback

* Make use of memoize-one instead of rememo as memoize-one is already installed
2023-01-12 04:02:35 -04:00
Matt Harrison e588c560bf
Update spelling of Cancelled to Canceled for US English. (#36294)
* Update spelling of Cancelled to Canceled for US English.

This only updates output display text that uses US English. All code that uses
the form Cancelled is unchanged and is perfectly fine to stay as Cancelled.
(since it is behind the scenes and would require changes in other plugins)

For languages where Cancelled is preferred such as UK English the approprate
form can be applied in the translation files.

Fixes https://github.com/woocommerce/woocommerce/issues/25847

* add changelog file

* Update plugins/woocommerce/tests/api-core-tests/tests/settings/settings-crud.test.js

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

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-01-12 12:13:36 +08:00
Joel Thiessen 6e428201c1
Adding WooProductSectionItem slotfill (#36331) 2023-01-11 10:00:20 -08:00
Maikel David Pérez Gómez 8bada412d4
Product variations should inherit parent product properties (#36234)
Remove manage_stock 'parent' value before saving the variation
2023-01-11 11:41:25 -03:00
Miguel Pérez Pellicer ef3d15fcd4
Make secondQuestion and title params optional in CES Prompt (#36270)
* Set secondQuestion and title as optional

* Update docs and changelog

* Fixes after review
2023-01-11 18:53:36 +07:00
Joel Thiessen f429b9444c
Adding WooProductFieldItem slotfill (#36315) 2023-01-10 10:13:02 -08:00