Commit Graph

188 Commits

Author SHA1 Message Date
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
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
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
Gan Eng Chin 14511ae4d6
Code refactor with SyncStatus and IssueStatus components. 2023-01-28 00:14:50 +08: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 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
Gan Eng Chin d70fb07f31
Modify PluginCardBody to accept className, and change description type. 2023-01-21 23:13:13 +08:00
Gan Eng Chin 6baa403071
Move and rename type Plugin to RecommendedPlugin. 2023-01-21 23:12:04 +08:00
Gan Eng Chin d252922110
Rename file Plugin to InstalledPlugin.
(cherry picked from commit 0229354da0)
2023-01-21 23:11:47 +08:00
Gan Eng Chin 8873252c45
Rename type Plugin to InstalledPlugin.
(cherry picked from commit 56dbf53a35)
2023-01-21 23:11:36 +08:00
Gan Eng Chin 0fe028d8c2
Code refactor with CardHeaderTitle component.
This component will be used in other components later.

(cherry picked from commit 995fb7e02d)
2023-01-21 23:10:31 +08:00
Gan Eng Chin 3f56382cf1
Code refactor with CenteredSpinner.
(cherry picked from commit 5216643465)
2023-01-21 23:09:06 +08:00
Gan Eng Chin 1af1524b83
Rename CSS installed-channel to registered-channel. 2023-01-21 02:38:00 +08:00
Gan Eng Chin ef669d8ca2
Rename InstalledChannel to RegisteredChannel. 2023-01-21 02:36:39 +08:00
Gan Eng Chin 8754003fb0
Add mapping for sync-failed product listings status. 2023-01-21 02:26:19 +08:00
Gan Eng Chin 2a15f09514
Remove TODO comments. 2023-01-21 02:22:30 +08:00
Gan Eng Chin 3cc568b4ed
Remove duplicated RecommendedChannel type. 2023-01-21 02:20:06 +08:00
Gan Eng Chin 0b1ab21836
Rename types. 2023-01-21 02:14:36 +08:00
Gan Eng Chin d69f078fd5
Replace useIsPluginInstalled with useIsPluginInstalledNotActivated. 2023-01-20 01:36:39 +08:00
Gan Eng Chin cd0402a10c
Refetch registered channels after install and activate recommended channels. 2023-01-20 01:02:41 +08:00
Gan Eng Chin 9fa6ea4a25
Display activate button for channels that are not yet activated. 2023-01-20 00:36:34 +08:00
Gan Eng Chin 223ea4d712
Filter recommended channels to get "not installed" or "not activated" channels. 2023-01-19 22:23:00 +08:00
Gan Eng Chin cf4c62e707
Fix loading bug in useRecommendedChannels. 2023-01-19 19:50:56 +08:00
Gan Eng Chin b708cc18ff
Get recommended channels from API. 2023-01-19 19:33:51 +08:00
Gan Eng Chin 2d7c8db2e5
Map product_listings_status to syncStatus. 2023-01-19 01:32:38 +08:00
Gan Eng Chin 0a36d7a4fe
Map errors_count to issueType and issueText. 2023-01-19 01:12:50 +08:00
Gan Eng Chin f616d688d8
Call marketing channels API with wp.data. 2023-01-18 02:04:42 +08:00
Gan Eng Chin c89b28157d
Merge branch 'feature/34903-multichannel-marketing-frontend/34905-campaigns-card' into feature/34903-multichannel-marketing-frontend/34909-create-campaign-modal
Conflicts:
	plugins/woocommerce-admin/client/marketing/hooks/index.ts
	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
	plugins/woocommerce-admin/client/marketing/overview-multichannel/Channels/useChannels.ts
2022-12-24 02:07:15 +08:00
Gan Eng Chin 1d7b663186
Remove the unneeded "Create new campaign" button for now. 2022-12-24 01:45:59 +08:00
Gan Eng Chin 8e39098256
Show Campaigns card only when there is at least one registered channel. 2022-12-24 01:43:09 +08:00
Gan Eng Chin ee6fa9508e
Merge branch 'feature/34903-multichannel-marketing-frontend/34906-channels-card' into feature/34903-multichannel-marketing-frontend/34905-campaigns-card
Conflicts:
	plugins/woocommerce-admin/client/marketing/overview-multichannel/MarketingOverviewMultichannel.tsx
