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
f1dea8ae
Commit
f1dea8ae
authored
May 27, 2021
by
Francisco Javier López
Committed by
Denys Mishunov
May 31, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply 2 suggestion(s) to 2 file(s)
parent
9c8e4e9c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
lib/sidebars/menu.rb
lib/sidebars/menu.rb
+1
-2
spec/lib/sidebars/menu_spec.rb
spec/lib/sidebars/menu_spec.rb
+1
-1
No files found.
lib/sidebars/menu.rb
View file @
f1dea8ae
...
...
@@ -86,8 +86,7 @@ module Sidebars
override
:container_html_options
def
container_html_options
super
.
tap
do
|
html_options
|
# Flagging menus that can be rendered but without any children
# like the merge requests or the requirements menu
# Flagging menus that can be rendered and with renderable menu items
if
render?
&&
has_renderable_items?
html_options
[
:class
]
=
[
*
html_options
[
:class
],
'has-sub-items'
].
join
(
' '
)
end
...
...
spec/lib/sidebars/menu_spec.rb
View file @
f1dea8ae
...
...
@@ -191,7 +191,7 @@ RSpec.describe Sidebars::Menu do
allow
(
menu
).
to
receive
(
:render?
).
and_return
(
false
)
end
it
'does not contain
"has-sub-items"
class'
do
it
'does not contain
special
class'
do
expect
(
menu
.
container_html_options
[
:class
]).
to
be_nil
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