Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AnchorFM: Podcasting Card #47487

Merged
merged 5 commits into from
Nov 19, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion client/my-sites/customer-home/cards/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ export const TASK_FIND_DOMAIN = 'home-task-find-domain';
export const TASK_GO_MOBILE_ANDROID = 'home-task-go-mobile-android';
export const TASK_GO_MOBILE_IOS = 'home-task-go-mobile-ios';
export const TASK_GROWTH_SUMMIT = 'home-task-growth-summit';
export const TASK_PODCASTING = 'home-task-podcasting';
export const TASK_RENEW_EXPIRED_PLAN = 'home-task-renew-expired-plan';
export const TASK_RENEW_EXPIRING_PLAN = 'home-task-renew-expiring-plan';
export const TASK_SITE_SETUP_CHECKLIST_ECOMMERCE = 'home-task-site-setup-checklist-ecommerce';
export const TASK_SITE_SETUP_CHECKLIST = 'home-task-site-setup-checklist';
export const TASK_SITE_SETUP_CHECKLIST_ECOMMERCE = 'home-task-site-setup-checklist-ecommerce';
export const TASK_WEBINARS = 'home-task-webinars';
32 changes: 32 additions & 0 deletions client/my-sites/customer-home/cards/tasks/podcasting/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* External dependencies
*/
import React from 'react';
import { useTranslate } from 'i18n-calypso';

/**
* Internal dependencies
*/
import Task from 'calypso/my-sites/customer-home/cards/tasks/task';
import { TASK_PODCASTING } from 'calypso/my-sites/customer-home/cards/constants';
import podcastingIllustration from 'calypso/assets/images/customer-home/illustration--task-podcasting.svg';

const Podcasting = () => {
const translate = useTranslate();

return (
<Task
title={ translate( 'Grow your audience with a podcast' ) }
description={ translate(
`Easily turn your blog into a podcast with Anchor — the world's biggest podcasting platform.`
) }
actionText={ translate( 'Get started' ) }
actionUrl={ `https://anchor.fm` }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a temporary link? Similarly to the Stripe connection process on Earn blocks, I think this should redirect to a URL where users can connect their Anchor.fm account to their WP.com account and then they are redirected back to WP.com. But probably that process is still not implemented, in that case the temporary link is fine, but maybe we can include a TODO comment linking to the pending issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I followed the description here: 310-gh-dotcom-manage

I agree -- the action URL as it stands doesn't make sense to me. I'll add a TODO

completeOnStart={ false }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more nitpick: completeOnStart defaults to false so we can remove this altogether.

illustration={ podcastingIllustration }
taskId={ TASK_PODCASTING }
/>
);
};

