Commit 762a3021 authored by Fatih Acet's avatar Fatih Acet

Merge branch '6500-fix-misaligned-approvers-dropdown' into 'master'

Fix misaligned approvers dropdown

See merge request gitlab-org/gitlab-ce!22832
parents fcadef1d 9406a497
/* eslint-disable func-names, one-var, no-var, prefer-rest-params, vars-on-top, prefer-arrow-callback, consistent-return, object-shorthand, no-shadow, no-unused-vars, no-else-return, no-self-compare, prefer-template, no-unused-expressions, yoda, prefer-spread, no-void, camelcase, no-param-reassign */ /* eslint-disable func-names, one-var, no-var, prefer-rest-params, vars-on-top, prefer-arrow-callback, consistent-return, object-shorthand, no-shadow, no-unused-vars, no-else-return, no-self-compare, prefer-template, no-unused-expressions, yoda, prefer-spread, camelcase, no-param-reassign */
/* global Issuable */ /* global Issuable */
/* global emitSidebarEvent */ /* global emitSidebarEvent */
...@@ -696,17 +696,21 @@ UsersSelect.prototype.formatResult = function(user) { ...@@ -696,17 +696,21 @@ UsersSelect.prototype.formatResult = function(user) {
} else { } else {
avatar = gon.default_avatar_url; avatar = gon.default_avatar_url;
} }
return ( return `
"<div class='user-result " + <div class='user-result'>
(!user.username ? 'no-username' : void 0) + <div class='user-image'>
"'> <div class='user-image'><img class='avatar avatar-inline s32' src='" + <img class='avatar avatar-inline s32' src='${avatar}'>
avatar + </div>
"'></div> <div class='user-name dropdown-menu-user-full-name'>" + <div class='user-info'>
_.escape(user.name) + <div class='user-name dropdown-menu-user-full-name'>
"</div> <div class='user-username dropdown-menu-user-username'>" + ${_.escape(user.name)}
(!user.invite ? '@' + _.escape(user.username) : '') + </div>
'</div> </div>' <div class='user-username dropdown-menu-user-username text-secondary'>
); ${!user.invite ? '@' + _.escape(user.username) : ''}
</div>
</div>
</div>
`;
}; };
UsersSelect.prototype.formatSelection = function(user) { UsersSelect.prototype.formatSelection = function(user) {
......
...@@ -243,6 +243,8 @@ ...@@ -243,6 +243,8 @@
.user-result { .user-result {
min-height: 24px; min-height: 24px;
display: flex;
align-items: center;
.user-image { .user-image {
float: left; float: left;
......
---
title: Fix misaligned approvers dropdown
merge_request: 22832
author:
type: fixed
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