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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
b9d4cb34
Commit
b9d4cb34
authored
Aug 07, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'collapse-sidebar-bugs' into 'master'
Remove JS flicker on page load; UI tweaks See merge request !13347
parents
184889cc
9127f32f
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
15 additions
and
7 deletions
+15
-7
app/assets/javascripts/new_sidebar.js
app/assets/javascripts/new_sidebar.js
+4
-2
app/assets/stylesheets/new_sidebar.scss
app/assets/stylesheets/new_sidebar.scss
+1
-0
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+4
-0
app/helpers/nav_helper.rb
app/helpers/nav_helper.rb
+1
-0
app/views/layouts/nav/_new_admin_sidebar.html.haml
app/views/layouts/nav/_new_admin_sidebar.html.haml
+1
-1
app/views/layouts/nav/_new_group_sidebar.html.haml
app/views/layouts/nav/_new_group_sidebar.html.haml
+1
-1
app/views/layouts/nav/_new_profile_sidebar.html.haml
app/views/layouts/nav/_new_profile_sidebar.html.haml
+1
-1
app/views/layouts/nav/_new_project_sidebar.html.haml
app/views/layouts/nav/_new_project_sidebar.html.haml
+2
-2
No files found.
app/assets/javascripts/new_sidebar.js
View file @
b9d4cb34
...
...
@@ -45,8 +45,10 @@ export default class NewNavSidebar {
toggleCollapsedSidebar
(
collapsed
)
{
this
.
$sidebar
.
toggleClass
(
'
sidebar-icons-only
'
,
collapsed
);
if
(
this
.
$sidebar
.
length
)
{
this
.
$page
.
toggleClass
(
'
page-with-new-sidebar
'
,
!
collapsed
);
this
.
$page
.
toggleClass
(
'
page-with-icon-sidebar
'
,
collapsed
);
}
NewNavSidebar
.
setCollapsedCookie
(
collapsed
);
}
...
...
app/assets/stylesheets/new_sidebar.scss
View file @
b9d4cb34
...
...
@@ -383,6 +383,7 @@ $new-sidebar-collapsed-width: 50px;
.toggle-sidebar-button
{
width
:
$new-sidebar-collapsed-width
-
2px
;
padding
:
16px
18px
;
.collapse-text
,
.fa-angle-double-left
{
...
...
app/helpers/application_helper.rb
View file @
b9d4cb34
...
...
@@ -305,4 +305,8 @@ module ApplicationHelper
def
show_new_nav?
cookies
[
"new_nav"
]
==
"true"
end
def
collapsed_sidebar?
cookies
[
"sidebar_collapsed"
]
==
"true"
end
end
app/helpers/nav_helper.rb
View file @
b9d4cb34
...
...
@@ -2,6 +2,7 @@ module NavHelper
def
page_with_sidebar_class
class_name
=
page_gutter_class
class_name
<<
'page-with-new-sidebar'
if
defined?
(
@new_sidebar
)
&&
@new_sidebar
class_name
<<
'page-with-icon-sidebar'
if
collapsed_sidebar?
&&
@new_sidebar
class_name
end
...
...
app/views/layouts/nav/_new_admin_sidebar.html.haml
View file @
b9d4cb34
.nav-sidebar
.nav-sidebar
{
class:
(
"sidebar-icons-only"
if
collapsed_sidebar?
)
}
.context-header
=
link_to
admin_root_path
,
title:
'Admin Overview'
do
.avatar-container.s40.settings-avatar
...
...
app/views/layouts/nav/_new_group_sidebar.html.haml
View file @
b9d4cb34
.nav-sidebar
.nav-sidebar
{
class:
(
"sidebar-icons-only"
if
collapsed_sidebar?
)
}
.context-header
=
link_to
group_path
(
@group
),
title:
@group
.
name
do
.avatar-container.s40.group-avatar
...
...
app/views/layouts/nav/_new_profile_sidebar.html.haml
View file @
b9d4cb34
.nav-sidebar
.nav-sidebar
{
class:
(
"sidebar-icons-only"
if
collapsed_sidebar?
)
}
.context-header
=
link_to
profile_path
,
title:
'Profile Settings'
do
.avatar-container.s40.settings-avatar
...
...
app/views/layouts/nav/_new_project_sidebar.html.haml
View file @
b9d4cb34
.nav-sidebar
.nav-sidebar
{
class:
(
"sidebar-icons-only"
if
collapsed_sidebar?
)
}
-
can_edit
=
can?
(
current_user
,
:admin_project
,
@project
)
.context-header
=
link_to
project_path
(
@project
),
title:
@project
.
name
do
...
...
@@ -216,7 +216,7 @@
=
link_to
project_settings_members_path
(
@project
),
title:
'Members'
,
class:
'shortcuts-tree'
do
.nav-icon-container
=
custom_icon
(
'members'
)
%span
%span
.nav-item-name
Members
=
render
'shared/sidebar_toggle_button'
...
...
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