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

Remove arrow and improve button CTA on Onboarding screen #111

Merged
merged 1 commit into from
May 10, 2024
Merged
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
13 changes: 1 addition & 12 deletions src/components/onboarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,6 @@ import { SiteForm } from './site-form';

const GradientBox = () => {
const { __ } = useI18n();
const Arrow = () => (
<svg width="18" height="13" viewBox="0 0 18 13" fill="none">
<path
fillRule="evenodd"
clipRule="evenodd"
d="M11.8061 12.5L10.6181 11.3121L14.7841 7.14603L0.012085 7.14603L0.0120851 5.46603L14.7841 5.46603L10.6181 1.3L11.8061 0.112061L18 6.30603L11.8061 12.5Z"
fill="white"
/>
</svg>
);
return (
<div
aria-label={ __( 'Imagine, Create, Design, Code, Build' ) }
Expand All @@ -35,7 +25,6 @@ const GradientBox = () => {
</div>
<div className="text-white tracking-[-0.84px] flex justify-between items-baseline self-stretch">
<p>{ __( 'Build' ) }</p>
<Arrow />
</div>
</div>
);
Expand Down Expand Up @@ -123,7 +112,7 @@ export default function Onboarding() {
disabled={ !! error || isAddingSite }
variant="primary"
>
{ isAddingSite ? __( 'Adding site…' ) : __( 'Continue' ) }
{ isAddingSite ? __( 'Adding site…' ) : __( 'Add site' ) }
</Button>
</div>
</SiteForm>
Expand Down
4 changes: 2 additions & 2 deletions src/components/tests/onboarding.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe( 'Onboarding Component', () => {
it( 'renders onboarding screen correctly', () => {
const { getByText } = render( <Onboarding /> );
expect( getByText( 'Add your first site' ) ).toBeVisible();
expect( getByText( 'Continue' ) ).toBeVisible();
expect( getByText( 'Add site' ) ).toBeVisible();
} );

it( 'completes onboarding when the final button is clicked', async () => {
Expand All @@ -66,7 +66,7 @@ describe( 'Onboarding Component', () => {

const { getByText } = render( <Onboarding /> );

await user.click( getByText( 'Continue' ) );
await user.click( getByText( 'Add site' ) );

// Check if handleAddSiteClick has been called and the process to create a new site started
await waitFor( () => expect( handleAddSiteClick ).toHaveBeenCalled() );
Expand Down
Loading