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
ce91c326
Commit
ce91c326
authored
Nov 20, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made diff file headers sticky
Closes
https://gitlab.com/gitlab-org/gitlab-ce/issues/48816
parent
0e182280
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
app/assets/javascripts/diffs/components/diff_file_header.vue
app/assets/javascripts/diffs/components/diff_file_header.vue
+4
-0
app/assets/stylesheets/pages/diff.scss
app/assets/stylesheets/pages/diff.scss
+22
-0
changelogs/unreleased/mr-sticky-headers.yml
changelogs/unreleased/mr-sticky-headers.yml
+5
-0
No files found.
app/assets/javascripts/diffs/components/diff_file_header.vue
View file @
ce91c326
<
script
>
<
script
>
import
_
from
'
underscore
'
;
import
_
from
'
underscore
'
;
import
{
mapActions
,
mapGetters
}
from
'
vuex
'
;
import
{
mapActions
,
mapGetters
}
from
'
vuex
'
;
import
{
polyfillSticky
}
from
'
~/lib/utils/sticky
'
;
import
ClipboardButton
from
'
~/vue_shared/components/clipboard_button.vue
'
;
import
ClipboardButton
from
'
~/vue_shared/components/clipboard_button.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
FileIcon
from
'
~/vue_shared/components/file_icon.vue
'
;
import
FileIcon
from
'
~/vue_shared/components/file_icon.vue
'
;
...
@@ -116,6 +117,9 @@ export default {
...
@@ -116,6 +117,9 @@ export default {
return
`\`
${
this
.
diffFile
.
file_path
}
\``
;
return
`\`
${
this
.
diffFile
.
file_path
}
\``
;
},
},
},
},
mounted
()
{
polyfillSticky
(
this
.
$refs
.
header
);
},
methods
:
{
methods
:
{
...
mapActions
(
'
diffs
'
,
[
'
toggleFileDiscussions
'
]),
...
mapActions
(
'
diffs
'
,
[
'
toggleFileDiscussions
'
]),
handleToggleFile
(
e
,
checkTarget
)
{
handleToggleFile
(
e
,
checkTarget
)
{
...
...
app/assets/stylesheets/pages/diff.scss
View file @
ce91c326
...
@@ -6,6 +6,28 @@
...
@@ -6,6 +6,28 @@
.file-title-flex-parent
{
.file-title-flex-parent
{
cursor
:
pointer
;
cursor
:
pointer
;
@media
(
min-width
:
map-get
(
$grid-breakpoints
,
md
))
{
position
:
-
webkit-sticky
;
position
:
sticky
;
top
:
92px
;
z-index
:
102
;
&
:
:
before
{
content
:
''
;
position
:
absolute
;
top
:
-1px
;
left
:
-10px
;
width
:
10px
;
height
:
calc
(
100%
+
1px
);
background
:
$white-light
;
border-right
:
1px
solid
$border-color
;
}
}
.with-performance-bar
&
{
top
:
127px
;
}
a
:hover
{
a
:hover
{
text-decoration
:
none
;
text-decoration
:
none
;
}
}
...
...
changelogs/unreleased/mr-sticky-headers.yml
0 → 100644
View file @
ce91c326
---
title
:
Make diff file headers sticky
merge_request
:
author
:
type
:
changed
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