From 93c57201b224696f8cd11b6fa2cd85e0c49f92be Mon Sep 17 00:00:00 2001
From: Annabel Dunstone Gray <annabel.dunstone@gmail.com>
Date: Mon, 13 Feb 2017 09:28:15 -0600
Subject: [PATCH] Remove pinned nav functionality and side_navbar_class

---
 app/helpers/nav_helper.rb         | 14 --------------
 app/views/layouts/_page.html.haml | 19 +------------------
 2 files changed, 1 insertion(+), 32 deletions(-)

diff --git a/app/helpers/nav_helper.rb b/app/helpers/nav_helper.rb
index e21178c7377..c1523b4dabf 100644
--- a/app/helpers/nav_helper.rb
+++ b/app/helpers/nav_helper.rb
@@ -1,10 +1,4 @@
 module NavHelper
-  def page_sidebar_class
-    if pinned_nav?
-      "page-sidebar-expanded page-sidebar-pinned"
-    end
-  end
-
   def page_gutter_class
     if current_path?('merge_requests#show') ||
         current_path?('merge_requests#diffs') ||
@@ -32,10 +26,6 @@ module NavHelper
     class_name = ''
     class_name << " with-horizontal-nav" if defined?(nav) && nav
 
-    if pinned_nav?
-      class_name << " header-sidebar-expanded header-sidebar-pinned"
-    end
-
     class_name
   end
 
@@ -46,8 +36,4 @@ module NavHelper
   def nav_control_class
     "nav-control" if current_user
   end
-
-  def pinned_nav?
-    cookies[:pin_nav] == 'true'
-  end
 end
diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml
index 54d02ee8e4b..5d227d1d52a 100644
--- a/app/views/layouts/_page.html.haml
+++ b/app/views/layouts/_page.html.haml
@@ -1,21 +1,4 @@
-.page-with-sidebar{ class: "#{page_sidebar_class} #{page_gutter_class}" }
-  .sidebar-wrapper.nicescroll
-    .sidebar-action-buttons
-      .nav-header-btn.toggle-nav-collapse{ title: "Open/Close" }
-        %span.sr-only Toggle navigation
-        = icon('bars')
-
-      %div{ class: "nav-header-btn pin-nav-btn has-tooltip #{'is-active' if pinned_nav?} js-nav-pin", title: pinned_nav? ? "Unpin navigation" : "Pin Navigation", data: { placement: 'right', container: 'body' } }
-        %span.sr-only Toggle navigation pinning
-        = icon('fw thumb-tack')
-
-    - if defined?(sidebar) && sidebar
-      = render "layouts/nav/#{sidebar}"
-    - elsif current_user
-      = render 'layouts/nav/dashboard'
-    - else
-      = render 'layouts/nav/explore'
-
+.page-with-sidebar{ class: "#{page_gutter_class}" }
   - if defined?(nav) && nav
     .layout-nav
       .container-fluid
-- 
GitLab