Skip to content

Commit 61d2c32

Browse files
committed
Merge branch 'profile-project-empty-state' into 'master'
First pass at updated profile empty state See merge request gitlab-org/gitlab-ce!23973
2 parents 3f01f0c + decfde1 commit 61d2c32

File tree

7 files changed

+20
-6
lines changed

7 files changed

+20
-6
lines changed

app/assets/javascripts/pages/users/user_overview_block.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ export default class UserOverviewBlock {
1515
}
1616

1717
loadData() {
18-
const loadingEl = document.querySelector(`${this.container} .loading`);
18+
const containerEl = document.querySelector(this.container);
19+
const loadingEl = containerEl.querySelector(`.loading`);
1920

2021
loadingEl.classList.remove('hide');
2122

@@ -42,7 +43,7 @@ export default class UserOverviewBlock {
4243
const nothingHereBlock = containerEl.querySelector('.nothing-here-block');
4344

4445
if (nothingHereBlock) {
45-
nothingHereBlock.classList.add('text-left', 'p-0');
46+
nothingHereBlock.classList.add('p-5');
4647
}
4748
}
4849

app/views/shared/projects/_list.html.haml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,9 @@
3333
%span  you have no access to.
3434
= paginate_collection(projects, remote: remote) unless skip_pagination
3535
- else
36-
.nothing-here-block No projects found
36+
.nothing-here-block
37+
.svg-content.svg-130
38+
= image_tag 'illustrations/profile-page/personal-project.svg'
39+
%div
40+
%span
41+
= s_('UserProfile|This user doesn\'t have any personal projects')
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: Added empty project illustration and updated text to user profile overview
3+
merge_request: 23973
4+
author: Fernando Arias
5+
type: changed

locale/gitlab.pot

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7476,6 +7476,9 @@ msgstr ""
74767476
msgid "UserProfile|Subscribe"
74777477
msgstr ""
74787478

7479+
msgid "UserProfile|This user doesn't have any personal projects"
7480+
msgstr ""
7481+
74797482
msgid "UserProfile|This user has a private profile"
74807483
msgstr ""
74817484

spec/features/dashboard/shortcuts_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
find('body').send_keys([:shift, 'P'])
5050

5151
find('.nothing-here-block')
52-
expect(page).to have_content('No projects found')
52+
expect(page).to have_content('This user doesn\'t have any personal projects')
5353
end
5454
end
5555

spec/features/dashboard/user_filters_projects_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
it 'returns message when starred projects fitler returns no results' do
3939
fill_in 'project-filter-form-field', with: 'Beta\n'
4040

41-
expect(page).to have_content('No projects found')
41+
expect(page).to have_content('This user doesn\'t have any personal projects')
4242
expect(page).not_to have_content('You don\'t have starred projects yet')
4343
end
4444
end

spec/features/users/overview_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def push_code_contribution
9696
it 'it shows an empty project list with an info message' do
9797
page.within('.projects-block') do
9898
expect(page).to have_selector('.loading', visible: false)
99-
expect(page).to have_content('No projects found')
99+
expect(page).to have_content('This user doesn\'t have any personal projects')
100100
expect(page).not_to have_selector('.project-row')
101101
end
102102
end

0 commit comments

Comments
 (0)