Entrepreneur Signup: Add Skip button to Design With AI steps. (#47667)
* Add Skip button to Design With AI steps. * Add changefile(s) from automation for the following project(s): woocommerce * Use window.location.href to redirect instead. * fix css linter errors --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Luigi Teschio <gigitux@gmail.com>
This commit is contained in:
parent
01bfab0527
commit
169baa2929
|
@ -0,0 +1,13 @@
|
|||
.skip-cys-design-with-ai {
|
||||
/* This follows the same styling and positioning
|
||||
as seen on the Entrepreneur signup flow. */
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
right: 24px;
|
||||
|
||||
&.components-button.is-link {
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
color: #101517;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { Button } from '@wordpress/components';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import './skip-button.scss';
|
||||
|
||||
type Props = {
|
||||
onClick?: () => void;
|
||||
};
|
||||
|
||||
export const SkipButton = ( { onClick }: Props ) => {
|
||||
return (
|
||||
<div>
|
||||
<Button
|
||||
className="skip-cys-design-with-ai"
|
||||
onClick={ onClick ? onClick : () => {} }
|
||||
variant="link"
|
||||
>
|
||||
{ __( 'Skip', 'woocommerce' ) }
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
};
|
|
@ -5,15 +5,18 @@ import { useState } from '@wordpress/element';
|
|||
import { TextareaControl, Button, Spinner } from '@wordpress/components';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { ProgressBar } from '@woocommerce/components';
|
||||
import { getAdminLink } from '@woocommerce/settings';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { designWithAiStateMachineContext } from '../types';
|
||||
import { CloseButton } from '../components/close-button/close-button';
|
||||
import { SkipButton } from '../components/skip-button/skip-button';
|
||||
import { aiWizardClosedBeforeCompletionEvent } from '../events';
|
||||
import { isEntrepreneurFlow } from '../entrepreneur-flow';
|
||||
import WordPressLogo from '~/lib/wordpress-logo';
|
||||
import { trackEvent } from '~/customize-store/tracking';
|
||||
|
||||
export type businessInfoDescriptionCompleteEvent = {
|
||||
type: 'BUSINESS_INFO_DESCRIPTION_COMPLETE';
|
||||
|
@ -60,6 +63,21 @@ export const BusinessInfoDescription = ( {
|
|||
} }
|
||||
/>
|
||||
) }
|
||||
{ isEntrepreneurFlow() && (
|
||||
<SkipButton
|
||||
onClick={ () => {
|
||||
trackEvent(
|
||||
'customize_your_store_entrepreneur_skip_click',
|
||||
{
|
||||
step: 'business-info-description',
|
||||
}
|
||||
);
|
||||
window.location.href = getAdminLink(
|
||||
'admin.php?page=wc-admin&ref=entrepreneur-signup'
|
||||
);
|
||||
} }
|
||||
/>
|
||||
) }
|
||||
<div className="woocommerce-cys-design-with-ai woocommerce-cys-layout">
|
||||
<div className="woocommerce-cys-page">
|
||||
<h1>
|
||||
|
|
|
@ -5,6 +5,7 @@ import { Button } from '@wordpress/components';
|
|||
import { __ } from '@wordpress/i18n';
|
||||
import { ProgressBar } from '@woocommerce/components';
|
||||
import { useState } from '@wordpress/element';
|
||||
import { getAdminLink } from '@woocommerce/settings';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
|
@ -12,6 +13,7 @@ import { useState } from '@wordpress/element';
|
|||
import { Look, designWithAiStateMachineContext } from '../types';
|
||||
import { Choice } from '../components/choice/choice';
|
||||
import { CloseButton } from '../components/close-button/close-button';
|
||||
import { SkipButton } from '../components/skip-button/skip-button';
|
||||
import { aiWizardClosedBeforeCompletionEvent } from '../events';
|
||||
import { isEntrepreneurFlow } from '../entrepreneur-flow';
|
||||
import { trackEvent } from '~/customize-store/tracking';
|
||||
|
@ -88,6 +90,21 @@ export const LookAndFeel = ( {
|
|||
} }
|
||||
/>
|
||||
) }
|
||||
{ isEntrepreneurFlow() && (
|
||||
<SkipButton
|
||||
onClick={ () => {
|
||||
trackEvent(
|
||||
'customize_your_store_entrepreneur_skip_click',
|
||||
{
|
||||
step: 'look-and-feel',
|
||||
}
|
||||
);
|
||||
window.location.href = getAdminLink(
|
||||
'admin.php?page=wc-admin&ref=entrepreneur-signup'
|
||||
);
|
||||
} }
|
||||
/>
|
||||
) }
|
||||
<div className="woocommerce-cys-design-with-ai-look-and-feel woocommerce-cys-layout">
|
||||
<div className="woocommerce-cys-page">
|
||||
<h1>
|
||||
|
|
|
@ -5,6 +5,7 @@ import { Button, Notice } from '@wordpress/components';
|
|||
import { __ } from '@wordpress/i18n';
|
||||
import { ProgressBar } from '@woocommerce/components';
|
||||
import { useState, createInterpolateElement } from '@wordpress/element';
|
||||
import { getAdminLink } from '@woocommerce/settings';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
|
@ -12,6 +13,7 @@ import { useState, createInterpolateElement } from '@wordpress/element';
|
|||
import { Tone, designWithAiStateMachineContext } from '../types';
|
||||
import { Choice } from '../components/choice/choice';
|
||||
import { CloseButton } from '../components/close-button/close-button';
|
||||
import { SkipButton } from '../components/skip-button/skip-button';
|
||||
import { aiWizardClosedBeforeCompletionEvent } from '../events';
|
||||
import { isEntrepreneurFlow } from '../entrepreneur-flow';
|
||||
import { trackEvent } from '~/customize-store/tracking';
|
||||
|
@ -106,6 +108,21 @@ export const ToneOfVoice = ( {
|
|||
} }
|
||||
/>
|
||||
) }
|
||||
{ isEntrepreneurFlow() && (
|
||||
<SkipButton
|
||||
onClick={ () => {
|
||||
trackEvent(
|
||||
'customize_your_store_entrepreneur_skip_click',
|
||||
{
|
||||
step: 'tone-of-voice',
|
||||
}
|
||||
);
|
||||
window.location.href = getAdminLink(
|
||||
'admin.php?page=wc-admin&ref=entrepreneur-signup'
|
||||
);
|
||||
} }
|
||||
/>
|
||||
) }
|
||||
<div className="woocommerce-cys-design-with-ai-tone-of-voice woocommerce-cys-layout">
|
||||
<div className="woocommerce-cys-page">
|
||||
<h1>
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: add
|
||||
Comment: Add Skip button to Design With AI steps. (This is internal for Enterpreneur Signup on WPCOM)
|
||||
|
Loading…
Reference in New Issue