export default Podcasting;
31 changes: 17 additions & 14 deletions client/my-sites/customer-home/locations/primary/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@ import React, { useEffect } from 'react';
* Internal dependencies
*/
import ConnectAccounts from 'calypso/my-sites/customer-home/cards/tasks/connect-accounts';
import Webinars from 'calypso/my-sites/customer-home/cards/tasks/webinars';
import EarnFeatures from 'calypso/my-sites/customer-home/cards/tasks/earn-features';
import FindDomain from 'calypso/my-sites/customer-home/cards/tasks/find-domain';
import SiteSetupList from 'calypso/my-sites/customer-home/cards/tasks/site-setup-list';
import SiteSetupListEcommerce from 'calypso/my-sites/customer-home/cards/tasks/site-setup-checklist-ecommerce';
import GoMobile from 'calypso/my-sites/customer-home/cards/tasks/go-mobile';
import EarnFeatures from 'calypso/my-sites/customer-home/cards/tasks/earn-features';
import GrowthSummit from 'calypso/my-sites/customer-home/cards/tasks/growth-summit';
import Podcasting from 'calypso/my-sites/customer-home/cards/tasks/podcasting';
import Renew from 'calypso/my-sites/customer-home/cards/tasks/renew';
import SiteSetupList from 'calypso/my-sites/customer-home/cards/tasks/site-setup-list';
import SiteSetupListEcommerce from 'calypso/my-sites/customer-home/cards/tasks/site-setup-checklist-ecommerce';
import Webinars from 'calypso/my-sites/customer-home/cards/tasks/webinars';
import CelebrateSiteCreation from 'calypso/my-sites/customer-home/cards/notices/celebrate-site-creation';
import CelebrateSiteLaunch from 'calypso/my-sites/customer-home/cards/notices/celebrate-site-launch';
import CelebrateSiteMigration from 'calypso/my-sites/customer-home/cards/notices/celebrate-site-migration';
import CelebrateSiteSetupComplete from 'calypso/my-sites/customer-home/cards/notices/celebrate-site-setup-complete';
import Renew from 'calypso/my-sites/customer-home/cards/tasks/renew';
import {
NOTICE_CELEBRATE_SITE_CREATION,
NOTICE_CELEBRATE_SITE_LAUNCH,
Expand All @@ -30,32 +31,34 @@ import {
TASK_GO_MOBILE_ANDROID,
TASK_GO_MOBILE_IOS,
TASK_GROWTH_SUMMIT,
TASK_PODCASTING,
TASK_RENEW_EXPIRED_PLAN,
TASK_RENEW_EXPIRING_PLAN,
TASK_SITE_SETUP_CHECKLIST,
TASK_SITE_SETUP_CHECKLIST_ECOMMERCE,
TASK_SITE_SETUP_CHECKLIST,
TASK_WEBINARS,
} from 'calypso/my-sites/customer-home/cards/constants';
import { withPerformanceTrackerStop } from 'calypso/lib/performance-tracking';
import { bumpStat, composeAnalytics, recordTracksEvent } from 'calypso/state/analytics/actions';
import { connect } from 'react-redux';

const cardComponents = {
[ TASK_SITE_SETUP_CHECKLIST_ECOMMERCE ]: SiteSetupListEcommerce,
[ TASK_SITE_SETUP_CHECKLIST ]: SiteSetupList,
[ NOTICE_CELEBRATE_SITE_CREATION ]: CelebrateSiteCreation,
[ NOTICE_CELEBRATE_SITE_LAUNCH ]: CelebrateSiteLaunch,
[ NOTICE_CELEBRATE_SITE_MIGRATION ]: CelebrateSiteMigration,
[ NOTICE_CELEBRATE_SITE_SETUP_COMPLETE ]: CelebrateSiteSetupComplete,
[ TASK_CONNECT_ACCOUNTS ]: ConnectAccounts,
[ TASK_EARN_FEATURES ]: EarnFeatures,
[ TASK_FIND_DOMAIN ]: FindDomain,
[ TASK_WEBINARS ]: Webinars,
[ TASK_GO_MOBILE_ANDROID ]: GoMobile,
[ TASK_GO_MOBILE_IOS ]: GoMobile,
[ TASK_EARN_FEATURES ]: EarnFeatures,
[ TASK_GROWTH_SUMMIT ]: GrowthSummit,
[ NOTICE_CELEBRATE_SITE_CREATION ]: CelebrateSiteCreation,
[ NOTICE_CELEBRATE_SITE_LAUNCH ]: CelebrateSiteLaunch,
[ NOTICE_CELEBRATE_SITE_MIGRATION ]: CelebrateSiteMigration,
[ NOTICE_CELEBRATE_SITE_SETUP_COMPLETE ]: CelebrateSiteSetupComplete,
[ TASK_PODCASTING ]: Podcasting,
[ TASK_RENEW_EXPIRED_PLAN ]: Renew,
[ TASK_RENEW_EXPIRING_PLAN ]: Renew,
[ TASK_SITE_SETUP_CHECKLIST ]: SiteSetupList,
[ TASK_SITE_SETUP_CHECKLIST_ECOMMERCE ]: SiteSetupListEcommerce,
[ TASK_WEBINARS ]: Webinars,
};

const Primary = ( { cards, trackCards } ) => {
Expand Down