Commit Graph

276 Commits

Author SHA1 Message Date
Gan Eng Chin 57220390b9
Update Codisto extension description and fix WooCommerce name typo in test. 2023-05-16 00:42:15 +08: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
Gan Eng Chin 12ec1c88fc
Remove unused classic marketing overview component. 2023-03-24 16:56:52 +08:00
Gan Eng Chin 51a57c2808
Remove unused Button component in marketing directory. 2023-03-23 23:28:55 +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
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 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
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 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
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