Commit a4901248 authored by Lukas Eipert's avatar Lukas Eipert

Utilize GitLab UI icon component: ee/

This replaces all the usages of ~/vue_shared/components/icon.vue with
the corresponding GitLab UI component for all remaining ee/ components.

In a previous MR [0] we already replaced the internal implementation
with the GitLab UI component. This should allow us to migrate all usages
without any test failures relating to the differences in their
implementation.

The actual deletion of the file will be done in a follow-up in case we
have missed an instance or someone introduces a new one in the
meanwhile.

[0]: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/38778
parent 474fe142
...@@ -7,11 +7,11 @@ import { ...@@ -7,11 +7,11 @@ import {
GlDeprecatedDropdownItem, GlDeprecatedDropdownItem,
GlDeprecatedButton, GlDeprecatedButton,
GlTooltipDirective, GlTooltipDirective,
GlIcon,
} from '@gitlab/ui'; } from '@gitlab/ui';
import dateFormat from 'dateformat'; import dateFormat from 'dateformat';
import { GlColumnChart } from '@gitlab/ui/dist/charts'; import { GlColumnChart } from '@gitlab/ui/dist/charts';
import featureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import featureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import Icon from '~/vue_shared/components/icon.vue';
import { beginOfDayTime, endOfDayTime } from '~/lib/utils/datetime_utility'; import { beginOfDayTime, endOfDayTime } from '~/lib/utils/datetime_utility';
import MetricChart from './metric_chart.vue'; import MetricChart from './metric_chart.vue';
import Scatterplot from '../../shared/components/scatterplot.vue'; import Scatterplot from '../../shared/components/scatterplot.vue';
...@@ -28,7 +28,7 @@ export default { ...@@ -28,7 +28,7 @@ export default {
GlDeprecatedDropdownItem, GlDeprecatedDropdownItem,
GlColumnChart, GlColumnChart,
GlDeprecatedButton, GlDeprecatedButton,
Icon, GlIcon,
MetricChart, MetricChart,
Scatterplot, Scatterplot,
MergeRequestTable, MergeRequestTable,
...@@ -313,7 +313,7 @@ export default { ...@@ -313,7 +313,7 @@ export default {
@click="setSortField(metric.key)" @click="setSortField(metric.key)"
> >
<span class="d-flex"> <span class="d-flex">
<icon <gl-icon
class="flex-shrink-0 gl-mr-2" class="flex-shrink-0 gl-mr-2"
:class="{ :class="{
invisible: !isSelectedSortField(metric.key), invisible: !isSelectedSortField(metric.key),
...@@ -329,7 +329,7 @@ export default { ...@@ -329,7 +329,7 @@ export default {
:title="sortTooltipTitle" :title="sortTooltipTitle"
@click="toggleSortOrder" @click="toggleSortOrder"
> >
<icon :name="sortIcon" /> <gl-icon :name="sortIcon" />
</gl-deprecated-button> </gl-deprecated-button>
</div> </div>
</div> </div>
......
<script> <script>
import { isEmpty } from 'lodash'; import { isEmpty } from 'lodash';
import { GlDeprecatedDropdown, GlDeprecatedDropdownItem, GlLoadingIcon, GlAlert } from '@gitlab/ui'; import {
GlDeprecatedDropdown,
GlDeprecatedDropdownItem,
GlLoadingIcon,
GlAlert,
GlIcon,
} from '@gitlab/ui';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import httpStatusCodes from '~/lib/utils/http_status'; import httpStatusCodes from '~/lib/utils/http_status';
export default { export default {
...@@ -12,7 +17,7 @@ export default { ...@@ -12,7 +17,7 @@ export default {
GlDeprecatedDropdownItem, GlDeprecatedDropdownItem,
GlLoadingIcon, GlLoadingIcon,
GlAlert, GlAlert,
Icon, GlIcon,
}, },
props: { props: {
title: { title: {
...@@ -106,7 +111,7 @@ export default { ...@@ -106,7 +111,7 @@ export default {
@click="$emit('metricTypeChange', metric.key)" @click="$emit('metricTypeChange', metric.key)"
> >
<span class="d-flex"> <span class="d-flex">
<icon <gl-icon
:title="s__('MetricChart|Selected')" :title="s__('MetricChart|Selected')"
class="flex-shrink-0 gl-mr-2" class="flex-shrink-0 gl-mr-2"
:class="{ :class="{
......
<script> <script>
import { GlDeprecatedDropdown, GlDeprecatedDropdownItem } from '@gitlab/ui'; import { GlDeprecatedDropdown, GlDeprecatedDropdownItem, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import MergeRequestTableRow from './mr_table_row.vue'; import MergeRequestTableRow from './mr_table_row.vue';
import Pagination from '~/vue_shared/components/pagination_links.vue'; import Pagination from '~/vue_shared/components/pagination_links.vue';
...@@ -8,7 +7,7 @@ export default { ...@@ -8,7 +7,7 @@ export default {
components: { components: {
GlDeprecatedDropdown, GlDeprecatedDropdown,
GlDeprecatedDropdownItem, GlDeprecatedDropdownItem,
Icon, GlIcon,
MergeRequestTableRow, MergeRequestTableRow,
Pagination, Pagination,
}, },
...@@ -79,7 +78,7 @@ export default { ...@@ -79,7 +78,7 @@ export default {
@click="$emit('columnMetricChange', option.key)" @click="$emit('columnMetricChange', option.key)"
> >
<span class="d-flex"> <span class="d-flex">
<icon <gl-icon
class="flex-shrink-0 gl-mr-2" class="flex-shrink-0 gl-mr-2"
:class="{ :class="{
invisible: !isSelectedMetric(option.key), invisible: !isSelectedMetric(option.key),
......
<script> <script>
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import Avatar from '~/vue_shared/components/project_avatar/default.vue'; import Avatar from '~/vue_shared/components/project_avatar/default.vue';
import HiddenGroupsItem from './hidden_groups_item.vue'; import HiddenGroupsItem from './hidden_groups_item.vue';
import { TYPE_USER, TYPE_GROUP, TYPE_HIDDEN_GROUPS } from '../constants'; import { TYPE_USER, TYPE_GROUP, TYPE_HIDDEN_GROUPS } from '../constants';
...@@ -10,7 +9,7 @@ const types = [TYPE_USER, TYPE_GROUP, TYPE_HIDDEN_GROUPS]; ...@@ -10,7 +9,7 @@ const types = [TYPE_USER, TYPE_GROUP, TYPE_HIDDEN_GROUPS];
export default { export default {
components: { components: {
GlDeprecatedButton, GlDeprecatedButton,
Icon, GlIcon,
Avatar, Avatar,
HiddenGroupsItem, HiddenGroupsItem,
}, },
...@@ -43,7 +42,7 @@ export default { ...@@ -43,7 +42,7 @@ export default {
<avatar :project="approver" :size="24" /><span>{{ displayName }}</span> <avatar :project="approver" :size="24" /><span>{{ displayName }}</span>
</template> </template>
<gl-deprecated-button variant="none" class="ml-auto" @click="$emit('remove', approver)"> <gl-deprecated-button variant="none" class="ml-auto" @click="$emit('remove', approver)">
<icon name="remove" :aria-label="__('Remove')" /> <gl-icon name="remove" :aria-label="__('Remove')" />
</gl-deprecated-button> </gl-deprecated-button>
</li> </li>
</transition> </transition>
......
<script> <script>
import { GlPopover, GlLink } from '@gitlab/ui'; import { GlPopover, GlLink, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
Icon, GlIcon,
GlPopover, GlPopover,
GlLink, GlLink,
}, },
...@@ -22,7 +21,7 @@ export default { ...@@ -22,7 +21,7 @@ export default {
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<span class="mt-n1">{{ __('Any eligible user') }}</span> <span class="mt-n1">{{ __('Any eligible user') }}</span>
<span id="popovercontainer" class="ml-2 align-self-end"> <span id="popovercontainer" class="ml-2 align-self-end">
<icon <gl-icon
id="pop-approver" id="pop-approver"
tabindex="0" tabindex="0"
name="question" name="question"
......
<script> <script>
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import { GlButton } from '@gitlab/ui'; import { GlButton, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
GlButton, GlButton,
Icon, GlIcon,
}, },
props: { props: {
rule: { rule: {
...@@ -34,7 +33,7 @@ export default { ...@@ -34,7 +33,7 @@ export default {
category="primary" category="primary"
@click="requestDeleteRule(rule)" @click="requestDeleteRule(rule)"
> >
<icon name="remove" :aria-label="__('Remove')" /> <gl-icon name="remove" :aria-label="__('Remove')" />
</gl-button> </gl-button>
</div> </div>
</template> </template>
<script> <script>
import { GlIcon } from '@gitlab/ui';
import { dateInWords } from '~/lib/utils/datetime_utility'; import { dateInWords } from '~/lib/utils/datetime_utility';
import Icon from '~/vue_shared/components/icon.vue';
import Popover from '~/vue_shared/components/help_popover.vue'; import Popover from '~/vue_shared/components/help_popover.vue';
export default { export default {
name: 'SubscriptionTableRow', name: 'SubscriptionTableRow',
components: { components: {
Icon, GlIcon,
Popover, Popover,
}, },
props: { props: {
...@@ -54,7 +54,7 @@ export default { ...@@ -54,7 +54,7 @@ export default {
<div class="grid-row d-flex flex-grow-1 flex-column flex-sm-column flex-md-column flex-lg-row"> <div class="grid-row d-flex flex-grow-1 flex-column flex-sm-column flex-md-column flex-lg-row">
<div class="grid-cell header-cell"> <div class="grid-cell header-cell">
<span class="icon-wrapper"> <span class="icon-wrapper">
<icon v-if="header.icon" class="gl-mr-3" :name="header.icon" aria-hidden="true" /> <gl-icon v-if="header.icon" class="gl-mr-3" :name="header.icon" aria-hidden="true" />
{{ header.title }} {{ header.title }}
</span> </span>
</div> </div>
......
<script> <script>
import { GlTable, GlEmptyState, GlLoadingIcon } from '@gitlab/ui'; import { GlTable, GlEmptyState, GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue'; import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue';
export default { export default {
components: { components: {
GlEmptyState, GlEmptyState,
GlTable, GlTable,
Icon, GlIcon,
TimeAgo, TimeAgo,
GlLoadingIcon, GlLoadingIcon,
deploymentInstance: () => import('ee_component/vue_shared/components/deployment_instance.vue'), deploymentInstance: () => import('ee_component/vue_shared/components/deployment_instance.vue'),
...@@ -153,7 +152,7 @@ export default { ...@@ -153,7 +152,7 @@ export default {
<!-- Empty state --> <!-- Empty state -->
<div v-else class="deployments-empty d-flex"> <div v-else class="deployments-empty d-flex">
<icon <gl-icon
name="warning" name="warning"
:size="18" :size="18"
class="cluster-deployments-warning mr-2 align-self-center flex-shrink-0" class="cluster-deployments-warning mr-2 align-self-center flex-shrink-0"
......
<script> <script>
import { escape, isEmpty } from 'lodash'; import { escape, isEmpty } from 'lodash';
import { GlTooltipDirective, GlLink, GlDeprecatedBadge as GlBadge } from '@gitlab/ui'; import { GlTooltipDirective, GlLink, GlDeprecatedBadge as GlBadge, GlIcon } from '@gitlab/ui';
import Alerts from 'ee/vue_shared/dashboards/components/alerts.vue'; import Alerts from 'ee/vue_shared/dashboards/components/alerts.vue';
import TimeAgo from 'ee/vue_shared/dashboards/components/time_ago.vue'; import TimeAgo from 'ee/vue_shared/dashboards/components/time_ago.vue';
import { STATUS_FAILED } from 'ee/vue_shared/dashboards/constants'; import { STATUS_FAILED } from 'ee/vue_shared/dashboards/constants';
import ProjectPipeline from 'ee/vue_shared/dashboards/components/project_pipeline.vue'; import ProjectPipeline from 'ee/vue_shared/dashboards/components/project_pipeline.vue';
import { s__, __, sprintf } from '~/locale'; import { s__, __, sprintf } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import timeagoMixin from '~/vue_shared/mixins/timeago'; import timeagoMixin from '~/vue_shared/mixins/timeago';
import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue';
import Commit from '~/vue_shared/components/commit.vue'; import Commit from '~/vue_shared/components/commit.vue';
...@@ -22,7 +21,7 @@ export default { ...@@ -22,7 +21,7 @@ export default {
Alerts, Alerts,
ProjectPipeline, ProjectPipeline,
TimeAgo, TimeAgo,
Icon, GlIcon,
}, },
directives: { directives: {
'gl-tooltip': GlTooltipDirective, 'gl-tooltip': GlTooltipDirective,
...@@ -139,7 +138,7 @@ export default { ...@@ -139,7 +138,7 @@ export default {
<div class="col-10 col-sm-7 pr-0 pl-5 align-self-center align-middle ci-table"> <div class="col-10 col-sm-7 pr-0 pl-5 align-self-center align-middle ci-table">
<div class="branch-commit"> <div class="branch-commit">
<icon name="work" /> <gl-icon name="work" />
<gl-link <gl-link
v-if="deployable" v-if="deployable"
v-gl-tooltip="jobTooltip" v-gl-tooltip="jobTooltip"
......
<script> <script>
import { GlLink, GlDeprecatedBadge as GlBadge, GlTooltipDirective } from '@gitlab/ui'; import { GlLink, GlDeprecatedBadge as GlBadge, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import ReviewAppLink from '~/vue_merge_request_widget/components/review_app_link.vue'; import ReviewAppLink from '~/vue_merge_request_widget/components/review_app_link.vue';
export default { export default {
components: { components: {
Icon, GlIcon,
ReviewAppLink, ReviewAppLink,
GlBadge, GlBadge,
GlLink, GlLink,
...@@ -64,7 +63,7 @@ export default { ...@@ -64,7 +63,7 @@ export default {
environment.size environment.size
}}</gl-badge> }}</gl-badge>
</div> </div>
<icon <gl-icon
v-if="environment.within_folder" v-if="environment.within_folder"
v-gl-tooltip v-gl-tooltip
:title="$options.tooltips.information" :title="$options.tooltips.information"
......
<script> <script>
import { GlTooltipDirective, GlLink, GlButton } from '@gitlab/ui'; import { GlTooltipDirective, GlLink, GlButton, GlIcon } from '@gitlab/ui';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue'; import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue';
export default { export default {
components: { components: {
Icon, GlIcon,
ProjectAvatar, ProjectAvatar,
GlLink, GlLink,
GlButton, GlButton,
...@@ -54,7 +53,7 @@ export default { ...@@ -54,7 +53,7 @@ export default {
data-toggle="dropdown" data-toggle="dropdown"
:title="$options.moreActionsText" :title="$options.moreActionsText"
> >
<icon name="ellipsis_v" class="text-secondary" /> <gl-icon name="ellipsis_v" class="text-secondary" />
</button> </button>
<ul class="dropdown-menu dropdown-menu-right"> <ul class="dropdown-menu dropdown-menu-right">
<li> <li>
......
<script> <script>
import { uniqueId } from 'lodash'; import { uniqueId } from 'lodash';
import { GlLoadingIcon, GlButton } from '@gitlab/ui'; import { GlLoadingIcon, GlButton, GlIcon } from '@gitlab/ui';
import { __, s__ } from '~/locale'; import { __, s__ } from '~/locale';
import { dateInWords } from '~/lib/utils/datetime_utility'; import { dateInWords } from '~/lib/utils/datetime_utility';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
import popover from '~/vue_shared/directives/popover'; import popover from '~/vue_shared/directives/popover';
import Icon from '~/vue_shared/components/icon.vue';
import DatePicker from '~/vue_shared/components/pikaday.vue'; import DatePicker from '~/vue_shared/components/pikaday.vue';
import CollapsedCalendarIcon from '~/vue_shared/components/sidebar/collapsed_calendar_icon.vue'; import CollapsedCalendarIcon from '~/vue_shared/components/sidebar/collapsed_calendar_icon.vue';
import ToggleSidebar from '~/vue_shared/components/sidebar/toggle_sidebar.vue'; import ToggleSidebar from '~/vue_shared/components/sidebar/toggle_sidebar.vue';
...@@ -21,7 +20,7 @@ export default { ...@@ -21,7 +20,7 @@ export default {
popover, popover,
}, },
components: { components: {
Icon, GlIcon,
DatePicker, DatePicker,
CollapsedCalendarIcon, CollapsedCalendarIcon,
ToggleSidebar, ToggleSidebar,
...@@ -200,7 +199,12 @@ export default { ...@@ -200,7 +199,12 @@ export default {
{{ label }} {{ label }}
<gl-loading-icon v-if="dateSaveInProgress" :inline="true" /> <gl-loading-icon v-if="dateSaveInProgress" :inline="true" />
<div class="float-right d-flex"> <div class="float-right d-flex">
<icon v-popover="popoverOptions" name="question-o" class="help-icon gl-mr-2" tabindex="0" /> <gl-icon
v-popover="popoverOptions"
name="question-o"
class="help-icon gl-mr-2"
tabindex="0"
/>
<gl-button <gl-button
v-show="canUpdate && !editing" v-show="canUpdate && !editing"
ref="editButton" ref="editButton"
...@@ -241,7 +245,7 @@ export default { ...@@ -241,7 +245,7 @@ export default {
<span v-else class="d-flex value-content gl-ml-1"> <span v-else class="d-flex value-content gl-ml-1">
<template v-if="dateFixed"> <template v-if="dateFixed">
<span>{{ dateFixedWords }}</span> <span>{{ dateFixedWords }}</span>
<icon <gl-icon
v-if="isDateInvalid && selectedDateIsFixed" v-if="isDateInvalid && selectedDateIsFixed"
v-popover="dateInvalidPopoverOptions" v-popover="dateInvalidPopoverOptions"
name="warning" name="warning"
...@@ -280,7 +284,7 @@ export default { ...@@ -280,7 +284,7 @@ export default {
/> />
<span class="gl-ml-2">{{ __('Inherited:') }}</span> <span class="gl-ml-2">{{ __('Inherited:') }}</span>
<span class="value-content gl-ml-1">{{ dateFromMilestonesWords }}</span> <span class="value-content gl-ml-1">{{ dateFromMilestonesWords }}</span>
<icon <gl-icon
v-if="isDateInvalid && !selectedDateIsFixed" v-if="isDateInvalid && !selectedDateIsFixed"
v-popover="dateInvalidPopoverOptions" v-popover="dateInvalidPopoverOptions"
name="warning" name="warning"
......
...@@ -7,10 +7,10 @@ import { ...@@ -7,10 +7,10 @@ import {
GlLoadingIcon, GlLoadingIcon,
GlSprintf, GlSprintf,
GlLink, GlLink,
GlIcon,
} from '@gitlab/ui'; } from '@gitlab/ui';
import { s__, __, sprintf } from '~/locale'; import { s__, __, sprintf } from '~/locale';
import ModalCopyButton from '~/vue_shared/components/modal_copy_button.vue'; import ModalCopyButton from '~/vue_shared/components/modal_copy_button.vue';
import Icon from '~/vue_shared/components/icon.vue';
import Callout from '~/vue_shared/components/callout.vue'; import Callout from '~/vue_shared/components/callout.vue';
export default { export default {
...@@ -30,7 +30,7 @@ export default { ...@@ -30,7 +30,7 @@ export default {
GlFormInput, GlFormInput,
GlModal, GlModal,
ModalCopyButton, ModalCopyButton,
Icon, GlIcon,
Callout, Callout,
GlLoadingIcon, GlLoadingIcon,
GlSprintf, GlSprintf,
...@@ -217,7 +217,7 @@ export default { ...@@ -217,7 +217,7 @@ export default {
v-if="hasRotateError" v-if="hasRotateError"
class="text-danger d-flex align-items-center font-weight-normal mb-2" class="text-danger d-flex align-items-center font-weight-normal mb-2"
> >
<icon name="warning" class="mr-1" /> <gl-icon name="warning" class="mr-1" />
<span>{{ $options.instanceIdRegenerateError }}</span> <span>{{ $options.instanceIdRegenerateError }}</span>
</div> </div>
<callout <callout
......
<script> <script>
import { isEmpty } from 'lodash'; import { isEmpty } from 'lodash';
import { GlLoadingIcon, GlDeprecatedButton } from '@gitlab/ui'; import { GlLoadingIcon, GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import { deprecatedCreateFlash as createFlash } from '~/flash'; import { deprecatedCreateFlash as createFlash } from '~/flash';
/** /**
...@@ -31,7 +30,7 @@ export default { ...@@ -31,7 +30,7 @@ export default {
components: { components: {
GlDeprecatedButton, GlDeprecatedButton,
GlLoadingIcon, GlLoadingIcon,
Icon, GlIcon,
}, },
props: { props: {
endpoint: { endpoint: {
...@@ -172,7 +171,7 @@ export default { ...@@ -172,7 +171,7 @@ export default {
<template> <template>
<div> <div>
<div class="dropdown position-relative"> <div class="dropdown position-relative">
<icon name="search" class="seach-icon-input" /> <gl-icon name="search" class="seach-icon-input" />
<input <input
type="text" type="text"
...@@ -189,7 +188,7 @@ export default { ...@@ -189,7 +188,7 @@ export default {
class="js-clear-search-input btn-transparent clear-search-input position-right-0" class="js-clear-search-input btn-transparent clear-search-input position-right-0"
@click="clearInput" @click="clearInput"
> >
<icon name="clear" :aria-label="__('Clear input')" /> <gl-icon name="clear" :aria-label="__('Clear input')" />
</gl-deprecated-button> </gl-deprecated-button>
<div <div
......
<script> <script>
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import icon from '~/vue_shared/components/icon.vue';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
export default { export default {
components: { components: {
icon, GlIcon,
GlLoadingIcon, GlLoadingIcon,
}, },
directives: { directives: {
...@@ -42,7 +41,7 @@ export default { ...@@ -42,7 +41,7 @@ export default {
v-if="nodeDetailsLoading || node.nodeActionActive" v-if="nodeDetailsLoading || node.nodeActionActive"
class="node-details-loading gl-ml-3 inline" class="node-details-loading gl-ml-3 inline"
/> />
<icon <gl-icon
v-if="showNodeWarningIcon" v-if="showNodeWarningIcon"
v-tooltip v-tooltip
class="ml-2 text-warning-500" class="ml-2 text-warning-500"
......
<script> <script>
import { GlIcon } from '@gitlab/ui';
import { sprintf, s__, __ } from '~/locale'; import { sprintf, s__, __ } from '~/locale';
import { timeIntervalInWords } from '~/lib/utils/datetime_utility'; import { timeIntervalInWords } from '~/lib/utils/datetime_utility';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
import icon from '~/vue_shared/components/icon.vue';
import { TIME_DIFF } from '../constants'; import { TIME_DIFF } from '../constants';
export default { export default {
...@@ -11,7 +10,7 @@ export default { ...@@ -11,7 +10,7 @@ export default {
tooltip, tooltip,
}, },
components: { components: {
icon, GlIcon,
}, },
props: { props: {
syncStatusUnavailable: { syncStatusUnavailable: {
...@@ -122,7 +121,7 @@ export default { ...@@ -122,7 +121,7 @@ export default {
data-placement="bottom" data-placement="bottom"
> >
<strong data-testid="syncType">{{ syncType }}</strong> <strong data-testid="syncType">{{ syncType }}</strong>
<icon name="retry" class="ml-2" /> <gl-icon name="retry" class="ml-2" />
<span v-if="!eventTimestampEmpty" class="ml-2"> <span v-if="!eventTimestampEmpty" class="ml-2">
{{ syncStatusEventInfo }} {{ syncStatusEventInfo }}
</span> </span>
......
<script> <script>
import icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
export default { export default {
components: { components: {
icon, GlIcon,
}, },
props: { props: {
buttonTitle: { buttonTitle: {
...@@ -32,7 +32,7 @@ export default { ...@@ -32,7 +32,7 @@ export default {
<template> <template>
<button class="btn-link d-flex align-items-center" type="button" @click="onClickButton"> <button class="btn-link d-flex align-items-center" type="button" @click="onClickButton">
<icon :size="16" :name="toggleButtonIcon" /> <gl-icon :size="16" :name="toggleButtonIcon" />
<span class="gl-ml-3">{{ buttonTitle }}</span> <span class="gl-ml-3">{{ buttonTitle }}</span>
</button> </button>
</template> </template>
<script> <script>
import { GlIcon } from '@gitlab/ui';
import { STATUS_ICON_NAMES, STATUS_ICON_CLASS, DEFAULT_STATUS } from '../constants'; import { STATUS_ICON_NAMES, STATUS_ICON_CLASS, DEFAULT_STATUS } from '../constants';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
name: 'GeoReplicableStatus', name: 'GeoReplicableStatus',
components: { components: {
Icon, GlIcon,
}, },
props: { props: {
status: { status: {
...@@ -40,7 +40,7 @@ export default { ...@@ -40,7 +40,7 @@ export default {
<template> <template>
<div> <div>
<span class="d-flex align-items-center text-capitalize"> <span class="d-flex align-items-center text-capitalize">
<icon :name="icon.name" :class="icon.cssClass" class="mr-2" /> <gl-icon :name="icon.name" :class="icon.cssClass" class="mr-2" />
{{ status }} {{ status }}
</span> </span>
</div> </div>
......
<script> <script>
import { GlIcon } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
Icon, GlIcon,
}, },
props: { props: {
columns: { columns: {
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
class="header" class="header"
@click="onColumnClick(column.name)" @click="onColumnClick(column.name)"
> >
{{ column.text }} <icon :size="12" :name="getColumnSortIcon(column.name)" /> {{ column.text }} <gl-icon :size="12" :name="getColumnSortIcon(column.name)" />
</th> </th>
</tr> </tr>
</thead> </thead>
......
<script> <script>
import { GlLink } from '@gitlab/ui'; import { GlLink, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import { Cell, HeaderCell, InfoCell, DateCell } from '../cells'; import { Cell, HeaderCell, InfoCell, DateCell } from '../cells';
export default { export default {
name: 'LicenseCardBody', name: 'LicenseCardBody',
components: { components: {
Icon, GlIcon,
Cell, Cell,
HeaderCell, HeaderCell,
InfoCell, InfoCell,
...@@ -75,7 +74,7 @@ export default { ...@@ -75,7 +74,7 @@ export default {
v-if="isRemoving" v-if="isRemoving"
class="p-5 d-flex justify-content-center align-items-center license-card-loading" class="p-5 d-flex justify-content-center align-items-center license-card-loading"
> >
<icon name="spinner" /><span class="ml-2">{{ __('Removing license…') }}</span> <gl-icon name="spinner" /><span class="ml-2">{{ __('Removing license…') }}</span>
</div> </div>
<div v-else class="license-table js-license-table"> <div v-else class="license-table js-license-table">
......
<script> <script>
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import Cell from './cell.vue'; import Cell from './cell.vue';
export default { export default {
name: 'HeaderCell', name: 'HeaderCell',
components: { components: {
Icon, GlIcon,
Cell, Cell,
}, },
props: { props: {
...@@ -24,7 +24,7 @@ export default { ...@@ -24,7 +24,7 @@ export default {
<template> <template>
<cell class="license-header-cell" :is-flexible="false"> <cell class="license-header-cell" :is-flexible="false">
<template slot="title"> <template slot="title">
<icon class="icon" :name="icon" /> <gl-icon class="icon" :name="icon" />
<span class="ml-2 font-weight-bold">{{ title }}</span> <span class="ml-2 font-weight-bold">{{ title }}</span>
</template> </template>
</cell> </cell>
......
<script> <script>
import { GlPopover } from '@gitlab/ui'; import { GlPopover, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import Cell from './cell.vue'; import Cell from './cell.vue';
export default { export default {
name: 'InfoCell', name: 'InfoCell',
components: { components: {
Icon, GlIcon,
GlPopover, GlPopover,
Cell, Cell,
}, },
...@@ -44,7 +43,7 @@ export default { ...@@ -44,7 +43,7 @@ export default {
<span class="mr-2 text">{{ title }}</span> <span class="mr-2 text">{{ title }}</span>
<button ref="popoverTarget" type="button" class="btn-link information-target"> <button ref="popoverTarget" type="button" class="btn-link information-target">
<icon name="information" class="icon d-block" /> <gl-icon name="information" class="icon d-block" />
</button> </button>
<gl-popover <gl-popover
......
<script> <script>
import { GlDeprecatedButton, GlLink, GlTooltipDirective } from '@gitlab/ui'; import { GlDeprecatedButton, GlLink, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue'; import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue';
import { __ } from '~/locale'; import { __ } from '~/locale';
export default { export default {
components: { components: {
Icon, GlIcon,
ProjectAvatar, ProjectAvatar,
GlDeprecatedButton, GlDeprecatedButton,
GlLink, GlLink,
...@@ -70,7 +69,7 @@ export default { ...@@ -70,7 +69,7 @@ export default {
:title="title" :title="title"
@click="onRemove" @click="onRemove"
> >
<icon name="remove" /> <gl-icon name="remove" />
</gl-deprecated-button> </gl-deprecated-button>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters, mapActions, mapState } from 'vuex'; import { mapGetters, mapActions, mapState } from 'vuex';
import { GlTooltipDirective, GlLoadingIcon, GlDeprecatedButton } from '@gitlab/ui'; import { GlTooltipDirective, GlLoadingIcon, GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import TreeItemBody from './tree_item_body.vue'; import TreeItemBody from './tree_item_body.vue';
import { ChildType } from '../constants'; import { ChildType } from '../constants';
...@@ -14,7 +12,7 @@ import { ChildType } from '../constants'; ...@@ -14,7 +12,7 @@ import { ChildType } from '../constants';
export default { export default {
ChildType, ChildType,
components: { components: {
Icon, GlIcon,
TreeItemBody, TreeItemBody,
GlLoadingIcon, GlLoadingIcon,
GlDeprecatedButton, GlDeprecatedButton,
...@@ -96,7 +94,7 @@ export default { ...@@ -96,7 +94,7 @@ export default {
class="btn-svg btn-tree-item-chevron align-self-start" class="btn-svg btn-tree-item-chevron align-self-start"
@click="handleChevronClick" @click="handleChevronClick"
> >
<icon :name="chevronType" /> <gl-icon :name="chevronType" />
</gl-deprecated-button> </gl-deprecated-button>
<gl-loading-icon v-if="childrenFetchInProgress" class="loading-icon" size="sm" /> <gl-loading-icon v-if="childrenFetchInProgress" class="loading-icon" size="sm" />
<tree-item-body <tree-item-body
......
<script> <script>
import { GlPopover, GlProgressBar } from '@gitlab/ui'; import { GlPopover, GlProgressBar, GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import { generateKey } from '../utils/epic_utils'; import { generateKey } from '../utils/epic_utils';
import CommonMixin from '../mixins/common_mixin'; import CommonMixin from '../mixins/common_mixin';
...@@ -23,7 +22,7 @@ export default { ...@@ -23,7 +22,7 @@ export default {
cellWidth: TIMELINE_CELL_MIN_WIDTH, cellWidth: TIMELINE_CELL_MIN_WIDTH,
components: { components: {
CurrentDayIndicator, CurrentDayIndicator,
Icon, GlIcon,
GlPopover, GlPopover,
GlProgressBar, GlProgressBar,
}, },
...@@ -185,7 +184,7 @@ export default { ...@@ -185,7 +184,7 @@ export default {
aria-hidden="true" aria-hidden="true"
/> />
<div class="gl-font-sm d-flex align-items-center text-nowrap"> <div class="gl-font-sm d-flex align-items-center text-nowrap">
<icon class="gl-mr-1" :size="12" name="weight" /> <gl-icon class="gl-mr-1" :size="12" name="weight" />
<p class="m-0" :aria-label="epicWeightPercentageText">{{ epicWeightPercentage }}%</p> <p class="m-0" :aria-label="epicWeightPercentageText">{{ epicWeightPercentage }}%</p>
</div> </div>
</div> </div>
......
<script> <script>
import { GlDeprecatedDropdown, GlSearchBoxByType } from '@gitlab/ui'; import { GlDeprecatedDropdown, GlSearchBoxByType, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
GlDeprecatedDropdown, GlDeprecatedDropdown,
GlSearchBoxByType, GlSearchBoxByType,
Icon, GlIcon,
}, },
props: { props: {
filter: { filter: {
...@@ -83,7 +82,7 @@ export default { ...@@ -83,7 +82,7 @@ export default {
:aria-label="__('Close')" :aria-label="__('Close')"
@click="closeDropdown" @click="closeDropdown"
> >
<icon name="close" aria-hidden="true" class="vertical-align-middle" /> <gl-icon name="close" aria-hidden="true" class="vertical-align-middle" />
</button> </button>
</div> </div>
...@@ -108,7 +107,7 @@ export default { ...@@ -108,7 +107,7 @@ export default {
@click="clickFilter(option)" @click="clickFilter(option)"
> >
<span class="d-flex"> <span class="d-flex">
<icon <gl-icon
v-if="isSelected(option)" v-if="isSelected(option)"
class="flex-shrink-0 js-check" class="flex-shrink-0 js-check"
name="mobile-issue-close" name="mobile-issue-close"
......
<script> <script>
import { mapActions, mapState } from 'vuex'; import { mapActions, mapState } from 'vuex';
import { GlDeprecatedButton, GlFormCheckbox, GlSkeletonLoading, GlSprintf } from '@gitlab/ui'; import {
GlDeprecatedButton,
GlFormCheckbox,
GlSkeletonLoading,
GlSprintf,
GlIcon,
} from '@gitlab/ui';
import SeverityBadge from 'ee/vue_shared/security_reports/components/severity_badge.vue'; import SeverityBadge from 'ee/vue_shared/security_reports/components/severity_badge.vue';
import convertReportType from 'ee/vue_shared/security_reports/store/utils/convert_report_type'; import convertReportType from 'ee/vue_shared/security_reports/store/utils/convert_report_type';
import getPrimaryIdentifier from 'ee/vue_shared/security_reports/store/utils/get_primary_identifier'; import getPrimaryIdentifier from 'ee/vue_shared/security_reports/store/utils/get_primary_identifier';
import Icon from '~/vue_shared/components/icon.vue';
import VulnerabilityActionButtons from './vulnerability_action_buttons.vue'; import VulnerabilityActionButtons from './vulnerability_action_buttons.vue';
import VulnerabilityIssueLink from './vulnerability_issue_link.vue'; import VulnerabilityIssueLink from './vulnerability_issue_link.vue';
import { DASHBOARD_TYPES } from '../store/constants'; import { DASHBOARD_TYPES } from '../store/constants';
...@@ -16,7 +21,7 @@ export default { ...@@ -16,7 +21,7 @@ export default {
GlFormCheckbox, GlFormCheckbox,
GlSkeletonLoading, GlSkeletonLoading,
GlSprintf, GlSprintf,
Icon, GlIcon,
SeverityBadge, SeverityBadge,
VulnerabilityActionButtons, VulnerabilityActionButtons,
VulnerabilityIssueLink, VulnerabilityIssueLink,
...@@ -131,7 +136,7 @@ export default { ...@@ -131,7 +136,7 @@ export default {
>{{ vulnerability.name }}</gl-deprecated-button >{{ vulnerability.name }}</gl-deprecated-button
> >
<template v-if="isDismissed"> <template v-if="isDismissed">
<icon <gl-icon
v-show="vulnerability.dismissal_feedback.comment_details" v-show="vulnerability.dismissal_feedback.comment_details"
name="comment" name="comment"
class="text-warning vertical-align-middle" class="text-warning vertical-align-middle"
......
<script> <script>
import { GlDeprecatedBadge as GlBadge, GlTabs, GlTab, GlLink } from '@gitlab/ui'; import { GlDeprecatedBadge as GlBadge, GlTabs, GlTab, GlLink, GlIcon } from '@gitlab/ui';
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import Icon from '~/vue_shared/components/icon.vue';
import UnscannedProjectsTabContent from './unscanned_projects_tab_content.vue'; import UnscannedProjectsTabContent from './unscanned_projects_tab_content.vue';
export default { export default {
components: { GlBadge, GlTabs, GlTab, GlLink, Icon, UnscannedProjectsTabContent }, components: { GlBadge, GlTabs, GlTab, GlLink, GlIcon, UnscannedProjectsTabContent },
props: { props: {
endpoint: { endpoint: {
type: String, type: String,
...@@ -52,7 +50,7 @@ export default { ...@@ -52,7 +50,7 @@ export default {
:href="helpPath" :href="helpPath"
:title="__('Project scanning help page')" :title="__('Project scanning help page')"
target="_blank" target="_blank"
><icon name="question" :size="12" class="align-top" ><gl-icon name="question" :size="12" class="align-top"
/></gl-link> /></gl-link>
</h4> </h4>
<p class="text-secondary mb-0"> <p class="text-secondary mb-0">
......
<script> <script>
import { GlTooltipDirective } from '@gitlab/ui'; import { GlTooltipDirective, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
name: 'VulnerabilityIssueLink', name: 'VulnerabilityIssueLink',
components: { components: {
Icon, GlIcon,
}, },
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
...@@ -30,7 +29,7 @@ export default { ...@@ -30,7 +29,7 @@ export default {
<template> <template>
<div class="d-inline"> <div class="d-inline">
<icon <gl-icon
v-gl-tooltip v-gl-tooltip
name="issue-created" name="issue-created"
class="text-success vertical-align-middle" class="text-success vertical-align-middle"
......
...@@ -6,10 +6,9 @@ import { ...@@ -6,10 +6,9 @@ import {
} from 'ee/security_dashboard/store/modules/vulnerable_projects/constants'; } from 'ee/security_dashboard/store/modules/vulnerable_projects/constants';
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import { GlLink, GlTooltipDirective } from '@gitlab/ui'; import { GlLink, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { Accordion, AccordionItem } from 'ee/vue_shared/components/accordion'; import { Accordion, AccordionItem } from 'ee/vue_shared/components/accordion';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
css: { css: {
...@@ -30,7 +29,7 @@ export default { ...@@ -30,7 +29,7 @@ export default {
}, },
}, },
accordionItemsContentMaxHeight: '445px', accordionItemsContentMaxHeight: '445px',
components: { Accordion, AccordionItem, GlLink, Icon }, components: { Accordion, AccordionItem, GlLink, GlIcon },
directives: { directives: {
'gl-tooltip': GlTooltipDirective, 'gl-tooltip': GlTooltipDirective,
}, },
...@@ -82,7 +81,7 @@ export default { ...@@ -82,7 +81,7 @@ export default {
:href="helpPagePath" :href="helpPagePath"
:aria-label="__('Project security status help page')" :aria-label="__('Project security status help page')"
target="_blank" target="_blank"
><icon name="question" ><gl-icon name="question"
/></gl-link> /></gl-link>
</h4> </h4>
<p class="text-secondary gl-m-0"> <p class="text-secondary gl-m-0">
......
<script> <script>
import { GlLink, GlSprintf, GlModalDirective, GlButton } from '@gitlab/ui'; import { GlLink, GlSprintf, GlModalDirective, GlButton, GlIcon } from '@gitlab/ui';
import Project from './project.vue'; import Project from './project.vue';
import UsageGraph from './usage_graph.vue'; import UsageGraph from './usage_graph.vue';
import query from '../queries/storage.query.graphql'; import query from '../queries/storage.query.graphql';
import TemporaryStorageIncreaseModal from './temporary_storage_increase_modal.vue'; import TemporaryStorageIncreaseModal from './temporary_storage_increase_modal.vue';
import { numberToHumanSize } from '~/lib/utils/number_utils'; import { numberToHumanSize } from '~/lib/utils/number_utils';
import { parseBoolean } from '~/lib/utils/common_utils'; import { parseBoolean } from '~/lib/utils/common_utils';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
...@@ -14,7 +13,7 @@ export default { ...@@ -14,7 +13,7 @@ export default {
GlLink, GlLink,
GlButton, GlButton,
GlSprintf, GlSprintf,
Icon, GlIcon,
UsageGraph, UsageGraph,
TemporaryStorageIncreaseModal, TemporaryStorageIncreaseModal,
}, },
...@@ -111,7 +110,7 @@ export default { ...@@ -111,7 +110,7 @@ export default {
target="_blank" target="_blank"
:aria-label="s__('UsageQuota|Usage quotas help link')" :aria-label="s__('UsageQuota|Usage quotas help link')"
> >
<icon name="question" :size="12" /> <gl-icon name="question" :size="12" />
</gl-link> </gl-link>
</div> </div>
<div class="col-lg-6 text-lg-right"> <div class="col-lg-6 text-lg-right">
......
<script> <script>
import { GlDeprecatedButton, GlLink } from '@gitlab/ui'; import { GlDeprecatedButton, GlLink, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue'; import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue';
import { numberToHumanSize, isOdd } from '~/lib/utils/number_utils'; import { numberToHumanSize, isOdd } from '~/lib/utils/number_utils';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
...@@ -8,7 +7,7 @@ import StorageRow from './storage_row.vue'; ...@@ -8,7 +7,7 @@ import StorageRow from './storage_row.vue';
export default { export default {
components: { components: {
Icon, GlIcon,
GlDeprecatedButton, GlDeprecatedButton,
GlLink, GlLink,
ProjectAvatar, ProjectAvatar,
...@@ -93,7 +92,7 @@ export default { ...@@ -93,7 +92,7 @@ export default {
:aria-label="__('Toggle project')" :aria-label="__('Toggle project')"
@click="toggleProject" @click="toggleProject"
> >
<icon :name="iconName" class="folder-icon" /> <gl-icon :name="iconName" class="folder-icon" />
</gl-deprecated-button> </gl-deprecated-button>
<project-avatar :project="projectAvatar" :size="20" /> <project-avatar :project="projectAvatar" :size="20" />
......
<script> <script>
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
export default { export default {
components: { components: {
Icon, GlIcon,
}, },
props: { props: {
isFinished: { isFinished: {
...@@ -19,7 +19,7 @@ export default { ...@@ -19,7 +19,7 @@ export default {
</script> </script>
<template> <template>
<div class="d-flex"> <div class="d-flex">
<icon <gl-icon
v-show="isFinished" v-show="isFinished"
class="checkmark gl-mr-3" class="checkmark gl-mr-3"
:size="18" :size="18"
......
...@@ -35,7 +35,7 @@ exports[`MetricChart component template when isLoading is false and chartData is ...@@ -35,7 +35,7 @@ exports[`MetricChart component template when isLoading is false and chartData is
<span <span
class="d-flex" class="d-flex"
> >
<icon-stub <gl-icon-stub
aria-label="Selected" aria-label="Selected"
class="flex-shrink-0 gl-mr-2 invisible" class="flex-shrink-0 gl-mr-2 invisible"
name="mobile-issue-close" name="mobile-issue-close"
...@@ -54,7 +54,7 @@ exports[`MetricChart component template when isLoading is false and chartData is ...@@ -54,7 +54,7 @@ exports[`MetricChart component template when isLoading is false and chartData is
<span <span
class="d-flex" class="d-flex"
> >
<icon-stub <gl-icon-stub
aria-label="Selected" aria-label="Selected"
class="flex-shrink-0 gl-mr-2 invisible" class="flex-shrink-0 gl-mr-2 invisible"
name="mobile-issue-close" name="mobile-issue-close"
......
...@@ -49,7 +49,7 @@ exports[`MergeRequestTable component matches the snapshot 1`] = ` ...@@ -49,7 +49,7 @@ exports[`MergeRequestTable component matches the snapshot 1`] = `
<span <span
class="d-flex" class="d-flex"
> >
<icon-stub <gl-icon-stub
class="flex-shrink-0 gl-mr-2 invisible" class="flex-shrink-0 gl-mr-2 invisible"
name="mobile-issue-close" name="mobile-issue-close"
size="16" size="16"
...@@ -66,7 +66,7 @@ exports[`MergeRequestTable component matches the snapshot 1`] = ` ...@@ -66,7 +66,7 @@ exports[`MergeRequestTable component matches the snapshot 1`] = `
<span <span
class="d-flex" class="d-flex"
> >
<icon-stub <gl-icon-stub
class="flex-shrink-0 gl-mr-2" class="flex-shrink-0 gl-mr-2"
name="mobile-issue-close" name="mobile-issue-close"
size="16" size="16"
...@@ -83,7 +83,7 @@ exports[`MergeRequestTable component matches the snapshot 1`] = ` ...@@ -83,7 +83,7 @@ exports[`MergeRequestTable component matches the snapshot 1`] = `
<span <span
class="d-flex" class="d-flex"
> >
<icon-stub <gl-icon-stub
class="flex-shrink-0 gl-mr-2 invisible" class="flex-shrink-0 gl-mr-2 invisible"
name="mobile-issue-close" name="mobile-issue-close"
size="16" size="16"
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import MetricChart from 'ee/analytics/productivity_analytics/components/metric_chart.vue'; import MetricChart from 'ee/analytics/productivity_analytics/components/metric_chart.vue';
import { GlLoadingIcon, GlDeprecatedDropdown, GlDeprecatedDropdownItem, GlAlert } from '@gitlab/ui'; import {
import Icon from '~/vue_shared/components/icon.vue'; GlLoadingIcon,
GlDeprecatedDropdown,
GlDeprecatedDropdownItem,
GlAlert,
GlIcon,
} from '@gitlab/ui';
import httpStatusCodes from '~/lib/utils/http_status'; import httpStatusCodes from '~/lib/utils/http_status';
describe('MetricChart component', () => { describe('MetricChart component', () => {
...@@ -155,7 +160,7 @@ describe('MetricChart component', () => { ...@@ -155,7 +160,7 @@ describe('MetricChart component', () => {
expect( expect(
findMetricDropdownItems() findMetricDropdownItems()
.at(0) .at(0)
.find(Icon) .find(GlIcon)
.classes(), .classes(),
).toContain('invisible'); ).toContain('invisible');
}); });
......
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { createLocalVue, shallowMount } from '@vue/test-utils';
import Vuex from 'vuex'; import Vuex from 'vuex';
import { GlButton } from '@gitlab/ui'; import { GlButton, GlIcon } from '@gitlab/ui';
import MREditModule from 'ee/approvals/stores/modules/mr_edit'; import MREditModule from 'ee/approvals/stores/modules/mr_edit';
import { createStoreOptions } from 'ee/approvals/stores'; import { createStoreOptions } from 'ee/approvals/stores';
import RuleControls from 'ee/approvals/components/rule_controls.vue'; import RuleControls from 'ee/approvals/components/rule_controls.vue';
import Icon from '~/vue_shared/components/icon.vue';
const localVue = createLocalVue(); const localVue = createLocalVue();
localVue.use(Vuex); localVue.use(Vuex);
...@@ -12,7 +11,7 @@ localVue.use(Vuex); ...@@ -12,7 +11,7 @@ localVue.use(Vuex);
const TEST_RULE = { id: 10 }; const TEST_RULE = { id: 10 };
const findButtonLabel = button => { const findButtonLabel = button => {
const icon = button.find(Icon); const icon = button.find(GlIcon);
return icon.exists() ? icon.attributes('aria-label') : button.text(); return icon.exists() ? icon.attributes('aria-label') : button.text();
}; };
const hasLabel = (button, label) => findButtonLabel(button) === label; const hasLabel = (button, label) => findButtonLabel(button) === label;
......
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import Environments from 'ee/clusters/components/environments.vue'; import Environments from 'ee/clusters/components/environments.vue';
import { GlTable, GlEmptyState, GlLoadingIcon } from '@gitlab/ui'; import { GlTable, GlEmptyState, GlLoadingIcon, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import environments from './mock_data'; import environments from './mock_data';
describe('Environments', () => { describe('Environments', () => {
...@@ -102,7 +101,7 @@ describe('Environments', () => { ...@@ -102,7 +101,7 @@ describe('Environments', () => {
if (status !== 'loading' && instances.length === 0) { if (status !== 'loading' && instances.length === 0) {
const emptyState = tableRows.at(i).find('.deployments-empty'); const emptyState = tableRows.at(i).find('.deployments-empty');
const emptyStateIcon = emptyState.find(Icon); const emptyStateIcon = emptyState.find(GlIcon);
expect(emptyState.exists()).toBe(true); expect(emptyState.exists()).toBe(true);
expect(emptyStateIcon.exists()).toBe(true); expect(emptyStateIcon.exists()).toBe(true);
......
...@@ -132,7 +132,7 @@ exports[`Environment Header with environments grouped into a folder matches the ...@@ -132,7 +132,7 @@ exports[`Environment Header with environments grouped into a folder matches the
</gl-badge-stub> </gl-badge-stub>
</div> </div>
<icon-stub <gl-icon-stub
class="dashboard-card-icon" class="dashboard-card-icon"
name="information" name="information"
size="16" size="16"
......
...@@ -36,7 +36,7 @@ exports[`Environment matchs the snapshot 1`] = ` ...@@ -36,7 +36,7 @@ exports[`Environment matchs the snapshot 1`] = `
<div <div
class="branch-commit" class="branch-commit"
> >
<icon-stub <gl-icon-stub
name="work" name="work"
size="16" size="16"
/> />
......
...@@ -56,7 +56,7 @@ exports[`Project Header matches the snapshot 1`] = ` ...@@ -56,7 +56,7 @@ exports[`Project Header matches the snapshot 1`] = `
title="More actions" title="More actions"
type="button" type="button"
> >
<icon-stub <gl-icon-stub
class="text-secondary" class="text-secondary"
name="ellipsis_v" name="ellipsis_v"
size="16" size="16"
......
import { shallowMount, mount } from '@vue/test-utils'; import { shallowMount, mount } from '@vue/test-utils';
import { GlLink, GlDeprecatedBadge as GlBadge } from '@gitlab/ui'; import { GlLink, GlDeprecatedBadge as GlBadge, GlIcon } from '@gitlab/ui';
import component from 'ee/environments_dashboard/components/dashboard/environment_header.vue'; import component from 'ee/environments_dashboard/components/dashboard/environment_header.vue';
import Icon from '~/vue_shared/components/icon.vue';
import ReviewAppLink from '~/vue_merge_request_widget/components/review_app_link.vue'; import ReviewAppLink from '~/vue_merge_request_widget/components/review_app_link.vue';
describe('Environment Header', () => { describe('Environment Header', () => {
...@@ -69,8 +68,8 @@ describe('Environment Header', () => { ...@@ -69,8 +68,8 @@ describe('Environment Header', () => {
}); });
it('shows an icon stating the environment is one of many in a folder', () => { it('shows an icon stating the environment is one of many in a folder', () => {
expect(wrapper.find(Icon).attributes('name')).toBe('information'); expect(wrapper.find(GlIcon).attributes('name')).toBe('information');
expect(wrapper.find(Icon).attributes('title')).toMatch(/last updated environment/); expect(wrapper.find(GlIcon).attributes('title')).toMatch(/last updated environment/);
}); });
it('matches the snapshot', () => { it('matches the snapshot', () => {
......
...@@ -23,7 +23,7 @@ exports[`SidebarDatePicker renders expected template 1`] = ` ...@@ -23,7 +23,7 @@ exports[`SidebarDatePicker renders expected template 1`] = `
<div <div
class="float-right d-flex" class="float-right d-flex"
> >
<icon-stub <gl-icon-stub
class="help-icon gl-mr-2" class="help-icon gl-mr-2"
name="question-o" name="question-o"
size="16" size="16"
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { TEST_HOST } from 'helpers/test_constants'; import { TEST_HOST } from 'helpers/test_constants';
import SidebarDatepicker from 'ee/epic/components/sidebar_items/sidebar_date_picker.vue'; import SidebarDatepicker from 'ee/epic/components/sidebar_items/sidebar_date_picker.vue';
import { mockDatePickerProps } from '../../mock_data'; import { mockDatePickerProps } from '../../mock_data';
import Icon from '~/vue_shared/components/icon.vue';
import DatePicker from '~/vue_shared/components/pikaday.vue'; import DatePicker from '~/vue_shared/components/pikaday.vue';
import ToggleSidebar from '~/vue_shared/components/sidebar/toggle_sidebar.vue'; import ToggleSidebar from '~/vue_shared/components/sidebar/toggle_sidebar.vue';
import CollapsedCalendarIcon from '~/vue_shared/components/sidebar/collapsed_calendar_icon.vue'; import CollapsedCalendarIcon from '~/vue_shared/components/sidebar/collapsed_calendar_icon.vue';
...@@ -29,7 +28,7 @@ describe('SidebarDatePicker', () => { ...@@ -29,7 +28,7 @@ describe('SidebarDatePicker', () => {
const findIconByName = name => const findIconByName = name =>
wrapper wrapper
.findAll(Icon) .findAll(GlIcon)
.filter(w => w.props().name === name) .filter(w => w.props().name === name)
.at(0); .at(0);
const findEditButton = () => wrapper.find({ ref: 'editButton' }); const findEditButton = () => wrapper.find({ ref: 'editButton' });
......
...@@ -8,7 +8,7 @@ import { ...@@ -8,7 +8,7 @@ import {
STATUS_ICON_CLASS, STATUS_ICON_CLASS,
DEFAULT_STATUS, DEFAULT_STATUS,
} from 'ee/geo_replicable/constants'; } from 'ee/geo_replicable/constants';
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import { MOCK_REPLICABLE_TYPE } from '../mock_data'; import { MOCK_REPLICABLE_TYPE } from '../mock_data';
const localVue = createLocalVue(); const localVue = createLocalVue();
...@@ -34,7 +34,7 @@ describe('GeoReplicableStatus', () => { ...@@ -34,7 +34,7 @@ describe('GeoReplicableStatus', () => {
}); });
const findGeoReplicableStatusContainer = () => wrapper.find('div'); const findGeoReplicableStatusContainer = () => wrapper.find('div');
const findIcon = () => findGeoReplicableStatusContainer().find(Icon); const findIcon = () => findGeoReplicableStatusContainer().find(GlIcon);
describe('template', () => { describe('template', () => {
beforeEach(() => { beforeEach(() => {
......
...@@ -202,7 +202,7 @@ exports[`LicenseCardBody renders a loading state if isRemoving 1`] = ` ...@@ -202,7 +202,7 @@ exports[`LicenseCardBody renders a loading state if isRemoving 1`] = `
<div <div
class="p-5 d-flex justify-content-center align-items-center license-card-loading" class="p-5 d-flex justify-content-center align-items-center license-card-loading"
> >
<icon-stub <gl-icon-stub
name="spinner" name="spinner"
size="16" size="16"
/> />
......
...@@ -5,7 +5,7 @@ exports[`HeaderCell renders an inflexible cell with a title with an icon through ...@@ -5,7 +5,7 @@ exports[`HeaderCell renders an inflexible cell with a title with an icon through
class="license-header-cell" class="license-header-cell"
> >
<template> <template>
<icon-stub <gl-icon-stub
class="icon" class="icon"
name="retry" name="retry"
size="16" size="16"
......
...@@ -17,7 +17,7 @@ exports[`InfoCell renders a number value 1`] = ` ...@@ -17,7 +17,7 @@ exports[`InfoCell renders a number value 1`] = `
class="btn-link information-target" class="btn-link information-target"
type="button" type="button"
> >
<icon-stub <gl-icon-stub
class="icon d-block" class="icon d-block"
name="information" name="information"
size="16" size="16"
...@@ -51,7 +51,7 @@ exports[`InfoCell renders a title and string value with an info popover through ...@@ -51,7 +51,7 @@ exports[`InfoCell renders a title and string value with an info popover through
class="btn-link information-target" class="btn-link information-target"
type="button" type="button"
> >
<icon-stub <gl-icon-stub
class="icon d-block" class="icon d-block"
name="information" name="information"
size="16" size="16"
......
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex'; import Vuex from 'vuex';
import { GlDeprecatedButton, GlLoadingIcon } from '@gitlab/ui'; import { GlDeprecatedButton, GlLoadingIcon, GlIcon } from '@gitlab/ui';
import TreeItem from 'ee/related_items_tree/components/tree_item.vue'; import TreeItem from 'ee/related_items_tree/components/tree_item.vue';
import TreeItemBody from 'ee/related_items_tree/components/tree_item_body.vue'; import TreeItemBody from 'ee/related_items_tree/components/tree_item_body.vue';
...@@ -11,8 +11,6 @@ import * as epicUtils from 'ee/related_items_tree/utils/epic_utils'; ...@@ -11,8 +11,6 @@ import * as epicUtils from 'ee/related_items_tree/utils/epic_utils';
import { ChildType, treeItemChevronBtnClassName } from 'ee/related_items_tree/constants'; import { ChildType, treeItemChevronBtnClassName } from 'ee/related_items_tree/constants';
import { PathIdSeparator } from 'ee/related_issues/constants'; import { PathIdSeparator } from 'ee/related_issues/constants';
import Icon from '~/vue_shared/components/icon.vue';
import { mockParentItem, mockQueryResponse, mockEpic1 } from '../mock_data'; import { mockParentItem, mockQueryResponse, mockEpic1 } from '../mock_data';
const mockItem = { ...mockEpic1, type: ChildType.Epic, pathIdSeparator: PathIdSeparator.Epic }; const mockItem = { ...mockEpic1, type: ChildType.Epic, pathIdSeparator: PathIdSeparator.Epic };
...@@ -147,8 +145,8 @@ describe('RelatedItemsTree', () => { ...@@ -147,8 +145,8 @@ describe('RelatedItemsTree', () => {
}); });
it('renders expand/collapse icon', () => { it('renders expand/collapse icon', () => {
const expandedIcon = wrapperExpanded.find(Icon); const expandedIcon = wrapperExpanded.find(GlIcon);
const collapsedIcon = wrapperCollapsed.find(Icon); const collapsedIcon = wrapperCollapsed.find(GlIcon);
expect(expandedIcon.isVisible()).toBe(true); expect(expandedIcon.isVisible()).toBe(true);
expect(expandedIcon.props('name')).toBe('chevron-down'); expect(expandedIcon.props('name')).toBe('chevron-down');
......
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