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
eb10ec1a
Commit
eb10ec1a
authored
Sep 27, 2021
by
David O'Regan
Committed by
Kushal Pandya
Sep 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Add tooltip to sidebar title menu item"
parent
10e8074a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
5 deletions
+34
-5
app/views/layouts/nav/sidebar/_admin.html.haml
app/views/layouts/nav/sidebar/_admin.html.haml
+1
-1
app/views/layouts/nav/sidebar/_profile.html.haml
app/views/layouts/nav/sidebar/_profile.html.haml
+1
-1
ee/app/views/layouts/nav/sidebar/_security.html.haml
ee/app/views/layouts/nav/sidebar/_security.html.haml
+1
-1
lib/sidebars/groups/menus/scope_menu.rb
lib/sidebars/groups/menus/scope_menu.rb
+5
-1
lib/sidebars/projects/menus/scope_menu.rb
lib/sidebars/projects/menus/scope_menu.rb
+5
-1
spec/lib/sidebars/groups/menus/scope_menu_spec.rb
spec/lib/sidebars/groups/menus/scope_menu_spec.rb
+15
-0
spec/lib/sidebars/projects/menus/scope_menu_spec.rb
spec/lib/sidebars/projects/menus/scope_menu_spec.rb
+6
-0
No files found.
app/views/layouts/nav/sidebar/_admin.html.haml
View file @
eb10ec1a
%aside
.nav-sidebar.qa-admin-sidebar
{
class:
(
"sidebar-collapsed-desktop"
if
collapsed_sidebar?
),
'aria-label'
:
_
(
'Admin navigation'
)
}
%aside
.nav-sidebar.qa-admin-sidebar
{
class:
(
"sidebar-collapsed-desktop"
if
collapsed_sidebar?
),
'aria-label'
:
_
(
'Admin navigation'
)
}
.nav-sidebar-inner-scroll
.nav-sidebar-inner-scroll
.context-header
.context-header
=
link_to
admin_root_path
,
title:
_
(
'Admin Overview'
)
do
=
link_to
admin_root_path
,
title:
_
(
'Admin Overview'
)
,
class:
'has-tooltip'
,
data:
{
container:
'body'
,
placement:
'right'
}
do
%span
{
class:
[
'avatar-container'
,
'settings-avatar'
,
'rect-avatar'
,
's32'
]
}
%span
{
class:
[
'avatar-container'
,
'settings-avatar'
,
'rect-avatar'
,
's32'
]
}
=
sprite_icon
(
'admin'
,
size:
18
)
=
sprite_icon
(
'admin'
,
size:
18
)
%span
.sidebar-context-title
%span
.sidebar-context-title
...
...
app/views/layouts/nav/sidebar/_profile.html.haml
View file @
eb10ec1a
%aside
.nav-sidebar
{
class:
(
"sidebar-collapsed-desktop"
if
collapsed_sidebar?
),
**
sidebar_tracking_attributes_by_object
(
current_user
),
'aria-label'
:
_
(
'User settings'
)
}
%aside
.nav-sidebar
{
class:
(
"sidebar-collapsed-desktop"
if
collapsed_sidebar?
),
**
sidebar_tracking_attributes_by_object
(
current_user
),
'aria-label'
:
_
(
'User settings'
)
}
.nav-sidebar-inner-scroll
.nav-sidebar-inner-scroll
.context-header
.context-header
=
link_to
profile_path
,
title:
_
(
'Profile Settings'
)
do
=
link_to
profile_path
,
title:
_
(
'Profile Settings'
)
,
class:
'has-tooltip'
,
data:
{
container:
'body'
,
placement:
'right'
}
do
%span
{
class:
[
'avatar-container'
,
'settings-avatar'
,
's32'
]
}
%span
{
class:
[
'avatar-container'
,
'settings-avatar'
,
's32'
]
}
=
image_tag
avatar_icon_for_user
(
current_user
,
32
),
class:
[
'avatar'
,
'avatar-tile'
,
'js-sidebar-user-avatar'
,
's32'
],
alt:
current_user
.
name
,
data:
{
testid:
'sidebar-user-avatar'
}
=
image_tag
avatar_icon_for_user
(
current_user
,
32
),
class:
[
'avatar'
,
'avatar-tile'
,
'js-sidebar-user-avatar'
,
's32'
],
alt:
current_user
.
name
,
data:
{
testid:
'sidebar-user-avatar'
}
%span
.sidebar-context-title
=
_
(
'User Settings'
)
%span
.sidebar-context-title
=
_
(
'User Settings'
)
...
...
ee/app/views/layouts/nav/sidebar/_security.html.haml
View file @
eb10ec1a
%aside
.nav-sidebar
{
class:
(
"sidebar-collapsed-desktop"
if
collapsed_sidebar?
),
'aria-label'
:
_
(
'Security navigation'
)
}
%aside
.nav-sidebar
{
class:
(
"sidebar-collapsed-desktop"
if
collapsed_sidebar?
),
'aria-label'
:
_
(
'Security navigation'
)
}
.nav-sidebar-inner-scroll
.nav-sidebar-inner-scroll
.context-header
.context-header
=
link_to
security_dashboard_path
,
title:
_
(
'Security Dashboard'
),
id:
'logo'
do
=
link_to
security_dashboard_path
,
title:
_
(
'Security Dashboard'
),
id:
'logo'
,
class:
'has-tooltip'
,
data:
{
container:
'body'
,
placement:
'right'
}
do
%span
{
class:
[
'avatar-container'
,
'rect-avatar'
,
'settings-avatar'
,
's32'
]
}
%span
{
class:
[
'avatar-container'
,
'rect-avatar'
,
'settings-avatar'
,
's32'
]
}
=
brand_header_logo
=
brand_header_logo
%span
.sidebar-context-title
%span
.sidebar-context-title
...
...
lib/sidebars/groups/menus/scope_menu.rb
View file @
eb10ec1a
...
@@ -21,7 +21,11 @@ module Sidebars
...
@@ -21,7 +21,11 @@ module Sidebars
override
:extra_nav_link_html_options
override
:extra_nav_link_html_options
def
extra_nav_link_html_options
def
extra_nav_link_html_options
{
class:
'context-header'
}
{
class:
'context-header has-tooltip'
,
title:
context
.
group
.
name
,
data:
{
container:
'body'
,
placement:
'right'
}
}
end
end
override
:render?
override
:render?
...
...
lib/sidebars/projects/menus/scope_menu.rb
View file @
eb10ec1a
...
@@ -28,7 +28,11 @@ module Sidebars
...
@@ -28,7 +28,11 @@ module Sidebars
override
:extra_nav_link_html_options
override
:extra_nav_link_html_options
def
extra_nav_link_html_options
def
extra_nav_link_html_options
{
class:
'context-header'
}
{
class:
'context-header has-tooltip'
,
title:
context
.
project
.
name
,
data:
{
container:
'body'
,
placement:
'right'
}
}
end
end
override
:render?
override
:render?
...
...
spec/lib/sidebars/groups/menus/scope_menu_spec.rb
0 → 100644
View file @
eb10ec1a
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
Sidebars
::
Groups
::
Menus
::
ScopeMenu
do
let
(
:group
)
{
build
(
:group
)
}
let
(
:user
)
{
group
.
owner
}
let
(
:context
)
{
Sidebars
::
Groups
::
Context
.
new
(
current_user:
user
,
container:
group
)
}
describe
'#extra_nav_link_html_options'
do
subject
{
described_class
.
new
(
context
).
extra_nav_link_html_options
}
specify
{
is_expected
.
to
match
(
hash_including
(
class:
'context-header has-tooltip'
,
title:
context
.
group
.
name
))
}
end
end
spec/lib/sidebars/projects/menus/scope_menu_spec.rb
View file @
eb10ec1a
...
@@ -12,4 +12,10 @@ RSpec.describe Sidebars::Projects::Menus::ScopeMenu do
...
@@ -12,4 +12,10 @@ RSpec.describe Sidebars::Projects::Menus::ScopeMenu do
specify
{
is_expected
.
to
match
(
hash_including
(
class:
'shortcuts-project rspec-project-link'
))
}
specify
{
is_expected
.
to
match
(
hash_including
(
class:
'shortcuts-project rspec-project-link'
))
}
end
end
describe
'#extra_nav_link_html_options'
do
subject
{
described_class
.
new
(
context
).
extra_nav_link_html_options
}
specify
{
is_expected
.
to
match
(
hash_including
(
class:
'context-header has-tooltip'
,
title:
context
.
project
.
name
))
}
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