Commit Graph

6685 Commits

Author SHA1 Message Date
Matt Sherman 9c5e9b57bf
Move CES data store to @woocommerce/customer-effort-score (#37252) 2023-03-16 10:22:33 -04:00
Ahmed 3985242547
Add onboarding support for new countries in WCPay (#36906)
* Add new countries to WCPay

* changelog

* add new countries code to woocommerce admin

* Add the new countries to onboarding wizard fallback config file

---------

Co-authored-by: Anurag Bhandari <anurag@automattic.com>
2023-03-16 20:48:45 +08: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
RJ 1c9b3a58fe
fix: mobile app connection owner bug (#37170) 2023-03-16 16:20:36 +08: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
Chi-Hsuan Huang c804e76156
Set up "React Fast Refresh" in woocommerce-admin (#37165)
* Add @pmmmwh/react-refresh-webpack-plugin, react-refresh, webpack-dev-server and add start:hot command

* Set up react fast fresh

* Add changelog

* Run prestart in hot command

* Update pnpm-lock.yaml

* Update pnpm-lock.yaml
2023-03-16 11:52:03 +08: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
Moon 16c7c58462
Update Avalara CTA copy in tax task (#37224)
* Change CTA to Download

* Add changelog
2023-03-14 22:37:07 -07:00
Gan Eng Chin aef22190d2
Make sure expression before && is always boolean in React rendering in marketing page. 2023-03-15 08:24:00 +08:00
Gan Eng Chin 98dcb9bea4
Specify args for wp.data resolution in marketing page to support WP 5.9 (#37198) 2023-03-15 07:30:40 +08:00
Matt Sherman 4cabe5f6b5
Add Tracks events for product inventory tab (#37202) 2023-03-14 18:16:01 -04: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
Gan Eng Chin 0316fbb265
Specify empty array as hasFinishedResolution args.
This is to make things consistent with invalidateResolution to make things work with WP 5.9.
2023-03-14 03:35:20 +08:00
Gan Eng Chin 5a58784a62
Specify empty array as invalidateResolution and hasFinishedResolution args.
This is to make things work with WP 5.9.
2023-03-14 03:32:54 +08: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
Gan Eng Chin 0cf56774f5
Merge branch 'trunk' into feature/34909-marketing-create-campaign-modal 2023-03-13 12:51:24 +08:00
Gan Eng Chin baf9408f69
Merge branch 'feature/34909-marketing-create-campaign-modal' into feature/34904-marketing-introduction-banner
Conflicts:
	plugins/woocommerce-admin/client/marketing/overview-multichannel/Campaigns/Campaigns.test.tsx
	plugins/woocommerce-admin/client/marketing/overview-multichannel/Campaigns/Campaigns.tsx
	plugins/woocommerce-admin/client/marketing/overview-multichannel/MarketingOverviewMultichannel.tsx
2023-03-13 01:02:12 +08:00
louwie17 329b0cbd07
Hydrate product editor settings (#37123) 2023-03-10 12:21:22 -08:00
Gan Eng Chin c6e6f8774d
Specify empty array dependency in useCampaignTypes.
This is to make it work with WP 5.9. See https://github.com/woocommerce/woocommerce/pull/37044#discussion_r1132062493.
2023-03-11 00:42:09 +08:00
Gan Eng Chin 1fea0185fe
Don't throw error in getCampaignTypes.
In WP 5.9, if we throw error, there would be an uncaught promise, and it causes UI to break.
2023-03-11 00:31:23 +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
Joel Thiessen 970c1ef352
Hydrating product entity when creating or editing product with block editor (#37064) 2023-03-09 13:11:25 -08:00
Maikel David Pérez Gómez 2896a8cd13
Add the new feature to enable the new product editor blocks experience (#37137)
* Add the new feature to enable the new product editor blocks experience

* Add the type definition of the feature flag

* Add the feature to the beta_featues in Features.php file

* Keep the page routes when the feature is anabled

* Add the feature php class to manage page assets

* Add changelog file
2023-03-09 15:33:39 -03:00
Gan Eng Chin 0a58ec19f8
Remove unneeded div in CreateNewCampaignModal. 2023-03-10 02:14:35 +08:00
Gan Eng Chin e4da8cba09
Display info message when there are no campaign types. 2023-03-10 02:13:05 +08:00
Gan Eng Chin 6446053784
Load campaign types in overview and refetch after installeing a channel. 2023-03-09 23:46:54 +08:00
Gan Eng Chin 8b6aad4138
Refetch campaign types after installing a channel in CreateNewCampaignModal. 2023-03-09 22:51:12 +08:00
Gan Eng Chin 29d67a3a21
Refactor test data in CreateNewCampaignModal tests. 2023-03-09 22:31:51 +08:00
Gan Eng Chin 9f0326b398
Remove unneeded return in CreateNewCampaignModal.
This helps us save indentation and make the code few lines shorter.
2023-03-09 22:26:06 +08:00
Gan Eng Chin e15305b7c3
Remove unneeded CardDivider in CreateNewCampaignModal.
The code is copied from the Channels component, but in CreateNewCampaignModal, we don't need to display the divider, so we can just remove the divider code.
2023-03-09 22:23:27 +08:00
Gan Eng Chin c6dcee426b
Make it clear that title and classname cannot be overwritten by props. 2023-03-09 22:17:03 +08:00
Gan Eng Chin f5bb8490ea
Rename open and setOpen to isModalOpen and setModalOpen in Campaigns. 2023-03-09 22:11:53 +08:00
Gan Eng Chin e831e89997
Make the mocked modal clearer.
The previous text "Create a new campaign" can be a bit confusing with the other text "Create new campaign" in the test.
2023-03-09 22:09:24 +08:00
Gan Eng Chin 551db21e9b
Remove unneeded getByText in Campaigns test. 2023-03-09 22:05:17 +08:00
Gan Eng Chin f19969dacb
Change NewCampaignTypes to CampaignTypes. 2023-03-09 21:52:11 +08:00
Gan Eng Chin 39ce470fe8
Specify dependency for useSelect in useNewCampaignTypes. 2023-03-09 21:43:54 +08:00
Gan Eng Chin 3ba492f32b
Move convert function out of useSelect in useNewCampaignTypes.
This is so that it doesn't become dependency in useSelect.
2023-03-09 21:42:59 +08: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
Gan Eng Chin 6d72c2bbe1
Fix failed test for Campaigns component. 2023-03-09 01:08:28 +08:00
Gan Eng Chin 66e46d8942
Run lint:css-fix. 2023-03-09 00:34:20 +08: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
Gan Eng Chin 4068808f0a
Merge branch 'feature/34909-marketing-create-campaign-modal' into feature/34904-marketing-introduction-banner 2023-03-08 03:03:31 +08:00
Gan Eng Chin 97ed1d2a7d
Fix array length rendering literal 0 in CreateNewCampaignModal. 2023-03-08 02:57:02 +08:00
Gan Eng Chin 42ac7e4d28
Better logic for displaying buttons in IntroductionBanner. 2023-03-08 02:54:43 +08:00
Gan Eng Chin 8fe3781266
Use ref instead of location hash to scroll to add channels section. 2023-03-08 02:06:06 +08:00
Gan Eng Chin 0cb2fb1cd0
Display CreateNewCampaignModal upon button click in IntroductionBanner. 2023-03-08 00:37:55 +08:00
Gan Eng Chin a9b696d28c
Move CreateNewCampaignModal to shared components folder. 2023-03-08 00:34:09 +08:00
Rodrigue Tusse ed6c19b827 Fix 0 rendered on short-circuit evaluation. 2023-03-07 15:06:25 +02:00
Joel Thiessen 2332c7c813
Migrating details fields to product-editor package (#36945) 2023-03-06 14:33:10 -08:00
Maikel David Pérez Gómez 79841c58a5
Fixes react version to 17.0.2 globally (#37087)
* Fix react version to 17.0.2 globally

* Add changelog file
2023-03-06 18:38:05 -03:00
Joel Thiessen b825b51767
Moving useProductHelper and useVariationsOrder hooks to product editor package (#37006) 2023-03-06 09:11:54 -08:00
Gan Eng Chin 7c9eedbbb4
Merge branch 'feature/34909-marketing-create-campaign-modal' into feature/34904-marketing-introduction-banner
Conflicts:
	plugins/woocommerce-admin/client/marketing/hooks/index.ts
	plugins/woocommerce-admin/client/marketing/overview-multichannel/Channels/RecommendedChannels.tsx
	plugins/woocommerce-admin/client/marketing/overview-multichannel/MarketingOverviewMultichannel.tsx
2023-03-07 00:46:38 +08:00
Gan Eng Chin e653a4ca15
Merge branch 'trunk' into feature/34909-marketing-create-campaign-modal 2023-03-04 01:04:59 +08:00
Gan Eng Chin 3e620c41c6
Add tests for CreateNewCampaignModal. 2023-03-04 01:02:46 +08:00
Gan Eng Chin 00a12db5bd
Add Campaigns card in Multichannel Marketing page (#36735) 2023-03-03 18:43:02 +08:00
Gan Eng Chin 15c57bf712
Fix and add tests for Campaigns card. 2023-03-03 03:25:00 +08:00
Gan Eng Chin 913f7176b2
Refetch registered channels after installing channel in Campaigns card. 2023-03-03 02:34:16 +08:00
Gan Eng Chin ec15697d44
Load campaign types in Campaigns card. 2023-03-03 01:08:21 +08:00
Gan Eng Chin e13112875b
Move useNewCampaignTypes to shared hooks directory. 2023-03-03 01:05:14 +08:00
Gan Eng Chin 51a5a18448
Simplify receiveCampaignTypes. 2023-03-03 00:54:21 +08:00
Gan Eng Chin 8132addd18
Simplify wp.data for receiveCampaignTypes. 2023-03-03 00:24:51 +08:00
Gan Eng Chin 2443bfd7a0
Merge branch 'feature/34905-marketing-campaigns-card' into feature/34909-marketing-create-campaign-modal
Conflicts:
	plugins/woocommerce-admin/client/marketing/data-multichannel/action-types.ts
	plugins/woocommerce-admin/client/marketing/data-multichannel/actions.ts
	plugins/woocommerce-admin/client/marketing/data-multichannel/resolvers.ts
2023-03-03 00:11:35 +08:00
Sam Seay 1834621d1a
Update the @woocommerce/eslint-plugin and fix bugs (#36988) 2023-03-02 11:36:38 +13:00
Moon d339a777e1
Update/use theme color for completed task strikethrough (#37001)
* Use theme color for completed task strikethrough

* Add changelog

* Fix style
2023-03-01 11:54:21 -08:00
Gan Eng Chin c0364ad0ab
Remove unused error property in CampaignsState. 2023-03-02 03:16:29 +08:00
Gan Eng Chin 4b87f0a4ed
Add JSDOC. 2023-03-02 03:15:38 +08:00
Gan Eng Chin 9feaf55a60
Simplify receive campaigns success and error. 2023-03-02 03:02:14 +08:00
Gan Eng Chin 5af90c5e77
Add JSDOC for getTotalFromResponse. 2023-03-02 01:16:51 +08:00
Gan Eng Chin b83888577a
Fix getTotalFromResponse treating total 0 as undefined.
If total is 0, then the function should return 0, not undefined.
2023-03-02 01:13:42 +08:00
Gan Eng Chin 8e9f344478
Test code refactor with createTestCampaign. 2023-03-02 00:59:22 +08: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
Gan Eng Chin d111370d1e
Make UI work with wp.data new campaign types. 2023-02-28 00:51:34 +08:00
Gan Eng Chin 9526608fbc
wp.data for getting new campaign types. 2023-02-28 00:45:47 +08:00
Gan Eng Chin 418e4fba02
Fix build error after merging. 2023-02-27 23:49:50 +08:00
Gan Eng Chin f420a0ed9e
Merge branch 'feature/34905-marketing-campaigns-card' into feature/34909-marketing-create-campaign-modal
Conflicts:
	plugins/woocommerce-admin/client/marketing/components/RecommendedChannelsList.tsx
	plugins/woocommerce-admin/client/marketing/overview-multichannel/Campaigns/Campaigns.scss
	plugins/woocommerce-admin/client/marketing/overview-multichannel/Campaigns/Campaigns.tsx
	plugins/woocommerce-admin/client/marketing/overview-multichannel/Channels/Channels.tsx
	plugins/woocommerce-admin/client/marketing/overview-multichannel/Channels/RecommendedChannels.tsx
2023-02-27 23:46:30 +08:00
Gan Eng Chin e57181b987
Add tests for Campaigns component. 2023-02-27 02:23:11 +08:00
Gan Eng Chin 3513ef51a1
Merge branch 'trunk' into feature/34905-marketing-campaigns-card 2023-02-25 00:39:37 +08:00
Gan Eng Chin f62b44ae2f
Set numberOfRows for TablePlaceholder in Campaigns card. 2023-02-24 23:48:04 +08:00
Gan Eng Chin f7a1ef2123
Code refactor with getTotalFromResponse in getCampaigns. 2023-02-24 23:45:10 +08:00
Gan Eng Chin a4e11924fd
Change meta.total to optional in receiveCampaignsSuccess. 2023-02-24 23:44:47 +08:00
Gan Eng Chin f5ba6d94ac
Remove unused fetchWithHeaders control. 2023-02-24 23:35:40 +08: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
Gan Eng Chin a982b7be21
Error handling in getCampaigns. 2023-02-24 18:32:33 +08:00
Gan Eng Chin 92762ca9b0
Better pagination with TablePlaceholder in Campaigns card. 2023-02-24 17:09:42 +08: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
Fernando Marichal 756fe32c04
Create spotlight on analytics revenue report (#36653)
* Add `RevenueReportDateTour` component

* Add changelog

* Fix styles

* Rename RevenueReportDateTour to ReportDateTour to use it in two different reports: Orders and Revenue

* Change default sort date to date_paid

# Conflicts:
#	plugins/woocommerce/src/Admin/API/Reports/Orders/Stats/DataStore.php

* Update changelog

* Assign date_column_name before calling parent constructor

* Remove date_type default value from configuration and show tour only if user didn't assign a value

---------

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Nathan Schneider <nsschneider1@gmail.com>
2023-02-23 15:49:24 -03:00
Gan Eng Chin cc5345db4e
Campaigns pagination UI logic. 2023-02-24 02:13:20 +08:00
Gan Eng Chin 60d815c582
wp.data for campaigns data pagination. 2023-02-24 02:10:37 +08:00
Gan Eng Chin 20ae504be0
Add controls with fetchWithHeaders. 2023-02-24 02:08:59 +08: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
Nathan Silveira 41eab0d669
Add additional global attributes and local attributes information when saving product attributes (#36858)
* Add additional global attributes and local attributes information when saving product attributes

* Log only local attributes
Add attribute name
Fix issue with attribute_value and names selectors

* Save name and slug for global attributes and global terms
2023-02-20 23:55:01 +01: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
Ilyas Foo e03ed88410
Fix inconsistent colors products task icons (#36889)
* Remove colors overriding theme colors

* Changelog
2023-02-20 18:18:17 +08:00
Ilyas Foo 052bb39e8a
Temporary remove free trial terms from Avalara tax task (#36888)
* Remove free trial terms from Avalara tax task

* Changelog
2023-02-20 13:56:34 +08:00
Chi-Hsuan Huang 30409fa8c3
Update default payment gateway list (#36550)
* Remove Klarna payments from North America and remove Amazon pay from CA

* Update payment gateway list ordering priority

* Add changelog

* Sort gateways by recommendation_priority

* Fix DefaultPaymentGateways.php

Fix lint

Fix paypal

Fix comment

* Remove unneed comment

* Change eway priority to show after square
2023-02-20 09:02:57 +08:00
Nathan Silveira 2ad2b79ac6
Fix inconsistencies on Analytics > Orders table when using date_paid or date_completed (#36876)
* Fix inconsistencies on Analytics > Orders table when using date_paid or date_completed

* Fix sniff

* Fix unit test
2023-02-17 17:52:10 -03:00
Nathan Silveira 9d7e503519
Add date sorting configuration for Analytics (#36492)
* Include fields date_paid and date_completed to wp_wc_order_stats

TODO: add script to create new columns in the database

* Add update script and new columns in get_schema

* Add new configuration in Analytics > Settings to configure type of date used in Revenue report

* Change date_column_name to date_paid

TODO: This will be configurable in future

* Add date type config field

* Use customizable date field in DataStore

* Change label

* Fix linter errors

* Remove blank line

* Put default column name back to date_created

* Make date_paid and date_completed nullable to help with unit tests

* Remove new table creation in update function and use query method instead of get_var

* Extend stats constructor

* Improve date type configuration description

* Set date column name default to date_created to test if build passes

* Fix phpcs issue on constructor

* Remove cache bypass added by mistake

* Improve changelog

* Fill date_paid and date_completed for refunds to avoid problems whem they are being used to sort
Fix unit tests when date_paid or date_completed are being used as sort date

* Change default to date_created

* Bump update script to 7.5.0

* Add prefix and postmeta variables for script
2023-02-17 10:29:36 -03:00
Chi-Hsuan Huang ad2f126a32
Have "Grow your store" appear first in marketing task by default (#36826)
* Have "Grow your store" appear first by default

* Add changelog

* Remove PLUGIN_LIST_DISPLAY_ORDER and use ALLOWED_PLUGIN_LISTS instead
2023-02-17 11:28:20 +08:00
Chi-Hsuan Huang dcba4456cf
Add SlotFill for marketing overview screen (#36828)
* Add slot for marketing overview section slotfill

* Add changelog

* Remove unneed changes

* Add changelog
2023-02-17 09:46:52 +08: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
Gan Eng Chin b717ce9645
Merge branch 'trunk' into feature/34906-marketing-channels-card 2023-02-04 02:33:01 +08:00
Joshua T Flowers 89438cf873
Remove variations logic from the AttributeControl component (#36563)
* Move attribute data changes out of attribute control

* Move dynamic text to props

* Add onModalOpen callback

* Add onModal close prop

* Add changelog entry

* Use closeModal for edit attribute modal

* Add onEdit callback

* Extract util to get unique attribute id

* Rename editingAttribute to currentAttribute

* Rename showAttributeModal to isNewModalVisible

* Rename AddAttributeModal to NewAttributeModal

* Fix up handle add attributes

* Add onRemove callback for attibutes

* Fix up modal styling classes

* Fix up closing edit modal

* Fix up modal title for options

* Handle PR feedback

* Separate handlers for edit and new modal callbacks

* Update event names to be option/attribute specific

* Use default callback functions

* Handle PR feedback
2023-02-02 13:04:32 -08:00
Gan Eng Chin c9214abe1f
Merge branch 'feature/34906-marketing-channels-card' into feature/34905-marketing-campaigns-card 2023-02-03 00:54:51 +08:00
Gan Eng Chin 67c09f63ea
Merge branch 'trunk' into feature/34906-marketing-channels-card 2023-02-03 00:53:21 +08:00
Gan Eng Chin 7bb042fcd2
Simplify CSS for CardHeaderDescription. 2023-02-02 21:50:36 +08:00
Gan Eng Chin 048906ad80
Change Campaigns CSS to use @include font-size(). 2023-02-02 19:06:17 +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
Gan Eng Chin 7b068bf908
Code refactor for Campaigns card CSS. 2023-02-02 17:52:22 +08:00
Gan Eng Chin c17f336acc
Code refactor for Campaigns card. 2023-02-02 17:47:42 +08:00
Gan Eng Chin 0abe368962
Display error state in Campaigns card. 2023-02-02 17:17:29 +08:00
Gan Eng Chin 743c0e5085
Set per_page to 100 for getCampaigns.
100 is the maximum limit allowed by the API.

We do this because the API does not return total number of rows, so we use 100 to get "all" rows, to support pagination in the UI.
2023-02-02 01:03:15 +08:00
Gan Eng Chin 183fc48132
Show CardFooter and Pagination only when it is needed.
This means when total is more than perPage.
2023-02-01 20:29:32 +08:00
Gan Eng Chin eda6f194b9
Use perPage constant instead of literal 5. 2023-02-01 20:27:07 +08:00
Gan Eng Chin 274ea3dd60
Use Link component in Campaigns.
This allows fast client-side navigation.
2023-02-01 20:23:14 +08:00
Gan Eng Chin 29154425cb
Check description before rendering FlexItem.
This is to eliminate the unneeded flex gap when there is no description.
2023-02-01 20:17:53 +08:00
Gan Eng Chin c342cbb98d
Change to color variable in Campaigns CSS. 2023-02-01 20:09:17 +08:00
Gan Eng Chin cd7b5f2c96
Fetch and display campaigns with wp.data. 2023-02-01 19:02:03 +08:00
Gan Eng Chin 46adb0dc25
Rename Channels to RegisteredChannels. 2023-02-01 02:58:49 +08:00
Gan Eng Chin 630bd0ab17
Merge branch 'feature/34906-marketing-channels-card' into feature/34905-marketing-campaigns-card 2023-02-01 00:52:48 +08:00
Gan Eng Chin f050bb79b5
Rename Channel to RegisteredChannel.
This is for better clarity and consistency.
2023-02-01 00:52:35 +08:00
Gan Eng Chin 177fc59dea
Simplify rendering code in MarketingOverviewMultichannel. 2023-02-01 00:29:38 +08:00
Gan Eng Chin 3384ad576d
Remove unused import. 2023-02-01 00:20:04 +08:00
Gan Eng Chin d69f7f00b7
Fix ids typescript error in Campaigns. 2023-02-01 00:18:53 +08:00
Gan Eng Chin 76102143ff
Merge branch 'feature/34906-marketing-channels-card' into feature/34905-marketing-campaigns-card
Conflicts:
	plugins/woocommerce-admin/client/marketing/overview-multichannel/MarketingOverviewMultichannel.tsx
2023-01-31 23:50:03 +08:00
Gan Eng Chin d59e7e5721
Edit and arrange imports in MarketingOverviewMultichannel. 2023-01-31 23:39:02 +08: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
Gan Eng Chin 449da4e91c
Merge branch 'trunk' into feature/34906-marketing-channels-card 2023-01-29 01:29:31 +08:00
Gan Eng Chin e700232415
Simplify Channels component. 2023-01-29 01:28:14 +08:00
Joel Thiessen 9be843422d
Fixing issue preventing import productes CES exit page from firing (#36656) 2023-01-27 12:14:59 -08:00
Joshua T Flowers c12ae8033d
Tweak product link description and display (#36591)
* Tweak product link description and display

* Add changelog entry

* Fix up edit product link modal tests

* Update changelog entry
2023-01-27 10:59:39 -08:00
Gan Eng Chin 15200103cc
Simplify Channels CSS. 2023-01-28 01:16:31 +08:00
Gan Eng Chin 0eb318c1f5
Simplify and remove RecommendedChannels and RecommendedChannelsList components. 2023-01-28 01:12:36 +08:00
Joel Thiessen 79c596cbd0
Updating section and field product fills to support multiple slots (#36592) 2023-01-27 08:42:51 -08:00
Gan Eng Chin 14511ae4d6
Code refactor with SyncStatus and IssueStatus components. 2023-01-28 00:14:50 +08:00
Nathan Silveira d5e2ae0474
Move clearQueue call to inside an useEffect (#36626)
* Move clearQueue call to inside an useEffect

That call was causing a React error (Cannot update a component while rendering a different component)

* Move queueForPage declaration to before it's use
2023-01-27 12:33:48 -03:00
Gan Eng Chin 49032b98db
Make data undefined on first load in useRecommendedChannels. 2023-01-27 21:38:38 +08:00
Gan Eng Chin 316aad8b2e
Simplify RegisteredChannelCardBody CSS. 2023-01-27 21:15:40 +08:00
Gan Eng Chin 0061e34a00
Code refactor on marketing components (#36540) 2023-01-27 16:00:35 +08:00
Gan Eng Chin c2aad26473
Simplify CardHeaderTitle CSS.
- Use `@include font-size ( 20 )` to generate relative size in rem.
- Use unitless number value for line-height; this is the preferred way according to MDN.
- `font-weight` and `letter-spacing` are not needed.

The UI looks the same before and after this change.
2023-01-27 01:26:37 +08:00
Joshua T Flowers dfe2780e6a
Add default value for backorders (#36607)
* Add default value for backorders

* Add changelog entry
2023-01-26 09:20:10 -08: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
Fernando Marichal c030b7dcd5
Add survey when disabling new experience (#36544)
* Add customer-score-tracks data

* Add callback after disabling new exp

* Add TransientNotice after filling out the survey

# Conflicts:
#	plugins/woocommerce/src/Admin/Features/NewProductManagementExperience.php

* Remove comments

* Remove NEW_PRODUCT_MANAGEMENT_FEEDBACK

* Add changelog

* Rename const

* Remove queryParam after showing notice

* Fix lint

* Fix lint 2.0

* Remove empty line

* Refactor `maybe_show_disabled_notice`

* Fix lint 3.0

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-01-23 22:43:17 -03: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 db2343cfed
Enable new experience when new user selects "Physical product" (#36406)
* Enable new experience for simple products

* Add changelog

* Fix `updateOptions`

* Fix redirect when new-exp is enabled

* Redirect when new-exp is enabled

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-01-23 20:18:43 -03:00
Joshua T Flowers 4a2180f442
Show product CES footer on product tour close (#36516)
* Show product CES footer on product tour close

* Add changelog entry

* Remove unused code
2023-01-23 11:55:35 -08:00
Nathan Silveira 732fd7dba7
Fix typo in product tour in new product management experience (#36561) 2023-01-23 16:23:03 -03:00
Joshua T Flowers 7e27cffdb3
Fix overlapping header elements on product page (#36495)
* Place product tabs beneath header elements

* Observe header height changes and adjust tabs position

* Move header height into reusable hook

* Add changelog entry
2023-01-23 10:14:58 -08:00