diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2019-03-06 18:03:22 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2019-03-06 18:03:22 +0300 |
commit | 7bbdb2a29fbc7b8c9f879c42de7063adaa8313c7 (patch) | |
tree | ddf3f44ea1de245217e5b60093c18538161a99a0 /app/assets | |
parent | bd28bcbf4e8696547fa590de0eab1ad88f0a9b09 (diff) | |
parent | 40f767e98b64c2eb86dadb1986c029c15cdaa2a5 (diff) |
Merge branch 'ee-parallel-diff-view-ce' into 'master'
CE backport of ee-parallel-diff-view
See merge request gitlab-org/gitlab-ce!25734
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/diffs/components/parallel_diff_view.vue | 10 | ||||
-rw-r--r-- | app/assets/javascripts/diffs/mixins/draft_comments.js | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/app/assets/javascripts/diffs/components/parallel_diff_view.vue b/app/assets/javascripts/diffs/components/parallel_diff_view.vue index 1bf693380db..93e754fa896 100644 --- a/app/assets/javascripts/diffs/components/parallel_diff_view.vue +++ b/app/assets/javascripts/diffs/components/parallel_diff_view.vue @@ -1,5 +1,6 @@ <script> import { mapGetters } from 'vuex'; +import draftCommentsMixin from 'ee_else_ce/diffs/mixins/draft_comments'; import parallelDiffTableRow from './parallel_diff_table_row.vue'; import parallelDiffCommentRow from './parallel_diff_comment_row.vue'; @@ -7,7 +8,10 @@ export default { components: { parallelDiffTableRow, parallelDiffCommentRow, + ParallelDraftCommentRow: () => + import('ee_component/batch_comments/components/parallel_draft_comment_row.vue'), }, + mixins: [draftCommentsMixin], props: { diffFile: { type: Object, @@ -56,6 +60,12 @@ export default { :line-index="index" :help-page-path="helpPagePath" /> + <parallel-draft-comment-row + v-if="shouldRenderParallelDraftRow(diffFile.file_hash, line)" + :key="`drafts-${index}`" + :line="line" + :diff-file-content-sha="diffFile.file_hash" + /> </template> </tbody> </table> diff --git a/app/assets/javascripts/diffs/mixins/draft_comments.js b/app/assets/javascripts/diffs/mixins/draft_comments.js index d7bed2a5f0d..cfa722b27f1 100644 --- a/app/assets/javascripts/diffs/mixins/draft_comments.js +++ b/app/assets/javascripts/diffs/mixins/draft_comments.js @@ -1,6 +1,7 @@ export default { computed: { shouldRenderDraftRow: () => () => false, + shouldRenderParallelDraftRow: () => () => false, draftForLine: () => () => ({}), }, }; |