Commit 9825f3f6 authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch 'mw-edit-board-modal-replace-fa-icons' into 'master'

Replace fa icons with svg icons in Board modal

See merge request gitlab-org/gitlab!35329
parents 3c0fa85e 5fba239f
<script> <script>
import { __, s__, sprintf } from '~/locale'; import { __, s__, sprintf } from '~/locale';
import { GlIcon } from '@gitlab/ui';
export default { export default {
components: {
GlIcon,
},
props: { props: {
abilityName: { abilityName: {
type: String, type: String,
...@@ -72,6 +76,10 @@ export default { ...@@ -72,6 +76,10 @@ export default {
data-toggle="dropdown" data-toggle="dropdown"
> >
<span class="dropdown-toggle-text"> {{ dropdownToggleText }} </span> <span class="dropdown-toggle-text"> {{ dropdownToggleText }} </span>
<i aria-hidden="true" class="fa fa-chevron-down" data-hidden="true"> </i> <gl-icon
name="chevron-down"
class="gl-absolute gl-top-3 gl-right-3 gl-text-gray-700"
:size="16"
/>
</button> </button>
</template> </template>
<script> <script>
export default {}; import { GlIcon } from '@gitlab/ui';
export default {
components: {
GlIcon,
},
};
</script> </script>
<template> <template>
...@@ -10,13 +16,13 @@ export default {}; ...@@ -10,13 +16,13 @@ export default {};
class="dropdown-input-field" class="dropdown-input-field"
type="search" type="search"
/> />
<i aria-hidden="true" class="fa fa-search dropdown-input-search" data-hidden="true"> </i> <gl-icon
<i name="search"
aria-hidden="true" class="dropdown-input-search gl-absolute gl-top-3 gl-right-5 gl-text-gray-500 gl-pointer-events-none"
class="fa fa-times dropdown-input-clear js-dropdown-input-clear" />
data-hidden="true" <gl-icon
role="button" name="close"
> class="dropdown-input-clear js-dropdown-input-clear gl-absolute gl-top-3 gl-right-5 gl-text-gray-700"
</i> />
</div> </div>
</template> </template>
...@@ -639,9 +639,12 @@ ...@@ -639,9 +639,12 @@
display: none; display: none;
cursor: pointer; cursor: pointer;
pointer-events: all; pointer-events: all;
right: 22px; top: $gl-padding-8;
top: 9px;
font-size: 14px; font-size: 14px;
&:not(.gl-icon) {
right: 22px;
}
} }
&.has-value { &.has-value {
......
<script> <script>
import '~/gl_dropdown';
import { GlLoadingIcon } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import '~/gl_dropdown';
import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import UsersSelect from '~/users_select'; import UsersSelect from '~/users_select';
import UserAvatarImage from '~/vue_shared/components/user_avatar/user_avatar_image.vue'; import UserAvatarImage from '~/vue_shared/components/user_avatar/user_avatar_image.vue';
...@@ -9,6 +9,7 @@ export default { ...@@ -9,6 +9,7 @@ export default {
components: { components: {
UserAvatarImage, UserAvatarImage,
GlLoadingIcon, GlLoadingIcon,
GlIcon,
}, },
props: { props: {
anyUserText: { anyUserText: {
...@@ -133,7 +134,11 @@ export default { ...@@ -133,7 +134,11 @@ export default {
type="button" type="button"
> >
<span class="dropdown-toggle-text"> {{ placeholderText }} </span> <span class="dropdown-toggle-text"> {{ placeholderText }} </span>
<i aria-hidden="true" class="fa fa-chevron-down" data-hidden="true"> </i> <gl-icon
name="chevron-down"
class="gl-absolute gl-top-3 gl-right-3 gl-text-gray-700"
:size="16"
/>
</button> </button>
<div <div
class="dropdown-menu dropdown-select dropdown-menu-paging class="dropdown-menu dropdown-select dropdown-menu-paging
...@@ -146,15 +151,14 @@ dropdown-menu-user dropdown-menu-selectable dropdown-menu-author" ...@@ -146,15 +151,14 @@ dropdown-menu-user dropdown-menu-selectable dropdown-menu-author"
:placeholder="__('Search')" :placeholder="__('Search')"
type="search" type="search"
/> />
<i aria-hidden="true" class="fa fa-search dropdown-input-search" data-hidden="true"> <gl-icon
</i> name="search"
<i class="dropdown-input-search gl-absolute gl-top-3 gl-right-5 gl-text-gray-500 gl-pointer-events-none"
aria-hidden="true" />
class="fa fa-times dropdown-input-clear js-dropdown-input-clear" <gl-icon
data-hidden="true" name="close"
role="button" class="dropdown-input-clear js-dropdown-input-clear gl-absolute gl-top-3 gl-right-5 gl-text-gray-700"
> />
</i>
</div> </div>
<div class="dropdown-content"></div> <div class="dropdown-content"></div>
<div class="dropdown-loading"><gl-loading-icon /></div> <div class="dropdown-loading"><gl-loading-icon /></div>
......
<script> <script>
/* eslint-disable @gitlab/vue-require-i18n-strings */ import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { GlLoadingIcon } from '@gitlab/ui';
import MilestoneSelect from '~/milestone_select'; import MilestoneSelect from '~/milestone_select';
const ANY_MILESTONE = 'Any milestone'; const ANY_MILESTONE = 'Any milestone';
...@@ -9,6 +8,7 @@ const NO_MILESTONE = 'No milestone'; ...@@ -9,6 +8,7 @@ const NO_MILESTONE = 'No milestone';
export default { export default {
components: { components: {
GlLoadingIcon, GlLoadingIcon,
GlIcon,
}, },
props: { props: {
board: { board: {
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
<template> <template>
<div class="block milestone"> <div class="block milestone">
<div class="title append-bottom-10"> <div class="title append-bottom-10">
Milestone {{ __('Milestone') }}
<button v-if="canEdit" type="button" class="edit-link btn btn-blank float-right"> <button v-if="canEdit" type="button" class="edit-link btn btn-blank float-right">
{{ __('Edit') }} {{ __('Edit') }}
</button> </button>
...@@ -101,7 +101,12 @@ export default { ...@@ -101,7 +101,12 @@ export default {
data-toggle="dropdown" data-toggle="dropdown"
type="button" type="button"
> >
Milestone <i aria-hidden="true" data-hidden="true" class="fa fa-chevron-down"> </i> {{ __('Milestone') }}
<gl-icon
name="chevron-down"
class="gl-absolute gl-top-3 gl-right-3 gl-text-gray-700"
:size="16"
/>
</button> </button>
<div class="dropdown-menu dropdown-select dropdown-menu-selectable"> <div class="dropdown-menu dropdown-select dropdown-menu-selectable">
<div class="dropdown-input"> <div class="dropdown-input">
...@@ -111,15 +116,14 @@ export default { ...@@ -111,15 +116,14 @@ export default {
:placeholder="__('Search milestones')" :placeholder="__('Search milestones')"
autocomplete="off" autocomplete="off"
/> />
<i aria-hidden="true" data-hidden="true" class="fa fa-search dropdown-input-search"> <gl-icon
</i> name="search"
<i class="dropdown-input-search gl-absolute gl-top-3 gl-right-5 gl-text-gray-500 gl-pointer-events-none"
role="button" />
aria-hidden="true" <gl-icon
data-hidden="true" name="close"
class="fa fa-times dropdown-input-clear js-dropdown-input-clear" class="dropdown-input-clear js-dropdown-input-clear gl-right-5 gl-absolute gl-top-3 gl-text-gray-700"
> />
</i>
</div> </div>
<div class="dropdown-content"></div> <div class="dropdown-content"></div>
<div class="dropdown-loading"><gl-loading-icon /></div> <div class="dropdown-loading"><gl-loading-icon /></div>
......
...@@ -82,10 +82,9 @@ describe('DropdownButtonComponent', () => { ...@@ -82,10 +82,9 @@ describe('DropdownButtonComponent', () => {
}); });
it('renders dropdown button icon', () => { it('renders dropdown button icon', () => {
const dropdownIconEl = vm.$el.querySelector('i.fa'); const dropdownIconEl = vm.$el.querySelector('.dropdown-menu-toggle .gl-icon');
expect(dropdownIconEl).not.toBeNull(); expect(dropdownIconEl).not.toBeNull();
expect(dropdownIconEl.classList.contains('fa-chevron-down')).toBe(true);
}); });
}); });
}); });
...@@ -29,13 +29,11 @@ describe('DropdownSearchInputComponent', () => { ...@@ -29,13 +29,11 @@ describe('DropdownSearchInputComponent', () => {
}); });
it('renders search icon element', () => { it('renders search icon element', () => {
expect(vm.$el.querySelector('.fa-search.dropdown-input-search')).not.toBeNull(); expect(vm.$el.querySelector('.dropdown-input-search')).not.toBeNull();
}); });
it('renders clear search icon element', () => { it('renders clear search icon element', () => {
expect( expect(vm.$el.querySelector('.dropdown-input-clear.js-dropdown-input-clear')).not.toBeNull();
vm.$el.querySelector('.fa-times.dropdown-input-clear.js-dropdown-input-clear'),
).not.toBeNull();
}); });
}); });
}); });
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