Commit decfde13 authored by Fernando Arias's avatar Fernando Arias Committed by Mike Greiling

First pass at updated profile empty state

parent 3f01f0c5
...@@ -15,7 +15,8 @@ export default class UserOverviewBlock { ...@@ -15,7 +15,8 @@ export default class UserOverviewBlock {
} }
loadData() { loadData() {
const loadingEl = document.querySelector(`${this.container} .loading`); const containerEl = document.querySelector(this.container);
const loadingEl = containerEl.querySelector(`.loading`);
loadingEl.classList.remove('hide'); loadingEl.classList.remove('hide');
...@@ -42,7 +43,7 @@ export default class UserOverviewBlock { ...@@ -42,7 +43,7 @@ export default class UserOverviewBlock {
const nothingHereBlock = containerEl.querySelector('.nothing-here-block'); const nothingHereBlock = containerEl.querySelector('.nothing-here-block');
if (nothingHereBlock) { if (nothingHereBlock) {
nothingHereBlock.classList.add('text-left', 'p-0'); nothingHereBlock.classList.add('p-5');
} }
} }
......
...@@ -33,4 +33,9 @@ ...@@ -33,4 +33,9 @@
%span  you have no access to. %span  you have no access to.
= paginate_collection(projects, remote: remote) unless skip_pagination = paginate_collection(projects, remote: remote) unless skip_pagination
- else - else
.nothing-here-block No projects found .nothing-here-block
.svg-content.svg-130
= image_tag 'illustrations/profile-page/personal-project.svg'
%div
%span
= s_('UserProfile|This user doesn\'t have any personal projects')
---
title: Added empty project illustration and updated text to user profile overview
merge_request: 23973
author: Fernando Arias
type: changed
...@@ -7476,6 +7476,9 @@ msgstr "" ...@@ -7476,6 +7476,9 @@ msgstr ""
msgid "UserProfile|Subscribe" msgid "UserProfile|Subscribe"
msgstr "" msgstr ""
msgid "UserProfile|This user doesn't have any personal projects"
msgstr ""
msgid "UserProfile|This user has a private profile" msgid "UserProfile|This user has a private profile"
msgstr "" msgstr ""
......
...@@ -49,7 +49,7 @@ describe 'Dashboard shortcuts', :js do ...@@ -49,7 +49,7 @@ describe 'Dashboard shortcuts', :js do
find('body').send_keys([:shift, 'P']) find('body').send_keys([:shift, 'P'])
find('.nothing-here-block') find('.nothing-here-block')
expect(page).to have_content('No projects found') expect(page).to have_content('This user doesn\'t have any personal projects')
end end
end end
......
...@@ -38,7 +38,7 @@ describe 'Dashboard > User filters projects' do ...@@ -38,7 +38,7 @@ describe 'Dashboard > User filters projects' do
it 'returns message when starred projects fitler returns no results' do it 'returns message when starred projects fitler returns no results' do
fill_in 'project-filter-form-field', with: 'Beta\n' fill_in 'project-filter-form-field', with: 'Beta\n'
expect(page).to have_content('No projects found') expect(page).to have_content('This user doesn\'t have any personal projects')
expect(page).not_to have_content('You don\'t have starred projects yet') expect(page).not_to have_content('You don\'t have starred projects yet')
end end
end end
......
...@@ -96,7 +96,7 @@ describe 'Overview tab on a user profile', :js do ...@@ -96,7 +96,7 @@ describe 'Overview tab on a user profile', :js do
it 'it shows an empty project list with an info message' do it 'it shows an empty project list with an info message' do
page.within('.projects-block') do page.within('.projects-block') do
expect(page).to have_selector('.loading', visible: false) expect(page).to have_selector('.loading', visible: false)
expect(page).to have_content('No projects found') expect(page).to have_content('This user doesn\'t have any personal projects')
expect(page).not_to have_selector('.project-row') expect(page).not_to have_selector('.project-row')
end end
end end
......
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