Commit 7bb0ced0 authored by Phil Hughes's avatar Phil Hughes

Merge branch '46733-move-filter-dropdown-from-font-awesome-to-our-own-icons-ee' into 'master'

46733 move filter dropdown from font awesome to our own icons ee

Closes gitlab-ce#46733

See merge request gitlab-org/gitlab-ee!7356
parents 99b12b1d fd650c20
......@@ -5,7 +5,7 @@ const tokenKeys = [{
type: 'string',
param: 'status',
symbol: '',
icon: 'signal',
icon: 'messages',
tag: 'status',
}];
......
......@@ -62,7 +62,7 @@ export default class DropdownHint extends FilteredSearchDropdown {
renderContent() {
const dropdownData = this.tokenKeys.get()
.map(tokenKey => ({
icon: `fa-${tokenKey.icon}`,
icon: `${gon.sprite_icons}#${tokenKey.icon}`,
hint: tokenKey.key,
tag: `:${tokenKey.tag}`,
type: tokenKey.type,
......
......@@ -19,14 +19,14 @@ export const tokenKeys = [{
type: 'string',
param: 'title',
symbol: '%',
icon: 'clock-o',
icon: 'clock',
tag: '%milestone',
}, {
key: 'label',
type: 'array',
param: 'name[]',
symbol: '~',
icon: 'tag',
icon: 'labels',
tag: '~label',
}];
......@@ -37,7 +37,7 @@ if (gon.current_user_id) {
type: 'string',
param: 'emoji',
symbol: '',
icon: 'thumbs-up',
icon: 'thumb-up',
tag: 'emoji',
});
}
......
......@@ -389,9 +389,8 @@
.btn {
text-overflow: ellipsis;
.fa {
width: 15px;
line-height: $line-height-base;
svg {
margin-right: $gl-padding-8;
}
.dropdown-label-box {
......
......@@ -69,7 +69,7 @@
%ul{ data: { dropdown: true } }
%li.filter-dropdown-item{ data: { action: 'submit' } }
= button_tag class: %w[btn btn-link] do
= icon('search')
= sprite_icon('search')
%span
= _('Press Enter or click to search')
%ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
......@@ -77,7 +77,8 @@
= button_tag class: %w[btn btn-link] do
-# Encapsulate static class name `{{icon}}` inside #{} to bypass
-# haml lint's ClassAttributeWithStaticValue
%i.fa{ class: "#{'{{icon}}'}" }
%svg
%use{ 'xlink:href': "#{'{{icon}}'}" }
%span.js-filter-hint
{{hint}}
%span.js-filter-tag.dropdown-light-content
......
......@@ -34,7 +34,7 @@
%ul{ data: { dropdown: true } }
%li.filter-dropdown-item{ data: { action: 'submit' } }
%button.btn.btn-link
= icon('search')
= sprite_icon('search')
%span
Press Enter or click to search
%ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
......@@ -42,7 +42,8 @@
%button.btn.btn-link
-# Encapsulate static class name `{{icon}}` inside #{} to bypass
-# haml lint's ClassAttributeWithStaticValue
%i.fa{ class: "#{'{{icon}}'}" }
%svg
%use{ 'xlink:href': "#{'{{icon}}'}" }
%span.js-filter-hint
{{hint}}
%span.js-filter-tag.dropdown-light-content
......
......@@ -10,7 +10,7 @@ const tokenKeys = [{
type: 'array',
param: 'name[]',
symbol: '~',
icon: 'tag',
icon: 'labels',
tag: '~label',
}];
......
......@@ -10,7 +10,7 @@ const weightTokenKey = {
type: 'string',
param: '',
symbol: '',
icon: 'balance-scale',
icon: 'scale',
tag: 'number',
};
......
......@@ -41,7 +41,7 @@
%ul{ data: { dropdown: true } }
%li.filter-dropdown-item{ data: { action: 'submit' } }
%button.btn.btn-link{ type: 'button' }
= icon('search')
= sprite_icon('search')
%span
Press Enter or click to search
%ul.filter-dropdown{ data: { dynamic: true, dropdown: true } }
......@@ -49,7 +49,8 @@
%button.btn.btn-link{ type: 'button' }
-# Encapsulate static class name `{{icon}}` inside #{} to bypass
-# haml lint's ClassAttributeWithStaticValue
%i.fa{ class: "#{'{{icon}}'}" }
%svg
%use{ 'xlink:href': "#{'{{icon}}'}" }
%span.js-filter-hint
{{hint}}
%span.js-filter-tag.dropdown-light-content
......
---
title: updated icons used in filtered search dropdowns
merge_request: 7356
author:
type: changed
......@@ -6,7 +6,7 @@ describe('Filtered Search Token Keys (Issues EE)', () => {
type: 'string',
param: '',
symbol: '',
icon: 'balance-scale',
icon: 'scale',
tag: 'number',
};
......
......@@ -667,3 +667,4 @@ describe('common_utils', () => {
});
});
});
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