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
de9b9c9d
Commit
de9b9c9d
authored
Feb 06, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
57b01309
35bc3906
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
40 additions
and
19 deletions
+40
-19
app/assets/stylesheets/framework/files.scss
app/assets/stylesheets/framework/files.scss
+2
-0
app/assets/stylesheets/framework/variables.scss
app/assets/stylesheets/framework/variables.scss
+7
-0
app/assets/stylesheets/pages/diff.scss
app/assets/stylesheets/pages/diff.scss
+20
-13
app/views/projects/commit/show.html.haml
app/views/projects/commit/show.html.haml
+1
-1
app/views/projects/compare/show.html.haml
app/views/projects/compare/show.html.haml
+1
-1
app/views/projects/diffs/_diffs.html.haml
app/views/projects/diffs/_diffs.html.haml
+2
-2
app/views/projects/diffs/_file.html.haml
app/views/projects/diffs/_file.html.haml
+2
-2
changelogs/unreleased/56938-diff-file-headers-on-compare-not-quite-right.yml
...ed/56938-diff-file-headers-on-compare-not-quite-right.yml
+5
-0
No files found.
app/assets/stylesheets/framework/files.scss
View file @
de9b9c9d
...
...
@@ -4,6 +4,7 @@
*/
.file-holder
{
border
:
1px
solid
$border-color
;
border-top
:
0
;
border-radius
:
$border-radius-default
;
&
.file-holder-no-border
{
...
...
@@ -328,6 +329,7 @@ span.idiff {
justify-content
:
space-between
;
background-color
:
$gray-light
;
border-bottom
:
1px
solid
$border-color
;
border-top
:
1px
solid
$border-color
;
padding
:
5px
$gl-padding
;
margin
:
0
;
border-radius
:
$border-radius-default
$border-radius-default
0
0
;
...
...
app/assets/stylesheets/framework/variables.scss
View file @
de9b9c9d
...
...
@@ -497,6 +497,7 @@ $builds-trace-bg: #111;
*/
$commit-max-width-marker-color
:
rgba
(
0
,
0
,
0
,
0
);
$commit-message-text-area-bg
:
rgba
(
0
,
0
,
0
,
0
);
$commit-stat-summary-height
:
36px
;
/*
* Common
...
...
@@ -694,8 +695,14 @@ $priority-label-empty-state-width: 114px;
Issues Analytics
*/
$issues-analytics-popover-boarder-color
:
rgba
(
0
,
0
,
0
,
0
.15
);
/*
Merge Requests
*/
$mr-tabs-height
:
51px
;
$mr-version-controls-height
:
56px
;
/*
Compare Branches
*/
$compare-branches-sticky-header-height
:
68px
;
app/assets/stylesheets/pages/diff.scss
View file @
de9b9c9d
...
...
@@ -7,22 +7,13 @@
cursor
:
pointer
;
@media
(
min-width
:
map-get
(
$grid-breakpoints
,
md
))
{
$mr-file-header-top
:
$mr-version-controls-height
+
$header-height
+
$mr-tabs-height
;
position
:
-
webkit-sticky
;
position
:
sticky
;
top
:
$mr-version-controls-height
+
$header-height
+
$mr-tabs-height
;
margin-left
:
-1px
;
border-left
:
1px
solid
$border-color
;
top
:
$mr-file-header-top
;
z-index
:
102
;
&
.is-commit
{
top
:
$header-height
+
36px
;
.with-performance-bar
&
{
top
:
$header-height
+
36px
+
$performance-bar-height
;
}
}
&
:
:
before
{
content
:
''
;
position
:
absolute
;
...
...
@@ -35,7 +26,23 @@
}
.with-performance-bar
&
{
top
:
$header-height
+
$performance-bar-height
+
$mr-version-controls-height
+
$mr-tabs-height
;
top
:
$mr-file-header-top
+
$performance-bar-height
;
}
&
.is-commit
{
top
:
$header-height
+
$commit-stat-summary-height
;
.with-performance-bar
&
{
top
:
$header-height
+
$commit-stat-summary-height
+
$performance-bar-height
;
}
}
&
.is-compare
{
top
:
$header-height
+
$compare-branches-sticky-header-height
;
.with-performance-bar
&
{
top
:
$performance-bar-height
+
$header-height
+
$compare-branches-sticky-header-height
;
}
}
}
...
...
app/views/projects/commit/show.html.haml
View file @
de9b9c9d
...
...
@@ -10,7 +10,7 @@
.container-fluid
{
class:
[
limited_container_width
,
container_class
]
}
=
render
"commit_box"
=
render
"ci_menu"
=
render
"projects/diffs/diffs"
,
diffs:
@diffs
,
environment:
@environment
,
is_commit:
true
=
render
"projects/diffs/diffs"
,
diffs:
@diffs
,
environment:
@environment
,
diff_page_context:
"is-commit"
.limited-width-notes
=
render
"shared/notes/notes_with_form"
,
:autocomplete
=>
true
...
...
app/views/projects/compare/show.html.haml
View file @
de9b9c9d
...
...
@@ -8,7 +8,7 @@
-
if
@commits
.
present?
=
render
"projects/commits/commit_list"
=
render
"projects/diffs/diffs"
,
diffs:
@diffs
,
environment:
@environment
=
render
"projects/diffs/diffs"
,
diffs:
@diffs
,
environment:
@environment
,
diff_page_context:
"is-compare"
-
else
.card.bg-light
.center
...
...
app/views/projects/diffs/_diffs.html.haml
View file @
de9b9c9d
...
...
@@ -2,7 +2,7 @@
-
show_whitespace_toggle
=
local_assigns
.
fetch
(
:show_whitespace_toggle
,
true
)
-
can_create_note
=
!
@diff_notes_disabled
&&
can?
(
current_user
,
:create_note
,
diffs
.
project
)
-
diff_files
=
diffs
.
diff_files
-
is_commit
=
local_assigns
.
fetch
(
:is_commit
,
false
)
-
diff_page_context
=
local_assigns
.
fetch
(
:diff_page_context
,
nil
)
.content-block.oneline-block.files-changed.diff-files-changed.js-diff-files-changed
.files-changed-inner
...
...
@@ -25,4 +25,4 @@
=
render
'projects/diffs/warning'
,
diff_files:
diffs
.files
{
data:
{
can_create_note:
can_create_note
}
}
=
render
partial:
'projects/diffs/file'
,
collection:
diff_files
,
as: :diff_file
,
locals:
{
project:
diffs
.
project
,
environment:
environment
,
is_commit:
is_commi
t
}
=
render
partial:
'projects/diffs/file'
,
collection:
diff_files
,
as: :diff_file
,
locals:
{
project:
diffs
.
project
,
environment:
environment
,
diff_page_context:
diff_page_contex
t
}
app/views/projects/diffs/_file.html.haml
View file @
de9b9c9d
-
environment
=
local_assigns
.
fetch
(
:environment
,
nil
)
-
is_commit
=
local_assigns
.
fetch
(
:is_commit
,
false
)
-
diff_page_context
=
local_assigns
.
fetch
(
:diff_page_context
,
nil
)
-
file_hash
=
hexdigest
(
diff_file
.
file_path
)
-
image_diff
=
diff_file
.
rich_viewer
&&
diff_file
.
rich_viewer
.
partial_name
==
'image'
-
image_replaced
=
diff_file
.
old_content_sha
&&
diff_file
.
old_content_sha
!=
diff_file
.
content_sha
.diff-file.file-holder
{
id:
file_hash
,
data:
diff_file_html_data
(
project
,
diff_file
.
file_path
,
diff_file
.
content_sha
)
}
.js-file-title.file-title-flex-parent
{
class:
is_commit
?
"is-commit"
:
""
}
.js-file-title.file-title-flex-parent
{
class:
diff_page_context
}
.file-header-content
=
render
"projects/diffs/file_header"
,
diff_file:
diff_file
,
url:
"#
#{
file_hash
}
"
...
...
changelogs/unreleased/56938-diff-file-headers-on-compare-not-quite-right.yml
0 → 100644
View file @
de9b9c9d
---
title
:
Correct spacing for comparison page
merge_request
:
!24783
author
:
type
:
fixed
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