Backported EE fix to CE

- fixed attribute to be not hyphenated
- applied parallel diffs view on CE
- separated left and right drafts
- added fallback for hasDrafts
This commit is contained in:
Natalia Tepluhina 2019-07-08 09:49:48 +00:00 committed by Phil Hughes
parent 5214ad1a7f
commit aeb2efaba2
5 changed files with 23 additions and 0 deletions

View File

@ -24,6 +24,11 @@ export default {
required: false,
default: '',
},
hasDraft: {
type: Boolean,
required: false,
default: false,
},
},
computed: {
className() {
@ -55,6 +60,7 @@ export default {
:help-page-path="helpPagePath"
/>
<diff-discussion-reply
v-if="!hasDraft"
:has-form="line.hasForm"
:render-reply-placeholder="Boolean(line.discussions.length)"
@showNewDiscussionForm="

View File

@ -57,6 +57,7 @@ export default {
:diff-file-hash="diffFile.file_hash"
:line="line"
:help-page-path="helpPagePath"
:has-draft="shouldRenderDraftRow(diffFile.file_hash, line) || false"
/>
<inline-draft-comment-row
v-if="shouldRenderDraftRow(diffFile.file_hash, line)"

View File

@ -28,6 +28,16 @@ export default {
required: false,
default: '',
},
hasDraftLeft: {
type: Boolean,
required: false,
default: false,
},
hasDraftRight: {
type: Boolean,
required: false,
default: false,
},
},
computed: {
hasExpandedDiscussionOnLeft() {
@ -121,6 +131,7 @@ export default {
/>
</div>
<diff-discussion-reply
v-if="!hasDraftLeft"
:has-form="showLeftSideCommentForm"
:render-reply-placeholder="shouldRenderReplyPlaceholderOnLeft"
@showNewDiscussionForm="showNewDiscussionForm"
@ -145,6 +156,7 @@ export default {
/>
</div>
<diff-discussion-reply
v-if="!hasDraftRight"
:has-form="showRightSideCommentForm"
:render-reply-placeholder="shouldRenderReplyPlaceholderOnRight"
@showNewDiscussionForm="showNewDiscussionForm"

View File

@ -58,6 +58,8 @@ export default {
:diff-file-hash="diffFile.file_hash"
:line-index="index"
:help-page-path="helpPagePath"
:has-draft-left="hasParallelDraftLeft(diffFile.file_hash, line) || false"
:has-draft-right="hasParallelDraftRight(diffFile.file_hash, line) || false"
/>
<parallel-draft-comment-row
v-if="shouldRenderParallelDraftRow(diffFile.file_hash, line)"

View File

@ -6,5 +6,7 @@ export default {
imageDiscussions() {
return this.diffFile.discussions;
},
hasParallelDraftLeft: () => () => false,
hasParallelDraftRight: () => () => false,
},
};