diff options
author | Phil Hughes <me@iamphill.com> | 2019-05-03 08:33:15 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-05-03 08:33:15 +0100 |
commit | 9d24d4a8fdd299a1e84f2e549fb58ee526a2f0f9 (patch) | |
tree | 5644c2b7f96e0b668e45ef39f5a959236fd06633 /app/assets/javascripts/diffs/components/diff_line_gutter_content.vue | |
parent | b75e92a1b8e6100e4c099fc2f941c6e73f5632e6 (diff) | |
download | gitlab-ce-9d24d4a8fdd299a1e84f2e549fb58ee526a2f0f9.tar.gz |
Impove the performance of expanding full diff
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58597
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.vue | 6 |
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" |