From ccee4d7a566969a1a98db57f59b89628aefe271b Mon Sep 17 00:00:00 2001 From: Gabriel Caires Date: Mon, 30 Sep 2024 16:44:02 +0100 Subject: [PATCH] Revert "Rename already-wordpress to already-wpcom" This reverts commit 6cebceb8df9f637ab2b70645accbe1b4d70fe072. --- .../components/form/index.tsx | 26 +++++++++---------- .../hooks/use-migration-ticket-mutation.ts | 0 .../index.tsx | 0 .../style.scss | 20 +++++++------- .../test/index.tsx | 0 .../types.ts | 0 .../declarative-flow/internals/steps.tsx | 6 ++--- .../declarative-flow/migration/index.tsx | 4 +-- 8 files changed, 28 insertions(+), 28 deletions(-) rename client/landing/stepper/declarative-flow/internals/steps-repository/{site-migration-already-wpcom => site-migration-already-wordpress}/components/form/index.tsx (81%) rename client/landing/stepper/declarative-flow/internals/steps-repository/{site-migration-already-wpcom => site-migration-already-wordpress}/hooks/use-migration-ticket-mutation.ts (100%) rename client/landing/stepper/declarative-flow/internals/steps-repository/{site-migration-already-wpcom => site-migration-already-wordpress}/index.tsx (100%) rename client/landing/stepper/declarative-flow/internals/steps-repository/{site-migration-already-wpcom => site-migration-already-wordpress}/style.scss (53%) rename client/landing/stepper/declarative-flow/internals/steps-repository/{site-migration-already-wpcom => site-migration-already-wordpress}/test/index.tsx (100%) rename client/landing/stepper/declarative-flow/internals/steps-repository/{site-migration-already-wpcom => site-migration-already-wordpress}/types.ts (100%) diff --git a/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wpcom/components/form/index.tsx b/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wordpress/components/form/index.tsx similarity index 81% rename from client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wpcom/components/form/index.tsx rename to client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wordpress/components/form/index.tsx index 8295306735903..ddcad2a359cb9 100644 --- a/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wpcom/components/form/index.tsx +++ b/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wordpress/components/form/index.tsx @@ -25,7 +25,7 @@ const CheckboxIntents = ( { label, control, value }: CheckboxProps ) => ( render={ ( { field } ) => { return ( { if ( isChecked ) { field.onChange( [ ...field.value, value ] ); @@ -57,7 +57,7 @@ const OtherDetails = ( { label, control, error }: OtherDetailsProps ) => { rules={ { required: translate( 'Please, provide more details.' ) } } render={ ( { field } ) => { return ( -
+
{ label } { placeholder={ translate( 'Share any other details that will help us figure out what we need to do next.' ) } - className={ clsx( 'site-migration-already-wpcom__form-textarea', { - 'site-migration-already-wpcomrm-textarea--error': error, + className={ clsx( 'site-migration-already-wordpress__form-textarea', { + 'site-migration-already-wordpress__form-textarea--error': error, } ) } /> { error && error.message && ( -

{ error.message }

+

{ error.message }

) }
); @@ -105,7 +105,7 @@ const Form: FC< FormProps > = ( { onComplete } ) => { useEffect( () => { if ( isSuccess ) { - if ( process.env.NODE_ENV !== 'test' ) { + if ( process.env.NODE_ENV !== 'development' ) { alert( 'Success!' ); } onComplete(); @@ -129,19 +129,19 @@ const Form: FC< FormProps > = ( { onComplete } ) => { const isOtherChecked = intents.includes( 'other' ); return ( -
-
-
-
+
+ +
+

{ translate( 'What brought you here today?' ) }

{ errors.intents && ( -

+

{ errors.intents.message }

) } diff --git a/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wpcom/hooks/use-migration-ticket-mutation.ts b/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wordpress/hooks/use-migration-ticket-mutation.ts similarity index 100% rename from client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wpcom/hooks/use-migration-ticket-mutation.ts rename to client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wordpress/hooks/use-migration-ticket-mutation.ts diff --git a/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wpcom/index.tsx b/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wordpress/index.tsx similarity index 100% rename from client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wpcom/index.tsx rename to client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wordpress/index.tsx diff --git a/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wpcom/style.scss b/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wordpress/style.scss similarity index 53% rename from client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wpcom/style.scss rename to client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wordpress/style.scss index d468582b761ec..3dfc1d41b016d 100644 --- a/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wpcom/style.scss +++ b/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wordpress/style.scss @@ -1,13 +1,13 @@ @import "@wordpress/base-styles/breakpoints"; -.site-migration-already-wpcomitle--error, -.site-migration-already-wpcom__form-error { +.site-migration-already-wordpress__form-title--error, +.site-migration-already-wordpress__form-error { color: var(--color-error); font-size: 0.875rem; font-weight: 500; } -.site-migration-already-wpcom__form-container { +.site-migration-already-wordpress__form-container { display: flex; flex-direction: column; gap: 1rem; @@ -16,7 +16,7 @@ } -.site-migration-already-wpcom__form { +.site-migration-already-wordpress__form { width: 520px; padding: 0 2.5rem; display: flex; @@ -25,12 +25,12 @@ box-sizing: border-box; } -.site-migration-already-wpcom__form .components-checkbox-control__label { +.site-migration-already-wordpress__form .components-checkbox-control__label { font-size: 0.875rem; font-weight: 400; } -.site-migration-already-wpcom__form-title-container { +.site-migration-already-wordpress__form-title-container { display: flex; flex-direction: row; gap: 0.25rem; @@ -38,21 +38,21 @@ margin-bottom: 0.5rem; } -.site-migration-already-wpcom__form-title { +.site-migration-already-wordpress__form-title { font-size: 0.875rem; font-weight: 600; margin-bottom: 0; } -.site-migration-already-wpcom__form-textarea-container { +.site-migration-already-wordpress__form-textarea-container { margin-top: 1.5rem; } -.site-migration-already-wpcom__form-textarea { +.site-migration-already-wordpress__form-textarea { width: 100%; } -.site-migration-already-wpcom__form-textarea--error { +.site-migration-already-wordpress__form-textarea--error { border-color: var(--color-error); } diff --git a/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wpcom/test/index.tsx b/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wordpress/test/index.tsx similarity index 100% rename from client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wpcom/test/index.tsx rename to client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wordpress/test/index.tsx diff --git a/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wpcom/types.ts b/client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wordpress/types.ts similarity index 100% rename from client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wpcom/types.ts rename to client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-already-wordpress/types.ts diff --git a/client/landing/stepper/declarative-flow/internals/steps.tsx b/client/landing/stepper/declarative-flow/internals/steps.tsx index 4c9449d0d7767..89b9d38e6ceba 100644 --- a/client/landing/stepper/declarative-flow/internals/steps.tsx +++ b/client/landing/stepper/declarative-flow/internals/steps.tsx @@ -291,9 +291,9 @@ export const STEPS = { asyncComponent: () => import( './steps-repository/site-migration-plugin-install' ), }, - SITE_MIGRATION_ALREADY_WPCOM: { - slug: 'already-wpcom', - asyncComponent: () => import( './steps-repository/site-migration-already-wpcom' ), + SITE_MIGRATION_ALREADY_WORDPRESS: { + slug: 'already-wordpress', + asyncComponent: () => import( './steps-repository/site-migration-already-wordpress' ), }, PICK_SITE: { diff --git a/client/landing/stepper/declarative-flow/migration/index.tsx b/client/landing/stepper/declarative-flow/migration/index.tsx index 57bc9021a9f76..17fcf7b4eb131 100644 --- a/client/landing/stepper/declarative-flow/migration/index.tsx +++ b/client/landing/stepper/declarative-flow/migration/index.tsx @@ -35,7 +35,7 @@ const { SITE_MIGRATION_STARTED, SITE_MIGRATION_ASSISTED_MIGRATION, SITE_MIGRATION_CREDENTIALS, - SITE_MIGRATION_ALREADY_WPCOM, + SITE_MIGRATION_ALREADY_WORDPRESS, } = STEPS; const steps = [ @@ -49,7 +49,7 @@ const steps = [ SITE_MIGRATION_STARTED, SITE_MIGRATION_ASSISTED_MIGRATION, SITE_MIGRATION_CREDENTIALS, - SITE_MIGRATION_ALREADY_WPCOM, + SITE_MIGRATION_ALREADY_WORDPRESS, ]; const plans: { [ key: string ]: string } = {