First pass at updated profile empty state

This commit is contained in:
Fernando Arias 2019-01-09 16:56:23 +00:00 committed by Mike Greiling
parent 3f01f0c5b3
commit decfde137d
7 changed files with 20 additions and 6 deletions

View file

@ -15,7 +15,8 @@ export default class UserOverviewBlock {
}
loadData() {
const loadingEl = document.querySelector(`${this.container} .loading`);
const containerEl = document.querySelector(this.container);
const loadingEl = containerEl.querySelector(`.loading`);
loadingEl.classList.remove('hide');
@ -42,7 +43,7 @@ export default class UserOverviewBlock {
const nothingHereBlock = containerEl.querySelector('.nothing-here-block');
if (nothingHereBlock) {
nothingHereBlock.classList.add('text-left', 'p-0');
nothingHereBlock.classList.add('p-5');
}
}

View file

@ -33,4 +33,9 @@
%span  you have no access to.
= paginate_collection(projects, remote: remote) unless skip_pagination
- 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')

View file

@ -0,0 +1,5 @@
---
title: Added empty project illustration and updated text to user profile overview
merge_request: 23973
author: Fernando Arias
type: changed

View file

@ -7476,6 +7476,9 @@ msgstr ""
msgid "UserProfile|Subscribe"
msgstr ""
msgid "UserProfile|This user doesn't have any personal projects"
msgstr ""
msgid "UserProfile|This user has a private profile"
msgstr ""

View file

@ -49,7 +49,7 @@ describe 'Dashboard shortcuts', :js do
find('body').send_keys([:shift, 'P'])
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

View file

@ -38,7 +38,7 @@ describe 'Dashboard > User filters projects' do
it 'returns message when starred projects fitler returns no results' do
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')
end
end

View file

@ -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
page.within('.projects-block') do
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')
end
end