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
32c5fa99
Commit
32c5fa99
authored
Jun 12, 2019
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sidebar flyout navigation
Show flyout nav for active item when collapsed.
parent
b6e56ed3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
3 deletions
+45
-3
app/assets/javascripts/contextual_sidebar.js
app/assets/javascripts/contextual_sidebar.js
+1
-1
app/views/layouts/nav/sidebar/_project.html.haml
app/views/layouts/nav/sidebar/_project.html.haml
+1
-1
app/views/shared/_sidebar_toggle_button.html.haml
app/views/shared/_sidebar_toggle_button.html.haml
+1
-1
changelogs/unreleased/fix-flyout-navs.yml
changelogs/unreleased/fix-flyout-navs.yml
+5
-0
spec/features/contextual_sidebar_spec.rb
spec/features/contextual_sidebar_spec.rb
+37
-0
No files found.
app/assets/javascripts/contextual_sidebar.js
View file @
32c5fa99
...
...
@@ -78,7 +78,7 @@ export default class ContextualSidebar {
const
dbp
=
ContextualSidebar
.
isDesktopBreakpoint
();
if
(
this
.
$sidebar
.
length
)
{
this
.
$sidebar
.
toggleClass
(
'
sidebar-collapsed-desktop
'
,
collapsed
);
this
.
$sidebar
.
toggleClass
(
`sidebar-collapsed-desktop
${
SIDEBAR_COLLAPSED_CLASS
}
`
,
collapsed
);
this
.
$sidebar
.
toggleClass
(
'
sidebar-expanded-mobile
'
,
!
dbp
?
!
collapsed
:
false
);
this
.
$page
.
toggleClass
(
'
page-with-icon-sidebar
'
,
...
...
app/views/layouts/nav/sidebar/_project.html.haml
View file @
32c5fa99
...
...
@@ -9,7 +9,7 @@
=
@project
.
name
%ul
.sidebar-top-level-items
=
nav_link
(
path:
sidebar_projects_paths
,
html_options:
{
class:
'home'
})
do
=
link_to
project_path
(
@project
),
class:
'shortcuts-project'
do
=
link_to
project_path
(
@project
),
class:
'shortcuts-project
qa-link-project
'
do
.nav-icon-container
=
sprite_icon
(
'home'
)
%span
.nav-item-name
...
...
app/views/shared/_sidebar_toggle_button.html.haml
View file @
32c5fa99
%a
.toggle-sidebar-button.js-toggle-sidebar
{
role:
"button"
,
type:
"button"
,
title:
"Toggle sidebar"
}
%a
.toggle-sidebar-button.js-toggle-sidebar
.qa-toggle-sidebar
{
role:
"button"
,
type:
"button"
,
title:
"Toggle sidebar"
}
=
sprite_icon
(
'angle-double-left'
,
css_class:
'icon-angle-double-left'
)
=
sprite_icon
(
'angle-double-right'
,
css_class:
'icon-angle-double-right'
)
%span
.collapse-text
=
_
(
"Collapse sidebar"
)
...
...
changelogs/unreleased/fix-flyout-navs.yml
0 → 100644
View file @
32c5fa99
---
title
:
Fix sidebar flyout navigation
merge_request
:
29571
author
:
type
:
fixed
spec/features/contextual_sidebar_spec.rb
0 → 100644
View file @
32c5fa99
# frozen_string_literal: true
require
'spec_helper'
describe
'Contextual sidebar'
,
:js
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
before
do
project
.
add_maintainer
(
user
)
sign_in
(
user
)
visit
project_path
(
project
)
end
it
'shows flyout navs when collapsed or expanded apart from on the active item when expanded'
do
expect
(
page
).
not_to
have_selector
(
'.js-sidebar-collapsed'
)
find
(
'.qa-link-pipelines'
).
hover
expect
(
page
).
to
have_selector
(
'.is-showing-fly-out'
)
find
(
'.qa-link-project'
).
hover
expect
(
page
).
not_to
have_selector
(
'.is-showing-fly-out'
)
find
(
'.qa-toggle-sidebar'
).
click
find
(
'.qa-link-pipelines'
).
hover
expect
(
page
).
to
have_selector
(
'.is-showing-fly-out'
)
find
(
'.qa-link-project'
).
hover
expect
(
page
).
to
have_selector
(
'.is-showing-fly-out'
)
end
end
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