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

Add January Bump card to My Home screen #97692

Merged
merged 3 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all 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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions client/my-sites/customer-home/cards/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const SECTION_BLOGGING_PROMPT = 'home-section-blogging-prompt';
export const SECTION_BLOGANUARY_BLOGGING_PROMPT = 'home-section-bloganuary-blogging-prompt';
export const SECTION_MANAGE_SITE = 'home-section-manage-site';
export const TASK_AFFILIATES = 'home-task-affiliates';
export const TASK_JANUARY_BUMP = 'home-task-january-bump';
export const TASK_CONNECT_ACCOUNTS = 'home-task-connect-accounts';
export const TASK_EARN_FEATURES = 'home-task-earn-features';
export const TASK_GO_MOBILE_ANDROID = 'home-task-go-mobile-android';
Expand Down
33 changes: 33 additions & 0 deletions client/my-sites/customer-home/cards/tasks/january-bump/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { localizeUrl } from '@automattic/i18n-utils';
import { useTranslate } from 'i18n-calypso';
import januaryBumpIllustration from 'calypso/assets/images/customer-home/illustration--january-bump.png';
import { TASK_JANUARY_BUMP } from 'calypso/my-sites/customer-home/cards/constants';
import Task from 'calypso/my-sites/customer-home/cards/tasks/task';

import './style.scss';

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

const title = translate( 'Start That ‘Someday Project’ Now' );
const description = translate(
'Whatever your New Year’s resolutions are—from starting a newsletter to taking on the world with a bold new business—tap into the powerful platform that’s here to help you make it happen sooner.'
);

return (
<Task
customClass="task__january-bump"
title={ title }
description={ description }
actionText={ translate( 'Start today' ) }
actionUrl={ localizeUrl(
'https://wordpress.com/pricing/start-your-someday-project?ref=my-home-card'
) }
completeOnStart={ false }
illustration={ januaryBumpIllustration }
taskId={ TASK_JANUARY_BUMP }
/>
);
};

export default JanuaryBump;
45 changes: 45 additions & 0 deletions client/my-sites/customer-home/cards/tasks/january-bump/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
.task {
&.task__january-bump {
position: relative;

&::before,
&::after {
content: "";
position: absolute;
display: block;
z-index: -1;
}
&::before {
width: 654px;
border-radius: 100%;
height: 654px;
background: #3858e9;
filter: blur(81px);
top: 50%;
left: 50%;
transform: translate(5%, 5%);
}

&::after {
background-image: url(calypso/assets/images/customer-home/plus-pattern-white.png);
top: 0;
left: 0;
width: calc(100% + 32px);
height: calc(100% + 32px);
background-size: 14px;
}

.task__actions {
flex-direction: column;
display: inline-flex;
}
.task__skip {
text-align: left;
}

.task__illustration {
width: 44%;
max-width: 272px;
}
}
}
3 changes: 3 additions & 0 deletions client/my-sites/customer-home/locations/card-components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
SECTION_BLOGANUARY_BLOGGING_PROMPT,
SECTION_LEARN_GROW,
TASK_AFFILIATES,
TASK_JANUARY_BUMP,
TASK_CONNECT_ACCOUNTS,
TASK_DOMAIN_UPSELL,
TASK_EARN_FEATURES,
Expand Down Expand Up @@ -78,6 +79,7 @@ import EarnFeatures from 'calypso/my-sites/customer-home/cards/tasks/earn-featur
import Fiverr from 'calypso/my-sites/customer-home/cards/tasks/fiverr';
import GoMobile from 'calypso/my-sites/customer-home/cards/tasks/go-mobile';
import GoogleDomainOwners from 'calypso/my-sites/customer-home/cards/tasks/google-domain-owners';
import JanuaryBump from 'calypso/my-sites/customer-home/cards/tasks/january-bump';
import Marketplace from 'calypso/my-sites/customer-home/cards/tasks/marketplace';
import NoticeHomeLimitedTimeOfferCoupon from 'calypso/my-sites/customer-home/cards/tasks/notice-home-limited-time-offer-coupon';
import PromotePost from 'calypso/my-sites/customer-home/cards/tasks/promote-post';
Expand Down Expand Up @@ -110,6 +112,7 @@ const PRIMARY_CARD_COMPONENTS: CardComponentMap = {
[ NOTICE_SITE_LAUNCH_SELLER_UPSELL ]: SiteLaunchSellerUpsell,
[ NOTICE_STAGING_SITE ]: StagingSiteNotice,
[ TASK_AFFILIATES ]: Affiliates,
[ TASK_JANUARY_BUMP ]: JanuaryBump,
[ TASK_CONNECT_ACCOUNTS ]: ConnectAccounts,
[ TASK_DOMAIN_UPSELL ]: DomainUpsell,
[ TASK_EARN_FEATURES ]: EarnFeatures,
Expand Down
4 changes: 0 additions & 4 deletions client/my-sites/customer-home/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,6 @@ body.is-section-home.theme-default.color-scheme {
@include break-small {
margin: 32px;
}

@media (min-width: ($break-wide + 1)) {
margin: 0 32px 32px;
}
Comment on lines -311 to -314
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remove this because this was causing the top card margin to be removed on larger screens:
Screenshot 2024-12-20 at 13 29 37
Screenshot 2024-12-20 at 13 29 31
Screenshot 2024-12-20 at 13 29 27
Screenshot 2024-12-20 at 13 29 23

}

// Extend the checklist to the edge of the primary content area
Expand Down
Loading