Commit ece045db authored by Jacques Erasmus's avatar Jacques Erasmus

Merge branch 'ph/diffCommentIconToCss' into 'master'

Moves diff notes comment icon to CSS

See merge request gitlab-org/gitlab!57345
parents ab0aa66c 0809ed2c
<script> <script>
import { GlTooltipDirective, GlIcon, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui'; import { GlTooltipDirective, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants'; import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
...@@ -17,7 +17,6 @@ import * as utils from './diff_row_utils'; ...@@ -17,7 +17,6 @@ import * as utils from './diff_row_utils';
export default { export default {
components: { components: {
GlIcon,
DiffGutterAvatars, DiffGutterAvatars,
}, },
directives: { directives: {
...@@ -203,14 +202,12 @@ export default { ...@@ -203,14 +202,12 @@ export default {
<button <button
:draggable="glFeatures.dragCommentSelection" :draggable="glFeatures.dragCommentSelection"
type="button" type="button"
class="add-diff-note note-button js-add-diff-note-button qa-diff-comment" class="add-diff-note unified-diff-components-diff-note-button note-button js-add-diff-note-button qa-diff-comment"
:class="{ 'gl-cursor-grab': dragging }" :class="{ 'gl-cursor-grab': dragging }"
:disabled="line.left.commentsDisabled" :disabled="line.left.commentsDisabled"
@click="handleCommentButton(line.left)" @click="handleCommentButton(line.left)"
@dragstart="onDragStart({ ...line.left, index })" @dragstart="onDragStart({ ...line.left, index })"
> ></button>
<gl-icon :size="12" name="comment" />
</button>
</span> </span>
</template> </template>
<a <a
...@@ -305,14 +302,12 @@ export default { ...@@ -305,14 +302,12 @@ export default {
<button <button
:draggable="glFeatures.dragCommentSelection" :draggable="glFeatures.dragCommentSelection"
type="button" type="button"
class="add-diff-note note-button js-add-diff-note-button qa-diff-comment" class="add-diff-note unified-diff-components-diff-note-button note-button js-add-diff-note-button qa-diff-comment"
:class="{ 'gl-cursor-grab': dragging }" :class="{ 'gl-cursor-grab': dragging }"
:disabled="line.right.commentsDisabled" :disabled="line.right.commentsDisabled"
@click="handleCommentButton(line.right)" @click="handleCommentButton(line.right)"
@dragstart="onDragStart({ ...line.right, index })" @dragstart="onDragStart({ ...line.right, index })"
> ></button>
<gl-icon :size="12" name="comment" />
</button>
</span> </span>
</template> </template>
<a <a
......
...@@ -771,6 +771,26 @@ $system-note-svg-size: 16px; ...@@ -771,6 +771,26 @@ $system-note-svg-size: 16px;
} }
} }
.unified-diff-components-diff-note-button {
&::before {
background-color: $blue-500;
mask-image: asset_url('icons-stacked.svg#comment');
mask-repeat: no-repeat;
mask-size: cover;
mask-position: center;
content: '';
width: 12px;
height: 12px;
}
&:hover,
&.inverted {
&::before {
background-color: $white;
}
}
}
.disabled-comment { .disabled-comment {
background-color: $gray-light; background-color: $gray-light;
border-radius: $border-radius-base; border-radius: $border-radius-base;
......
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