summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/diffs/components/inline_diff_table_row.vue
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2019-05-03 08:33:15 +0100
committerPhil Hughes <me@iamphill.com>2019-05-03 08:33:15 +0100
commit9d24d4a8fdd299a1e84f2e549fb58ee526a2f0f9 (patch)
tree5644c2b7f96e0b668e45ef39f5a959236fd06633 /app/assets/javascripts/diffs/components/inline_diff_table_row.vue
parentb75e92a1b8e6100e4c099fc2f941c6e73f5632e6 (diff)
downloadgitlab-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/inline_diff_table_row.vue')
-rw-r--r--app/assets/javascripts/diffs/components/inline_diff_table_row.vue15
1 files changed, 7 insertions, 8 deletions
diff --git a/app/assets/javascripts/diffs/components/inline_diff_table_row.vue b/app/assets/javascripts/diffs/components/inline_diff_table_row.vue
index c764cbeb8e0..2d5262baeec 100644
--- a/app/assets/javascripts/diffs/components/inline_diff_table_row.vue
+++ b/app/assets/javascripts/diffs/components/inline_diff_table_row.vue
@@ -1,12 +1,11 @@
<script>
-import { mapGetters, mapActions, mapState } from 'vuex';
+import { mapActions, mapState } from 'vuex';
import DiffTableCell from './diff_table_cell.vue';
import {
NEW_LINE_TYPE,
OLD_LINE_TYPE,
CONTEXT_LINE_TYPE,
CONTEXT_LINE_CLASS_NAME,
- PARALLEL_DIFF_VIEW_TYPE,
LINE_POSITION_LEFT,
LINE_POSITION_RIGHT,
} from '../constants';
@@ -45,16 +44,16 @@ export default {
return this.line.line_code !== null && this.line.line_code === state.diffs.highlightedRow;
},
}),
- ...mapGetters('diffs', ['isInlineView']),
isContextLine() {
return this.line.type === CONTEXT_LINE_TYPE;
},
classNameMap() {
- return {
- [this.line.type]: this.line.type,
- [CONTEXT_LINE_CLASS_NAME]: this.isContextLine,
- [PARALLEL_DIFF_VIEW_TYPE]: this.isParallelView,
- };
+ return [
+ this.line.type,
+ {
+ [CONTEXT_LINE_CLASS_NAME]: this.isContextLine,
+ },
+ ];
},
inlineRowId() {
return this.line.line_code || `${this.fileHash}_${this.line.old_line}_${this.line.new_line}`;