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
cf01719d
Commit
cf01719d
authored
Jun 14, 2018
by
Annabel Gray
Committed by
Clement Ho
Jun 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve ""Click to expand" link in collapsed diffs should be blue"
parent
941cf7c3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
app/assets/javascripts/single_file_diff.js
app/assets/javascripts/single_file_diff.js
+1
-1
app/assets/stylesheets/framework/blocks.scss
app/assets/stylesheets/framework/blocks.scss
+1
-0
app/views/projects/diffs/_collapsed.html.haml
app/views/projects/diffs/_collapsed.html.haml
+1
-1
spec/features/projects/diffs/diff_show_spec.rb
spec/features/projects/diffs/diff_show_spec.rb
+1
-2
No files found.
app/assets/javascripts/single_file_diff.js
View file @
cf01719d
...
...
@@ -11,7 +11,7 @@ import syntaxHighlight from './syntax_highlight';
const
WRAPPER
=
'
<div class="diff-content"></div>
'
;
const
LOADING_HTML
=
'
<i class="fa fa-spinner fa-spin"></i>
'
;
const
ERROR_HTML
=
'
<div class="nothing-here-block"><i class="fa fa-warning"></i> Could not load diff</div>
'
;
const
COLLAPSED_HTML
=
'
<div class="nothing-here-block diff-collapsed">This diff is collapsed. <
a class="click-to-expand">Click to expand it.</a
></div>
'
;
const
COLLAPSED_HTML
=
'
<div class="nothing-here-block diff-collapsed">This diff is collapsed. <
button class="click-to-expand btn btn-link">Click to expand it.</button
></div>
'
;
export
default
class
SingleFileDiff
{
constructor
(
file
)
{
...
...
app/assets/stylesheets/framework/blocks.scss
View file @
cf01719d
...
...
@@ -16,6 +16,7 @@
.click-to-expand
{
cursor
:
pointer
;
vertical-align
:
initial
;
}
}
}
...
...
app/views/projects/diffs/_collapsed.html.haml
View file @
cf01719d
...
...
@@ -2,4 +2,4 @@
-
url
=
url_for
(
safe_params
.
merge
(
action: :diff_for_path
,
old_path:
diff_file
.
old_path
,
new_path:
diff_file
.
new_path
,
file_identifier:
diff_file
.
file_identifier
))
.nothing-here-block.diff-collapsed
{
data:
{
diff_for_path:
url
}
}
This diff is collapsed.
%
a
.click-to-expand
Click to expand it.
%
button
.click-to-expand.btn.btn-link
Click to expand it.
spec/features/projects/diffs/diff_show_spec.rb
View file @
cf01719d
...
...
@@ -166,8 +166,7 @@ feature 'Diff file viewer', :js do
context
'expanding the diff'
do
before
do
# We can't use `click_link` because the "link" doesn't have an `href`.
find
(
'a.click-to-expand'
).
click
click_button
'Click to expand it.'
wait_for_requests
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