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
eff96b8c
Commit
eff96b8c
authored
Oct 10, 2017
by
Clement Ho
Committed by
Filipa Lacerda
Oct 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix unable to expand text diff discussion comments
parent
97ece0ba
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
10 deletions
+6
-10
app/views/discussions/_diff_discussion.html.haml
app/views/discussions/_diff_discussion.html.haml
+1
-1
app/views/discussions/_diff_with_notes.html.haml
app/views/discussions/_diff_with_notes.html.haml
+1
-1
app/views/discussions/_notes.html.haml
app/views/discussions/_notes.html.haml
+2
-2
spec/features/merge_requests/diffs_spec.rb
spec/features/merge_requests/diffs_spec.rb
+2
-6
No files found.
app/views/discussions/_diff_discussion.html.haml
View file @
eff96b8c
...
...
@@ -7,4 +7,4 @@
%td
.notes_line
{
colspan:
2
}
%td
.notes_content
.content
{
class:
(
'hide'
unless
expanded
)
}
=
render
partial:
"discussions/notes"
,
collection:
discussions
,
as: :discussion
=
render
partial:
"discussions/notes"
,
collection:
discussions
,
as: :discussion
,
locals:
{
disable_collapse_class:
true
}
app/views/discussions/_diff_with_notes.html.haml
View file @
eff96b8c
...
...
@@ -24,4 +24,4 @@
=
render
partial:
"projects/diffs/
#{
partial
}
"
,
locals:
{
diff_file:
diff_file
,
position:
discussion
.
position
.
to_json
,
click_to_comment:
false
}
.note-container
=
render
partial:
"discussions/notes"
,
locals:
{
discussion:
discussion
,
show_toggle:
false
,
show_image_comment_badge:
true
,
disable_collapse:
true
}
=
render
partial:
"discussions/notes"
,
locals:
{
discussion:
discussion
,
show_toggle:
false
,
show_image_comment_badge:
true
,
disable_collapse
_class
:
true
}
app/views/discussions/_notes.html.haml
View file @
eff96b8c
-
disable_collapse
=
local_assigns
.
fetch
(
:disable_collapse
,
false
)
-
collapsed_class
=
'collapsed'
if
discussion
.
resolved?
&&
!
disable_collapse
-
disable_collapse
_class
=
local_assigns
.
fetch
(
:disable_collapse_class
,
false
)
-
collapsed_class
=
'collapsed'
if
discussion
.
resolved?
&&
!
disable_collapse
_class
-
badge_counter
=
discussion_counter
+
1
if
local_assigns
[
:discussion_counter
]
-
show_toggle
=
local_assigns
.
fetch
(
:show_toggle
,
true
)
-
show_image_comment_badge
=
local_assigns
.
fetch
(
:show_image_comment_badge
,
false
)
...
...
spec/features/merge_requests/diffs_spec.rb
View file @
eff96b8c
...
...
@@ -44,12 +44,8 @@ feature 'Diffs URL', :js do
visit
"
#{
diffs_project_merge_request_path
(
project
,
merge_request
)
}#{
fragment
}
"
end
it
'shows collapsed note'
do
wait_for_requests
expect
(
page
).
to
have_selector
(
'.discussion-notes.collapsed'
)
do
|
note_container
|
expect
(
note_container
).
to
have_selector
(
fragment
,
visible:
false
)
end
it
'shows expanded note'
do
expect
(
page
).
to
have_selector
(
fragment
,
visible:
true
)
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