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

Launchpad: Remove experiment code #95481

Merged
merged 2 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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,6 +1,5 @@
import { updateLaunchpadSettings } from '@automattic/data-stores';
import { ExperimentAssignment } from '@automattic/explat-client';
import { useExperiment } from 'calypso/lib/explat';

export const LAUNCHPAD_EXPERIMENT_NAME = 'calypso_onboarding_launchpad_removal_test_2024_08';

Expand All @@ -21,8 +20,7 @@ interface SiteProps {
}

export const useLaunchpadDecider = ( { exitFlow, navigate }: Props ) => {
const [ isLoadingExperiment, experimentAssignment ] = useExperiment( LAUNCHPAD_EXPERIMENT_NAME );
const showCustomerHome = shouldShowCustomerHome( isLoadingExperiment, experimentAssignment );
const showCustomerHome = true;
bogiii marked this conversation as resolved.
Show resolved Hide resolved

let launchpadStateOnSkip: null | 'skipped' = null;
if ( showCustomerHome ) {
Expand Down
21 changes: 1 addition & 20 deletions client/landing/stepper/declarative-flow/site-setup-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { isTargetSitePlanCompatible } from 'calypso/blocks/importer/util';
import { useIsSiteAssemblerEnabled } from 'calypso/data/site-assembler';
import { useIsBigSkyEligible } from 'calypso/landing/stepper/hooks/use-is-site-big-sky-eligible';
import { useQuery } from 'calypso/landing/stepper/hooks/use-query';
import { useExperiment } from 'calypso/lib/explat';
import { ImporterMainPlatform } from 'calypso/lib/importer/types';
import { addQueryArgs } from 'calypso/lib/route';
import { useDispatch as reduxDispatch, useSelector } from 'calypso/state';
Expand All @@ -20,11 +19,7 @@ import { useSiteData } from '../hooks/use-site-data';
import { useCanUserManageOptions } from '../hooks/use-user-can-manage-options';
import { ONBOARD_STORE, SITE_STORE, USER_STORE, STEPPER_INTERNAL_STORE } from '../stores';
import { shouldRedirectToSiteMigration } from './helpers';
import {
useLaunchpadDecider,
getLaunchpadStateBasedOnExperiment,
LAUNCHPAD_EXPERIMENT_NAME,
} from './internals/hooks/use-launchpad-decider';
import { useLaunchpadDecider } from './internals/hooks/use-launchpad-decider';
import { STEPS } from './internals/steps';
import { redirect } from './internals/steps-repository/import/util';
import { ProcessingResult } from './internals/steps-repository/processing-step/constants';
Expand Down Expand Up @@ -167,9 +162,6 @@ const siteSetupFlow: Flow = {
const { setDesignOnSite } = useDispatch( SITE_STORE );
const dispatch = reduxDispatch();

const [ isLoadingLaunchpadExperiment, launchpadExperimentAssigment ] =
useExperiment( LAUNCHPAD_EXPERIMENT_NAME );

const getLaunchpadScreenValue = (
intent: string,
shouldSkip: boolean
Expand All @@ -178,17 +170,6 @@ const siteSetupFlow: Flow = {
return 'off';
}

const launchpadState = getLaunchpadStateBasedOnExperiment(
isLoadingLaunchpadExperiment,
launchpadExperimentAssigment,
shouldSkip
);

if ( launchpadState ) {
return launchpadState;
}

// We shouldn't get here, but match the default/existing behaviour
if ( shouldSkip ) {
return 'skipped';
}
Expand Down
7 changes: 1 addition & 6 deletions client/my-sites/customer-home/controller.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import page from '@automattic/calypso-router';
import { fetchLaunchpad } from '@automattic/data-stores';
import { areLaunchpadTasksCompleted } from 'calypso/landing/stepper/declarative-flow/internals/steps-repository/launchpad/task-helper';
import { loadExperimentAssignment } from 'calypso/lib/explat';
import { getQueryArgs } from 'calypso/lib/query-args';
import { fetchModuleList } from 'calypso/state/jetpack/modules/actions';
import { fetchSitePlugins } from 'calypso/state/plugins/installed/actions';
Expand Down Expand Up @@ -68,11 +67,7 @@ export async function maybeRedirect( context, next ) {
checklist: launchpadChecklist,
} = await fetchLaunchpad( slug );

const experimentAssignment = await loadExperimentAssignment(
'calypso_onboarding_launchpad_removal_test_2024_08'
);

const shouldShowLaunchpad = 'treatment' !== experimentAssignment?.variationName;
const shouldShowLaunchpad = true;

if (
shouldShowLaunchpad &&
Expand Down
Loading