Commit 5cd0e721 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Merge branch '61988-collapse-icon-on-merge-request-diff-larger-than-profile-picture' into 'master'

Change collapse icon size to size of profile picture

Closes #61988

See merge request gitlab-org/gitlab-ce!28512
parents 06c96cef c1cf0f29
...@@ -86,7 +86,6 @@ export default { ...@@ -86,7 +86,6 @@ export default {
:key="note.id" :key="note.id"
:img-src="note.author.avatar_url" :img-src="note.author.avatar_url"
:tooltip-text="getTooltipText(note)" :tooltip-text="getTooltipText(note)"
:size="19"
class="diff-comment-avatar js-diff-comment-avatar" class="diff-comment-avatar js-diff-comment-avatar"
@click.native="toggleDiscussions" @click.native="toggleDiscussions"
/> />
......
@mixin btn-comment-icon { @mixin btn-comment-icon {
border-radius: 50%; border-radius: 50%;
background: $white-light; background: $white-light;
padding: 1px 5px; padding: 1px;
font-size: 12px; font-size: 12px;
color: $blue-500; color: $blue-500;
border: 1px solid $blue-500;
width: 24px; width: 24px;
height: 24px; height: 24px;
border: 1px solid $blue-500;
&:hover, &:hover,
&.inverted { &.inverted {
......
...@@ -385,3 +385,8 @@ ...@@ -385,3 +385,8 @@
height: $size; height: $size;
margin-right: $margin-right; margin-right: $margin-right;
} }
@mixin code-icon-size() {
width: $gl-font-size * $code-line-height * 0.9;
height: $gl-font-size * $code-line-height * 0.9;
}
...@@ -615,10 +615,9 @@ table.code { ...@@ -615,10 +615,9 @@ table.code {
.diff-comment-avatar-holders { .diff-comment-avatar-holders {
position: absolute; position: absolute;
height: 19px; margin-left: -$gl-padding;
width: 19px;
margin-left: -15px;
z-index: 100; z-index: 100;
@include code-icon-size();
&:hover { &:hover {
.diff-comment-avatar, .diff-comment-avatar,
...@@ -652,26 +651,28 @@ table.code { ...@@ -652,26 +651,28 @@ table.code {
.diff-comments-more-count { .diff-comments-more-count {
position: absolute; position: absolute;
left: 0; left: 0;
width: 19px;
height: 19px;
margin-right: 0; margin-right: 0;
border-color: $white-light; border-color: $white-light;
cursor: pointer; cursor: pointer;
transition: all 0.1s ease-out; transition: all 0.1s ease-out;
@include code-icon-size();
@for $i from 1 through 4 { @for $i from 1 through 4 {
&:nth-child(#{$i}) { &:nth-child(#{$i}) {
z-index: (4 - $i); z-index: (4 - $i);
} }
} }
.avatar {
@include code-icon-size();
}
} }
.diff-comments-more-count { .diff-comments-more-count {
width: 19px;
min-width: 19px;
padding-left: 0; padding-left: 0;
padding-right: 0; padding-right: 0;
overflow: hidden; overflow: hidden;
@include code-icon-size();
} }
.diff-comments-more-count, .diff-comments-more-count,
...@@ -680,12 +681,15 @@ table.code { ...@@ -680,12 +681,15 @@ table.code {
} }
.diff-notes-collapse { .diff-notes-collapse {
width: 24px; border: 0;
height: 24px;
border-radius: 50%; border-radius: 50%;
padding: 0; padding: 0;
transition: transform 0.1s ease-out; transition: transform 0.1s ease-out;
z-index: 100; z-index: 100;
display: flex;
justify-content: center;
align-items: center;
@include code-icon-size();
.collapse-icon { .collapse-icon {
height: 50%; height: 50%;
......
...@@ -437,7 +437,9 @@ $note-form-margin-left: 72px; ...@@ -437,7 +437,9 @@ $note-form-margin-left: 72px;
.diff-file { .diff-file {
.is-over { .is-over {
.add-diff-note { .add-diff-note {
display: inline-block; display: inline-flex;
justify-content: center;
align-items: center;
} }
} }
...@@ -741,7 +743,7 @@ $note-form-margin-left: 72px; ...@@ -741,7 +743,7 @@ $note-form-margin-left: 72px;
.add-diff-note { .add-diff-note {
@include btn-comment-icon; @include btn-comment-icon;
opacity: 0; opacity: 0;
margin-left: -50px; margin-left: -52px;
position: absolute; position: absolute;
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
...@@ -900,10 +902,6 @@ $note-form-margin-left: 72px; ...@@ -900,10 +902,6 @@ $note-form-margin-left: 72px;
.diff-comment-form { .diff-comment-form {
display: block; display: block;
} }
.add-diff-note svg {
margin-top: 4px;
}
} }
.discussion-filter-container { .discussion-filter-container {
......
---
title: Change collapse icon size to size of profile picture
merge_request: 28512
author: Marcel van Remmerden
type: other
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