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

Added skip button to WP.com checklist #34420

Merged
merged 2 commits into from
Jul 4, 2019
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
4 changes: 4 additions & 0 deletions client/components/checklist/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ $chevron-animation: transform 0.15s cubic-bezier( 0.175, 0.885, 0.32, 1.275 );
white-space: nowrap;
}

.checklist__task-skip {
margin-left: 8px;
}

&.warning {
.gridicons-notice-outline {
display: block;
Expand Down
8 changes: 8 additions & 0 deletions client/components/checklist/task.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class Task extends PureComponent {
title: PropTypes.node.isRequired,
translate: PropTypes.func.isRequired,
trackTaskDisplay: PropTypes.func,
showSkip: PropTypes.bool,
};

static defaultProps = {
Expand Down Expand Up @@ -137,6 +138,8 @@ class Task extends PureComponent {
target,
title,
translate,
onDismiss,
showSkip,
} = this.props;

// A task that's being automatically completed ("in progress") cannot be expanded.
Expand Down Expand Up @@ -196,6 +199,11 @@ class Task extends PureComponent {
>
{ taskActionButtonText }
</Button>
{ ! completed && showSkip && (
<Button className="checklist__task-skip" onClick={ onDismiss }>
{ translate( 'Skip' ) }
</Button>
) }
</div>
</div>
</div>
Expand Down
17 changes: 17 additions & 0 deletions client/my-sites/checklist/wpcom-checklist/component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ class WpcomChecklistComponent extends PureComponent {
} ) }
onDismiss={ this.handleTaskDismiss( task.id ) }
title={ translate( 'Give your site a name' ) }
showSkip={ true }
/>
);
};
Expand All @@ -449,6 +450,7 @@ class WpcomChecklistComponent extends PureComponent {
} ) }
onDismiss={ this.handleTaskDismiss( task.id ) }
title={ translate( 'Upload a site icon' ) }
showSkip={ true }
/>
);
};
Expand All @@ -473,6 +475,7 @@ class WpcomChecklistComponent extends PureComponent {
} ) }
onDismiss={ this.handleTaskDismiss( task.id ) }
title={ translate( 'Create a tagline' ) }
showSkip={ true }
/>
);
};
Expand All @@ -497,6 +500,7 @@ class WpcomChecklistComponent extends PureComponent {
} ) }
onDismiss={ this.handleTaskDismiss( task.id ) }
title={ translate( 'Upload your profile picture' ) }
showSkip={ true }
/>
);
};
Expand All @@ -521,6 +525,7 @@ class WpcomChecklistComponent extends PureComponent {
} ) }
onDismiss={ this.handleTaskDismiss( task.id ) }
title={ translate( 'Personalize your Contact page' ) }
showSkip={ true }
/>
);
};
Expand All @@ -543,6 +548,7 @@ class WpcomChecklistComponent extends PureComponent {
} ) }
onDismiss={ this.handleTaskDismiss( task.id ) }
title={ translate( 'Publish your first blog post' ) }
showSkip={ true }
/>
);
};
Expand All @@ -567,6 +573,7 @@ class WpcomChecklistComponent extends PureComponent {
} ) }
onDismiss={ this.handleTaskDismiss( task.id ) }
title={ translate( 'Register a custom domain' ) }
showSkip={ true }
/>
);
};
Expand All @@ -591,6 +598,7 @@ class WpcomChecklistComponent extends PureComponent {
} ) }
onDismiss={ this.handleTaskDismiss( task.id ) }
title={ translate( 'Get the WordPress app' ) }
showSkip={ true }
/>
);
};
Expand Down Expand Up @@ -637,6 +645,7 @@ class WpcomChecklistComponent extends PureComponent {
'Subscribe to G Suite to get a dedicated inbox with a personalized email address using your domain and collaborate in real-time on documents, spreadsheets, and slides.'
) }
duration={ translate( '%d minute', '%d minutes', { count: 5, args: [ 5 ] } ) }
showSkip={ true }
{ ...clickProps }
/>
);
Expand Down Expand Up @@ -671,6 +680,7 @@ class WpcomChecklistComponent extends PureComponent {
page( emailManagement( siteSlug ) );
} }
onDismiss={ this.handleTaskDismiss( task.id ) }
showSkip={ true }
/>
);
};
Expand Down Expand Up @@ -778,6 +788,7 @@ class WpcomChecklistComponent extends PureComponent {
onDismiss={ this.handleTaskDismiss( task.id ) }
backToChecklist={ this.backToChecklist }
nextInlineHelp={ this.nextInlineHelp }
showSkip={ true }
/>
);
};
Expand Down Expand Up @@ -817,6 +828,7 @@ class WpcomChecklistComponent extends PureComponent {
onDismiss={ this.handleTaskDismiss( task.id ) }
backToChecklist={ this.backToChecklist }
nextInlineHelp={ this.nextInlineHelp }
showSkip={ true }
/>
);
};
Expand Down Expand Up @@ -844,6 +856,7 @@ class WpcomChecklistComponent extends PureComponent {
onDismiss={ this.handleTaskDismiss( task.id ) }
backToChecklist={ this.backToChecklist }
nextInlineHelp={ this.nextInlineHelp }
showSkip={ true }
/>
);
};
Expand Down Expand Up @@ -880,6 +893,7 @@ class WpcomChecklistComponent extends PureComponent {
onDismiss={ this.handleTaskDismiss( task.id ) }
backToChecklist={ this.backToChecklist }
nextInlineHelp={ this.nextInlineHelp }
showSkip={ true }
/>
);
};
Expand Down Expand Up @@ -914,6 +928,7 @@ class WpcomChecklistComponent extends PureComponent {
onDismiss={ this.handleTaskDismiss( task.id ) }
backToChecklist={ this.backToChecklist }
nextInlineHelp={ this.nextInlineHelp }
showSkip={ true }
/>
);
};
Expand Down Expand Up @@ -957,6 +972,7 @@ class WpcomChecklistComponent extends PureComponent {
onDismiss={ this.handleTaskDismiss( task.id ) }
backToChecklist={ this.backToChecklist }
nextInlineHelp={ this.nextInlineHelp }
showSkip={ true }
/>
);
};
Expand Down Expand Up @@ -991,6 +1007,7 @@ class WpcomChecklistComponent extends PureComponent {
onDismiss={ this.handleTaskDismiss( task.id ) }
backToChecklist={ this.backToChecklist }
nextInlineHelp={ this.nextInlineHelp }
showSkip={ true }
/>
);
};
Expand Down