2022-12-24 01:39:57 +08:00
Gan Eng Chin 52dd8845cc
Load registered and recommended channels in MarketingOverviewMultichannel.
The data will be used to conditionally display Campaigns card later.
2022-12-24 01:14:02 +08:00
Gan Eng Chin e950417542
Move useRegisteredChannels and useRecommendedChannels into shared hooks directory. 2022-12-24 00:48:03 +08:00
Gan Eng Chin 7bd32ba638
Remove useChannels and use useRegisteredChannels and useRecommendedChannels directly. 2022-12-24 00:32:23 +08:00
Gan Eng Chin 9e0b71ff1c
Rename CollapsibleRecommendedChannels to RecommendedChannels. 2022-12-23 22:12:16 +08:00
Gan Eng Chin af2f4eb904
CSS for "Add channels" button. 2022-12-23 22:08:50 +08:00
Gan Eng Chin 31b635b888
Code refactor: move CSS code to corresponding SCSS file. 2022-12-23 21:53:42 +08:00
Gan Eng Chin 06a303fc33
Types for useRegisteredChannels. 2022-12-23 21:21:52 +08:00
Gan Eng Chin 4fa4f802e9
Check for empty recommended channels. 2022-12-23 21:19:00 +08:00
Gan Eng Chin d0de1b5c21
Add border and change padding for recommended channels in create campaign modal. 2022-12-23 02:00:45 +08:00
Gan Eng Chin 07894d42e3
Code refactor for Campaigns component, remove unneeded CampaignsCardHeader. 2022-12-22 01:52:24 +08:00
Gan Eng Chin a3c8680789
Use perPage variable instead of duplicated number. 2022-12-22 01:34:46 +08:00
Gan Eng Chin 321145eb2e
Better code clarity with woocommerce-marketing-campaigns-table class name. 2022-12-21 23:12:10 +08:00
Gan Eng Chin 894b77dc96
Code refactor with CreateNewCampaignModal. 2022-12-21 22:56:22 +08:00
Gan Eng Chin 5caffb6c63
Make create campaign button open in new tab depending on createUrl origin. 2022-12-21 21:26:57 +08:00
Gan Eng Chin 6b3fbdf16b
Display new campaign types in create campaign modal. 2022-12-21 02:38:56 +08:00
Gan Eng Chin 24d59f7316
Hide the recommended channels section if it is empty. 2022-12-20 22:39:00 +08:00
Gan Eng Chin 17f2072d9f
Display recommended channels in create campaign modal. 2022-12-20 02:37:02 +08:00
Gan Eng Chin 5f50e63a1e
Move useRecommendedChannels to shared hooks directory. 2022-12-20 02:35:37 +08:00
Gan Eng Chin 6de95c78a1
Move RecommendedChannelsList to shared components directory. 2022-12-20 02:33:35 +08:00
Gan Eng Chin 33998743d6
Remove unneeded imports in RecommendedChannelsList. 2022-12-20 02:29:42 +08:00
Gan Eng Chin 08661353eb
Add CampaignsCardHeader component with modal. 2022-12-20 01:17:30 +08:00
Gan Eng Chin 558ddf2609
Use Campaign type in useCampaigns. 2022-12-19 20:54:01 +08:00
Gan Eng Chin c67e479162
Add Campaign type. 2022-12-19 20:53:31 +08:00
Gan Eng Chin cbc616a9f3
Set cost column as numeric in Campaigns card.
This makes the column right-aligned.
2022-12-18 20:38:07 +08:00
Gan Eng Chin 32cf8d1341
Add pagination to Campaigns card. 2022-12-18 20:37:25 +08:00
Gan Eng Chin c444dbd126
CSS for campaign rows in Campaigns card. 2022-12-18 20:08:21 +08:00
Gan Eng Chin f5799c8721
Display campaign data in table in Campaigns card. 2022-12-18 19:34:16 +08:00
Gan Eng Chin af4f79ab28
Add loading state for Campaigns card. 2022-12-17 21:08:14 +08:00
Gan Eng Chin 30d316886c
Add empty state Campaigns card. 2022-12-16 01:13:32 +08:00
Gan Eng Chin 2e8b5227e4
Move RecommendedChannel type. 2022-12-14 20:54:29 +08:00
Gan Eng Chin 6f4e05945b
Add dummy data for testing in useRecommendedChannels. 2022-12-14 20:19:20 +08:00
Gan Eng Chin 6c127d70c8
Add dummy data for testing. 2022-12-14 20:11:40 +08:00
Gan Eng Chin 6b80109754
Code refactor with RecommendedChannelsList. 2022-12-14 02:07:35 +08:00
Gan Eng Chin 4a2205bcd1
Display recommended channels in a collapsible list in Channels card. 2022-12-14 01:13:00 +08:00
Gan Eng Chin 9963fd07ab
Display description and button based on channel setup status in Channels card. 2022-12-13 23:23:13 +08:00
Gan Eng Chin f713c01f56
Add more properties into InstalledChannel type. 2022-12-13 23:22:27 +08:00
Gan Eng Chin e6e6dc19ef
Display issue status in Channels card. 2022-12-13 22:47:16 +08:00
Gan Eng Chin 437ebb20a8
Display sync status in Channels card. 2022-12-13 21:36:09 +08:00
Gan Eng Chin 02ce7cccc5
Modify PluginCardBody to accept className, and change description type. 2022-12-13 21:35:01 +08:00
Gan Eng Chin be621df8da
Add more data for testing. 2022-12-10 02:29:58 +08:00
Gan Eng Chin a9010ffd68
Add InstalledChannelCardBody to Channels. 2022-12-10 02:29:58 +08:00
Gan Eng Chin 92112e27a1
Add InstalledChannel type. 2022-12-10 02:29:58 +08:00
Gan Eng Chin 7852448a7a
Use SmartPluginCardBody in Channels component. 2022-12-10 02:29:58 +08:00
Gan Eng Chin 5da2385d41
Add SmartPluginCardBody component. 2022-12-10 02:29:58 +08:00
Gan Eng Chin 542b26e346
Move and rename type Plugin to RecommendedPlugin. 2022-12-10 02:29:58 +08:00
Gan Eng Chin 0229354da0
Rename file Plugin to InstalledPlugin. 2022-12-10 02:29:58 +08:00
Gan Eng Chin 56dbf53a35
Rename type Plugin to InstalledPlugin. 2022-12-10 02:29:57 +08:00
Gan Eng Chin 5cd1d0fe3f
Add CardHeaderDescription in Channels card. 2022-12-10 02:29:57 +08:00
Gan Eng Chin 995fb7e02d
Code refactor with CardHeaderTitle component.
This component will be used in other components later.
2022-12-10 02:29:57 +08:00
Gan Eng Chin a8c8be7c26
Use CenteredSpinner in Channels. 2022-12-10 02:29:57 +08:00
Gan Eng Chin 5216643465
Code refactor with CenteredSpinner. 2022-12-10 02:29:57 +08:00
Gan Eng Chin dc7a233cb1
Add Channels card into Marketing page. 2022-12-10 02:29:57 +08:00
Gan Eng Chin a811009a06
Add one-click installation for recommended extensions in multichannel Marketing page (#35542) 2022-11-24 21:46:08 +08:00
Gan Eng Chin 9e697cdf0a
Add tests for UI Revamp on Marketing page (#34840) 2022-09-27 22:25:48 +08:00
Gan Eng Chin 4b4b5f36e2
Feature integration: UI Revamp on Marketing Page (#34642)
Co-authored-by: Nima <nima.karimi@automattic.com>
Co-authored-by: Nima Karimi <73110514+nima-karimi@users.noreply.github.com>
2022-09-14 15:43:30 +08:00
Gan Eng Chin a197622df1
Replace Facebook icon (#34592)
* Replace facebook icon.

* Use facebook.svg file instead of duplicating svg.

* Add changelog.
2022-09-07 22:45:05 +08:00
aezazs-multidots f9642fedc8
fix-marketing-slider-image-size (#34589) 2022-09-07 16:32:46 +08:00
Gan Eng Chin 945a55adbc
Update Google logo icon (#34471)
* Update Google logo icon.

* Update Google logo icon to use img element with svg file.

* Simplify ProductIcon CSS with size prop.

This applies to svg and image icons, not just svg.

* Add changelog.

* Set style for Google logo icon.

We set white background to override the gray backgroun in ProductIcon.

Padding is used to make it look visually similar size with other icons.

* Update style for Google logo.
2022-08-26 19:24:19 +08:00
Rodrigue 0b772e31e3
Add back FB extension to Installed marketing extensions list. (#34259)
* Update FB icon component SVG to latest FB icon.
2022-08-26 19:36:44 +09:30
Chi-Hsuan Huang 7068c78101
Fix JS lint errors (#33484)
* Fix @woocommerce/data lint errors

* Fix internal-e2e-builds lint error

* Fix lint errors
2022-06-21 16:37:34 +08:00
RJChow 26ec889111 Manually change i18n text domain from 'woocommerce-admin' to 'woocommerce' in WCA Client .md files 2022-04-01 11:41:32 +08:00
RJChow 1ba60ee69d Codemod to change i18n text domain from 'woocommerce-admin' to 'woocommerce' in WCA Client 2022-04-01 11:41:32 +08:00
Chi-Hsuan Huang c05ed7777a Update dependencies to support react 17 (https://github.com/woocommerce/woocommerce-admin/pull/8305)
* Upgrade dependencies to support react17

Update pkg

Update @wordpress/api-fetch and gridicons

* Update test snapshots

* Update SnackbarList with latest react-spring

* Mock data.dispatch for task-list-item.test.tsx

* Remove '@wordpress/components/src/visually-hidden/style' import

wp-components has included it

* Update interpolateComponents import path

* Fix display-options test

* Add changelogs

Update changelogs

* Add @automattic/explat-client-react-helpers back

* Update webpack.config for explat-client-react-helpers

Update webpack config comment

Fix grammar
2022-02-21 10:34:25 +08:00