Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2c3c3a7a
Commit
2c3c3a7a
authored
Jul 17, 2020
by
Justin Boyson
Committed by
Phil Hughes
Jul 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't show MLC form on thread replies
parent
40caa9d0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
3 deletions
+32
-3
app/assets/javascripts/notes/components/noteable_note.vue
app/assets/javascripts/notes/components/noteable_note.vue
+2
-2
changelogs/unreleased/jdb-fix-multiline-comment-form-reply.yml
...elogs/unreleased/jdb-fix-multiline-comment-form-reply.yml
+5
-0
spec/frontend/notes/components/noteable_note_spec.js
spec/frontend/notes/components/noteable_note_spec.js
+25
-1
No files found.
app/assets/javascripts/notes/components/noteable_note.vue
View file @
2c3c3a7a
...
...
@@ -147,10 +147,10 @@ export default {
return
getEndLineNumber
(
this
.
lineRange
);
},
showMultiLineComment
()
{
if
(
!
this
.
glFeatures
.
multilineComments
)
return
false
;
if
(
!
this
.
glFeatures
.
multilineComments
||
!
this
.
discussionRoot
)
return
false
;
if
(
this
.
isEditing
)
return
true
;
return
this
.
line
&&
this
.
discussionRoot
&&
this
.
startLineNumber
!==
this
.
endLineNumber
;
return
this
.
line
&&
this
.
startLineNumber
!==
this
.
endLineNumber
;
},
commentLineOptions
()
{
if
(
!
this
.
diffFile
||
!
this
.
line
)
return
[];
...
...
changelogs/unreleased/jdb-fix-multiline-comment-form-reply.yml
0 → 100644
View file @
2c3c3a7a
---
title
:
Fix showing MLC form on replies
merge_request
:
37139
author
:
type
:
fixed
spec/frontend/notes/components/noteable_note_spec.js
View file @
2c3c3a7a
...
...
@@ -34,7 +34,13 @@ describe('issue_note', () => {
note
,
},
localVue
,
stubs
:
[
'
note-header
'
,
'
user-avatar-link
'
,
'
note-actions
'
,
'
note-body
'
],
stubs
:
[
'
note-header
'
,
'
user-avatar-link
'
,
'
note-actions
'
,
'
note-body
'
,
'
multiline-comment-form
'
,
],
});
});
...
...
@@ -77,6 +83,24 @@ describe('issue_note', () => {
});
});
it
(
'
should render multiline comment if editing discussion root
'
,
()
=>
{
wrapper
.
setProps
({
discussionRoot
:
true
});
wrapper
.
vm
.
isEditing
=
true
;
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
findMultilineComment
().
exists
()).
toBe
(
true
);
});
});
it
(
'
should not render multiline comment form unless it is the discussion root
'
,
()
=>
{
wrapper
.
setProps
({
discussionRoot
:
false
});
wrapper
.
vm
.
isEditing
=
true
;
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
findMultilineComment
().
exists
()).
toBe
(
false
);
});
});
it
(
'
should not render if has single line comment
'
,
()
=>
{
const
position
=
{
line_range
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment