Commit 060194b9 authored by Phil Hughes's avatar Phil Hughes

Merge branch '37197-approved-gap' into 'master'

Removes the gap in approvers in the MR widget

Closes #3329

See merge request !2825
parents c2865f7e 7e43ca99
...@@ -724,7 +724,14 @@ ...@@ -724,7 +724,14 @@
.approvers-list { .approvers-list {
display: flex; display: flex;
align-items: center; align-items: center;
margin-right: 5px; }
.approvers-list {
.link-to-member-avatar:not(:first-child) {
img {
margin-left: 0;
}
}
} }
.unapprove-btn { .unapprove-btn {
......
---
title: Fix the gap in approvals in merge request widget
merge_request:
author:
type: fixed
...@@ -59,43 +59,48 @@ export default { ...@@ -59,43 +59,48 @@ export default {
}) })
.catch(() => { .catch(() => {
this.unapproving = false; this.unapproving = false;
new Flash('An error occured while removing your approval.'); // eslint-disable-line Flash('An error occured while removing your approval.');
}); });
}, },
}, },
template: ` template: `
<div v-if="approvedBy.length" class="approved-by-users approvals-footer clearfix mr-info-list"> <div
<div class="approvers-prefix space-children"> v-if="approvedBy.length"
class="approved-by-users approvals-footer clearfix mr-info-list">
<div class="approvers-prefix">
<p>Approved by</p> <p>Approved by</p>
<div class="approvers-list"> <div class="approvers-list">
<span v-for="approver in approvedBy"> <link-to-member-avatar
<link-to-member-avatar v-for="(approver, index) in approvedBy"
:avatarSize="20" :key="index"
:avatar-url="approver.user.avatar_url" :avatar-size="20"
extra-link-class="approver-avatar" :avatar-url="approver.user.avatar_url"
:display-name="approver.user.name" extra-link-class="approver-avatar"
:profile-url="approver.user.web_url" :display-name="approver.user.name"
:show-tooltip="true" /> :profile-url="approver.user.web_url"
</span> :show-tooltip="true"
<span class="potential-approvers-list" v-for="n in approvalsLeft"> />
<link-to-member-avatar <link-to-member-avatar
:avatarSize="20" v-for="n in approvalsLeft"
:clickable="false" :key="n"
:show-tooltip="false" /> :avatar-size="20"
</span> :clickable="false"
:show-tooltip="false"
/>
</div> </div>
<span class="unapprove-btn-wrap" v-if="showUnapproveButton"> <button
<button v-if="showUnapproveButton"
:disabled="unapproving" type="button"
@click="unapproveMergeRequest" :disabled="unapproving"
class="btn btn-xs"> @click="unapproveMergeRequest"
<i class="btn btn-small unapprove-btn-wrap">
v-if="unapproving" <i
class="fa fa-spinner fa-spin" v-if="unapproving"
aria-hidden="true" /> class="fa fa-spinner fa-spin"
Remove your approval aria-hidden="true">
</button> </i>
</span> Remove your approval
</button>
</div> </div>
</div> </div>
`, `,
......
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