Commit Graph

6780 Commits

Author SHA1 Message Date
Joshua T Flowers 868fbbf23a
Register product editor blocks server-side (#37339)
* Move product block editor to new feature name

* Register all blocks and block assets server-side

* Add changelog entry

* Disable phpcs rule for file_get_contents
2023-04-06 10:13:48 -07:00
Nathan Silveira 277f4aab12
Show tooltip in Save attributes button instead of using title attribute (#37345)
* Modify tipTip to allow showing dynamic content

* Show tooltip when button is disabled

* Add tipTip and disabled logic to create variations button

* Add header comment in tipTip plugin
2023-04-05 16:22:59 -03:00
Maikel David Pérez Gómez f7572b4361
Move the Save draft and Preview buttons to the product editor header (#37461)
* Add preview button to the product editor header

* Publish the product on add or on save

* Add save draft button

* Save product changes before previewing it

* Add notice messages

* Fix linter errors

* Force the store page to be openned in a new tab after publishing the product

* Enable publish button when the status is not publish

* Add changelog files

* Fix some comment typos

* Address comment suggestions

* Move preview logic to its own component

* Move save draft logic to its own component

* Move publish logic to its own component
2023-04-04 11:30:39 -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
Chi-Hsuan Huang e553759ab6
Fix `FormContext` type error in client/tasks/fills/steps/location.tsx (#37532)
* Fix FormContext type error

* Add changelog
2023-03-31 18:43:16 +08:00
Moon 658034f64e
Migrate steps/location to TS (#37257)
* Migrate steps location to TS

* Add description for ts-expect-error
2023-03-30 12:07:58 -07:00
Ilyas Foo d3229b97cb
Update mobile app modal image resolution (#37506)
* Update image

* Changelog
2023-03-30 23:36:12 +08:00
Gan Eng Chin 5094cc6742
Code refactor: Simplify boolean expression before `&&` in Marketing page (#37452) 2023-03-29 21:15:01 +08:00
Gan Eng Chin a57ec7818e
Code refactor: Move marketing components into coupons directory (#37444) 2023-03-29 21:13:04 +08:00
Gan Eng Chin b2629c03db
Make Multichannel Marketing the default new UI for Marketing page (#37430) 2023-03-29 21:09:23 +08:00
Matt Sherman 30ea6cfc71
Show spotlight when switching to variable product type (#37413)
* Show variable product tour
* Only show tour when product type is changed to variable
* Only show tour if it hasn't been shown before
* Add variable_product_tour_shown to UserPreferences type
* Store whether tour has been shown in user preferences
* Record Tracks events
* Add docblock for woocommerce_admin_get_user_data_fields filter
* Add test for tour
2023-03-28 13:49:40 -04: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
Gan Eng Chin de2aa280ef
Simplify boolean expression before && in Marketing page. 2023-03-27 21:55:42 +08:00
Gan Eng Chin 64bd683e0b
Simplify import. 2023-03-27 20:17:05 +08:00
Gan Eng Chin ab2d56d8b3
Move card and slider into coupons directory. 2023-03-27 19:56:40 +08:00
Gan Eng Chin 48c50afcbf
Move RecommendedExtensions and KnowledgeBase into coupons directory. 2023-03-27 19:56:40 +08:00
Matt Sherman a77e4abffe
Emit error on webpack build when invalid export name used in import for JS (#37195) 2023-03-26 21:42:33 -04:00
Gan Eng Chin 12ec1c88fc
Remove unused classic marketing overview component. 2023-03-24 16:56:52 +08:00
Chi-Hsuan Huang 9cf7ef5a3d
Migrate woocommerce-payments task fills to TS and remove connect.js fill (#37308)
* Migrate woocommerce-payments.js to TS

* Remove tasks/fills/connect.js

* Add changelog

* Remove connect js
2023-03-24 12:26:13 +08: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
Gan Eng Chin 51a57c2808
Remove unused Button component in marketing directory. 2023-03-23 23:28:55 +08:00
Gan Eng Chin 4f7705f691
Always use MarketingOverviewMultichannel for marketing page. 2023-03-23 23:19:34 +08:00
Gan Eng Chin 5953362485
Refetch "Installed extensions" card data after installing recommended channels (#37300) 2023-03-23 15:06:08 +08:00
Gan Eng Chin 1453351521
Simplify tests for CreateNewCampaignModal. 2023-03-22 18:38:43 +08:00
Gan Eng Chin 59c94ce24a
Fix build errors after merging from trunk. 2023-03-22 18:35:06 +08: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
Gan Eng Chin 186f1fb850
Merge branch 'trunk' into feature/37127-marketing-reload-installed-extensions 2023-03-22 18:28:39 +08:00
Gan Eng Chin c0dc416700
Exclude marketing channels in "Installed extensions" and "Discover more marketing tools" cards (#37126) 2023-03-22 17:41:04 +08:00
Gan Eng Chin 76379770a1
Fix hook file name with correct casing. 2023-03-22 16:51:25 +08:00
Gan Eng Chin 1f7a8120a3
Temporary rename file to fix casing issue. 2023-03-22 16:50:27 +08:00
Gan Eng Chin 3189f2b7f5
Reorganize code. 2023-03-22 16:44:44 +08:00
Gan Eng Chin 01492520d3
Fix JSDOC comment in UseRecommendedPluginsWithoutChannels. 2023-03-22 16:38:21 +08:00
Gan Eng Chin 5e6cd11028
Simplify naming in PluginsTabPanel. 2023-03-22 16:09:40 +08:00
Gan Eng Chin b18e1705cd
Fix and simplify mocks in DiscoverTools tests. 2023-03-22 16:07:51 +08:00
Gan Eng Chin 7395d6939c
Fix file name for useInstalledPluginsWithoutChannels. 2023-03-22 15:59:37 +08:00
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
Gan Eng Chin e281c09bc6
Merge branch 'trunk' into feature/34907-marketing-exclude-channels
Conflicts:
	plugins/woocommerce-admin/client/marketing/hooks/index.ts
2023-03-21 23:33:41 +08:00
Gan Eng Chin 637fca8df5
Rename file UseInstalledPlugins to UseInstalledPluginsWithoutChannels. 2023-03-21 23:23:39 +08:00
Gan Eng Chin 648eab74eb
Change namings in useInstalledExtensions to useInstalledPluginsWithoutChannels. 2023-03-21 23:22:39 +08:00
Gan Eng Chin fab90dc712
Fix incorrect data while loading in useRecommendedPlugins.
See the incorrect data issue in https://github.com/woocommerce/woocommerce/pull/37126#discussion_r1141936304.
2023-03-21 22:28:05 +08:00
Gan Eng Chin e4a8d17ed3
Rename file useRecommendedPlugins to useRecommendedPluginsWithoutChannels. 2023-03-21 21:13:19 +08:00
Gan Eng Chin b129dd5173
Change namings and add docs in useRecommendedPlugins. 2023-03-21 21:12:00 +08:00
Gan Eng Chin c6bcf9fa67
Fix incorrect data while loading in useRecommendedPlugins.
See the incorrect data issue in https://github.com/woocommerce/woocommerce/pull/37126#discussion_r1141936304.
2023-03-21 19:30:24 +08:00
Gan Eng Chin fe4e28d511
Rename UseInstalledPlugins to UseInstalledExtensions.
Also change related names from "plugin" to "extension".
2023-03-21 19:08:13 +08:00
Gan Eng Chin 50c391cee0
Use fallback value instead of default value in useInstalledPlugins. 2023-03-21 18:35:38 +08:00
Gan Eng Chin 79023a4a10
Fix incorrect data while loading in useInstalledPlugins. 2023-03-21 18:33:57 +08:00
Gan Eng Chin bebad071a3
Add introduction banner card into multichannel marketing page (#37110) 2023-03-20 19:25:01 +08:00
Gan Eng Chin a2b02fc00c
Rename illustration-large.svg to illustration.svg. 2023-03-20 18:11:02 +08:00
Gan Eng Chin 0300078dfd
Remove unused illustration.svg file. 2023-03-20 18:08:30 +08:00
Gan Eng Chin 4e38969ce7
Use one illustration instead of two in IntroductionBanner. 2023-03-20 18:07:30 +08:00
Gan Eng Chin 7dd7994e01
Make scrollIntoView center on the "Add channels" button. 2023-03-20 17:46:54 +08:00
Gan Eng Chin 29299903c3
Make shouldShowCampaigns boolean type. 2023-03-20 17:23:20 +08:00
RJ a959b589f6
fix: added skydropx slug back to shipping partners list (#37286) 2023-03-20 16:48:44 +08:00
Moon e8a00edaef
Visual tweaks for shipping task partners (#37229)
* Visual tweaks for 2 partners layout

* Add spacing between banner image and list

* Add changelog

* Add spacing between banner image and list

* Align buttons at the bottom

* Lint fix
2023-03-19 21:33:10 -07:00
Gan Eng Chin 5455abcabb
Use useImperativeHandle instead of exposing button ref in Channels. 2023-03-20 01:00:19 +08:00
Gan Eng Chin 75c11a681d
Simplify CSS to have less hardcoded width value. 2023-03-20 00:11:32 +08:00
Gan Eng Chin 38370cc544
Remove unneeded CSS. 2023-03-19 23:34:17 +08:00
Gan Eng Chin ddd287cc4c
Show Campaigns card when banner is dismissed or campaigns total is truthy. 2023-03-19 23:30:21 +08:00
Gan Eng Chin 11683be1a8
Set default parameter values for useCampaigns. 2023-03-19 23:17:22 +08:00
Gan Eng Chin 458c16bad9
Move useCampaigns to shared hooks directory. 2023-03-19 22:54:55 +08:00
Gan Eng Chin c6a95ae9bf
Rename callback props in IntroductionBanner to make them clearer. 2023-03-19 21:10:22 +08:00
Gan Eng Chin 6b75b5db38
Rename variables to make them clearer. 2023-03-19 20:58:54 +08:00
Gan Eng Chin 155211d77a
Remove unneeded Icon component. 2023-03-19 20:56:00 +08:00
Gan Eng Chin 65523e36dd
Fix spacing for close button in IntroductionBanner. 2023-03-19 20:54:34 +08:00
Gan Eng Chin 1b65be0a53
Fix useSelect dependency in useIntroductionBanner. 2023-03-19 20:50:37 +08:00
Gan Eng Chin 99c6ebff15
Remove the use of isOptionsUpdating in useIntroductionBanner.
isOptionsUpdating will return true for any option update, not just our option here. This causes issue as shown in demo video in https://github.com/woocommerce/woocommerce/pull/37110#discussion_r1130531104.

We can just depend on getOption. When we update an option, it will be updated immediately in wp.data store before making API request to update the option in database (see c5564a15c1/packages/js/data/src/options/actions.ts (L44)).
2023-03-19 20:38:20 +08:00
Gan Eng Chin 162d790a7a
Update option name and value to make it more indicative. 2023-03-19 20:16:04 +08:00
Gan Eng Chin 49253425b2
Specify dependency for useSelect in useIntroductionBanner.
Co-authored-by: Eason <eason.su.tw@gmail.com>
2023-03-19 20:12:09 +08:00
Gan Eng Chin 7cc8e065f9
Merge branch 'trunk' into feature/34904-marketing-introduction-banner 2023-03-19 20:09:23 +08:00
Gan Eng Chin e20b9d1ac9
Filter out marketing channels in useRecommendedPlugins. 2023-03-19 18:06:39 +08:00
Gan Eng Chin 8c151984ad
Filter installed plugins against marketing channels in useInstalledPlugins. 2023-03-19 18:06:34 +08:00
Gan Eng Chin 555116f3df
Fix broken tests for CreateNewCampaignModal.
The tests had errors because useInstalledPlugins is added into the component and it is not mocked in the tests.
2023-03-19 17:59:35 +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
Gan Eng Chin 1aaa26e07d
Reload installed extensions data after installing recommended channels.
This is because the channel may not have registered itself as a marketing channel and it should show up in the Installed extensions card.
2023-03-18 00:47:54 +08: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
Gan Eng Chin 8070f65ec7
Make sure expression before `&&` is always boolean in React rendering in marketing page (#37227) 2023-03-17 22:56:35 +08:00
Gan Eng Chin aa15311e8b
Disable React Fast Refresh completely in webpack when running `start` command (#37289) 2023-03-17 22:22:50 +08:00
Chi-Hsuan Huang 9ea8b630ee
Remove cart2cart option from product task (#37285)
* Remove cart2cart option from add product task

* Remove cart2cart link test

* Add changelog

* Fix unit test

* Fix lint
2023-03-17 20:15:31 +08:00
Chi-Hsuan Huang a6e3398e06 Disable React Fast Refresh completely in webpack when running start command 2023-03-17 17:52:24 +08:00
Chi-Hsuan Huang a643fef112
Fix woocommerce-admin "packages" commands (#37204)
Fix WCA run packages command

Add changelog
2023-03-17 15:11:33 +08:00
RJ 23b79428f7
add: payment transaction processor images to payment recommendations (#37230) 2023-03-17 13:49:50 +08:00
RJ 04f34e9636
fix: payments recommendations pane wrong image size (#37259) 2023-03-17 12:29:19 +08:00
Gan Eng Chin f769a8c6f5
Merge branch 'trunk' into feature/34904-marketing-introduction-banner
Conflicts:
	plugins/woocommerce-admin/client/marketing/overview-multichannel/MarketingOverviewMultichannel.tsx
2023-03-17 01:21:13 +08:00
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