Skip to content

Commit

Permalink
Add/growth to comparison page (#96689)
Browse files Browse the repository at this point in the history
* Add Growth to comparison page

* remove upgrade path changes

* Remove lightbox link until Growth lightbox is added

* Add lightbox back to comparison page growth column

* Remove unintentional changes
  • Loading branch information
CodeyGuyDylan authored Dec 4, 2024
1 parent 0fce49b commit c784935
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 9 deletions.
1 change: 1 addition & 0 deletions client/jetpack-cloud/sections/comparison/table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export const Table: React.FC = () => {
{ isFree ? (
<span className="more-info-link">{ translate( 'Basic Jetpack features' ) }</span>
) : (
/* removing until the PR to add the lightbox for Growth is merged */
<MoreInfoLink onClick={ onClickMoreInfoFactory( item ) } item={ item } />
) }
</div>
Expand Down
3 changes: 1 addition & 2 deletions client/jetpack-cloud/sections/comparison/table/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
.display-price__details,
.display-price__billing-time-frame {
display: block;
line-height: 0.5;
white-space: normal;
}

Expand Down Expand Up @@ -322,7 +321,7 @@
width: 200px;
}

col.product-jetpack-starter {
col.product-jetpack-growth {
background-color: rgba(157, 217, 119, 0.1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const CheckIcon = () => <img className="checkmark-icon" src={ Checkmark } alt=""

const allChecked: ComparisonDataItem[ 'features' ][ number ][ 'info' ] = {
FREE: { content: <CheckIcon /> },
GROWTH: { content: <CheckIcon /> },
SECURITY: { content: <CheckIcon /> },
COMPLETE: { content: <CheckIcon /> },
};
Expand Down Expand Up @@ -115,6 +116,9 @@ export const useComparisonData = () => {
FREE: {
content: translate( 'Last 20 events' ),
},
GROWTH: {
content: translate( 'Last 20 events' ),
},
SECURITY: {
highlight: true,
content: translate( '30-day archive' ),
Expand Down Expand Up @@ -177,6 +181,9 @@ export const useComparisonData = () => {
FREE: {
content: translate( 'Manual Critical CSS' ),
},
GROWTH: {
content: translate( 'Manual Critical CSS' ),
},
SECURITY: {
content: translate( 'Manual Critical CSS' ),
},
Expand All @@ -195,6 +202,9 @@ export const useComparisonData = () => {
FREE: {
content: translate( '1 video (Up to 1GB)' ),
},
GROWTH: {
content: translate( '1 video (Up to 1GB)' ),
},
SECURITY: {
content: translate( '1 video (Up to 1GB)' ),
},
Expand Down Expand Up @@ -238,6 +248,18 @@ export const useComparisonData = () => {
</>
),
},
GROWTH: {
highlight: true,
content: (
<>
{ translate( 'Advanced stats' ) }
<br data-screen="desktop" />
{ /* Space between description and parenthesis on mobile */ }
<span data-screen="mobile"> </span>
{ translate( '(10k page views)' ) }
</>
),
},
SECURITY: {
content: (
<>
Expand Down Expand Up @@ -272,6 +294,10 @@ export const useComparisonData = () => {
FREE: {
content: translate( 'Social Free' ),
},
GROWTH: {
highlight: true,
content: translate( 'Social Advanced' ),
},
SECURITY: {
content: translate( 'Social Free' ),
},
Expand All @@ -294,6 +320,9 @@ export const useComparisonData = () => {
FREE: {
content: translate( 'Free' ),
},
GROWTH: {
content: translate( 'Free' ),
},
SECURITY: {
content: translate( 'Free' ),
},
Expand All @@ -312,6 +341,9 @@ export const useComparisonData = () => {
FREE: {
content: translate( '20 free requests' ),
},
GROWTH: {
content: translate( '20 free requests' ),
},
SECURITY: {
content: translate( '20 free requests' ),
},
Expand Down Expand Up @@ -354,6 +386,7 @@ export const useComparisonData = () => {
name: translate( 'Ad network' ),
url: links.ad_network,
info: {
GROWTH: { content: <CheckIcon /> },
SECURITY: { content: <CheckIcon /> },
COMPLETE: { content: <CheckIcon /> },
},
Expand All @@ -370,6 +403,7 @@ export const useComparisonData = () => {
url: links.transaction_fees,
info: {
FREE: { content: translate( '10%' ) },
GROWTH: { content: translate( '2%' ) },
SECURITY: { content: translate( '4%' ) },
COMPLETE: { content: translate( '2%' ) },
},
Expand Down Expand Up @@ -411,6 +445,7 @@ export const useComparisonData = () => {
name: translate( 'Priority support' ),
url: links.priority_support,
info: {
GROWTH: { content: <CheckIcon /> },
SECURITY: { content: <CheckIcon /> },
COMPLETE: { content: <CheckIcon /> },
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
PLAN_JETPACK_SECURITY_T1_YEARLY,
PLAN_JETPACK_COMPLETE,
PLAN_JETPACK_FREE,
//PLAN_JETPACK_GROWTH_YEARLY,
PLAN_JETPACK_GROWTH_YEARLY,
} from '@automattic/calypso-products';
import { useTranslate } from 'i18n-calypso';
import { useMemo } from 'react';
Expand All @@ -18,6 +18,11 @@ export const useProductsToCompare = () => {
name: translate( 'Free' ),
productSlug: PLAN_JETPACK_FREE,
},
{
id: 'GROWTH',
name: translate( 'Growth', { context: 'Jetpack plan name' } ),
productSlug: PLAN_JETPACK_GROWTH_YEARLY,
},
{
id: 'SECURITY',
name: translate( 'Security', { context: 'Jetpack product name' } ),
Expand All @@ -28,12 +33,6 @@ export const useProductsToCompare = () => {
name: translate( 'Complete', { context: 'Jetpack plan name' } ),
productSlug: PLAN_JETPACK_COMPLETE,
},
// This will be added with features once Growth is launched
// {
// id: 'GROWTH',
// name: translate( 'Growth', { context: 'Jetpack plan name' } ),
// productSlug: PLAN_JETPACK_GROWTH_YEARLY,
// },
],
[ translate ]
);
Expand Down

0 comments on commit c784935

Please sign in to comment.