BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
92bf7dfc
Commit
92bf7dfc
authored
May 11, 2017
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mr-tabs-sticky-poc' into 'master'
POC: Use position sticky on merge request tabs See merge request !11289
parents
e3fa5275
5d74fc8a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
merge_request_tabs.js
app/assets/javascripts/merge_request_tabs.js
+7
-0
merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+7
-2
No files found.
app/assets/javascripts/merge_request_tabs.js
View file @
92bf7dfc
...
...
@@ -358,6 +358,13 @@ import BlobForkSuggestion from './blob/blob_fork_suggestion';
// So we dont affix the tabs on these
if
(
Breakpoints
.
get
().
getBreakpointSize
()
===
'xs'
||
!
$tabs
.
length
)
return
;
/**
If the browser does not support position sticky, it returns the position as static.
If the browser does support sticky, then we allow the browser to handle it, if not
then we default back to Bootstraps affix
**/
if
(
$tabs
.
css
(
'position'
)
!==
'static'
)
return
;
const
$diffTabs
=
$
(
'#diff-notes-app'
);
$tabs
.
off
(
'affix.bs.affix affix-top.bs.affix'
)
...
...
app/assets/stylesheets/pages/merge_requests.scss
View file @
92bf7dfc
...
...
@@ -693,12 +693,17 @@
}
.merge-request-tabs-holder
{
top
:
0
;
z-index
:
10
;
background-color
:
$white-light
;
@media
(
min-width
:
$screen-sm-min
)
{
position
:
sticky
;
position
:
-
webkit-sticky
;
}
&
.affix
{
top
:
0
;
left
:
0
;
z-index
:
10
;
transition
:
right
.15s
;
@media
(
max-width
:
$screen-xs-max
)
{
...
...
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