Commit Graph

1005 Commits

Author SHA1 Message Date
Joel Thiessen b8416d7948
Replacing multiple components on the product page with a single hook. (#37283)
* Replacing multiple componments on the product page with a single hook.

* Adding changelog

* Removed the conditional hook logic, because of React rule - Don’t call Hooks inside loops, conditions, or nested functions.

* Use promise for receiving entity, and reload template on product change

* Add changelog

---------

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2023-03-22 04:48:55 -03:00
Matt Sherman b27f6023f8
Move remaining CES-related components to @woocommerce/customer-effort-score (#37316)
* Add @woocommerce/tracks to dev dependencies
* Move remaining CES-related components to @woocommerce/customer-effort-score
* Update imports in woocommerce/client/admin
2023-03-21 11:58:35 -04:00
Maikel David Pérez Gómez 62ca7a266b
Add the summary field to the product form (#37302)
* Add summary block

* Add changelog files

* Add text alignment

* Add RTL and type definitions

* Add justify text alignment

* Fix rebasing errors
2023-03-21 12:34:24 -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
Joel Thiessen edbe36d7ad
Adding collapsible content block with flexible rendering (#37305)
* Adding collapsible content block with flexible rendering

* Adding changelogs

* Move content inside display state to avoid backwards compat issues

---------

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2023-03-20 18:18:44 -07:00
Chi-Hsuan Huang 7b10baff00
Add tracks for plugin installation and activation (#37261)
* Add @woocommerce/tracks to @woocommerce/data dependencies

* Add tracks for plugin actions and handle plugin error properly

* Add changelog

* Add doc

* Update doc
2023-03-20 10:38:30 +08: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
Maikel David Pérez Gómez e370f25c0c
Add a product header component to the blocks interface (#37152)
* Add button and saving logic

* Add comment suggestions

* Add changelog files

* Add comment suggestions

* Set header title to product name if the name field is dirty otherwise the default title value

* Navigate to EditProductPage after creating the product succesfully

* Add get-header-title util and expose edited product name from useSelect
2023-03-17 13:21:15 -03:00
Joshua T Flowers 5ed070d78a
Add tests around product block editor tabs (#37225)
* Add tests around tabs

* Add changelog entry

* Fix up frozen lock file

* Fix up frozen lock file

* Fix up lock file after rebase
2023-03-16 14:46:38 -07:00
Joshua T Flowers 90e7c66ba6
Remove the product block breadcrumbs and sidebar inspector (#37250)
* Remove the product block breadcrumbs and sidebar inspector

* Add changelog entry
2023-03-16 09:12:11 -07:00
Matt Sherman 9c5e9b57bf
Move CES data store to @woocommerce/customer-effort-score (#37252) 2023-03-16 10:22:33 -04:00
Joshua T Flowers 77937dd8cb
Move usePreventLeavingPage to navigation package (#36752)
* Move usePreventLeavingPage to navigation package

* Rename usePreventLeavingPage to useConfirmUnsavedChanges

* Move imports to external dependencies

* Fix up history push overrides

* Add changelog entries

* Fix up rebase issues

* Update i18n dependency to wp-6.0

* Fix up lock file

* Remove unused imports

* Update lock file

* Remove self import for navUtils
2023-03-16 05:33:22 -03:00
Chi-Hsuan Huang f50abc724f
Remove accordion from "Other payment providers" in WC Pay Task (#37205)
* Remove accordion from Other payment providers in WC Pay Task

* Add changelog

* Fix tests

* Update test

* Fix e2e test
2023-03-16 12:11:59 +08:00
Joshua T Flowers cb82998688
Improve accessibility around product editor tabs (#37217)
* Improve accessibility around product editor tabs

* Add changelog entry
2023-03-15 11:50:37 -07:00
louwie17 93506388e3
Update product rest config and template block usage (#37206)
* Update product post rest configs

* Update block usage

* Add changelogs

* Fix lint

* Make use of setupEditorState instead of setupEditor as we do not have a content block

* Simplify product condition

* Make use of core store only
2023-03-15 13:44:05 -03:00
Matt Sherman b94d38458d
Add components to @woocommerce/customer-effort-score (#37112)
* Update src structure of @woocommerce/customer-effort-score

* Changelog

* Add dependencies to @woocommerce/customer-effort-score

* Move useCustomerEffortScoreExitPageTracker and utils to @woocommerce/customer-effort-score

* Fix up imports from @woocommerce/customer-effort-score

* Changelog

* Fix import of constant

* Mock @woocommerce/customer-effort-score in tests

* Move tests to @woocommerce/customer-effort-score

* Update lock file

* Update lock file from trunk

* Update lock file again... this time, tests pass
2023-03-14 12:16:19 -04: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
Joshua T Flowers 2b4ed6fe03
Add section block for use in product editor (#37153)
* Allow json imports in product editor package

* Add section block

* Init all blocks in product editor

* Add section styles and base product editor font styles

* Add changelog entry

* Handle PR feedback
2023-03-13 11:38:16 -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
louwie17 329b0cbd07
Hydrate product editor settings (#37123) 2023-03-10 12:21:22 -08:00
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
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
Joel Thiessen b825b51767
Moving useProductHelper and useVariationsOrder hooks to product editor package (#37006) 2023-03-06 09:11:54 -08:00
Maikel David Pérez Gómez 7dd379773b
Add a11y support for the tree-control (#36459)
* Add tree-control expand/collapse on click the expander button or by a custom logic

* Upgrade WP components dependency to v19.8.5 to support indeterminate checkbox control

* Add styles to fit the disign

* Add tree-control expand/collapse on click the expander button or by a custom logic

* Add a11y landmarks

* Add keyboard interactions

* Add changelog file

* Fix linter errors

* Resolving rebase conflicts

* Add comment suggestions
2023-03-02 17:26:41 -03:00
Sam Seay 1834621d1a
Update the @woocommerce/eslint-plugin and fix bugs (#36988) 2023-03-02 11:36:38 +13:00
Maikel David Pérez Gómez e61211406f
Add hightlighter to the tree control (#36480)
* Add tree-control expand/collapse on click the expander button or by a custom logic

* Add stories

* Upgrade WP components dependency to v19.8.5 to support indeterminate checkbox control

* Add styles to fit the disign

* Add type definitions

* Add custom hook to manage highlight

* Add hightlighter to the tree control

* Add stories

* Add changelog file

* Fix rebase conflicts

* Add comment suggestions
2023-03-01 13:52:23 -03:00
louwie17 93af1c73e9
Update tree select control (#36932)
* Export tree select control and add 3 additional props

* Update storyboook

* Add unit tests for new props

* Fix duplicate parent selection
2023-03-01 03:54:53 -04:00
Maikel David Pérez Gómez 7d0669dcb1
Add selection to the tree control (#36435)
* Create tree-control component

* Remove items from treeItemProps

* Add tree-control expand/collapse on click the expander button or by a custom logic

* Add stories

* Add the type definitions

* Add use selection hook

* Upgrade WP components dependency to v19.8.5 to support indeterminate checkbox control

* Add selection logic to the tree control

* Create stories

* Add changelog file

* Fix linter error

* Add styles to fit the disign

* Highlight selected item when it's a single selection tree

* Rebasing from trunk

* Add comment suggestions

* Fix unit test errors due to a new version of @wordpress/compose related to the ResizeObserve feat
2023-02-28 15:10:12 -03:00
Joel Thiessen 6a345ac7eb
Moving currencyContext to currency package and updating references (#36959) 2023-02-28 08:55:49 -08:00
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