Skip to content

Commit

Permalink
Rename designSetup step to design-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
taipeicoder committed Feb 25, 2025
1 parent 640a867 commit 82cdebd
Show file tree
Hide file tree
Showing 22 changed files with 38 additions and 37 deletions.
2 changes: 1 addition & 1 deletion client/blocks/importer/blogger/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const BloggerImporter: React.FunctionComponent< ImporterBaseProps > = ( p
function onSiteViewClick() {
if ( isEnabled( 'onboarding/import-redirect-to-themes' ) ) {
recordTracksEvent( 'calypso_site_importer_pick_a_design' );
stepNavigator?.navigate?.( 'designSetup' );
stepNavigator?.navigate?.( 'design-setup' );
} else {
recordTracksEvent( 'calypso_site_importer_view_site' );
stepNavigator?.goToSiteViewPage?.();
Expand Down
2 changes: 1 addition & 1 deletion client/blocks/importer/medium/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const MediumImporter: React.FunctionComponent< ImporterBaseProps > = ( pr
function onSiteViewClick() {
if ( isEnabled( 'onboarding/import-redirect-to-themes' ) ) {
recordTracksEvent( 'calypso_site_importer_pick_a_design' );
stepNavigator?.navigate?.( 'designSetup' );
stepNavigator?.navigate?.( 'design-setup' );
} else {
recordTracksEvent( 'calypso_site_importer_view_site' );
stepNavigator?.goToSiteViewPage?.();
Expand Down
2 changes: 1 addition & 1 deletion client/blocks/importer/squarespace/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const SquarespaceImporter: React.FunctionComponent< ImporterBaseProps > =
function onSiteViewClick() {
if ( isEnabled( 'onboarding/import-redirect-to-themes' ) ) {
recordTracksEvent( 'calypso_site_importer_pick_a_design' );
stepNavigator?.navigate?.( 'designSetup' );
stepNavigator?.navigate?.( 'design-setup' );
} else {
recordTracksEvent( 'calypso_site_importer_view_site' );
stepNavigator?.goToSiteViewPage?.();
Expand Down
2 changes: 1 addition & 1 deletion client/blocks/importer/wix/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export const WixImporter: React.FunctionComponent< Props > = ( props ) => {
function onSiteViewClick() {
if ( isEnabled( 'onboarding/import-redirect-to-themes' ) ) {
recordTracksEvent( 'calypso_site_importer_pick_a_design' );
stepNavigator?.navigate?.( 'designSetup' );
stepNavigator?.navigate?.( 'design-setup' );
} else {
recordTracksEvent( 'calypso_site_importer_view_site' );
stepNavigator?.goToSiteViewPage?.();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const ImportContentOnly: React.FunctionComponent< Props > = ( props ) => {
job?.importerFileType !== 'playground' &&
isEnabled( 'onboarding/import-redirect-to-themes' )
) {
stepNavigator?.navigate?.( 'designSetup' );
stepNavigator?.navigate?.( 'design-setup' );
} else {
stepNavigator?.goToSiteViewPage?.();
}
Expand Down
4 changes: 2 additions & 2 deletions client/landing/stepper/declarative-flow/design-first.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const designFirst: Flow = {
] );

return window.location.assign(
addQueryArgs( `/setup/update-design/designSetup`, {
addQueryArgs( `/setup/update-design/design-setup`, {
siteSlug: providedDependencies?.siteSlug,
flowToReturnTo: DESIGN_FIRST_FLOW,
theme: getQueryArg( window.location.href, 'theme' ),
Expand Down Expand Up @@ -163,7 +163,7 @@ const designFirst: Flow = {
}

return window.location.assign(
addQueryArgs( `/setup/update-design/designSetup`, {
addQueryArgs( `/setup/update-design/design-setup`, {
siteSlug: siteSlug,
flowToReturnTo: flowName,
theme: getQueryArg( window.location.href, 'theme' ),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
export const getStepOldSlug = ( stepSlug: string ): string | undefined => {
const stepSlugMap: Record< string, string > = {
'create-site': 'site-creation-step',
'design-setup': 'designSetup',
};

return stepSlugMap[ stepSlug ];
Expand Down
4 changes: 2 additions & 2 deletions client/landing/stepper/declarative-flow/import-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const importFlow: Flow = {
}
}

case 'designSetup': {
case 'design-setup': {
return navigate( 'processing' );
}

Expand Down Expand Up @@ -305,7 +305,7 @@ const importFlow: Flow = {
case 'importReadyNot':
case 'importReadyWpcom':
case 'importReadyPreview':
case 'designSetup':
case 'design-setup':
return navigate( `import?siteSlug=${ siteSlugParam }` );

case 'verifyEmail':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const useStartingPoints = () => {
title: translate( 'Choose a design' ),
description: <p>{ translate( 'Make your blog feel like home' ) }</p>,
icon: design,
value: 'designSetup',
value: 'design-setup',
actionText: translate( 'View designs' ),
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const DesignChoicesStep: Step = ( { navigation, flow, stepName } ) => {
title={ translate( 'Choose a theme' ) }
description={ translate( 'Choose one of our professionally designed themes.' ) }
imageSrc={ themesIllustrationImage }
destination="designSetup"
destination="design-setup"
onSelect={ handleSubmit }
/>
) : (
Expand All @@ -148,7 +148,7 @@ const DesignChoicesStep: Step = ( { navigation, flow, stepName } ) => {
'Choose a professionally designed theme and make it yours.'
) }
fgImageSrc={ themeChoiceFg }
destination="designSetup"
destination="design-setup"
onSelect={ handleSubmit }
/>
) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const renderComponent = ( component, initialState = {} ) => {
...initialState,
} );

const initialEntries = [ `/setup/site-setup/designSetup?siteSlug=test.wordpress.com` ];
const initialEntries = [ `/setup/site-setup/design-setup?siteSlug=test.wordpress.com` ];

return render(
<Provider store={ store }>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const ImportLight: Step = function ImportStep( props ) {
return (
<Summary
colorsNum={ colors.length }
onContinueClick={ () => navigation.goToStep?.( 'designSetup' ) }
onContinueClick={ () => navigation.goToStep?.( 'design-setup' ) }
/>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const STEPS = {
},

DESIGN_SETUP: {
slug: 'designSetup',
slug: 'design-setup',
asyncComponent: () => import( './steps-repository/design-setup' ),
},

Expand Down
8 changes: 4 additions & 4 deletions client/landing/stepper/declarative-flow/onboarding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,12 @@ const onboarding: Flow = {
if ( isDesignChoicesStepEnabled ) {
return navigate( 'design-choices' );
}
return navigate( 'designSetup' );
return navigate( 'design-setup' );
}
}
}

case 'designSetup': {
case 'design-setup': {
return navigate( 'domains' );
}

Expand Down Expand Up @@ -424,9 +424,9 @@ const onboarding: Flow = {
if ( isBigSkyBeforePlansExperiment && createWithBigSky ) {
return navigate( 'design-choices' );
}
return navigate( 'designSetup' );
return navigate( 'design-setup' );
}
case 'designSetup':
case 'design-setup':
if ( isDesignChoicesStepEnabled ) {
return navigate( 'design-choices' );
}
Expand Down
14 changes: 7 additions & 7 deletions client/landing/stepper/declarative-flow/site-setup-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,12 @@ const siteSetupFlow: FlowV1 = {
*
* Instead of having the user manually choose between "Start simple" and "More power", we let them select a theme and use the theme choice to determine which path to take.
*/
return navigate( 'designSetup' );
return navigate( 'design-setup' );
}
return navigate( 'bloggerStartingPoint' );
}

case 'designSetup': {
case 'design-setup': {
return navigate( 'processing' );
}

Expand Down Expand Up @@ -344,7 +344,7 @@ const siteSetupFlow: FlowV1 = {
if ( isDesignChoicesStepEnabled ) {
return navigate( 'design-choices' );
}
return navigate( 'designSetup' );
return navigate( 'design-setup' );
}
}
}
Expand All @@ -368,7 +368,7 @@ const siteSetupFlow: FlowV1 = {
return exitFlow( `https://wordpress.com/home/${ siteId ?? siteSlug }` );
}
case 'build': {
return navigate( 'designSetup' );
return navigate( 'design-setup' );
}
case 'sell': {
return navigate( 'options' );
Expand Down Expand Up @@ -497,7 +497,7 @@ const siteSetupFlow: FlowV1 = {
case 'courses':
return navigate( 'bloggerStartingPoint' );

case 'designSetup':
case 'design-setup':
if ( intent === SiteIntent.DIFM ) {
return navigate( 'difmStartingPoint' );
}
Expand Down Expand Up @@ -580,7 +580,7 @@ const siteSetupFlow: FlowV1 = {
switch ( currentStep ) {
case 'options':
if ( intent === 'sell' ) {
return navigate( 'designSetup' );
return navigate( 'design-setup' );
}
return navigate( 'bloggerStartingPoint' );

Expand All @@ -591,7 +591,7 @@ const siteSetupFlow: FlowV1 = {
return navigate( 'importList' );

case 'difmStartingPoint':
return navigate( 'designSetup' );
return navigate( 'design-setup' );

default:
return navigate( 'intent' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe( 'Onboarding Flow', () => {
expect( getFlowLocation().path ).toBe( '/difmStartingPoint' );
} );

it( 'should navigate to designSetup step for other intents', async () => {
it( 'should navigate to design-setup step for other intents', async () => {
const { runUseStepNavigationSubmit } = renderFlow( onboarding );

runUseStepNavigationSubmit( {
Expand All @@ -88,7 +88,7 @@ describe( 'Onboarding Flow', () => {
},
} );

expect( getFlowLocation().path ).toBe( '/designSetup' );
expect( getFlowLocation().path ).toBe( '/design-setup' );
} );
} );
} );
2 changes: 1 addition & 1 deletion client/landing/stepper/declarative-flow/update-design.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const updateDesign: Flow = {
} )
);

case 'designSetup':
case 'design-setup':
if ( providedDependencies?.goToCheckout ) {
const destination = `/setup/${ flowToReturnTo }/launchpad?siteSlug=${ providedDependencies.siteSlug }`;
persistSignupDestination( destination );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const DEFAULT_TAKS_RESPONSE = {
subtitle: '',
badge_text: '',
isLaunchTask: false,
calypso_path: '/setup/update-design/designSetup?siteSlug=gabrielcaires0.wordpress.com',
calypso_path: '/setup/update-design/design-setup?siteSlug=gabrielcaires0.wordpress.com',
},
],
is_enabled: false,
Expand Down
2 changes: 1 addition & 1 deletion client/my-sites/themes/theme-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function getAllThemeOptions( { translate, isFSEActive, isGlobalStylesOnPersonal
const slug = getSiteSlug( state, siteId );

const redirectTo = encodeURIComponent(
addQueryArgs( `${ origin }/setup/site-setup/designSetup`, {
addQueryArgs( `${ origin }/setup/site-setup/design-setup`, {
siteSlug: slug,
theme: themeId,
style_variation: options?.styleVariationSlug,
Expand Down
4 changes: 2 additions & 2 deletions client/signup/config/flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function getWithThemeDestination( {
! cartItems &&
[ DOT_ORG_THEME, PREMIUM_THEME, MARKETPLACE_THEME, BUNDLED_THEME ].includes( themeType )
) {
return `/setup/site-setup/designSetup?siteSlug=${ siteSlug }`;
return `/setup/site-setup/design-setup?siteSlug=${ siteSlug }`;
}

if ( DOT_ORG_THEME === themeType ) {
Expand All @@ -158,7 +158,7 @@ function getWithThemeDestination( {
return `/marketplace/thank-you/${ siteSlug }?onboarding=&themes=${ themeParameter }${ style }`;
}

return `/setup/site-setup/designSetup?siteSlug=${ siteSlug }&theme=${ themeParameter }${ style }`;
return `/setup/site-setup/design-setup?siteSlug=${ siteSlug }&theme=${ themeParameter }${ style }`;
}

function getWithPluginDestination( { siteSlug, pluginParameter, pluginBillingPeriod } ) {
Expand Down
6 changes: 3 additions & 3 deletions packages/calypso-e2e/src/lib/flows/start-site-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export type StepName =
| 'goals'
| 'vertical'
| 'intent'
| 'designSetup'
| 'design-setup'
| 'options'
| 'designChoices';
type WriteActions = 'Start writing' | 'Start learning' | 'View designs';
Expand Down Expand Up @@ -79,7 +79,7 @@ export class StartSiteFlow {
return 'intent';
}
if ( ( await this.page.locator( selectors.themePickerContainer ).count() ) > 0 ) {
return 'designSetup';
return 'design-setup';
}
if ( ( await this.page.locator( selectors.optionsStepContainer ).count() ) > 0 ) {
return 'options';
Expand Down Expand Up @@ -165,7 +165,7 @@ export class StartSiteFlow {
await this.page.waitForURL( /setup\/site-setup\/courses/ );
}
if ( action === 'View designs' ) {
await this.page.waitForURL( /setup\/site-setup\/designSetup/ );
await this.page.waitForURL( /setup\/site-setup\/design-setup/ );
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/launchpad/src/msw/setup-free.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default {
subtitle: '',
badge_text: '',
isLaunchTask: false,
calypso_path: '/setup/update-design/designSetup?siteSlug=site62798.wordpress.com',
calypso_path: '/setup/update-design/design-setup?siteSlug=site62798.wordpress.com',
},
{
id: 'domain_upsell',
Expand Down

0 comments on commit 82cdebd

Please sign in to comment.