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

Big Sky GF: Add AI Copy to big sky plans step #99127

Open
wants to merge 5 commits into
base: trunk
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { isEnabled } from '@automattic/calypso-config';
import { setPlansListExperiment } from '@automattic/calypso-products';
import { ONBOARDING_FLOW } from '@automattic/onboarding';
import { useMemo } from 'react';
import { useExperiment } from 'calypso/lib/explat';
Expand Down Expand Up @@ -31,5 +32,7 @@ export function useGoalsFirstExperiment(): [ boolean, boolean ] {
*/
const variationName = experimentAssignment?.variationName ?? 'control';

setPlansListExperiment( EXPERIMENT_NAME, variationName );
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This depends on this #99133 PR as the experiment name is changed there


return [ isLoading, variationName === 'treatment' ];
}
2 changes: 2 additions & 0 deletions client/my-sites/checkout/checkout-main-wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { CheckoutErrorBoundary } from '@automattic/composite-checkout';
import { styled } from '@automattic/wpcom-checkout';
import { useTranslate } from 'i18n-calypso';
import { useEffect } from 'react';
import { useGoalsFirstExperiment } from 'calypso/landing/stepper/declarative-flow/helpers/use-goals-first-experiment';
import { logToLogstash } from 'calypso/lib/logstash';
import { getStripeConfiguration, getRazorpayConfiguration } from 'calypso/lib/store-transactions';
import Recaptcha from 'calypso/signup/recaptcha';
Expand Down Expand Up @@ -80,6 +81,7 @@ export default function CheckoutMainWrapper( {
const translate = useTranslate();
const locale = useSelector( getCurrentUserLocale );
const selectedSiteId = useSelector( getSelectedSiteId ) ?? undefined;
useGoalsFirstExperiment();

useEffect( () => {
window.scrollTo( 0, 0 );
Expand Down
1 change: 1 addition & 0 deletions packages/calypso-products/src/constants/feature-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ export const FEATURE_GROUP_INSTALL_PLUGINS = 'feature-group-install-plugins';
export const FEATURE_GROUP_PERFORMANCE = 'feature-group-performance';
export const FEATURE_GROUP_THEMES = 'feature-group-themes';
export const FEATURE_GROUP_WOO = 'feature-group-woo';
export const FEATURE_GROUP_BIG_SKY = 'feature-group-big-sky';
2 changes: 2 additions & 0 deletions packages/calypso-products/src/constants/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,3 +500,5 @@ export const FEATURE_WOO_AUTOMATE = 'feature-woo-automate';
export const FEATURE_GOOGLE_LISTING_ADS = 'feature-google-listing-ads';
export const FEATURE_CONNECT_ANALYTICS = 'feature-connect-analytics';
export const FEATURE_LIMITED_SITE_ACTIVITY_LOG = 'feature-limited-site-activity-log';
export const FEATURE_BIG_SKY_WEBSITE_BUILDER = 'feature-big-sky-website-builder';
export const FEATURE_BIG_SKY_WEBSITE_BUILDER_CHECKOUT = 'feature-big-sky-website-builder-checkout';
9 changes: 9 additions & 0 deletions packages/calypso-products/src/feature-group-plan-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ import {
FEATURE_CONNECT_ANALYTICS,
FEATURE_GROUP_DEV_TOOLS,
FEATURE_UNLTD_SOCIAL_MEDIA_JP,
FEATURE_BIG_SKY_WEBSITE_BUILDER,
FEATURE_GROUP_BIG_SKY,
} from './constants';
import { FeatureGroupMap } from './types';

Expand Down Expand Up @@ -374,11 +376,17 @@ export const featureGroups: Partial< FeatureGroupMap > = {
WPCOM_FEATURES_PREMIUM_THEMES_LIMITED,
],
},
[ FEATURE_GROUP_BIG_SKY ]: {
slug: FEATURE_GROUP_BIG_SKY,
getTitle: () => null,
getFeatures: () => [ FEATURE_BIG_SKY_WEBSITE_BUILDER ],
},
[ FEATURE_GROUP_ENTITIES ]: {
slug: FEATURE_GROUP_ENTITIES,
getTitle: () => null,
getFeatures: () => [ FEATURE_UNLIMITED_ENTITIES ],
},

[ FEATURE_GROUP_ADS ]: {
slug: FEATURE_GROUP_ADS,
getTitle: () => null,
Expand Down Expand Up @@ -424,6 +432,7 @@ export function resolveFeatureGroupsForFeaturesGrid( {
if ( showSimplifiedFeatures ) {
return {
[ FEATURE_GROUP_STORAGE ]: featureGroups[ FEATURE_GROUP_STORAGE ],
[ FEATURE_GROUP_BIG_SKY ]: featureGroups[ FEATURE_GROUP_BIG_SKY ],
[ FEATURE_GROUP_ENTITIES ]: featureGroups[ FEATURE_GROUP_ENTITIES ],
[ FEATURE_GROUP_DOMAIN ]: featureGroups[ FEATURE_GROUP_DOMAIN ],
[ FEATURE_GROUP_ADS ]: featureGroups[ FEATURE_GROUP_ADS ],
Expand Down
18 changes: 18 additions & 0 deletions packages/calypso-products/src/features-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ import {
FEATURE_WOO_AUTOMATE,
FEATURE_CONNECT_ANALYTICS,
FEATURE_LIMITED_SITE_ACTIVITY_LOG,
FEATURE_BIG_SKY_WEBSITE_BUILDER,
FEATURE_BIG_SKY_WEBSITE_BUILDER_CHECKOUT,
} from './constants';
import type { FeatureList } from './types';

Expand Down Expand Up @@ -2630,6 +2632,22 @@ const FEATURES_LIST: FeatureList = {
},
/* END: Sensei Features */

[ FEATURE_BIG_SKY_WEBSITE_BUILDER ]: {
getSlug: () => FEATURE_BIG_SKY_WEBSITE_BUILDER,
getTitle: () =>
i18n.translate( '{{strong}}Unlimited AI Website Builder edits{{/strong}}', {
components: {
strong: <strong />,
},
} ),
getDescription: () => i18n.translate( 'Build your site with our AI Website Builder.' ),
},
[ FEATURE_BIG_SKY_WEBSITE_BUILDER_CHECKOUT ]: {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The copy on the plans page should be bold, so we create a non bold one for the checkout page, maybe there is a better way to do this?

getSlug: () => FEATURE_BIG_SKY_WEBSITE_BUILDER_CHECKOUT,
getTitle: () => i18n.translate( 'Unlimited AI Website Builder edits' ),
getDescription: () => i18n.translate( 'Build your site with our AI Website Builder.' ),
},

[ FEATURE_UNLIMITED_ENTITIES ]: {
getSlug: () => FEATURE_UNLIMITED_ENTITIES,
getTitle: () => i18n.translate( 'Unlimited pages, posts, users, and visitors' ),
Expand Down
8 changes: 8 additions & 0 deletions packages/calypso-products/src/is-goals-first.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { getPlansListExperiment } from './experiments';

export function isGoalsFirst(): boolean {
return (
getPlansListExperiment( 'calypso_signup_onboarding_goals_first_flow_holdout_20241220' ) ===
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are only showing the copy to the treatment_cumulative group. @p-jackson can you confirm this? Also the experiment name when this PR is merged

'treatment_cumulative'
);
}
9 changes: 9 additions & 0 deletions packages/calypso-products/src/plans-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,11 @@ import {
JETPACK_TAG_FOR_BLOGGERS,
FEATURE_CONNECT_ANALYTICS,
FEATURE_JETPACK_SOCIAL_V1_MONTHLY,
FEATURE_BIG_SKY_WEBSITE_BUILDER,
FEATURE_BIG_SKY_WEBSITE_BUILDER_CHECKOUT,
} from './constants';
import { isGlobalStylesOnPersonalEnabled } from './is-global-styles-on-personal-enabled';
import { isGoalsFirst } from './is-goals-first';
import {
getPlanBusinessTitle,
getPlanEcommerceTitle,
Expand Down Expand Up @@ -792,6 +795,7 @@ const getPlanPersonalDetails = (): IncompleteWPcomPlan => ( {
},
get2023PricingGridSignupWpcomFeatures: () => {
const baseFeatures = [
...( isGoalsFirst() ? [ FEATURE_BIG_SKY_WEBSITE_BUILDER ] : [] ),
FEATURE_UNLIMITED_ENTITIES,
FEATURE_CUSTOM_DOMAIN,
FEATURE_AD_FREE_EXPERIENCE,
Expand Down Expand Up @@ -858,6 +862,7 @@ const getPlanPersonalDetails = (): IncompleteWPcomPlan => ( {
],
getCheckoutFeatures: () => {
const baseFeatures = [
...( isGoalsFirst() ? [ FEATURE_BIG_SKY_WEBSITE_BUILDER_CHECKOUT ] : [] ),
FEATURE_CUSTOM_DOMAIN,
FEATURE_AD_FREE_EXPERIENCE,
FEATURE_FAST_DNS,
Expand Down Expand Up @@ -1363,6 +1368,7 @@ const getPlanPremiumDetails = (): IncompleteWPcomPlan => ( {
].filter( isValueTruthy ),
get2023PricingGridSignupWpcomFeatures: () => {
return [
...( isGoalsFirst() ? [ FEATURE_BIG_SKY_WEBSITE_BUILDER ] : [] ),
FEATURE_UNLIMITED_ENTITIES,
FEATURE_CUSTOM_DOMAIN,
FEATURE_AD_FREE_EXPERIENCE,
Expand All @@ -1383,6 +1389,7 @@ const getPlanPremiumDetails = (): IncompleteWPcomPlan => ( {
];
},
getCheckoutFeatures: () => [
...( isGoalsFirst() ? [ FEATURE_BIG_SKY_WEBSITE_BUILDER_CHECKOUT ] : [] ),
FEATURE_CUSTOM_DOMAIN,
FEATURE_FAST_SUPPORT_FROM_EXPERTS,
WPCOM_FEATURES_PREMIUM_THEMES_UNLIMITED,
Expand Down Expand Up @@ -1532,6 +1539,7 @@ const getPlanBusinessDetails = (): IncompleteWPcomPlan => ( {
].filter( isValueTruthy ),
get2023PricingGridSignupWpcomFeatures: () => {
return [
...( isGoalsFirst() ? [ FEATURE_BIG_SKY_WEBSITE_BUILDER ] : [] ),
FEATURE_UNLIMITED_ENTITIES,
FEATURE_CUSTOM_DOMAIN,
FEATURE_AD_FREE_EXPERIENCE,
Expand Down Expand Up @@ -1575,6 +1583,7 @@ const getPlanBusinessDetails = (): IncompleteWPcomPlan => ( {
];
},
getCheckoutFeatures: () => [
...( isGoalsFirst() ? [ FEATURE_BIG_SKY_WEBSITE_BUILDER_CHECKOUT ] : [] ),
FEATURE_CUSTOM_DOMAIN,
FEATURE_PLUGINS_THEMES,
FEATURE_BANDWIDTH,
Expand Down
2 changes: 2 additions & 0 deletions packages/calypso-products/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import {
FEATURE_GROUP_CUSTOMIZE_STYLE,
FEATURE_GROUP_CUSTOM_PLUGINS,
FEATURE_GROUP_DEV_TOOLS,
FEATURE_GROUP_BIG_SKY,
} from './constants';
import { PriceTierEntry } from './get-price-tier-for-units';
import type { TranslateResult } from 'i18n-calypso';
Expand Down Expand Up @@ -264,6 +265,7 @@ export type FeatureGroupSlug =
| typeof FEATURE_GROUP_CUSTOMIZE_STYLE
| typeof FEATURE_GROUP_DOMAIN
| typeof FEATURE_GROUP_ENTITIES
| typeof FEATURE_GROUP_BIG_SKY
| typeof FEATURE_GROUP_PERFORMANCE
| typeof FEATURE_GROUP_THEMES
| typeof FEATURE_GROUP_WOO
Expand Down