Commit 0a06e34d authored by Paul Slaughter's avatar Paul Slaughter

Merge branch 'jdb/minimal-merge-ref-diff' into 'master'

Hide comment button if on diff HEAD

See merge request gitlab-org/gitlab!24207
parents 1af54d75 e5897481
<script>
import { mapState, mapGetters, mapActions } from 'vuex';
import { getParameterByName, parseBoolean } from '~/lib/utils/common_utils';
import Icon from '~/vue_shared/components/icon.vue';
import DiffGutterAvatars from './diff_gutter_avatars.vue';
import { LINE_POSITION_RIGHT } from '../constants';
......@@ -98,7 +99,8 @@ export default {
return this.showCommentButton && this.hasDiscussions;
},
shouldRenderCommentButton() {
return this.isLoggedIn && this.showCommentButton;
const isDiffHead = parseBoolean(getParameterByName('diff_head'));
return !isDiffHead && this.isLoggedIn && this.showCommentButton;
},
},
methods: {
......@@ -130,6 +132,7 @@ export default {
</button>
<a
v-if="lineNumber"
ref="lineNumberRef"
:data-linenumber="lineNumber"
:href="lineHref"
@click="setHighlightedRow(lineCode)"
......
---
title: Hide comment button if on diff HEAD
merge_request: 24207
author:
type: changed
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