Commit 1a50806d authored by Yogi's avatar Yogi Committed by Paul Slaughter

Fix alignment of chevron-down icon in toggle replies

https://gitlab.com/gitlab-org/gitlab/-/merge_requests/51872
parent 62f8dab1
...@@ -39,13 +39,17 @@ export default { ...@@ -39,13 +39,17 @@ export default {
this.$emit('toggle'); this.$emit('toggle');
}, },
}, },
ICON_CLASS: 'gl-mr-3 gl-cursor-pointer',
}; };
</script> </script>
<template> <template>
<li :class="className" class="replies-toggle js-toggle-replies"> <li
:class="className"
class="replies-toggle js-toggle-replies gl-display-flex! gl-align-items-center gl-flex-wrap"
>
<template v-if="collapsed"> <template v-if="collapsed">
<gl-icon name="chevron-right" @click.native="toggle" /> <gl-icon :class="$options.ICON_CLASS" name="chevron-right" @click.native="toggle" />
<div> <div>
<user-avatar-link <user-avatar-link
v-for="author in uniqueAuthors" v-for="author in uniqueAuthors"
...@@ -59,7 +63,7 @@ export default { ...@@ -59,7 +63,7 @@ export default {
/> />
</div> </div>
<gl-button <gl-button
class="js-replies-text" class="js-replies-text gl-mr-2"
category="tertiary" category="tertiary"
variant="link" variant="link"
data-qa-selector="expand_replies_button" data-qa-selector="expand_replies_button"
...@@ -68,18 +72,19 @@ export default { ...@@ -68,18 +72,19 @@ export default {
{{ replies.length }} {{ n__('reply', 'replies', replies.length) }} {{ replies.length }} {{ n__('reply', 'replies', replies.length) }}
</gl-button> </gl-button>
{{ __('Last reply by') }} {{ __('Last reply by') }}
<a :href="lastReply.author.path" class="btn btn-link author-link"> <a :href="lastReply.author.path" class="btn btn-link author-link gl-mx-2">
{{ lastReply.author.name }} {{ lastReply.author.name }}
</a> </a>
<time-ago-tooltip :time="lastReply.created_at" tooltip-placement="bottom" /> <time-ago-tooltip :time="lastReply.created_at" tooltip-placement="bottom" />
</template> </template>
<span <div
v-else v-else
class="collapse-replies-btn js-collapse-replies" class="collapse-replies-btn js-collapse-replies gl-display-flex align-items-center"
data-qa-selector="collapse_replies_button" data-qa-selector="collapse_replies_button"
@click="toggle" @click="toggle"
> >
<gl-icon name="chevron-down" /> {{ s__('Notes|Collapse replies') }} <gl-icon :class="$options.ICON_CLASS" name="chevron-down" />
</span> <span class="gl-cursor-pointer">{{ s__('Notes|Collapse replies') }}</span>
</div>
</li> </li>
</template> </template>
...@@ -91,29 +91,10 @@ $note-form-margin-left: 72px; ...@@ -91,29 +91,10 @@ $note-form-margin-left: 72px;
color: $blue-600; color: $blue-600;
} }
&.expanded {
span {
cursor: pointer;
}
svg {
position: relative;
top: 3px;
}
}
&.collapsed { &.collapsed {
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
border-radius: 0 0 $border-radius-default $border-radius-default; border-radius: 0 0 $border-radius-default $border-radius-default;
svg {
float: left;
position: relative;
top: $gl-padding-4;
margin-right: $gl-padding-8;
cursor: pointer;
}
img { img {
margin: -2px 4px 0 0; margin: -2px 4px 0 0;
} }
......
---
title: Fix alignment of chevron-down icon in toggle replies
merge_request: 51872
author: Yogi (@yo)
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