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
98dd987a
Commit
98dd987a
authored
Mar 29, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port of scrollabl-secondary-tabs to EE
parent
59828154
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
187 additions
and
120 deletions
+187
-120
app/assets/javascripts/layout_nav.js
app/assets/javascripts/layout_nav.js
+3
-2
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+2
-0
app/assets/javascripts/vue_pipelines_index/components/navigation_tabs.js
...scripts/vue_pipelines_index/components/navigation_tabs.js
+5
-1
app/assets/javascripts/vue_pipelines_index/pipelines.js
app/assets/javascripts/vue_pipelines_index/pipelines.js
+7
-1
app/assets/stylesheets/framework/nav.scss
app/assets/stylesheets/framework/nav.scss
+37
-0
app/views/dashboard/_projects_head.html.haml
app/views/dashboard/_projects_head.html.haml
+4
-2
app/views/projects/merge_requests/_show.html.haml
app/views/projects/merge_requests/_show.html.haml
+4
-2
app/views/search/_category.html.haml
app/views/search/_category.html.haml
+77
-74
app/views/shared/milestones/_tabs.html.haml
app/views/shared/milestones/_tabs.html.haml
+25
-22
app/views/users/show.html.haml
app/views/users/show.html.haml
+19
-16
changelogs/unreleased/scrollable-secondary-tabs.yml
changelogs/unreleased/scrollable-secondary-tabs.yml
+4
-0
No files found.
app/assets/javascripts/layout_nav.js
View file @
98dd987a
...
...
@@ -11,8 +11,9 @@
});
};
$
(
function
()
{
var
$scrollingTabs
=
$
(
'
.scrolling-tabs
'
);
$
(
document
).
on
(
'
init.scrolling-tabs
'
,
()
=>
{
const
$scrollingTabs
=
$
(
'
.scrolling-tabs
'
).
not
(
'
.is-initialized
'
);
$scrollingTabs
.
addClass
(
'
is-initialized
'
);
hideEndFade
(
$scrollingTabs
);
$
(
window
).
off
(
'
resize.nav
'
).
on
(
'
resize.nav
'
,
function
()
{
...
...
app/assets/javascripts/main.js
View file @
98dd987a
...
...
@@ -381,4 +381,6 @@ $(function () {
new
Aside
();
gl
.
utils
.
initTimeagoTimeout
();
$
(
document
).
trigger
(
'
init.scrolling-tabs
'
);
});
app/assets/javascripts/vue_pipelines_index/components/navigation_tabs.js
View file @
98dd987a
...
...
@@ -16,8 +16,12 @@ export default {
},
},
mounted
()
{
$
(
document
).
trigger
(
'
init.scrolling-tabs
'
);
},
template
:
`
<ul class="nav-links">
<ul class="nav-links
scrolling-tabs
">
<li
class="js-pipelines-tab-all"
:class="{ 'active': scope === 'all'}">
...
...
app/assets/javascripts/vue_pipelines_index/pipelines.js
View file @
98dd987a
...
...
@@ -182,8 +182,14 @@ export default {
<div :class="cssClass">
<div
class="top-area"
class="top-area
scrolling-tabs-container inner-page-scroll-tabs
"
v-if="!isLoading && !shouldRenderEmptyState">
<div class="fade-left">
<i class="fa fa-angle-left" aria-hidden="true"></i>
</div>
<div class="fade-right">
<i class="fa fa-angle-right" aria-hidden="true"></i>
</div>
<navigation-tabs
:scope="scope"
:count="state.count"
...
...
app/assets/stylesheets/framework/nav.scss
View file @
98dd987a
...
...
@@ -476,3 +476,40 @@
}
}
}
.inner-page-scroll-tabs
{
position
:
relative
;
.fade-right
{
@include
fade
(
left
,
$white-light
);
right
:
0
;
text-align
:
right
;
.fa
{
right
:
5px
;
}
}
.fade-left
{
@include
fade
(
right
,
$white-light
);
left
:
0
;
text-align
:
left
;
.fa
{
left
:
5px
;
}
}
.fade-right
,
.fade-left
{
top
:
16px
;
bottom
:
auto
;
}
&
.is-smaller
{
.fade-right
,
.fade-left
{
top
:
11px
;
}
}
}
app/views/dashboard/_projects_head.html.haml
View file @
98dd987a
=
content_for
:flash_message
do
=
render
'shared/project_limit'
.top-area
%ul
.nav-links
.top-area.scrolling-tabs-container.inner-page-scroll-tabs
.fade-left
=
icon
(
'angle-left'
)
.fade-right
=
icon
(
'angle-right'
)
%ul
.nav-links.scrolling-tabs
=
nav_link
(
page:
[
dashboard_projects_path
,
root_path
])
do
=
link_to
dashboard_projects_path
,
title:
'Home'
,
class:
'shortcuts-activity'
,
data:
{
placement:
'right'
}
do
Your projects
...
...
app/views/projects/merge_requests/_show.html.haml
View file @
98dd987a
...
...
@@ -52,8 +52,10 @@
=
render
'award_emoji/awards_block'
,
awardable:
@merge_request
,
inline:
true
.merge-request-tabs-holder
{
class:
(
"js-tabs-affix"
unless
ENV
[
'RAILS_ENV'
]
==
'test'
)
}
.merge-request-tabs-container
%ul
.merge-request-tabs.nav-links.no-top.no-bottom
.merge-request-tabs-container.scrolling-tabs-container.inner-page-scroll-tabs
.fade-left
=
icon
(
'angle-left'
)
.fade-right
=
icon
(
'angle-right'
)
%ul
.merge-request-tabs.nav-links.scrolling-tabs
%li
.notes-tab
=
link_to
namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'div#notes'
,
action:
'notes'
,
toggle:
'tab'
}
do
Discussion
...
...
app/views/search/_category.html.haml
View file @
98dd987a
%ul
.nav-links.search-filter
-
if
@project
%li
{
class:
active_when
(
@scope
==
'blobs'
)
}
=
link_to
search_filter_path
(
scope:
'blobs'
)
do
Code
%span
.badge
=
@search_results
.
blobs_count
%li
{
class:
active_when
(
@scope
==
'issues'
)
}
=
link_to
search_filter_path
(
scope:
'issues'
)
do
Issues
%span
.badge
=
@search_results
.
issues_count
%li
{
class:
active_when
(
@scope
==
'merge_requests'
)
}
=
link_to
search_filter_path
(
scope:
'merge_requests'
)
do
Merge requests
%span
.badge
=
@search_results
.
merge_requests_count
%li
{
class:
active_when
(
@scope
==
'milestones'
)
}
=
link_to
search_filter_path
(
scope:
'milestones'
)
do
Milestones
%span
.badge
=
@search_results
.
milestones_count
%li
{
class:
active_when
(
@scope
==
'notes'
)
}
=
link_to
search_filter_path
(
scope:
'notes'
)
do
Comments
%span
.badge
=
@search_results
.
notes_count
%li
{
class:
active_when
(
@scope
==
'wiki_blobs'
)
}
=
link_to
search_filter_path
(
scope:
'wiki_blobs'
)
do
Wiki
%span
.badge
=
@search_results
.
wiki_blobs_count
%li
{
class:
active_when
(
@scope
==
'commits'
)
}
=
link_to
search_filter_path
(
scope:
'commits'
)
do
Commits
%span
.badge
=
@search_results
.
commits_count
-
elsif
@show_snippets
%li
{
class:
active_when
(
@scope
==
'snippet_blobs'
)
}
=
link_to
search_filter_path
(
scope:
'snippet_blobs'
,
snippets:
true
,
group_id:
nil
,
project_id:
nil
)
do
Snippet Contents
%span
.badge
=
@search_results
.
snippet_blobs_count
%li
{
class:
active_when
(
@scope
==
'snippet_titles'
)
}
=
link_to
search_filter_path
(
scope:
'snippet_titles'
,
snippets:
true
,
group_id:
nil
,
project_id:
nil
)
do
Titles and Filenames
%span
.badge
=
@search_results
.
snippet_titles_count
-
else
%li
{
class:
active_when
(
@scope
==
'projects'
)
}
=
link_to
search_filter_path
(
scope:
'projects'
)
do
Projects
%span
.badge
=
@search_results
.
projects_count
%li
{
class:
active_when
(
@scope
==
'issues'
)
}
=
link_to
search_filter_path
(
scope:
'issues'
)
do
Issues
%span
.badge
=
@search_results
.
issues_count
%li
{
class:
active_when
(
@scope
==
'merge_requests'
)
}
=
link_to
search_filter_path
(
scope:
'merge_requests'
)
do
Merge requests
%span
.badge
=
@search_results
.
merge_requests_count
%li
{
class:
active_when
(
@scope
==
'milestones'
)
}
=
link_to
search_filter_path
(
scope:
'milestones'
)
do
Milestones
%span
.badge
=
@search_results
.
milestones_count
-
if
current_application_settings
.
elasticsearch_search?
%li
{
class:
(
"active"
if
@scope
==
'blobs'
)
}
.scrolling-tabs-container.inner-page-scroll-tabs.is-smaller
.fade-left
=
icon
(
'angle-left'
)
.fade-right
=
icon
(
'angle-right'
)
%ul
.nav-links.search-filter.scrolling-tabs
-
if
@project
%li
{
class:
active_when
(
@scope
==
'blobs'
)
}
=
link_to
search_filter_path
(
scope:
'blobs'
)
do
Code
%span
.badge
=
@search_results
.
blobs_count
%li
{
class:
(
"active"
if
@scope
==
'commits'
)
}
%li
{
class:
active_when
(
@scope
==
'issues'
)
}
=
link_to
search_filter_path
(
scope:
'issues'
)
do
Issues
%span
.badge
=
@search_results
.
issues_count
%li
{
class:
active_when
(
@scope
==
'merge_requests'
)
}
=
link_to
search_filter_path
(
scope:
'merge_requests'
)
do
Merge requests
%span
.badge
=
@search_results
.
merge_requests_count
%li
{
class:
active_when
(
@scope
==
'milestones'
)
}
=
link_to
search_filter_path
(
scope:
'milestones'
)
do
Milestones
%span
.badge
=
@search_results
.
milestones_count
%li
{
class:
active_when
(
@scope
==
'notes'
)
}
=
link_to
search_filter_path
(
scope:
'notes'
)
do
Comments
%span
.badge
=
@search_results
.
notes_count
%li
{
class:
active_when
(
@scope
==
'wiki_blobs'
)
}
=
link_to
search_filter_path
(
scope:
'wiki_blobs'
)
do
Wiki
%span
.badge
=
@search_results
.
wiki_blobs_count
%li
{
class:
active_when
(
@scope
==
'commits'
)
}
=
link_to
search_filter_path
(
scope:
'commits'
)
do
Commits
%span
.badge
=
@search_results
.
commits_count
-
elsif
@show_snippets
%li
{
class:
active_when
(
@scope
==
'snippet_blobs'
)
}
=
link_to
search_filter_path
(
scope:
'snippet_blobs'
,
snippets:
true
,
group_id:
nil
,
project_id:
nil
)
do
Snippet Contents
%span
.badge
=
@search_results
.
snippet_blobs_count
%li
{
class:
active_when
(
@scope
==
'snippet_titles'
)
}
=
link_to
search_filter_path
(
scope:
'snippet_titles'
,
snippets:
true
,
group_id:
nil
,
project_id:
nil
)
do
Titles and Filenames
%span
.badge
=
@search_results
.
snippet_titles_count
-
else
%li
{
class:
active_when
(
@scope
==
'projects'
)
}
=
link_to
search_filter_path
(
scope:
'projects'
)
do
Projects
%span
.badge
=
@search_results
.
projects_count
%li
{
class:
active_when
(
@scope
==
'issues'
)
}
=
link_to
search_filter_path
(
scope:
'issues'
)
do
Issues
%span
.badge
=
@search_results
.
issues_count
%li
{
class:
active_when
(
@scope
==
'merge_requests'
)
}
=
link_to
search_filter_path
(
scope:
'merge_requests'
)
do
Merge requests
%span
.badge
=
@search_results
.
merge_requests_count
%li
{
class:
active_when
(
@scope
==
'milestones'
)
}
=
link_to
search_filter_path
(
scope:
'milestones'
)
do
Milestones
%span
.badge
=
@search_results
.
milestones_count
-
if
current_application_settings
.
elasticsearch_search?
%li
{
class:
(
"active"
if
@scope
==
'blobs'
)
}
=
link_to
search_filter_path
(
scope:
'blobs'
)
do
Code
%span
.badge
=
@search_results
.
blobs_count
%li
{
class:
(
"active"
if
@scope
==
'commits'
)
}
=
link_to
search_filter_path
(
scope:
'commits'
)
do
Commits
%span
.badge
=
@search_results
.
commits_count
app/views/shared/milestones/_tabs.html.haml
View file @
98dd987a
%ul
.nav-links.no-top.no-bottom
-
if
milestone
.
is_a?
(
GlobalMilestone
)
||
can?
(
current_user
,
:read_issue
,
@project
)
%li
.active
=
link_to
'#tab-issues'
,
'data-toggle'
=>
'tab'
,
'data-show'
=>
'.tab-issues-buttons'
do
Issues
%span
.badge
=
milestone
.
issues_visible_to_user
(
current_user
).
size
.scrolling-tabs-container.inner-page-scroll-tabs.is-smaller
.fade-left
=
icon
(
'angle-left'
)
.fade-right
=
icon
(
'angle-right'
)
%ul
.nav-links.scrolling-tabs
-
if
milestone
.
is_a?
(
GlobalMilestone
)
||
can?
(
current_user
,
:read_issue
,
@project
)
%li
.active
=
link_to
'#tab-issues'
,
'data-toggle'
=>
'tab'
,
'data-show'
=>
'.tab-issues-buttons'
do
Issues
%span
.badge
=
milestone
.
issues_visible_to_user
(
current_user
).
size
%li
=
link_to
'#tab-merge-requests'
,
'data-toggle'
=>
'tab'
,
'data-show'
=>
'.tab-merge-requests-buttons'
do
Merge Requests
%span
.badge
=
milestone
.
merge_requests
.
size
-
else
%li
.active
=
link_to
'#tab-merge-requests'
,
'data-toggle'
=>
'tab'
,
'data-show'
=>
'.tab-merge-requests-buttons'
do
Merge Requests
%span
.badge
=
milestone
.
merge_requests
.
size
%li
=
link_to
'#tab-merge-requests'
,
'data-toggle'
=>
'tab'
,
'data-show'
=>
'.tab-merge-requests-buttons'
do
Merge Requests
%span
.badge
=
milestone
.
merge_requests
.
size
-
else
%li
.active
=
link_to
'#tab-merge-requests'
,
'data-toggle'
=>
'tab'
,
'data-show'
=>
'.tab-merge-requests-buttons'
do
Merge Requests
%span
.badge
=
milestone
.
merge_requests
.
size
%li
=
link_to
'#tab-participants'
,
'data-toggle'
=>
'tab'
do
Participants
%span
.badge
=
milestone
.
participants
.
count
%li
=
link_to
'#tab-labels'
,
'data-toggle'
=>
'tab'
do
Labels
%span
.badge
=
milestone
.
labels
.
count
=
link_to
'#tab-participants'
,
'data-toggle'
=>
'tab'
do
Participants
%span
.badge
=
milestone
.
participants
.
count
%li
=
link_to
'#tab-labels'
,
'data-toggle'
=>
'tab'
do
Labels
%span
.badge
=
milestone
.
labels
.
count
-
show_project_name
=
local_assigns
.
fetch
(
:show_project_name
,
false
)
-
show_full_project_name
=
local_assigns
.
fetch
(
:show_full_project_name
,
false
)
...
...
app/views/users/show.html.haml
View file @
98dd987a
...
...
@@ -79,22 +79,25 @@
%p
.profile-user-bio
=
@user
.
bio
%ul
.nav-links.center.user-profile-nav
%li
.js-activity-tab
=
link_to
user_path
,
data:
{
target:
'div#activity'
,
action:
'activity'
,
toggle:
'tab'
}
do
Activity
%li
.js-groups-tab
=
link_to
user_groups_path
,
data:
{
target:
'div#groups'
,
action:
'groups'
,
toggle:
'tab'
}
do
Groups
%li
.js-contributed-tab
=
link_to
user_contributed_projects_path
,
data:
{
target:
'div#contributed'
,
action:
'contributed'
,
toggle:
'tab'
}
do
Contributed projects
%li
.js-projects-tab
=
link_to
user_projects_path
,
data:
{
target:
'div#projects'
,
action:
'projects'
,
toggle:
'tab'
}
do
Personal projects
%li
.js-snippets-tab
=
link_to
user_snippets_path
,
data:
{
target:
'div#snippets'
,
action:
'snippets'
,
toggle:
'tab'
}
do
Snippets
.scrolling-tabs-container
.fade-left
=
icon
(
'angle-left'
)
.fade-right
=
icon
(
'angle-right'
)
%ul
.nav-links.center.user-profile-nav.scrolling-tabs
%li
.js-activity-tab
=
link_to
user_path
,
data:
{
target:
'div#activity'
,
action:
'activity'
,
toggle:
'tab'
}
do
Activity
%li
.js-groups-tab
=
link_to
user_groups_path
,
data:
{
target:
'div#groups'
,
action:
'groups'
,
toggle:
'tab'
}
do
Groups
%li
.js-contributed-tab
=
link_to
user_contributed_projects_path
,
data:
{
target:
'div#contributed'
,
action:
'contributed'
,
toggle:
'tab'
}
do
Contributed projects
%li
.js-projects-tab
=
link_to
user_projects_path
,
data:
{
target:
'div#projects'
,
action:
'projects'
,
toggle:
'tab'
}
do
Personal projects
%li
.js-snippets-tab
=
link_to
user_snippets_path
,
data:
{
target:
'div#snippets'
,
action:
'snippets'
,
toggle:
'tab'
}
do
Snippets
%div
{
class:
container_class
}
-
if
@user
==
current_user
...
...
changelogs/unreleased/scrollable-secondary-tabs.yml
0 → 100644
View file @
98dd987a
---
title
:
Fixed tabs not scrolling on mobile
merge_request
:
author
:
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