Commit 6e584f46 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Merge branch 'add-vertical-scrolling-sub-nav' into 'master'

Add horizontal scrolling to all sub-navs on mobile viewports

## What does this MR do?
Adds horizontal scrolling to all the sub navigation on mobile views. This was previously only available on the repository tab (commits page). 

## Are there points in the code the reviewer needs to double check?
Perhaps a better way to refactor out the common haml code

## Why was this MR needed?
Adding it to all to keep the UI consistency and to offer mobile users a better interface

## What are the relevant issue numbers?
Closes #20779 

## Screenshots (if relevant)
Before:
![Screen_Shot_2016-08-23_at_3.52.35_PM](/uploads/3833da4252cf616266a77654cee89faf/Screen_Shot_2016-08-23_at_3.52.35_PM.png)

After:
![Screen_Shot_2016-08-23_at_3.52.21_PM](/uploads/5a023bb1e639f16f2471009dd6ae0d62/Screen_Shot_2016-08-23_at_3.52.21_PM.png)

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
  - [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !5762
parents 1bf2fe27 4d6dfeee
......@@ -13,6 +13,7 @@ v 8.12.0 (unreleased)
- Add Sentry logging to API calls
- Automatically expand hidden discussions when accessed by a permalink !5585 (Mike Greiling)
- Fix groups sort dropdown alignment (ClemMakesApps)
- Add horizontal scrolling to all sub-navs on mobile viewports (ClemMakesApps)
- Added tests for diff notes
- Add delimiter to project stars and forks count (ClemMakesApps)
- Fix badge count alignment (ClemMakesApps)
......
@mixin fade($gradient-direction, $rgba, $gradient-color) {
@mixin fade($gradient-direction, $gradient-color) {
visibility: hidden;
opacity: 0;
z-index: 2;
......@@ -8,10 +8,10 @@
height: 30px;
transition-duration: .3s;
-webkit-transform: translateZ(0);
background: -webkit-linear-gradient($gradient-direction, $rgba, $gradient-color 45%);
background: -o-linear-gradient($gradient-direction, $rgba, $gradient-color 45%);
background: -moz-linear-gradient($gradient-direction, $rgba, $gradient-color 45%);
background: linear-gradient($gradient-direction, $rgba, $gradient-color 45%);
background: -webkit-linear-gradient($gradient-direction, rgba($gradient-color, 0.4), $gradient-color 45%);
background: -o-linear-gradient($gradient-direction, rgba($gradient-color, 0.4), $gradient-color 45%);
background: -moz-linear-gradient($gradient-direction, rgba($gradient-color, 0.4), $gradient-color 45%);
background: linear-gradient($gradient-direction, rgba($gradient-color, 0.4), $gradient-color 45%);
&.scrolling {
visibility: visible;
......@@ -356,7 +356,7 @@
}
.fade-right {
@include fade(left, rgba(255, 255, 255, 0.4), $background-color);
@include fade(left, $background-color);
right: -5px;
.fa {
......@@ -365,7 +365,7 @@
}
.fade-left {
@include fade(right, rgba(255, 255, 255, 0.4), $background-color);
@include fade(right, $background-color);
left: -5px;
.fa {
......@@ -376,6 +376,7 @@
&.sub-nav-scroll {
.fade-right {
@include fade(left, $dark-background-color);
right: 0;
.fa {
......@@ -384,6 +385,7 @@
}
.fade-left {
@include fade(right, $dark-background-color);
left: 0;
.fa {
......@@ -400,7 +402,7 @@
@include scrolling-links();
.fade-right {
@include fade(left, rgba(255, 255, 255, 0.4), $white-light);
@include fade(left, $white-light);
right: -5px;
.fa {
......@@ -409,7 +411,7 @@
}
.fade-left {
@include fade(right, rgba(255, 255, 255, 0.4), $white-light);
@include fade(right, $white-light);
left: -5px;
.fa {
......
.nav-links.sub-nav
.scrolling-tabs-container.sub-nav-scroll
= render 'shared/nav_scroll'
.nav-links.sub-nav.scrolling-tabs
%ul{ class: (container_class) }
= nav_link(controller: :system_info) do
= link_to admin_system_info_path, title: 'System Info' do
......
.nav-links.sub-nav
.scrolling-tabs-container.sub-nav-scroll
= render 'shared/nav_scroll'
.nav-links.sub-nav.scrolling-tabs
%ul{ class: (container_class) }
= nav_link(controller: :dashboard, html_options: {class: 'home'}) do
= link_to admin_root_path, title: 'Overview' do
......
.scrolling-tabs-container.sub-nav-scroll
.fade-left
= icon('angle-left')
.fade-right
= icon('angle-right')
= render 'shared/nav_scroll'
.nav-links.sub-nav.scrolling-tabs
%ul{ class: (container_class) }
= nav_link(controller: %w(tree blob blame edit_tree new_tree find_file)) do
......
.nav-links.sub-nav
.scrolling-tabs-container.sub-nav-scroll
= render 'shared/nav_scroll'
.nav-links.sub-nav.scrolling-tabs
%ul{ class: (container_class) }
- content_for :page_specific_javascripts do
......
.nav-links.sub-nav
.scrolling-tabs-container.sub-nav-scroll
= render 'shared/nav_scroll'
.nav-links.sub-nav.scrolling-tabs
%ul{ class: (container_class) }
- if project_nav_tab?(:issues) && !current_controller?(:merge_requests)
= nav_link(controller: :issues) do
......
.nav-links.sub-nav
.scrolling-tabs-container.sub-nav-scroll
= render 'shared/nav_scroll'
.nav-links.sub-nav.scrolling-tabs
%ul{ class: (container_class) }
- if project_nav_tab? :pipelines
= nav_link(controller: :pipelines) do
......
.nav-links.sub-nav
.scrolling-tabs-container.sub-nav-scroll
= render 'shared/nav_scroll'
.nav-links.sub-nav.scrolling-tabs
%ul{ class: (container_class) }
= nav_link(html_options: {class: params[:id] == 'home' ? 'active' : '' }) do
= link_to 'Home', namespace_project_wiki_path(@project.namespace, @project, :home)
......
.fade-left
= icon('angle-left')
.fade-right
= icon('angle-right')
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment