summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2019-05-03 08:59:06 +0000
committerFilipa Lacerda <filipa@gitlab.com>2019-05-03 08:59:06 +0000
commit6daf4d352e5c21187ece57f97a6e5548b178a35a (patch)
tree015edf922f71c67aab033deab3f64d7c163b3890 /app/assets/javascripts/diffs/components/diff_line_gutter_content.vue
parent34d5f27bef90b3e7bd7c3294f35a628d96326dee (diff)
parent9d24d4a8fdd299a1e84f2e549fb58ee526a2f0f9 (diff)
downloadgitlab-ce-6daf4d352e5c21187ece57f97a6e5548b178a35a.tar.gz
Merge branch 'expand-diff-performance' into 'master'
Impove the performance of expanding full diff Closes #58597 See merge request gitlab-org/gitlab-ce!27413
Diffstat (limited to 'app/assets/javascripts/diffs/components/diff_line_gutter_content.vue')
-rw-r--r--app/assets/javascripts/diffs/components/diff_line_gutter_content.vue6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue b/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue
index 6709df48637..1281f9b17ef 100644
--- a/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue
+++ b/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue
@@ -84,8 +84,6 @@ export default {
},
shouldShowCommentButton() {
return (
- this.isLoggedIn &&
- this.showCommentButton &&
this.isHover &&
!this.isMatchLine &&
!this.isContextLine &&
@@ -102,6 +100,9 @@ export default {
}
return this.showCommentButton && this.hasDiscussions;
},
+ shouldRenderCommentButton() {
+ return this.isLoggedIn && this.showCommentButton;
+ },
},
methods: {
...mapActions('diffs', ['loadMoreLines', 'showCommentForm', 'setHighlightedRow']),
@@ -167,6 +168,7 @@ export default {
>
<template v-else>
<button
+ v-if="shouldRenderCommentButton"
v-show="shouldShowCommentButton"
type="button"
class="add-diff-note js-add-diff-note-button qa-diff-comment"