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
dbb66e1f
Commit
dbb66e1f
authored
Apr 12, 2022
by
peterhegman
Committed by
Peter Hegman
Apr 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change subgroups to use official `subgroup` icon
Instead of using the `group` icon Changelog: changed
parent
658d583a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
4 deletions
+18
-4
app/assets/javascripts/groups/components/item_stats.vue
app/assets/javascripts/groups/components/item_stats.vue
+1
-1
app/assets/javascripts/groups/components/item_type_icon.vue
app/assets/javascripts/groups/components/item_type_icon.vue
+1
-1
lib/sidebars/groups/menus/group_information_menu.rb
lib/sidebars/groups/menus/group_information_menu.rb
+1
-1
spec/frontend/groups/components/item_type_icon_spec.js
spec/frontend/groups/components/item_type_icon_spec.js
+1
-1
spec/lib/sidebars/groups/menus/group_information_menu_spec.rb
.../lib/sidebars/groups/menus/group_information_menu_spec.rb
+14
-0
No files found.
app/assets/javascripts/groups/components/item_stats.vue
View file @
dbb66e1f
...
@@ -55,7 +55,7 @@ export default {
...
@@ -55,7 +55,7 @@ export default {
:title=
"__('Subgroups')"
:title=
"__('Subgroups')"
:value=
"item.subgroupCount"
:value=
"item.subgroupCount"
css-class=
"number-subgroups gl-ml-5"
css-class=
"number-subgroups gl-ml-5"
icon-name=
"group"
icon-name=
"
sub
group"
data-testid=
"subgroups-count"
data-testid=
"subgroups-count"
/>
/>
<item-stats-value
<item-stats-value
...
...
app/assets/javascripts/groups/components/item_type_icon.vue
View file @
dbb66e1f
...
@@ -15,7 +15,7 @@ export default {
...
@@ -15,7 +15,7 @@ export default {
computed
:
{
computed
:
{
iconClass
()
{
iconClass
()
{
if
(
this
.
itemType
===
ITEM_TYPE
.
GROUP
)
{
if
(
this
.
itemType
===
ITEM_TYPE
.
GROUP
)
{
return
'
group
'
;
return
'
sub
group
'
;
}
}
return
'
project
'
;
return
'
project
'
;
},
},
...
...
lib/sidebars/groups/menus/group_information_menu.rb
View file @
dbb66e1f
...
@@ -20,7 +20,7 @@ module Sidebars
...
@@ -20,7 +20,7 @@ module Sidebars
override
:sprite_icon
override
:sprite_icon
def
sprite_icon
def
sprite_icon
'group'
context
.
group
.
subgroup?
?
'subgroup'
:
'group'
end
end
override
:active_routes
override
:active_routes
...
...
spec/frontend/groups/components/item_type_icon_spec.js
View file @
dbb66e1f
...
@@ -34,7 +34,7 @@ describe('ItemTypeIcon', () => {
...
@@ -34,7 +34,7 @@ describe('ItemTypeIcon', () => {
it
.
each
`
it
.
each
`
type | icon
type | icon
${
ITEM_TYPE
.
GROUP
}
|
${
'
group
'
}
${
ITEM_TYPE
.
GROUP
}
|
${
'
sub
group
'
}
${
ITEM_TYPE
.
PROJECT
}
|
${
'
project
'
}
${
ITEM_TYPE
.
PROJECT
}
|
${
'
project
'
}
`
(
'
shows "$icon" icon when `itemType` is "$type"
'
,
({
type
,
icon
})
=>
{
`
(
'
shows "$icon" icon when `itemType` is "$type"
'
,
({
type
,
icon
})
=>
{
createComponent
({
createComponent
({
...
...
spec/lib/sidebars/groups/menus/group_information_menu_spec.rb
View file @
dbb66e1f
...
@@ -28,6 +28,20 @@ RSpec.describe Sidebars::Groups::Menus::GroupInformationMenu do
...
@@ -28,6 +28,20 @@ RSpec.describe Sidebars::Groups::Menus::GroupInformationMenu do
end
end
end
end
describe
'#sprite_icon'
do
subject
{
described_class
.
new
(
context
).
sprite_icon
}
context
'when group is a root group'
do
specify
{
is_expected
.
to
eq
'group'
}
end
context
'when group is a child group'
do
let
(
:group
)
{
build
(
:group
,
parent:
root_group
)
}
specify
{
is_expected
.
to
eq
'subgroup'
}
end
end
describe
'Menu Items'
do
describe
'Menu Items'
do
subject
{
described_class
.
new
(
context
).
renderable_items
.
index
{
|
e
|
e
.
item_id
==
item_id
}
}
subject
{
described_class
.
new
(
context
).
renderable_items
.
index
{
|
e
|
e
.
item_id
==
item_id
}
}
...
...
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