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
c495fd97
Commit
c495fd97
authored
Oct 19, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop batch comment actions showing on commit discussions
Closes
https://gitlab.com/gitlab-org/gitlab-ee/issues/8052
parent
29dbcccb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
1 deletion
+64
-1
app/assets/javascripts/notes/components/note_form.vue
app/assets/javascripts/notes/components/note_form.vue
+1
-1
ee/app/assets/javascripts/batch_comments/mixins/note_form.js
ee/app/assets/javascripts/batch_comments/mixins/note_form.js
+3
-0
ee/changelogs/unreleased/batch-comments-commit-comment.yml
ee/changelogs/unreleased/batch-comments-commit-comment.yml
+5
-0
ee/spec/javascripts/notes/components/note_form_spec.js
ee/spec/javascripts/notes/components/note_form_spec.js
+55
-0
No files found.
app/assets/javascripts/notes/components/note_form.vue
View file @
c495fd97
...
...
@@ -204,7 +204,7 @@ js-autosize markdown-area js-vue-issue-note-form js-vue-textarea"
class=
"note-form-actions clearfix"
>
<template
v-if=
"
withBatchComments && noteId === ''
"
v-if=
"
showBatchCommentsActions
"
>
<p
v-if=
"discussion && discussion.id"
...
...
ee/app/assets/javascripts/batch_comments/mixins/note_form.js
View file @
c495fd97
...
...
@@ -6,6 +6,9 @@ export default {
withBatchComments
:
state
=>
state
.
batchComments
&&
state
.
batchComments
.
withBatchComments
,
}),
...
mapGetters
(
'
batchComments
'
,
[
'
hasDrafts
'
]),
showBatchCommentsActions
()
{
return
this
.
withBatchComments
&&
this
.
noteId
===
''
&&
!
this
.
discussion
.
for_commit
;
},
},
methods
:
{
shouldBeResolved
(
resolveStatus
)
{
...
...
ee/changelogs/unreleased/batch-comments-commit-comment.yml
0 → 100644
View file @
c495fd97
---
title
:
Stops showing review actions on commit discussions in merge requests
merge_request
:
8007
author
:
type
:
fixed
ee/spec/javascripts/notes/components/note_form_spec.js
0 → 100644
View file @
c495fd97
import
Vue
from
'
vue
'
;
import
{
createStore
}
from
'
~/mr_notes/stores
'
;
import
issueNoteForm
from
'
~/notes/components/note_form.vue
'
;
import
{
noteableDataMock
,
discussionMock
,
notesDataMock
}
from
'
spec/notes/mock_data
'
;
describe
(
'
issue_note_form component
'
,
()
=>
{
let
store
;
let
vm
;
let
props
;
beforeEach
(()
=>
{
const
Component
=
Vue
.
extend
(
issueNoteForm
);
store
=
createStore
();
store
.
dispatch
(
'
setNoteableData
'
,
noteableDataMock
);
store
.
dispatch
(
'
setNotesData
'
,
notesDataMock
);
props
=
{
isEditing
:
false
,
noteBody
:
'
Magni suscipit eius consectetur enim et ex et commodi.
'
,
discussion
:
{
...
discussionMock
,
for_commit
:
false
},
};
vm
=
new
Component
({
store
,
propsData
:
props
,
}).
$mount
();
});
afterEach
(()
=>
{
vm
.
$destroy
();
});
describe
(
'
with batch comments
'
,
()
=>
{
beforeEach
(
done
=>
{
store
.
dispatch
(
'
batchComments/enableBatchComments
'
)
.
then
(
vm
.
$nextTick
)
.
then
(
done
)
.
catch
(
done
.
fail
);
});
it
(
'
hides actions for commits
'
,
done
=>
{
vm
.
discussion
.
for_commit
=
true
;
vm
.
$nextTick
(()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.note-form-actions
'
).
textContent
).
not
.
toContain
(
'
Start a review
'
,
);
done
();
});
});
});
});
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