Commit 4301922d authored by peterhegman's avatar peterhegman

Update group overview icons to match sidebar icons

Switch to official group and project icons

Changelog: changed
parent 4dc48bc2
...@@ -131,7 +131,7 @@ export default { ...@@ -131,7 +131,7 @@ export default {
> >
<div class="folder-toggle-wrap gl-mr-2 d-flex align-items-center"> <div class="folder-toggle-wrap gl-mr-2 d-flex align-items-center">
<item-caret :is-group-open="group.isOpen" /> <item-caret :is-group-open="group.isOpen" />
<item-type-icon :item-type="group.type" :is-group-open="group.isOpen" /> <item-type-icon :item-type="group.type" />
</div> </div>
<gl-loading-icon <gl-loading-icon
v-if="group.isChildrenLoading" v-if="group.isChildrenLoading"
......
...@@ -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="folder-o" icon-name="group"
data-testid="subgroups-count" data-testid="subgroups-count"
/> />
<item-stats-value <item-stats-value
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
:title="__('Projects')" :title="__('Projects')"
:value="item.projectCount" :value="item.projectCount"
css-class="number-projects gl-ml-5" css-class="number-projects gl-ml-5"
icon-name="bookmark" icon-name="project"
data-testid="projects-count" data-testid="projects-count"
/> />
<item-stats-value <item-stats-value
......
...@@ -11,18 +11,13 @@ export default { ...@@ -11,18 +11,13 @@ export default {
type: String, type: String,
required: true, required: true,
}, },
isGroupOpen: {
type: Boolean,
required: true,
default: false,
},
}, },
computed: { computed: {
iconClass() { iconClass() {
if (this.itemType === ITEM_TYPE.GROUP) { if (this.itemType === ITEM_TYPE.GROUP) {
return this.isGroupOpen ? 'folder-open' : 'folder-o'; return 'group';
} }
return 'bookmark'; return 'project';
}, },
}, },
}; };
......
...@@ -8,7 +8,6 @@ describe('ItemTypeIcon', () => { ...@@ -8,7 +8,6 @@ describe('ItemTypeIcon', () => {
const defaultProps = { const defaultProps = {
itemType: ITEM_TYPE.GROUP, itemType: ITEM_TYPE.GROUP,
isGroupOpen: false,
}; };
const createComponent = (props = {}) => { const createComponent = (props = {}) => {
...@@ -34,20 +33,14 @@ describe('ItemTypeIcon', () => { ...@@ -34,20 +33,14 @@ describe('ItemTypeIcon', () => {
}); });
it.each` it.each`
type | isGroupOpen | icon type | icon
${ITEM_TYPE.GROUP} | ${true} | ${'folder-open'} ${ITEM_TYPE.GROUP} | ${'group'}
${ITEM_TYPE.GROUP} | ${false} | ${'folder-o'} ${ITEM_TYPE.PROJECT} | ${'project'}
${ITEM_TYPE.PROJECT} | ${true} | ${'bookmark'} `('shows "$icon" icon when `itemType` is "$type"', ({ type, icon }) => {
${ITEM_TYPE.PROJECT} | ${false} | ${'bookmark'} createComponent({
`( itemType: type,
'shows "$icon" icon when `itemType` is "$type" and `isGroupOpen` is $isGroupOpen', });
({ type, isGroupOpen, icon }) => { expect(findGlIcon().props('name')).toBe(icon);
createComponent({ });
itemType: type,
isGroupOpen,
});
expect(findGlIcon().props('name')).toBe(icon);
},
);
}); });
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment