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
Léo-Paul Géneau
gitlab-ce
Commits
fa71715e
Commit
fa71715e
authored
Apr 05, 2019
by
ftab
Committed by
Phil Hughes
Apr 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix old image diff swipe view
parent
9ee30346
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
3 deletions
+25
-3
app/assets/stylesheets/pages/diff.scss
app/assets/stylesheets/pages/diff.scss
+17
-0
app/views/projects/diffs/_replaced_image_diff.html.haml
app/views/projects/diffs/_replaced_image_diff.html.haml
+2
-2
app/views/projects/diffs/_single_image_diff.html.haml
app/views/projects/diffs/_single_image_diff.html.haml
+1
-1
changelogs/unreleased/56762-fix-commit-swipe-view-26968.yml
changelogs/unreleased/56762-fix-commit-swipe-view-26968.yml
+5
-0
No files found.
app/assets/stylesheets/pages/diff.scss
View file @
fa71715e
...
@@ -167,6 +167,23 @@
...
@@ -167,6 +167,23 @@
}
}
}
}
.frame
{
top
:
0
;
right
:
0
;
&
.old-diff
{
/* only for commit / compare view */
position
:
absolute
;
}
&
.deleted
{
margin
:
0
;
display
:
block
;
top
:
13px
;
right
:
7px
;
}
}
.swipe-bar
{
.swipe-bar
{
display
:
block
;
display
:
block
;
height
:
100%
;
height
:
100%
;
...
...
app/views/projects/diffs/_replaced_image_diff.html.haml
View file @
fa71715e
...
@@ -35,10 +35,10 @@
...
@@ -35,10 +35,10 @@
.swipe.view.hide
.swipe.view.hide
.swipe-frame
.swipe-frame
.frame.deleted
.frame.deleted
.old-diff
=
image_tag
(
old_blob_raw_url
,
alt:
diff_file
.
old_path
,
lazy:
false
)
=
image_tag
(
old_blob_raw_url
,
alt:
diff_file
.
old_path
,
lazy:
false
)
.swipe-wrap.left-oriented
.swipe-wrap.left-oriented
=
render
partial:
"projects/diffs/image_diff_frame"
,
locals:
{
class_name:
"added js-image-frame
#{
class_name
}
"
,
position:
position
,
note_type:
DiffNote
.
name
,
image_path:
blob_raw_url
,
alt:
diff_file
.
new_path
}
=
render
partial:
"projects/diffs/image_diff_frame"
,
locals:
{
class_name:
"added
old-diff
js-image-frame
#{
class_name
}
"
,
position:
position
,
note_type:
DiffNote
.
name
,
image_path:
blob_raw_url
,
alt:
diff_file
.
new_path
}
%span
.swipe-bar
%span
.swipe-bar
%span
.top-handle
%span
.top-handle
%span
.bottom-handle
%span
.bottom-handle
...
...
app/views/projects/diffs/_single_image_diff.html.haml
View file @
fa71715e
...
@@ -10,5 +10,5 @@
...
@@ -10,5 +10,5 @@
.image.js-single-image
{
data:
diff_view_data
}
.image.js-single-image
{
data:
diff_view_data
}
.wrap
.wrap
-
single_class_name
=
diff_file
.
deleted_file?
?
'deleted'
:
'added'
-
single_class_name
=
diff_file
.
deleted_file?
?
'deleted'
:
'added'
=
render
partial:
"projects/diffs/image_diff_frame"
,
locals:
{
class_name:
"
#{
single_class_name
}
#{
class_name
}
js-image-frame"
,
position:
position
,
note_type:
DiffNote
.
name
,
image_path:
blob_raw_url
,
alt:
diff_file
.
file_path
}
=
render
partial:
"projects/diffs/image_diff_frame"
,
locals:
{
class_name:
"
#{
single_class_name
}
#{
class_name
}
old-diff
js-image-frame"
,
position:
position
,
note_type:
DiffNote
.
name
,
image_path:
blob_raw_url
,
alt:
diff_file
.
file_path
}
%p
.image-info
=
number_to_human_size
(
blob
.
size
)
%p
.image-info
=
number_to_human_size
(
blob
.
size
)
changelogs/unreleased/56762-fix-commit-swipe-view-26968.yml
0 → 100644
View file @
fa71715e
---
title
:
"
Fix
image
diff
swipe
view
on
commit
and
compare
pages"
merge_request
:
26968
author
:
ftab
type
:
fixed
\ No newline at end of file
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