diff options
-rw-r--r-- | app/assets/stylesheets/framework/common.scss | 4 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/header.scss | 8 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/issuable.scss | 4 | ||||
-rw-r--r-- | app/views/layouts/header/_default.html.haml | 5 | ||||
-rw-r--r-- | changelogs/unreleased/30484-profile-dropdown-account-name.yml | 4 | ||||
-rw-r--r-- | features/steps/group/members.rb | 4 | ||||
-rw-r--r-- | spec/features/admin/admin_projects_spec.rb | 2 |
7 files changed, 24 insertions, 7 deletions
diff --git a/app/assets/stylesheets/framework/common.scss b/app/assets/stylesheets/framework/common.scss index 2c33b235980..0fd7203e72b 100644 --- a/app/assets/stylesheets/framework/common.scss +++ b/app/assets/stylesheets/framework/common.scss @@ -40,6 +40,10 @@ line-height: 24px; } +.bold { + font-weight: 600; +} + .tab-content { overflow: visible; } diff --git a/app/assets/stylesheets/framework/header.scss b/app/assets/stylesheets/framework/header.scss index 2071d4dcfce..0077ea41d3b 100644 --- a/app/assets/stylesheets/framework/header.scss +++ b/app/assets/stylesheets/framework/header.scss @@ -331,6 +331,14 @@ header { .dropdown-menu-nav { min-width: 140px; margin-top: -5px; + + .current-user { + padding: 5px 18px; + + .user-name { + display: block; + } + } } } diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss index 0bca3e93e4c..8d3d1a72b9b 100644 --- a/app/assets/stylesheets/pages/issuable.scss +++ b/app/assets/stylesheets/pages/issuable.scss @@ -210,10 +210,6 @@ } } - .bold { - font-weight: 600; - } - .light { font-weight: normal; } diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml index a9893dea68f..66f75f1c2bf 100644 --- a/app/views/layouts/header/_default.html.haml +++ b/app/views/layouts/header/_default.html.haml @@ -67,6 +67,11 @@ = icon('caret-down') .dropdown-menu-nav.dropdown-menu-align-right %ul + %li.current-user + .user-name.bold + = current_user.name + @#{current_user.username} + %li.divider %li = link_to "Profile", current_user, class: 'profile-link', aria: { label: "Profile" }, data: { user: current_user.username } %li diff --git a/changelogs/unreleased/30484-profile-dropdown-account-name.yml b/changelogs/unreleased/30484-profile-dropdown-account-name.yml new file mode 100644 index 00000000000..71aa1ce139b --- /dev/null +++ b/changelogs/unreleased/30484-profile-dropdown-account-name.yml @@ -0,0 +1,4 @@ +--- +title: Added profile name to user dropdown +merge_request: +author: diff --git a/features/steps/group/members.rb b/features/steps/group/members.rb index adaf375453c..dcbf36df656 100644 --- a/features/steps/group/members.rb +++ b/features/steps/group/members.rb @@ -87,7 +87,7 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps end step 'I click on the "Remove User From Group" button for "John Doe"' do - find(:css, 'li', text: "John Doe").find(:css, 'a.btn-remove').click + find(:css, '.project-members-page li', text: "John Doe").find(:css, 'a.btn-remove').click # poltergeist always confirms popups. end @@ -97,7 +97,7 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps end step 'I should not see the "Remove User From Group" button for "John Doe"' do - expect(find(:css, 'li', text: "John Doe")).not_to have_selector(:css, 'a.btn-remove') + expect(find(:css, '.project-members-page li', text: "John Doe")).not_to have_selector(:css, 'a.btn-remove') # poltergeist always confirms popups. end diff --git a/spec/features/admin/admin_projects_spec.rb b/spec/features/admin/admin_projects_spec.rb index 87a8f62687a..9d205104ebe 100644 --- a/spec/features/admin/admin_projects_spec.rb +++ b/spec/features/admin/admin_projects_spec.rb @@ -109,7 +109,7 @@ describe "Admin::Projects", feature: true do expect(page).to have_content('Developer') end - find(:css, 'li', text: current_user.name).find(:css, 'a.btn-remove').click + find(:css, '.content-list li', text: current_user.name).find(:css, 'a.btn-remove').click expect(page).not_to have_selector(:css, '.content-list') end |