Commit fbe30cf1 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'ph/255278/fixStartDiscussionUnifiedDiffLines' into 'master'

Fixes start a new discussion not working with unified diff lines

Closes #255278

See merge request gitlab-org/gitlab!43271
parents 8a099c11 facd519c
...@@ -113,8 +113,8 @@ export default { ...@@ -113,8 +113,8 @@ export default {
}, },
methods: { methods: {
...mapActions('diffs', ['showCommentForm']), ...mapActions('diffs', ['showCommentForm']),
showNewDiscussionForm() { showNewDiscussionForm(lineCode) {
this.showCommentForm({ lineCode: this.line.line_code, fileHash: this.diffFileHash }); this.showCommentForm({ lineCode, fileHash: this.diffFileHash });
}, },
}, },
}; };
...@@ -134,7 +134,7 @@ export default { ...@@ -134,7 +134,7 @@ export default {
v-if="!hasDraftLeft" v-if="!hasDraftLeft"
:has-form="showLeftSideCommentForm" :has-form="showLeftSideCommentForm"
:render-reply-placeholder="shouldRenderReplyPlaceholderOnLeft" :render-reply-placeholder="shouldRenderReplyPlaceholderOnLeft"
@showNewDiscussionForm="showNewDiscussionForm" @showNewDiscussionForm="showNewDiscussionForm(line.left.line_code)"
> >
<template #form> <template #form>
<diff-line-note-form <diff-line-note-form
...@@ -159,7 +159,7 @@ export default { ...@@ -159,7 +159,7 @@ export default {
v-if="!hasDraftRight" v-if="!hasDraftRight"
:has-form="showRightSideCommentForm" :has-form="showRightSideCommentForm"
:render-reply-placeholder="shouldRenderReplyPlaceholderOnRight" :render-reply-placeholder="shouldRenderReplyPlaceholderOnRight"
@showNewDiscussionForm="showNewDiscussionForm" @showNewDiscussionForm="showNewDiscussionForm(line.right.line_code)"
> >
<template #form> <template #form>
<diff-line-note-form <diff-line-note-form
......
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