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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
0817c210
Commit
0817c210
authored
Dec 21, 2018
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'winh-discussion-header-commented' into 'master'"
This reverts merge request !23622
parent
a9049532
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
58 deletions
+10
-58
app/assets/javascripts/notes/components/noteable_discussion.vue
...sets/javascripts/notes/components/noteable_discussion.vue
+0
-11
app/assets/javascripts/notes/components/noteable_note.vue
app/assets/javascripts/notes/components/noteable_note.vue
+7
-28
app/helpers/notes_helper.rb
app/helpers/notes_helper.rb
+1
-1
changelogs/unreleased/winh-discussion-header-commented.yml
changelogs/unreleased/winh-discussion-header-commented.yml
+0
-5
locale/gitlab.pot
locale/gitlab.pot
+0
-3
spec/features/merge_request/user_sees_discussions_spec.rb
spec/features/merge_request/user_sees_discussions_spec.rb
+0
-8
spec/helpers/notes_helper_spec.rb
spec/helpers/notes_helper_spec.rb
+2
-2
No files found.
app/assets/javascripts/notes/components/noteable_discussion.vue
View file @
0817c210
...
@@ -212,16 +212,6 @@ export default {
...
@@ -212,16 +212,6 @@ export default {
return
this
.
line
;
return
this
.
line
;
},
},
commit
()
{
if
(
!
this
.
discussion
.
for_commit
)
{
return
null
;
}
return
{
id
:
this
.
discussion
.
commit_id
,
url
:
this
.
discussion
.
discussion_path
,
};
},
},
},
watch
:
{
watch
:
{
isReplying
()
{
isReplying
()
{
...
@@ -387,7 +377,6 @@ Please check your network connection and try again.`;
...
@@ -387,7 +377,6 @@ Please check your network connection and try again.`;
:note=
"componentData(initialDiscussion)"
:note=
"componentData(initialDiscussion)"
:line=
"line"
:line=
"line"
:help-page-path=
"helpPagePath"
:help-page-path=
"helpPagePath"
:commit=
"commit"
@
handleDeleteNote=
"deleteNoteHandler"
@
handleDeleteNote=
"deleteNoteHandler"
>
>
<note-edited-text
<note-edited-text
...
...
app/assets/javascripts/notes/components/noteable_note.vue
View file @
0817c210
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
import
$
from
'
jquery
'
;
import
$
from
'
jquery
'
;
import
{
mapGetters
,
mapActions
}
from
'
vuex
'
;
import
{
mapGetters
,
mapActions
}
from
'
vuex
'
;
import
{
escape
}
from
'
underscore
'
;
import
{
escape
}
from
'
underscore
'
;
import
{
truncateSha
}
from
'
~/lib/utils/text_utility
'
;
import
{
s__
,
sprintf
}
from
'
~/locale
'
;
import
TimelineEntryItem
from
'
~/vue_shared/components/notes/timeline_entry_item.vue
'
;
import
TimelineEntryItem
from
'
~/vue_shared/components/notes/timeline_entry_item.vue
'
;
import
Flash
from
'
../../flash
'
;
import
Flash
from
'
../../flash
'
;
import
userAvatarLink
from
'
../../vue_shared/components/user_avatar/user_avatar_link.vue
'
;
import
userAvatarLink
from
'
../../vue_shared/components/user_avatar/user_avatar_link.vue
'
;
...
@@ -39,11 +37,6 @@ export default {
...
@@ -39,11 +37,6 @@ export default {
required
:
false
,
required
:
false
,
default
:
''
,
default
:
''
,
},
},
commit
:
{
type
:
Object
,
required
:
false
,
default
:
()
=>
null
,
},
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -80,24 +73,6 @@ export default {
...
@@ -80,24 +73,6 @@ export default {
isTarget
()
{
isTarget
()
{
return
this
.
targetNoteHash
===
this
.
noteAnchorId
;
return
this
.
targetNoteHash
===
this
.
noteAnchorId
;
},
},
actionText
()
{
if
(
this
.
commit
)
{
const
{
id
,
url
}
=
this
.
commit
;
const
linkStart
=
`<a class="commit-sha monospace" href="
${
escape
(
url
)}
">`
;
const
linkEnd
=
'
</a>
'
;
return
sprintf
(
s__
(
'
MergeRequests|commented on commit %{linkStart}%{commitId}%{linkEnd}
'
),
{
commitId
:
truncateSha
(
id
),
linkStart
,
linkEnd
,
},
false
,
);
}
return
'
<span class="d-none d-sm-inline">·</span>
'
;
},
},
},
created
()
{
created
()
{
...
@@ -225,9 +200,13 @@ export default {
...
@@ -225,9 +200,13 @@ export default {
</div>
</div>
<div
class=
"timeline-content"
>
<div
class=
"timeline-content"
>
<div
class=
"note-header"
>
<div
class=
"note-header"
>
<note-header
v-once
:author=
"author"
:created-at=
"note.created_at"
:note-id=
"note.id"
>
<note-header
<span
v-html=
"actionText"
></span>
v-once
</note-header>
:author=
"author"
:created-at=
"note.created_at"
:note-id=
"note.id"
action-text=
"commented"
/>
<note-actions
<note-actions
:author-id=
"author.id"
:author-id=
"author.id"
:note-id=
"note.id"
:note-id=
"note.id"
...
...
app/helpers/notes_helper.rb
View file @
0817c210
...
@@ -85,7 +85,7 @@ module NotesHelper
...
@@ -85,7 +85,7 @@ module NotesHelper
diffs_project_merge_request_path
(
discussion
.
project
,
discussion
.
noteable
,
path_params
)
diffs_project_merge_request_path
(
discussion
.
project
,
discussion
.
noteable
,
path_params
)
elsif
discussion
.
for_commit?
elsif
discussion
.
for_commit?
anchor
=
discussion
.
diff_discussion?
?
discussion
.
line_code
:
"note_
#{
discussion
.
first_note
.
id
}
"
anchor
=
discussion
.
line_code
if
discussion
.
diff_discussion?
project_commit_path
(
discussion
.
project
,
discussion
.
noteable
,
anchor:
anchor
)
project_commit_path
(
discussion
.
project
,
discussion
.
noteable
,
anchor:
anchor
)
end
end
...
...
changelogs/unreleased/winh-discussion-header-commented.yml
deleted
100644 → 0
View file @
a9049532
---
title
:
Display "commented" only for commit discussions on merge requests
merge_request
:
23622
author
:
type
:
fixed
locale/gitlab.pot
View file @
0817c210
...
@@ -4138,9 +4138,6 @@ msgstr ""
...
@@ -4138,9 +4138,6 @@ msgstr ""
msgid "MergeRequests|View replaced file @ %{commitId}"
msgid "MergeRequests|View replaced file @ %{commitId}"
msgstr ""
msgstr ""
msgid "MergeRequests|commented on commit %{linkStart}%{commitId}%{linkEnd}"
msgstr ""
msgid "MergeRequests|started a discussion"
msgid "MergeRequests|started a discussion"
msgstr ""
msgstr ""
...
...
spec/features/merge_request/user_sees_discussions_spec.rb
View file @
0817c210
...
@@ -88,13 +88,5 @@ describe 'Merge request > User sees discussions', :js do
...
@@ -88,13 +88,5 @@ describe 'Merge request > User sees discussions', :js do
expect
(
page
).
to
have_content
"started a discussion on commit
#{
note
.
commit_id
[
0
...
7
]
}
"
expect
(
page
).
to
have_content
"started a discussion on commit
#{
note
.
commit_id
[
0
...
7
]
}
"
end
end
end
end
context
'a commit non-diff discussion'
do
let
(
:note
)
{
create
(
:discussion_note_on_commit
,
project:
project
)
}
it
'displays correct header'
do
expect
(
page
).
to
have_content
"commented on commit
#{
note
.
commit_id
[
0
...
7
]
}
"
end
end
end
end
end
end
spec/helpers/notes_helper_spec.rb
View file @
0817c210
...
@@ -185,8 +185,8 @@ describe NotesHelper do
...
@@ -185,8 +185,8 @@ describe NotesHelper do
context
'for a non-diff discussion'
do
context
'for a non-diff discussion'
do
let
(
:discussion
)
{
create
(
:discussion_note_on_commit
,
project:
project
).
to_discussion
}
let
(
:discussion
)
{
create
(
:discussion_note_on_commit
,
project:
project
).
to_discussion
}
it
'returns the commit path
with the note anchor
'
do
it
'returns the commit path'
do
expect
(
helper
.
discussion_path
(
discussion
)).
to
eq
(
project_commit_path
(
project
,
commit
,
anchor:
"note_
#{
discussion
.
first_note
.
id
}
"
))
expect
(
helper
.
discussion_path
(
discussion
)).
to
eq
(
project_commit_path
(
project
,
commit
))
end
end
end
end
end
end
...
...
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