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
6e19ee39
Commit
6e19ee39
authored
Jun 01, 2021
by
Francisco Javier López
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove link in collapsed sidebar top menu item
parent
46c03e93
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
6 deletions
+28
-6
app/views/shared/nav/_sidebar_menu.html.haml
app/views/shared/nav/_sidebar_menu.html.haml
+5
-6
app/views/shared/nav/_sidebar_menu_collapsed.html.haml
app/views/shared/nav/_sidebar_menu_collapsed.html.haml
+5
-0
spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
+18
-0
No files found.
app/views/shared/nav/_sidebar_menu.html.haml
View file @
6e19ee39
...
...
@@ -15,12 +15,11 @@
%ul
.sidebar-sub-level-items
{
class:
(
'is-fly-out-only'
unless
sidebar_menu
.
has_renderable_items?
)
}
=
nav_link
(
**
sidebar_menu
.
all_active_routes
,
html_options:
{
class:
'fly-out-top-item'
}
)
do
=
link_to
sidebar_menu
.
link
,
**
sidebar_menu
.
collapsed_container_html_options
do
%strong
.fly-out-top-item-name
=
sidebar_menu
.
title
-
if
sidebar_menu
.
has_pill?
%span
.badge.badge-pill.count.fly-out-badge
{
**
sidebar_menu
.
pill_html_options
}
=
number_with_delimiter
(
sidebar_menu
.
pill_count
)
-
if
sidebar_refactor_disabled?
=
link_to
sidebar_menu
.
link
,
**
sidebar_menu
.
collapsed_container_html_options
do
=
render
'shared/nav/sidebar_menu_collapsed'
,
sidebar_menu:
sidebar_menu
-
else
=
render
'shared/nav/sidebar_menu_collapsed'
,
sidebar_menu:
sidebar_menu
-
if
sidebar_menu
.
has_items?
%li
.divider.fly-out-top-item
...
...
app/views/shared/nav/_sidebar_menu_collapsed.html.haml
0 → 100644
View file @
6e19ee39
%strong
.fly-out-top-item-name
=
sidebar_menu
.
title
-
if
sidebar_menu
.
has_pill?
%span
.badge.badge-pill.count.fly-out-badge
{
**
sidebar_menu
.
pill_html_options
}
=
number_with_delimiter
(
sidebar_menu
.
pill_count
)
spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
View file @
6e19ee39
...
...
@@ -1338,4 +1338,22 @@ RSpec.describe 'layouts/nav/sidebar/_project' do
end
it_behaves_like
'sidebar includes snowplow attributes'
,
'render'
,
'projects_side_navigation'
,
'projects_side_navigation'
describe
'Collapsed menu items'
do
it
'does not render the collapsed top menu as a link'
do
render
expect
(
rendered
).
not_to
have_selector
(
'.sidebar-sub-level-items > li.fly-out-top-item > a'
)
end
context
'when feature flag :sidebar_refactor is disabled'
do
it
'renders the collapsed top menu as a link'
do
stub_feature_flags
(
sidebar_refactor:
false
)
render
expect
(
rendered
).
to
have_selector
(
'.sidebar-sub-level-items > li.fly-out-top-item > a'
)
end
end
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