Commit c7056a32 authored by Alper Akgun's avatar Alper Akgun Committed by David O'Regan

Add "issues created" action to continuous onboarding design

parent e5dfb288
This diff is collapsed.
...@@ -96,6 +96,9 @@ export default { ...@@ -96,6 +96,9 @@ export default {
<p class="gl-text-gray-700 gl-mb-6">{{ $options.i18n.plan.description }}</p> <p class="gl-text-gray-700 gl-mb-6">{{ $options.i18n.plan.description }}</p>
<div class="row row-cols-2 row-cols-md-3 row-cols-lg-4"> <div class="row row-cols-2 row-cols-md-3 row-cols-lg-4">
<div class="col gl-mb-6">
<learn-gitlab-info-card v-bind="infoProps('issueCreated')" />
</div>
<div class="col gl-mb-6"> <div class="col gl-mb-6">
<learn-gitlab-info-card v-bind="infoProps('mergeRequestCreated')" /> <learn-gitlab-info-card v-bind="infoProps('mergeRequestCreated')" />
</div> </div>
......
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
<div <div
class="gl-text-center gl-display-flex gl-justify-content-center gl-align-items-center gl-flex-direction-column learn-gitlab-info-card-content" class="gl-text-center gl-display-flex gl-justify-content-center gl-align-items-center gl-flex-direction-column learn-gitlab-info-card-content"
> >
<img :src="svg" /> <img :src="svg" :alt="actionLabel" />
<h6>{{ title }}</h6> <h6>{{ title }}</h6>
<p class="gl-font-sm gl-text-gray-700">{{ description }}</p> <p class="gl-font-sm gl-text-gray-700">{{ description }}</p>
<gl-link :href="url" target="_blank">{{ actionLabel }}</gl-link> <gl-link :href="url" target="_blank">{{ actionLabel }}</gl-link>
......
...@@ -63,6 +63,15 @@ export const ACTION_LABELS = { ...@@ -63,6 +63,15 @@ export const ACTION_LABELS = {
section: 'deploy', section: 'deploy',
position: 1, position: 1,
}, },
issueCreated: {
title: s__('LearnGitLab|Create an issue'),
actionLabel: s__('LearnGitLab|Create an issue'),
description: s__(
'LearnGitLab|Create/import issues (tickets) to collaborate on ideas and plan work.',
),
section: 'plan',
position: 0,
},
}; };
export const ACTION_SECTIONS = { export const ACTION_SECTIONS = {
......
...@@ -24,6 +24,7 @@ module LearnGitlabHelper ...@@ -24,6 +24,7 @@ module LearnGitlabHelper
private private
ACTION_ISSUE_IDS = { ACTION_ISSUE_IDS = {
issue_created: 4,
git_write: 6, git_write: 6,
pipeline_created: 7, pipeline_created: 7,
merge_request_created: 9, merge_request_created: 9,
......
...@@ -18475,12 +18475,18 @@ msgstr "" ...@@ -18475,12 +18475,18 @@ msgstr ""
msgid "LearnGitLab|Create a workflow for your new workspace, and learn how GitLab features work together:" msgid "LearnGitLab|Create a workflow for your new workspace, and learn how GitLab features work together:"
msgstr "" msgstr ""
msgid "LearnGitLab|Create an issue"
msgstr ""
msgid "LearnGitLab|Create or import a repository" msgid "LearnGitLab|Create or import a repository"
msgstr "" msgstr ""
msgid "LearnGitLab|Create or import your first repository into your new project." msgid "LearnGitLab|Create or import your first repository into your new project."
msgstr "" msgstr ""
msgid "LearnGitLab|Create/import issues (tickets) to collaborate on ideas and plan work."
msgstr ""
msgid "LearnGitLab|Deploy" msgid "LearnGitLab|Deploy"
msgstr "" msgstr ""
......
...@@ -29,21 +29,21 @@ exports[`Learn GitLab Design A renders correctly 1`] = ` ...@@ -29,21 +29,21 @@ exports[`Learn GitLab Design A renders correctly 1`] = `
class="gl-text-gray-500 gl-mb-2" class="gl-text-gray-500 gl-mb-2"
data-testid="completion-percentage" data-testid="completion-percentage"
> >
25% completed 22% completed
</p> </p>
<div <div
class="progress" class="progress"
max="8" max="9"
value="2" value="2"
> >
<div <div
aria-valuemax="8" aria-valuemax="9"
aria-valuemin="0" aria-valuemin="0"
aria-valuenow="2" aria-valuenow="2"
class="progress-bar" class="progress-bar"
role="progressbar" role="progressbar"
style="width: 25%;" style="width: 22.22222222222222%;"
> >
<!----> <!---->
</div> </div>
...@@ -234,6 +234,20 @@ exports[`Learn GitLab Design A renders correctly 1`] = ` ...@@ -234,6 +234,20 @@ exports[`Learn GitLab Design A renders correctly 1`] = `
</p> </p>
</div> </div>
<div
class="gl-mb-4"
>
<span>
<a
class="gl-link"
href="http://example.com/"
>
Create an issue
</a>
</span>
<!---->
</div>
<div <div
class="gl-mb-4" class="gl-mb-4"
> >
......
...@@ -29,21 +29,21 @@ exports[`Learn GitLab Design B renders correctly 1`] = ` ...@@ -29,21 +29,21 @@ exports[`Learn GitLab Design B renders correctly 1`] = `
class="gl-text-gray-500 gl-mb-2" class="gl-text-gray-500 gl-mb-2"
data-testid="completion-percentage" data-testid="completion-percentage"
> >
25% completed 22% completed
</p> </p>
<div <div
class="progress" class="progress"
max="8" max="9"
value="2" value="2"
> >
<div <div
aria-valuemax="8" aria-valuemax="9"
aria-valuemin="0" aria-valuemin="0"
aria-valuenow="2" aria-valuenow="2"
class="progress-bar" class="progress-bar"
role="progressbar" role="progressbar"
style="width: 25%;" style="width: 22.22222222222222%;"
> >
<!----> <!---->
</div> </div>
...@@ -94,6 +94,7 @@ exports[`Learn GitLab Design B renders correctly 1`] = ` ...@@ -94,6 +94,7 @@ exports[`Learn GitLab Design B renders correctly 1`] = `
class="gl-text-center gl-display-flex gl-justify-content-center gl-align-items-center gl-flex-direction-column learn-gitlab-info-card-content" class="gl-text-center gl-display-flex gl-justify-content-center gl-align-items-center gl-flex-direction-column learn-gitlab-info-card-content"
> >
<img <img
alt="Invite your colleagues"
src="http://example.com/images/illustration.svg" src="http://example.com/images/illustration.svg"
/> />
...@@ -151,6 +152,7 @@ exports[`Learn GitLab Design B renders correctly 1`] = ` ...@@ -151,6 +152,7 @@ exports[`Learn GitLab Design B renders correctly 1`] = `
class="gl-text-center gl-display-flex gl-justify-content-center gl-align-items-center gl-flex-direction-column learn-gitlab-info-card-content" class="gl-text-center gl-display-flex gl-justify-content-center gl-align-items-center gl-flex-direction-column learn-gitlab-info-card-content"
> >
<img <img
alt="Create or import a repository"
src="http://example.com/images/illustration.svg" src="http://example.com/images/illustration.svg"
/> />
...@@ -200,6 +202,7 @@ exports[`Learn GitLab Design B renders correctly 1`] = ` ...@@ -200,6 +202,7 @@ exports[`Learn GitLab Design B renders correctly 1`] = `
class="gl-text-center gl-display-flex gl-justify-content-center gl-align-items-center gl-flex-direction-column learn-gitlab-info-card-content" class="gl-text-center gl-display-flex gl-justify-content-center gl-align-items-center gl-flex-direction-column learn-gitlab-info-card-content"
> >
<img <img
alt="Set-up CI/CD"
src="http://example.com/images/illustration.svg" src="http://example.com/images/illustration.svg"
/> />
...@@ -249,6 +252,7 @@ exports[`Learn GitLab Design B renders correctly 1`] = ` ...@@ -249,6 +252,7 @@ exports[`Learn GitLab Design B renders correctly 1`] = `
class="gl-text-center gl-display-flex gl-justify-content-center gl-align-items-center gl-flex-direction-column learn-gitlab-info-card-content" class="gl-text-center gl-display-flex gl-justify-content-center gl-align-items-center gl-flex-direction-column learn-gitlab-info-card-content"
> >
<img <img
alt="Try GitLab Ultimate for free"
src="http://example.com/images/illustration.svg" src="http://example.com/images/illustration.svg"
/> />
...@@ -303,6 +307,7 @@ exports[`Learn GitLab Design B renders correctly 1`] = ` ...@@ -303,6 +307,7 @@ exports[`Learn GitLab Design B renders correctly 1`] = `
class="gl-text-center gl-display-flex gl-justify-content-center gl-align-items-center gl-flex-direction-column learn-gitlab-info-card-content" class="gl-text-center gl-display-flex gl-justify-content-center gl-align-items-center gl-flex-direction-column learn-gitlab-info-card-content"
> >
<img <img
alt="Add code owners"
src="http://example.com/images/illustration.svg" src="http://example.com/images/illustration.svg"
/> />
...@@ -357,6 +362,7 @@ exports[`Learn GitLab Design B renders correctly 1`] = ` ...@@ -357,6 +362,7 @@ exports[`Learn GitLab Design B renders correctly 1`] = `
class="gl-text-center gl-display-flex gl-justify-content-center gl-align-items-center gl-flex-direction-column learn-gitlab-info-card-content" class="gl-text-center gl-display-flex gl-justify-content-center gl-align-items-center gl-flex-direction-column learn-gitlab-info-card-content"
> >
<img <img
alt="Enable require merge approvals"
src="http://example.com/images/illustration.svg" src="http://example.com/images/illustration.svg"
/> />
...@@ -422,6 +428,57 @@ exports[`Learn GitLab Design B renders correctly 1`] = ` ...@@ -422,6 +428,57 @@ exports[`Learn GitLab Design B renders correctly 1`] = `
class="gl-text-center gl-display-flex gl-justify-content-center gl-align-items-center gl-flex-direction-column learn-gitlab-info-card-content" class="gl-text-center gl-display-flex gl-justify-content-center gl-align-items-center gl-flex-direction-column learn-gitlab-info-card-content"
> >
<img <img
alt="Create an issue"
src="http://example.com/images/illustration.svg"
/>
<h6>
Create an issue
</h6>
<p
class="gl-font-sm gl-text-gray-700"
>
Create/import issues (tickets) to collaborate on ideas and plan work.
</p>
<a
class="gl-link"
href="http://example.com/"
rel="noopener noreferrer"
target="_blank"
>
Create an issue
</a>
</div>
</div>
<!---->
</div>
</div>
<div
class="col gl-mb-6"
>
<div
class="gl-card gl-pt-0"
>
<!---->
<div
class="gl-card-body"
>
<div
class="gl-text-right gl-h-5"
>
<!---->
</div>
<div
class="gl-text-center gl-display-flex gl-justify-content-center gl-align-items-center gl-flex-direction-column learn-gitlab-info-card-content"
>
<img
alt="Submit a merge request (MR)"
src="http://example.com/images/illustration.svg" src="http://example.com/images/illustration.svg"
/> />
...@@ -487,6 +544,7 @@ exports[`Learn GitLab Design B renders correctly 1`] = ` ...@@ -487,6 +544,7 @@ exports[`Learn GitLab Design B renders correctly 1`] = `
class="gl-text-center gl-display-flex gl-justify-content-center gl-align-items-center gl-flex-direction-column learn-gitlab-info-card-content" class="gl-text-center gl-display-flex gl-justify-content-center gl-align-items-center gl-flex-direction-column learn-gitlab-info-card-content"
> >
<img <img
alt="Run a Security scan using CI/CD"
src="http://example.com/images/illustration.svg" src="http://example.com/images/illustration.svg"
/> />
......
...@@ -31,6 +31,10 @@ exports[`Learn GitLab Section Card renders correctly 1`] = ` ...@@ -31,6 +31,10 @@ exports[`Learn GitLab Section Card renders correctly 1`] = `
action="userAdded" action="userAdded"
value="[object Object]" value="[object Object]"
/> />
<learn-gitlab-section-link-stub
action="issueCreated"
value="[object Object]"
/>
<learn-gitlab-section-link-stub <learn-gitlab-section-link-stub
action="gitWrite" action="gitWrite"
value="[object Object]" value="[object Object]"
......
...@@ -26,13 +26,13 @@ describe('Learn GitLab Design A', () => { ...@@ -26,13 +26,13 @@ describe('Learn GitLab Design A', () => {
it('renders the progress percentage', () => { it('renders the progress percentage', () => {
const text = wrapper.find('[data-testid="completion-percentage"]').text(); const text = wrapper.find('[data-testid="completion-percentage"]').text();
expect(text).toEqual('25% completed'); expect(text).toBe('22% completed');
}); });
it('renders the progress bar with correct values', () => { it('renders the progress bar with correct values', () => {
const progressBar = wrapper.find(GlProgressBar); const progressBar = wrapper.findComponent(GlProgressBar);
expect(progressBar.attributes('value')).toBe('2'); expect(progressBar.attributes('value')).toBe('2');
expect(progressBar.attributes('max')).toBe('8'); expect(progressBar.attributes('max')).toBe('9');
}); });
}); });
...@@ -26,13 +26,13 @@ describe('Learn GitLab Design B', () => { ...@@ -26,13 +26,13 @@ describe('Learn GitLab Design B', () => {
it('renders the progress percentage', () => { it('renders the progress percentage', () => {
const text = wrapper.find('[data-testid="completion-percentage"]').text(); const text = wrapper.find('[data-testid="completion-percentage"]').text();
expect(text).toEqual('25% completed'); expect(text).toBe('22% completed');
}); });
it('renders the progress bar with correct values', () => { it('renders the progress bar with correct values', () => {
const progressBar = wrapper.find(GlProgressBar); const progressBar = wrapper.findComponent(GlProgressBar);
expect(progressBar.attributes('value')).toBe('2'); expect(progressBar.attributes('value')).toBe('2');
expect(progressBar.attributes('max')).toBe('8'); expect(progressBar.attributes('max')).toBe('9');
}); });
}); });
...@@ -39,4 +39,9 @@ export const testActions = { ...@@ -39,4 +39,9 @@ export const testActions = {
completed: false, completed: false,
svg: 'http://example.com/images/illustration.svg', svg: 'http://example.com/images/illustration.svg',
}, },
issueCreated: {
url: 'http://example.com/',
completed: false,
svg: 'http://example.com/images/illustration.svg',
},
}; };
...@@ -27,6 +27,7 @@ RSpec.describe LearnGitlabHelper do ...@@ -27,6 +27,7 @@ RSpec.describe LearnGitlabHelper do
it 'has all actions' do it 'has all actions' do
expect(onboarding_actions_data.keys).to contain_exactly( expect(onboarding_actions_data.keys).to contain_exactly(
:issue_created,
:git_write, :git_write,
:pipeline_created, :pipeline_created,
:merge_request_created, :merge_request_created,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment