Commit 3599a6c6 authored by Lukas Eipert's avatar Lukas Eipert

Utilize GitLab UI icon component: pipelines to vue_merge_request_widget

This replaces all the usages of ~/vue_shared/components/icon.vue with
the corresponding GitLab UI component for all components from pipelines
to vue_merge_request_widget (alphabetically).

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
<script> <script>
import { GlTooltipDirective, GlButton, GlLoadingIcon } from '@gitlab/ui'; import { GlTooltipDirective, GlButton, GlLoadingIcon, GlIcon } from '@gitlab/ui';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { dasherize } from '~/lib/utils/text_utility'; import { dasherize } from '~/lib/utils/text_utility';
import { __ } from '~/locale'; import { __ } from '~/locale';
import { deprecatedCreateFlash as createFlash } from '~/flash'; import { deprecatedCreateFlash as createFlash } from '~/flash';
import Icon from '~/vue_shared/components/icon.vue';
/** /**
* Renders either a cancel, retry or play icon button and handles the post request * Renders either a cancel, retry or play icon button and handles the post request
...@@ -18,7 +17,7 @@ import Icon from '~/vue_shared/components/icon.vue'; ...@@ -18,7 +17,7 @@ import Icon from '~/vue_shared/components/icon.vue';
*/ */
export default { export default {
components: { components: {
Icon, GlIcon,
GlButton, GlButton,
GlLoadingIcon, GlLoadingIcon,
}, },
...@@ -92,6 +91,6 @@ export default { ...@@ -92,6 +91,6 @@ export default {
@click="onClickAction" @click="onClickAction"
> >
<gl-loading-icon v-if="isLoading" class="js-action-icon-loading" /> <gl-loading-icon v-if="isLoading" class="js-action-icon-loading" />
<icon v-else :name="actionIcon" class="gl-mr-0!" /> <gl-icon v-else :name="actionIcon" class="gl-mr-0!" />
</gl-button> </gl-button>
</template> </template>
<script> <script>
import { isEqual } from 'lodash'; import { isEqual } from 'lodash';
import { GlIcon } from '@gitlab/ui';
import { __, s__ } from '~/locale'; import { __, s__ } from '~/locale';
import { deprecatedCreateFlash as createFlash } from '~/flash'; import { deprecatedCreateFlash as createFlash } from '~/flash';
import PipelinesService from '../../services/pipelines_service'; import PipelinesService from '../../services/pipelines_service';
...@@ -9,7 +10,6 @@ import NavigationTabs from '~/vue_shared/components/navigation_tabs.vue'; ...@@ -9,7 +10,6 @@ import NavigationTabs from '~/vue_shared/components/navigation_tabs.vue';
import NavigationControls from './nav_controls.vue'; import NavigationControls from './nav_controls.vue';
import { getParameterByName } from '~/lib/utils/common_utils'; import { getParameterByName } from '~/lib/utils/common_utils';
import CIPaginationMixin from '~/vue_shared/mixins/ci_pagination_api_mixin'; import CIPaginationMixin from '~/vue_shared/mixins/ci_pagination_api_mixin';
import Icon from '~/vue_shared/components/icon.vue';
import PipelinesFilteredSearch from './pipelines_filtered_search.vue'; import PipelinesFilteredSearch from './pipelines_filtered_search.vue';
import { validateParams } from '../../utils'; import { validateParams } from '../../utils';
import { ANY_TRIGGER_AUTHOR, RAW_TEXT_WARNING, FILTER_TAG_IDENTIFIER } from '../../constants'; import { ANY_TRIGGER_AUTHOR, RAW_TEXT_WARNING, FILTER_TAG_IDENTIFIER } from '../../constants';
...@@ -21,7 +21,7 @@ export default { ...@@ -21,7 +21,7 @@ export default {
NavigationTabs, NavigationTabs,
NavigationControls, NavigationControls,
PipelinesFilteredSearch, PipelinesFilteredSearch,
Icon, GlIcon,
}, },
mixins: [pipelinesMixin, CIPaginationMixin, glFeatureFlagsMixin()], mixins: [pipelinesMixin, CIPaginationMixin, glFeatureFlagsMixin()],
props: { props: {
...@@ -285,8 +285,8 @@ export default { ...@@ -285,8 +285,8 @@ export default {
v-if="shouldRenderTabs || shouldRenderButtons" v-if="shouldRenderTabs || shouldRenderButtons"
class="top-area scrolling-tabs-container inner-page-scroll-tabs" class="top-area scrolling-tabs-container inner-page-scroll-tabs"
> >
<div class="fade-left"><icon name="chevron-lg-left" :size="12" /></div> <div class="fade-left"><gl-icon name="chevron-lg-left" :size="12" /></div>
<div class="fade-right"><icon name="chevron-lg-right" :size="12" /></div> <div class="fade-right"><gl-icon name="chevron-lg-right" :size="12" /></div>
<navigation-tabs <navigation-tabs
v-if="shouldRenderTabs" v-if="shouldRenderTabs"
......
<script> <script>
import { GlTooltipDirective, GlButton, GlLoadingIcon } from '@gitlab/ui'; import { GlTooltipDirective, GlButton, GlLoadingIcon, GlIcon } from '@gitlab/ui';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { deprecatedCreateFlash as flash } from '~/flash'; import { deprecatedCreateFlash as flash } from '~/flash';
import { s__, __, sprintf } from '~/locale'; import { s__, __, sprintf } from '~/locale';
import GlCountdown from '~/vue_shared/components/gl_countdown.vue'; import GlCountdown from '~/vue_shared/components/gl_countdown.vue';
import Icon from '~/vue_shared/components/icon.vue';
import eventHub from '../../event_hub'; import eventHub from '../../event_hub';
export default { export default {
...@@ -12,7 +11,7 @@ export default { ...@@ -12,7 +11,7 @@ export default {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
}, },
components: { components: {
Icon, GlIcon,
GlCountdown, GlCountdown,
GlButton, GlButton,
GlLoadingIcon, GlLoadingIcon,
...@@ -87,7 +86,7 @@ export default { ...@@ -87,7 +86,7 @@ export default {
data-toggle="dropdown" data-toggle="dropdown"
:aria-label="__('Run manual or delayed jobs')" :aria-label="__('Run manual or delayed jobs')"
> >
<icon name="play" class="icon-play" /> <gl-icon name="play" class="icon-play" />
<i class="fa fa-caret-down" aria-hidden="true"></i> <i class="fa fa-caret-down" aria-hidden="true"></i>
<gl-loading-icon v-if="isLoading" /> <gl-loading-icon v-if="isLoading" />
</button> </button>
...@@ -104,7 +103,7 @@ export default { ...@@ -104,7 +103,7 @@ export default {
<div class="d-flex justify-content-between flex-wrap"> <div class="d-flex justify-content-between flex-wrap">
{{ action.name }} {{ action.name }}
<span v-if="action.scheduled_at"> <span v-if="action.scheduled_at">
<icon name="clock" /> <gl-icon name="clock" />
<gl-countdown :end-date-string="action.scheduled_at" /> <gl-countdown :end-date-string="action.scheduled_at" />
</span> </span>
</div> </div>
......
<script> <script>
/* eslint-disable @gitlab/vue-require-i18n-strings */ /* eslint-disable @gitlab/vue-require-i18n-strings */
import { GlLink, GlTooltipDirective } from '@gitlab/ui'; import { GlLink, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
}, },
components: { components: {
Icon, GlIcon,
GlLink, GlLink,
}, },
props: { props: {
...@@ -29,7 +28,7 @@ export default { ...@@ -29,7 +28,7 @@ export default {
data-toggle="dropdown" data-toggle="dropdown"
:aria-label="__('Artifacts')" :aria-label="__('Artifacts')"
> >
<icon name="download" /> <gl-icon name="download" />
<i class="fa fa-caret-down" aria-hidden="true"></i> <i class="fa fa-caret-down" aria-hidden="true"></i>
</button> </button>
<ul class="dropdown-menu dropdown-menu-right"> <ul class="dropdown-menu dropdown-menu-right">
......
...@@ -13,18 +13,17 @@ ...@@ -13,18 +13,17 @@
*/ */
import $ from 'jquery'; import $ from 'jquery';
import { GlLoadingIcon, GlTooltipDirective } from '@gitlab/ui'; import { GlLoadingIcon, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import { deprecatedCreateFlash as Flash } from '~/flash'; import { deprecatedCreateFlash as Flash } from '~/flash';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import eventHub from '../../event_hub'; import eventHub from '../../event_hub';
import Icon from '~/vue_shared/components/icon.vue';
import JobItem from '../graph/job_item.vue'; import JobItem from '../graph/job_item.vue';
import { PIPELINES_TABLE } from '../../constants'; import { PIPELINES_TABLE } from '../../constants';
export default { export default {
components: { components: {
Icon, GlIcon,
JobItem, JobItem,
GlLoadingIcon, GlLoadingIcon,
}, },
...@@ -170,7 +169,7 @@ export default { ...@@ -170,7 +169,7 @@ export default {
@click="onClickStage" @click="onClickStage"
> >
<span :aria-label="stage.title" aria-hidden="true" class="no-pointer-events"> <span :aria-label="stage.title" aria-hidden="true" class="no-pointer-events">
<icon :name="borderlessIcon" /> <gl-icon :name="borderlessIcon" />
</span> </span>
</button> </button>
......
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { GlTooltipDirective, GlFriendlyWrap } from '@gitlab/ui'; import { GlTooltipDirective, GlFriendlyWrap, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { __ } from '~/locale'; import { __ } from '~/locale';
import SmartVirtualList from '~/vue_shared/components/smart_virtual_list.vue'; import SmartVirtualList from '~/vue_shared/components/smart_virtual_list.vue';
export default { export default {
name: 'TestsSuiteTable', name: 'TestsSuiteTable',
components: { components: {
Icon, GlIcon,
SmartVirtualList, SmartVirtualList,
GlFriendlyWrap, GlFriendlyWrap,
}, },
...@@ -96,7 +95,7 @@ export default { ...@@ -96,7 +95,7 @@ export default {
class="add-border ci-status-icon d-flex align-items-center justify-content-end justify-content-md-center" class="add-border ci-status-icon d-flex align-items-center justify-content-end justify-content-md-center"
:class="`ci-status-icon-${testCase.status}`" :class="`ci-status-icon-${testCase.status}`"
> >
<icon :size="24" :name="testCase.icon" /> <gl-icon :size="24" :name="testCase.icon" />
</div> </div>
</div> </div>
</div> </div>
......
<script> <script>
import { GlDeprecatedButton, GlProgressBar } from '@gitlab/ui'; import { GlDeprecatedButton, GlProgressBar, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import { formattedTime } from '../../stores/test_reports/utils'; import { formattedTime } from '../../stores/test_reports/utils';
export default { export default {
...@@ -9,7 +8,7 @@ export default { ...@@ -9,7 +8,7 @@ export default {
components: { components: {
GlDeprecatedButton, GlDeprecatedButton,
GlProgressBar, GlProgressBar,
Icon, GlIcon,
}, },
props: { props: {
report: { report: {
...@@ -75,7 +74,7 @@ export default { ...@@ -75,7 +74,7 @@ export default {
class="gl-mr-3 js-back-button" class="gl-mr-3 js-back-button"
@click="onBackClick" @click="onBackClick"
> >
<icon name="angle-left" /> <gl-icon name="angle-left" />
</gl-deprecated-button> </gl-deprecated-button>
<h4>{{ heading }}</h4> <h4>{{ heading }}</h4>
......
<script> <script>
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import { GlLink, GlLoadingIcon } from '@gitlab/ui'; import { GlLink, GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { sprintf, n__, s__ } from '~/locale'; import { sprintf, n__, s__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import RelatedIssuableItem from '~/vue_shared/components/issue/related_issuable_item.vue'; import RelatedIssuableItem from '~/vue_shared/components/issue/related_issuable_item.vue';
import { parseIssuableData } from '../../issue_show/utils/parse_data'; import { parseIssuableData } from '../../issue_show/utils/parse_data';
export default { export default {
name: 'RelatedMergeRequests', name: 'RelatedMergeRequests',
components: { components: {
Icon, GlIcon,
GlLink, GlLink,
GlLoadingIcon, GlLoadingIcon,
RelatedIssuableItem, RelatedIssuableItem,
...@@ -85,7 +84,7 @@ export default { ...@@ -85,7 +84,7 @@ export default {
<div class="mr-count-badge gl-display-inline-flex"> <div class="mr-count-badge gl-display-inline-flex">
<div class="mr-count-badge-count"> <div class="mr-count-badge-count">
<svg class="s16 mr-1 text-secondary"> <svg class="s16 mr-1 text-secondary">
<icon name="merge-request" class="mr-1 text-secondary" /> <gl-icon name="merge-request" class="mr-1 text-secondary" />
</svg> </svg>
<span class="js-items-count">{{ totalCount }}</span> <span class="js-items-count">{{ totalCount }}</span>
</div> </div>
......
<script> <script>
import { GlTooltipDirective, GlLink, GlButton, GlCollapse, GlIcon, GlBadge } from '@gitlab/ui'; import { GlTooltipDirective, GlLink, GlButton, GlCollapse, GlIcon, GlBadge } from '@gitlab/ui';
import { difference, get } from 'lodash'; import { difference, get } from 'lodash';
import Icon from '~/vue_shared/components/icon.vue';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { ASSET_LINK_TYPE } from '../constants'; import { ASSET_LINK_TYPE } from '../constants';
import { __, s__, sprintf } from '~/locale'; import { __, s__, sprintf } from '~/locale';
...@@ -13,7 +12,6 @@ export default { ...@@ -13,7 +12,6 @@ export default {
GlButton, GlButton,
GlCollapse, GlCollapse,
GlIcon, GlIcon,
Icon,
GlBadge, GlBadge,
}, },
directives: { directives: {
...@@ -157,7 +155,7 @@ export default { ...@@ -157,7 +155,7 @@ export default {
<ul v-if="assets.links.length" class="pl-0 mb-0 gl-mt-3 list-unstyled js-assets-list"> <ul v-if="assets.links.length" class="pl-0 mb-0 gl-mt-3 list-unstyled js-assets-list">
<li v-for="link in assets.links" :key="link.name" class="gl-mb-3"> <li v-for="link in assets.links" :key="link.name" class="gl-mb-3">
<gl-link v-gl-tooltip.bottom :title="__('Download asset')" :href="link.directAssetUrl"> <gl-link v-gl-tooltip.bottom :title="__('Download asset')" :href="link.directAssetUrl">
<icon name="package" class="align-middle gl-mr-2 align-text-bottom" /> <gl-icon name="package" class="align-middle gl-mr-2 align-text-bottom" />
{{ link.name }} {{ link.name }}
<span v-if="link.external" data-testid="external-link-indicator">{{ <span v-if="link.external" data-testid="external-link-indicator">{{
__('(external source)') __('(external source)')
...@@ -174,9 +172,9 @@ export default { ...@@ -174,9 +172,9 @@ export default {
aria-haspopup="true" aria-haspopup="true"
aria-expanded="false" aria-expanded="false"
> >
<icon name="doc-code" class="align-top gl-mr-2" /> <gl-icon name="doc-code" class="align-top gl-mr-2" />
{{ __('Source code') }} {{ __('Source code') }}
<icon name="chevron-down" /> <gl-icon name="chevron-down" />
</button> </button>
<div class="js-sources-dropdown dropdown-menu"> <div class="js-sources-dropdown dropdown-menu">
......
<script> <script>
import { GlTooltipDirective, GlLink } from '@gitlab/ui'; import { GlTooltipDirective, GlLink, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
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 timeagoMixin from '~/vue_shared/mixins/timeago'; import timeagoMixin from '~/vue_shared/mixins/timeago';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
...@@ -8,7 +7,7 @@ import { __, sprintf } from '~/locale'; ...@@ -8,7 +7,7 @@ import { __, sprintf } from '~/locale';
export default { export default {
name: 'ReleaseBlockFooter', name: 'ReleaseBlockFooter',
components: { components: {
Icon, GlIcon,
GlLink, GlLink,
UserAvatarLink, UserAvatarLink,
}, },
...@@ -68,7 +67,7 @@ export default { ...@@ -68,7 +67,7 @@ export default {
<template> <template>
<div> <div>
<div v-if="commit" class="float-left mr-3 d-flex align-items-center js-commit-info"> <div v-if="commit" class="float-left mr-3 d-flex align-items-center js-commit-info">
<icon ref="commitIcon" name="commit" class="mr-1" /> <gl-icon ref="commitIcon" name="commit" class="mr-1" />
<div v-gl-tooltip.bottom :title="commit.title"> <div v-gl-tooltip.bottom :title="commit.title">
<gl-link v-if="commitPath" :href="commitPath"> <gl-link v-if="commitPath" :href="commitPath">
{{ commit.shortId }} {{ commit.shortId }}
...@@ -78,7 +77,7 @@ export default { ...@@ -78,7 +77,7 @@ export default {
</div> </div>
<div v-if="tagName" class="float-left mr-3 d-flex align-items-center js-tag-info"> <div v-if="tagName" class="float-left mr-3 d-flex align-items-center js-tag-info">
<icon name="tag" class="mr-1" /> <gl-icon name="tag" class="mr-1" />
<div v-gl-tooltip.bottom :title="__('Tag')"> <div v-gl-tooltip.bottom :title="__('Tag')">
<gl-link v-if="tagPath" :href="tagPath"> <gl-link v-if="tagPath" :href="tagPath">
{{ tagName }} {{ tagName }}
......
<script> <script>
import { GlTooltipDirective, GlLink, GlBadge, GlButton } from '@gitlab/ui'; import { GlTooltipDirective, GlLink, GlBadge, GlButton, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { BACK_URL_PARAM } from '~/releases/constants'; import { BACK_URL_PARAM } from '~/releases/constants';
import { setUrlParams } from '~/lib/utils/url_utility'; import { setUrlParams } from '~/lib/utils/url_utility';
...@@ -9,7 +8,7 @@ export default { ...@@ -9,7 +8,7 @@ export default {
components: { components: {
GlLink, GlLink,
GlBadge, GlBadge,
Icon, GlIcon,
GlButton, GlButton,
}, },
directives: { directives: {
...@@ -60,7 +59,7 @@ export default { ...@@ -60,7 +59,7 @@ export default {
:title="__('Edit this release')" :title="__('Edit this release')"
:href="editLink" :href="editLink"
> >
<icon name="pencil" /> <gl-icon name="pencil" />
</gl-button> </gl-button>
</div> </div>
</template> </template>
<script> <script>
import { GlTooltipDirective, GlLink } from '@gitlab/ui'; import { GlTooltipDirective, GlLink, GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, 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 ReleaseBlockAuthor from './release_block_author.vue'; import ReleaseBlockAuthor from './release_block_author.vue';
import ReleaseBlockMilestones from './release_block_milestones.vue'; import ReleaseBlockMilestones from './release_block_milestones.vue';
...@@ -9,7 +8,7 @@ import ReleaseBlockMilestones from './release_block_milestones.vue'; ...@@ -9,7 +8,7 @@ import ReleaseBlockMilestones from './release_block_milestones.vue';
export default { export default {
name: 'ReleaseBlockMetadata', name: 'ReleaseBlockMetadata',
components: { components: {
Icon, GlIcon,
GlLink, GlLink,
ReleaseBlockAuthor, ReleaseBlockAuthor,
ReleaseBlockMilestones, ReleaseBlockMilestones,
...@@ -58,7 +57,7 @@ export default { ...@@ -58,7 +57,7 @@ export default {
<template> <template>
<div class="card-subtitle d-flex flex-wrap text-secondary"> <div class="card-subtitle d-flex flex-wrap text-secondary">
<div class="gl-mr-3"> <div class="gl-mr-3">
<icon name="commit" class="align-middle" /> <gl-icon name="commit" class="align-middle" />
<gl-link v-if="commitUrl" v-gl-tooltip.bottom :title="commit.title" :href="commitUrl"> <gl-link v-if="commitUrl" v-gl-tooltip.bottom :title="commit.title" :href="commitUrl">
{{ commit.shortId }} {{ commit.shortId }}
</gl-link> </gl-link>
...@@ -66,7 +65,7 @@ export default { ...@@ -66,7 +65,7 @@ export default {
</div> </div>
<div class="gl-mr-3"> <div class="gl-mr-3">
<icon name="tag" class="align-middle" /> <gl-icon name="tag" class="align-middle" />
<gl-link v-if="tagUrl" v-gl-tooltip.bottom :title="__('Tag')" :href="tagUrl"> <gl-link v-if="tagUrl" v-gl-tooltip.bottom :title="__('Tag')" :href="tagUrl">
{{ release.tagName }} {{ release.tagName }}
</gl-link> </gl-link>
......
<script> <script>
import { GlTooltipDirective, GlLink } from '@gitlab/ui'; import { GlTooltipDirective, GlLink, GlIcon } from '@gitlab/ui';
import { n__ } from '~/locale'; import { n__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
name: 'ReleaseBlockMilestones', name: 'ReleaseBlockMilestones',
components: { components: {
GlLink, GlLink,
Icon, GlIcon,
}, },
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
...@@ -29,7 +28,7 @@ export default { ...@@ -29,7 +28,7 @@ export default {
<template> <template>
<div> <div>
<div class="js-milestone-list-label"> <div class="js-milestone-list-label">
<icon name="flag" class="align-middle" /> <gl-icon name="flag" class="align-middle" />
<span class="js-label-text">{{ labelText }}</span> <span class="js-label-text">{{ labelText }}</span>
</div> </div>
......
<script> <script>
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import { STATUS_FAILED, STATUS_NEUTRAL, STATUS_SUCCESS } from '../constants'; import { STATUS_FAILED, STATUS_NEUTRAL, STATUS_SUCCESS } from '../constants';
export default { export default {
name: 'IssueStatusIcon', name: 'IssueStatusIcon',
components: { components: {
Icon, GlIcon,
}, },
props: { props: {
status: { status: {
...@@ -49,6 +49,6 @@ export default { ...@@ -49,6 +49,6 @@ export default {
}" }"
class="report-block-list-icon" class="report-block-list-icon"
> >
<icon :name="iconName" :size="statusIconSize" :data-qa-selector="`status_${status}_icon`" /> <gl-icon :name="iconName" :size="statusIconSize" :data-qa-selector="`status_${status}_icon`" />
</div> </div>
</template> </template>
...@@ -4,10 +4,10 @@ import { ...@@ -4,10 +4,10 @@ import {
GlDeprecatedDropdownDivider, GlDeprecatedDropdownDivider,
GlDeprecatedDropdownHeader, GlDeprecatedDropdownHeader,
GlDeprecatedDropdownItem, GlDeprecatedDropdownItem,
GlIcon,
} from '@gitlab/ui'; } from '@gitlab/ui';
import { joinPaths, escapeFileUrl } from '~/lib/utils/url_utility'; import { joinPaths, escapeFileUrl } from '~/lib/utils/url_utility';
import { __ } from '../../locale'; import { __ } from '../../locale';
import Icon from '../../vue_shared/components/icon.vue';
import getRefMixin from '../mixins/get_ref'; import getRefMixin from '../mixins/get_ref';
import projectShortPathQuery from '../queries/project_short_path.query.graphql'; import projectShortPathQuery from '../queries/project_short_path.query.graphql';
import projectPathQuery from '../queries/project_path.query.graphql'; import projectPathQuery from '../queries/project_path.query.graphql';
...@@ -24,7 +24,7 @@ export default { ...@@ -24,7 +24,7 @@ export default {
GlDeprecatedDropdownDivider, GlDeprecatedDropdownDivider,
GlDeprecatedDropdownHeader, GlDeprecatedDropdownHeader,
GlDeprecatedDropdownItem, GlDeprecatedDropdownItem,
Icon, GlIcon,
}, },
apollo: { apollo: {
projectShortPath: { projectShortPath: {
...@@ -249,8 +249,8 @@ export default { ...@@ -249,8 +249,8 @@ export default {
<gl-deprecated-dropdown toggle-class="add-to-tree qa-add-to-tree ml-1"> <gl-deprecated-dropdown toggle-class="add-to-tree qa-add-to-tree ml-1">
<template #button-content> <template #button-content>
<span class="sr-only">{{ __('Add to tree') }}</span> <span class="sr-only">{{ __('Add to tree') }}</span>
<icon name="plus" :size="16" class="float-left" /> <gl-icon name="plus" :size="16" class="float-left" />
<icon name="chevron-down" :size="16" class="float-left" /> <gl-icon name="chevron-down" :size="16" class="float-left" />
</template> </template>
<template v-for="(item, i) in dropdownItems"> <template v-for="(item, i) in dropdownItems">
<component :is="getComponent(item.type)" :key="i" v-bind="item.attrs"> <component :is="getComponent(item.type)" :key="i" v-bind="item.attrs">
......
<script> <script>
import { GlTooltipDirective, GlLink, GlDeprecatedButton, GlLoadingIcon } from '@gitlab/ui'; import { GlTooltipDirective, GlLink, GlDeprecatedButton, GlLoadingIcon, GlIcon } from '@gitlab/ui';
import defaultAvatarUrl from 'images/no_avatar.png'; import defaultAvatarUrl from 'images/no_avatar.png';
import { sprintf, s__ } from '~/locale'; import { sprintf, s__ } from '~/locale';
import Icon from '../../vue_shared/components/icon.vue';
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 TimeagoTooltip from '../../vue_shared/components/time_ago_tooltip.vue'; import TimeagoTooltip from '../../vue_shared/components/time_ago_tooltip.vue';
import CiIcon from '../../vue_shared/components/ci_icon.vue'; import CiIcon from '../../vue_shared/components/ci_icon.vue';
...@@ -13,7 +12,7 @@ import pathLastCommitQuery from '../queries/path_last_commit.query.graphql'; ...@@ -13,7 +12,7 @@ import pathLastCommitQuery from '../queries/path_last_commit.query.graphql';
export default { export default {
components: { components: {
Icon, GlIcon,
UserAvatarLink, UserAvatarLink,
TimeagoTooltip, TimeagoTooltip,
ClipboardButton, ClipboardButton,
...@@ -130,7 +129,7 @@ export default { ...@@ -130,7 +129,7 @@ export default {
class="text-expander" class="text-expander"
@click="toggleShowDescription" @click="toggleShowDescription"
> >
<icon name="ellipsis_h" :size="10" /> <gl-icon name="ellipsis_h" :size="10" />
</gl-deprecated-button> </gl-deprecated-button>
<div class="committer"> <div class="committer">
<gl-link <gl-link
......
<script> <script>
import $ from 'jquery'; import $ from 'jquery';
import GfmAutoComplete from 'ee_else_ce/gfm_auto_complete'; import GfmAutoComplete from 'ee_else_ce/gfm_auto_complete';
import { GlModal, GlTooltipDirective } from '@gitlab/ui'; import { GlModal, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { deprecatedCreateFlash as createFlash } from '~/flash'; import { deprecatedCreateFlash as createFlash } from '~/flash';
import Icon from '~/vue_shared/components/icon.vue';
import { __, s__ } from '~/locale'; import { __, s__ } from '~/locale';
import Api from '~/api'; import Api from '~/api';
import eventHub from './event_hub'; import eventHub from './event_hub';
...@@ -14,7 +13,7 @@ const emojiMenuClass = 'js-modal-status-emoji-menu'; ...@@ -14,7 +13,7 @@ const emojiMenuClass = 'js-modal-status-emoji-menu';
export default { export default {
components: { components: {
Icon, GlIcon,
GlModal, GlModal,
}, },
directives: { directives: {
...@@ -196,9 +195,9 @@ export default { ...@@ -196,9 +195,9 @@ export default {
v-show="noEmoji" v-show="noEmoji"
class="js-no-emoji-placeholder no-emoji-placeholder position-relative" class="js-no-emoji-placeholder no-emoji-placeholder position-relative"
> >
<icon name="slight-smile" class="award-control-icon-neutral" /> <gl-icon name="slight-smile" class="award-control-icon-neutral" />
<icon name="smiley" class="award-control-icon-positive" /> <gl-icon name="smiley" class="award-control-icon-positive" />
<icon name="smile" class="award-control-icon-super-positive" /> <gl-icon name="smile" class="award-control-icon-super-positive" />
</span> </span>
</button> </button>
</span> </span>
...@@ -223,7 +222,7 @@ export default { ...@@ -223,7 +222,7 @@ export default {
class="js-clear-user-status-button clear-user-status btn" class="js-clear-user-status-button clear-user-status btn"
@click="clearStatusInputs()" @click="clearStatusInputs()"
> >
<icon name="close" /> <gl-icon name="close" />
</button> </button>
</span> </span>
</div> </div>
......
<script> <script>
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import { GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
import Icon from '~/vue_shared/components/icon.vue';
import eventHub from '~/sidebar/event_hub'; import eventHub from '~/sidebar/event_hub';
import EditForm from './edit_form.vue'; import EditForm from './edit_form.vue';
export default { export default {
components: { components: {
EditForm, EditForm,
Icon, GlIcon,
}, },
directives: { directives: {
tooltip, tooltip,
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
data-boundary="viewport" data-boundary="viewport"
@click="toggleForm" @click="toggleForm"
> >
<icon :name="confidentialityIcon" aria-hidden="true" /> <gl-icon :name="confidentialityIcon" aria-hidden="true" />
</div> </div>
<div class="title hide-collapsed"> <div class="title hide-collapsed">
{{ __('Confidentiality') }} {{ __('Confidentiality') }}
...@@ -105,11 +105,11 @@ export default { ...@@ -105,11 +105,11 @@ export default {
:issuable-type="issuableType" :issuable-type="issuableType"
/> />
<div v-if="!confidential" class="no-value sidebar-item-value" data-testid="not-confidential"> <div v-if="!confidential" class="no-value sidebar-item-value" data-testid="not-confidential">
<icon :size="16" name="eye" aria-hidden="true" class="sidebar-item-icon inline" /> <gl-icon :size="16" name="eye" aria-hidden="true" class="sidebar-item-icon inline" />
{{ __('Not confidential') }} {{ __('Not confidential') }}
</div> </div>
<div v-else class="value sidebar-item-value hide-collapsed"> <div v-else class="value sidebar-item-value hide-collapsed">
<icon <gl-icon
:size="16" :size="16"
name="eye-slash" name="eye-slash"
aria-hidden="true" aria-hidden="true"
......
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { GlIcon } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
import Icon from '~/vue_shared/components/icon.vue';
import eventHub from '~/sidebar/event_hub'; import eventHub from '~/sidebar/event_hub';
import editForm from './edit_form.vue'; import editForm from './edit_form.vue';
...@@ -22,7 +22,7 @@ export default { ...@@ -22,7 +22,7 @@ export default {
}, },
components: { components: {
editForm, editForm,
Icon, GlIcon,
}, },
directives: { directives: {
...@@ -88,7 +88,7 @@ export default { ...@@ -88,7 +88,7 @@ export default {
data-boundary="viewport" data-boundary="viewport"
@click="toggleForm" @click="toggleForm"
> >
<icon :name="lockStatus.icon" class="sidebar-item-icon is-active" /> <gl-icon :name="lockStatus.icon" class="sidebar-item-icon is-active" />
</div> </div>
<div class="title hide-collapsed"> <div class="title hide-collapsed">
...@@ -116,7 +116,7 @@ export default { ...@@ -116,7 +116,7 @@ export default {
/> />
<div data-testid="lock-status" class="sidebar-item-value" :class="lockStatus.class"> <div data-testid="lock-status" class="sidebar-item-value" :class="lockStatus.class">
<icon <gl-icon
:size="16" :size="16"
:name="lockStatus.icon" :name="lockStatus.icon"
class="sidebar-item-icon" class="sidebar-item-icon"
......
<script> <script>
import { GlIcon } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Tracking from '~/tracking'; import Tracking from '~/tracking';
import icon from '~/vue_shared/components/icon.vue';
import toggleButton from '~/vue_shared/components/toggle_button.vue'; import toggleButton from '~/vue_shared/components/toggle_button.vue';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
import eventHub from '../../event_hub'; import eventHub from '../../event_hub';
...@@ -16,7 +16,7 @@ export default { ...@@ -16,7 +16,7 @@ export default {
tooltip, tooltip,
}, },
components: { components: {
icon, GlIcon,
toggleButton, toggleButton,
}, },
mixins: [Tracking.mixin({ label: 'right_sidebar' })], mixins: [Tracking.mixin({ label: 'right_sidebar' })],
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
data-boundary="viewport" data-boundary="viewport"
@click="onClickCollapsedIcon" @click="onClickCollapsedIcon"
> >
<icon <gl-icon
:name="notificationIcon" :name="notificationIcon"
:size="16" :size="16"
aria-hidden="true" aria-hidden="true"
......
<script> <script>
import { GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
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 {
name: 'TimeTrackingCollapsedState', name: 'TimeTrackingCollapsedState',
components: { components: {
icon, GlIcon,
}, },
directives: { directives: {
tooltip, tooltip,
...@@ -105,7 +105,7 @@ export default { ...@@ -105,7 +105,7 @@ export default {
data-placement="left" data-placement="left"
data-boundary="viewport" data-boundary="viewport"
> >
<icon name="timer" /> <gl-icon name="timer" />
<div class="time-tracking-collapsed-summary"> <div class="time-tracking-collapsed-summary">
<div :class="divClass"> <div :class="divClass">
<span :class="spanClass"> {{ text }} </span> <span :class="spanClass"> {{ text }} </span>
......
<script> <script>
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
import Icon from '~/vue_shared/components/icon.vue';
const MARK_TEXT = __('Mark as done'); const MARK_TEXT = __('Mark as done');
const TODO_TEXT = __('Add a To-Do'); const TODO_TEXT = __('Add a To-Do');
...@@ -13,7 +11,7 @@ export default { ...@@ -13,7 +11,7 @@ export default {
tooltip, tooltip,
}, },
components: { components: {
Icon, GlIcon,
GlLoadingIcon, GlLoadingIcon,
}, },
props: { props: {
...@@ -85,7 +83,7 @@ export default { ...@@ -85,7 +83,7 @@ export default {
data-boundary="viewport" data-boundary="viewport"
@click="handleButtonClick" @click="handleButtonClick"
> >
<icon <gl-icon
v-show="collapsedButtonIconVisible" v-show="collapsedButtonIconVisible"
:class="collapsedButtonIconClasses" :class="collapsedButtonIconClasses"
:name="collapsedButtonIcon" :name="collapsedButtonIcon"
......
<script> <script>
import { GlTooltipDirective, GlLink } from '@gitlab/ui'; import { GlTooltipDirective, GlLink, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
GlLink, GlLink,
Icon, GlIcon,
}, },
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
...@@ -35,7 +34,7 @@ export default { ...@@ -35,7 +34,7 @@ export default {
target="_blank" target="_blank"
class="d-flex-center pl-1" class="d-flex-center pl-1"
> >
<icon name="question" /> <gl-icon name="question" />
</gl-link> </gl-link>
</div> </div>
</template> </template>
<script> <script>
import { GlButton, GlLoadingIcon } from '@gitlab/ui'; import { GlButton, GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
GlButton, GlButton,
GlLoadingIcon, GlLoadingIcon,
Icon, GlIcon,
}, },
props: { props: {
title: { title: {
...@@ -66,7 +65,7 @@ export default { ...@@ -66,7 +65,7 @@ export default {
@click="toggleCollapsed" @click="toggleCollapsed"
> >
<gl-loading-icon v-if="isLoading" /> <gl-loading-icon v-if="isLoading" />
<icon v-else :name="arrowIconName" class="js-icon" /> <gl-icon v-else :name="arrowIconName" class="js-icon" />
</button> </button>
<gl-button <gl-button
variant="link" variant="link"
......
<script> <script>
import { GlLink } from '@gitlab/ui'; import { GlLink, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { WARNING, DANGER, WARNING_MESSAGE_CLASS, DANGER_MESSAGE_CLASS } from '../constants'; import { WARNING, DANGER, WARNING_MESSAGE_CLASS, DANGER_MESSAGE_CLASS } from '../constants';
export default { export default {
name: 'MrWidgetAlertMessage', name: 'MrWidgetAlertMessage',
components: { components: {
GlLink, GlLink,
Icon, GlIcon,
}, },
props: { props: {
type: { type: {
...@@ -40,7 +39,7 @@ export default { ...@@ -40,7 +39,7 @@ export default {
<div class="m-3 ml-7" :class="messageClass"> <div class="m-3 ml-7" :class="messageClass">
<slot></slot> <slot></slot>
<gl-link v-if="helpPath" :href="helpPath" target="_blank"> <gl-link v-if="helpPath" :href="helpPath" target="_blank">
<icon :size="16" name="question-o" class="align-middle" /> <gl-icon :size="16" name="question-o" class="align-middle" />
</gl-link> </gl-link>
</div> </div>
</template> </template>
<script> <script>
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
export default { export default {
components: { Icon }, components: { GlIcon },
props: { props: {
name: { name: {
type: String, type: String,
...@@ -14,6 +14,6 @@ export default { ...@@ -14,6 +14,6 @@ export default {
<template> <template>
<div class="circle-icon-container gl-mr-3 align-self-start align-self-lg-center"> <div class="circle-icon-container gl-mr-3 align-self-start align-self-lg-center">
<icon :name="name" :size="24" /> <gl-icon :name="name" :size="24" />
</div> </div>
</template> </template>
<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 {
components: { components: {
Icon, GlIcon,
}, },
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
...@@ -36,6 +35,6 @@ export default { ...@@ -36,6 +35,6 @@ export default {
data-track-event="open_review_app" data-track-event="open_review_app"
data-track-label="review_app" data-track-label="review_app"
> >
{{ display.text }} <icon class="fgray" name="external-link" /> {{ display.text }} <gl-icon class="fgray" name="external-link" />
</a> </a>
</template> </template>
<script> <script>
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import { escape } from 'lodash'; import { escape } from 'lodash';
import { __, n__, sprintf, s__ } from '~/locale'; import { __, n__, sprintf, s__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
Icon, GlIcon,
GlDeprecatedButton, GlDeprecatedButton,
}, },
props: { props: {
...@@ -86,7 +85,7 @@ export default { ...@@ -86,7 +85,7 @@ export default {
class="commit-edit-toggle square s24 gl-mr-3" class="commit-edit-toggle square s24 gl-mr-3"
@click.stop="toggle()" @click.stop="toggle()"
> >
<icon :name="collapseIcon" :size="16" /> <gl-icon :name="collapseIcon" :size="16" />
</gl-deprecated-button> </gl-deprecated-button>
<span v-if="expanded">{{ __('Collapse') }}</span> <span v-if="expanded">{{ __('Collapse') }}</span>
<span v-else> <span v-else>
......
<script> <script>
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
import { __ } from '~/locale'; import { __ } from '~/locale';
export default { export default {
components: { components: {
Icon, GlIcon,
}, },
directives: { directives: {
tooltip, tooltip,
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
rel="noopener noreferrer nofollow" rel="noopener noreferrer nofollow"
data-container="body" data-container="body"
> >
<icon name="question" /> <gl-icon name="question" />
</a> </a>
</div> </div>
</template> </template>
<script> <script>
import { GlLoadingIcon, GlLink, GlTooltip } from '@gitlab/ui'; import { GlLoadingIcon, GlLink, GlTooltip, GlIcon } from '@gitlab/ui';
import { escape } from 'lodash'; import { escape } from 'lodash';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
name: 'AncestorsTree', name: 'AncestorsTree',
components: { components: {
Icon, GlIcon,
GlLoadingIcon, GlLoadingIcon,
GlLink, GlLink,
GlTooltip, GlTooltip,
...@@ -66,7 +65,7 @@ export default { ...@@ -66,7 +65,7 @@ export default {
<template> <template>
<div class="ancestor-tree"> <div class="ancestor-tree">
<div ref="sidebarIcon" class="sidebar-collapsed-icon"> <div ref="sidebarIcon" class="sidebar-collapsed-icon">
<div><icon name="epic" /></div> <div><gl-icon name="epic" /></div>
<span v-if="!isFetching" class="collapse-truncated-title">{{ tooltipText }}</span> <span v-if="!isFetching" class="collapse-truncated-title">{{ tooltipText }}</span>
</div> </div>
...@@ -78,7 +77,7 @@ export default { ...@@ -78,7 +77,7 @@ export default {
<ul v-if="!isFetching && ancestors.length" class="vertical-timeline hide-collapsed"> <ul v-if="!isFetching && ancestors.length" class="vertical-timeline hide-collapsed">
<li v-for="(ancestor, id) in ancestors" :key="id" class="vertical-timeline-row d-flex"> <li v-for="(ancestor, id) in ancestors" :key="id" class="vertical-timeline-row d-flex">
<div class="vertical-timeline-icon" :class="getTimelineClass(ancestor)"> <div class="vertical-timeline-icon" :class="getTimelineClass(ancestor)">
<icon :name="getIcon(ancestor)" /> <gl-icon :name="getIcon(ancestor)" />
</div> </div>
<div class="vertical-timeline-content"> <div class="vertical-timeline-content">
<gl-link :href="ancestor.url">{{ ancestor.title }}</gl-link> <gl-link :href="ancestor.url">{{ ancestor.title }}</gl-link>
......
<script> <script>
import $ from 'jquery'; import $ from 'jquery';
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { __, s__ } from '~/locale'; import { __, s__ } from '~/locale';
import Tracking from '~/tracking'; import Tracking from '~/tracking';
import eventHub from '~/sidebar/event_hub'; import eventHub from '~/sidebar/event_hub';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
import icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
icon, GlIcon,
GlLoadingIcon, GlLoadingIcon,
}, },
directives: { directives: {
...@@ -164,7 +163,7 @@ export default { ...@@ -164,7 +163,7 @@ export default {
data-boundary="viewport" data-boundary="viewport"
@click="onCollapsedClick" @click="onCollapsedClick"
> >
<icon :size="16" name="weight" /> <gl-icon :size="16" name="weight" />
<gl-loading-icon v-if="fetching" class="js-weight-collapsed-loading-icon" /> <gl-loading-icon v-if="fetching" class="js-weight-collapsed-loading-icon" />
<span v-else class="js-weight-collapsed-weight-label" v-html="collapsedWeightLabel"></span> <span v-else class="js-weight-collapsed-weight-label" v-html="collapsedWeightLabel"></span>
</div> </div>
...@@ -192,7 +191,7 @@ export default { ...@@ -192,7 +191,7 @@ export default {
@keydown.enter="onSubmit" @keydown.enter="onSubmit"
/> />
<span v-if="!hasValidInput" class="gl-field-error"> <span v-if="!hasValidInput" class="gl-field-error">
<icon :size="24" name="merge-request-close-m" /> <gl-icon :size="24" name="merge-request-close-m" />
{{ s__('Sidebar|Only numeral characters allowed') }} {{ s__('Sidebar|Only numeral characters allowed') }}
</span> </span>
</div> </div>
......
<script> <script>
import { GlDeprecatedButton, GlLoadingIcon } from '@gitlab/ui'; import { GlDeprecatedButton, GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import UserAvatarList from '~/vue_shared/components/user_avatar/user_avatar_list.vue'; import UserAvatarList from '~/vue_shared/components/user_avatar/user_avatar_list.vue';
import ApprovalsList from './approvals_list.vue'; import ApprovalsList from './approvals_list.vue';
export default { export default {
components: { components: {
Icon, GlIcon,
GlDeprecatedButton, GlDeprecatedButton,
GlLoadingIcon, GlLoadingIcon,
UserAvatarList, UserAvatarList,
...@@ -75,7 +74,7 @@ export default { ...@@ -75,7 +74,7 @@ export default {
@click="toggle" @click="toggle"
> >
<gl-loading-icon v-if="!isCollapsed && isLoadingRules" /> <gl-loading-icon v-if="!isCollapsed && isLoadingRules" />
<icon v-else :name="angleIcon" :size="16" /> <gl-icon v-else :name="angleIcon" :size="16" />
</button> </button>
<template v-if="isCollapsed"> <template v-if="isCollapsed">
<user-avatar-list :items="suggestedApproversTrimmed" :breakpoint="0" empty-text="" /> <user-avatar-list :items="suggestedApproversTrimmed" :breakpoint="0" empty-text="" />
......
<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: {
isApproved: { isApproved: {
...@@ -15,6 +15,6 @@ export default { ...@@ -15,6 +15,6 @@ export default {
</script> </script>
<template> <template>
<icon v-if="isApproved" name="mobile-issue-close" class="text-success" :size="16" /> <gl-icon v-if="isApproved" name="mobile-issue-close" class="text-success" :size="16" />
<div v-else class="square s16"></div> <div v-else class="square s16"></div>
</template> </template>
<script> <script>
import { GlIcon } from '@gitlab/ui';
import RelatedIssuableItem from '~/vue_shared/components/issue/related_issuable_item.vue'; import RelatedIssuableItem from '~/vue_shared/components/issue/related_issuable_item.vue';
import Icon from '~/vue_shared/components/icon.vue';
import { n__ } from '~/locale'; import { n__ } from '~/locale';
export default { export default {
name: 'BlockingMergeRequestsBody', name: 'BlockingMergeRequestsBody',
components: { RelatedIssuableItem, Icon }, components: { RelatedIssuableItem, GlIcon },
props: { props: {
issue: { issue: {
type: Object, type: Object,
...@@ -34,7 +34,7 @@ export default { ...@@ -34,7 +34,7 @@ export default {
<template> <template>
<div v-if="issue.hiddenCount" class="p-3 d-flex align-items-center"> <div v-if="issue.hiddenCount" class="p-3 d-flex align-items-center">
<icon class="gl-mr-3" name="eye-slash" aria-hidden="true" /> <gl-icon class="gl-mr-3" name="eye-slash" aria-hidden="true" />
{{ hiddenBlockingMRsText }} {{ hiddenBlockingMRsText }}
</div> </div>
<related-issuable-item <related-issuable-item
......
...@@ -6,8 +6,8 @@ import { ...@@ -6,8 +6,8 @@ import {
GlModal, GlModal,
GlSearchBoxByType, GlSearchBoxByType,
GlModalDirective, GlModalDirective,
GlIcon,
} from '@gitlab/ui'; } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import ModalCopyButton from '~/vue_shared/components/modal_copy_button.vue'; import ModalCopyButton from '~/vue_shared/components/modal_copy_button.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';
import { s__, sprintf } from '~/locale'; import { s__, sprintf } from '~/locale';
...@@ -19,7 +19,7 @@ export default { ...@@ -19,7 +19,7 @@ export default {
GlDeprecatedDropdownItem, GlDeprecatedDropdownItem,
GlModal, GlModal,
GlSearchBoxByType, GlSearchBoxByType,
Icon, GlIcon,
ReviewAppLink, ReviewAppLink,
ModalCopyButton, ModalCopyButton,
}, },
...@@ -216,7 +216,7 @@ export default { ...@@ -216,7 +216,7 @@ export default {
<gl-search-box-by-type v-model.trim="changesSearchTerm" class="m-2" /> <gl-search-box-by-type v-model.trim="changesSearchTerm" class="m-2" />
<template #button-content> <template #button-content>
{{ s__('VisualReviewApp|Open review app') }} {{ s__('VisualReviewApp|Open review app') }}
<icon class="fgray" name="external-link" /> <gl-icon class="fgray" name="external-link" />
</template> </template>
<gl-deprecated-dropdown-item <gl-deprecated-dropdown-item
v-for="change in filteredChanges" v-for="change in filteredChanges"
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedButton, GlLoadingIcon } from '@gitlab/ui'; import { GlDeprecatedButton, GlLoadingIcon, GlIcon } from '@gitlab/ui';
import ApprovalsList from 'ee/vue_merge_request_widget/components/approvals/approvals_list.vue'; import ApprovalsList from 'ee/vue_merge_request_widget/components/approvals/approvals_list.vue';
import ApprovalsFooter from 'ee/vue_merge_request_widget/components/approvals/approvals_footer.vue'; import ApprovalsFooter from 'ee/vue_merge_request_widget/components/approvals/approvals_footer.vue';
import Icon from '~/vue_shared/components/icon.vue';
import UserAvatarList from '~/vue_shared/components/user_avatar/user_avatar_list.vue'; import UserAvatarList from '~/vue_shared/components/user_avatar/user_avatar_list.vue';
const testSuggestedApprovers = () => Array.from({ length: 11 }, (_, i) => i).map(id => ({ id })); const testSuggestedApprovers = () => Array.from({ length: 11 }, (_, i) => i).map(id => ({ id }));
...@@ -22,7 +21,7 @@ describe('EE MRWidget approvals footer', () => { ...@@ -22,7 +21,7 @@ describe('EE MRWidget approvals footer', () => {
}; };
const findToggle = () => wrapper.find('button'); const findToggle = () => wrapper.find('button');
const findToggleIcon = () => findToggle().find(Icon); const findToggleIcon = () => findToggle().find(GlIcon);
const findToggleLoadingIcon = () => findToggle().find(GlLoadingIcon); const findToggleLoadingIcon = () => findToggle().find(GlLoadingIcon);
const findExpandButton = () => wrapper.find(GlDeprecatedButton); const findExpandButton = () => wrapper.find(GlDeprecatedButton);
const findCollapseButton = () => wrapper.find(GlDeprecatedButton); const findCollapseButton = () => wrapper.find(GlDeprecatedButton);
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import ApprovedIcon from 'ee/vue_merge_request_widget/components/approvals/approved_icon.vue'; import ApprovedIcon from 'ee/vue_merge_request_widget/components/approvals/approved_icon.vue';
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
const EXPECTED_SIZE = 16; const EXPECTED_SIZE = 16;
...@@ -13,7 +13,7 @@ describe('EE MRWidget approved icon', () => { ...@@ -13,7 +13,7 @@ describe('EE MRWidget approved icon', () => {
}); });
}; };
const findIcon = () => wrapper.find(Icon); const findIcon = () => wrapper.find(GlIcon);
const findSquare = () => wrapper.find('.square'); const findSquare = () => wrapper.find('.square');
afterEach(() => { afterEach(() => {
......
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import { GlLink } from '@gitlab/ui'; import { GlLink, GlIcon } from '@gitlab/ui';
import { trimText } from 'helpers/text_helper'; import { trimText } from 'helpers/text_helper';
import { cloneDeep } from 'lodash'; import { cloneDeep } from 'lodash';
import ReleaseBlockFooter from '~/releases/components/release_block_footer.vue'; import ReleaseBlockFooter from '~/releases/components/release_block_footer.vue';
import Icon from '~/vue_shared/components/icon.vue';
import { release as originalRelease } from '../mock_data'; import { release as originalRelease } from '../mock_data';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils'; import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
...@@ -56,7 +55,7 @@ describe('Release block footer', () => { ...@@ -56,7 +55,7 @@ describe('Release block footer', () => {
beforeEach(() => factory()); beforeEach(() => factory());
it('renders the commit icon', () => { it('renders the commit icon', () => {
const commitIcon = commitInfoSection().find(Icon); const commitIcon = commitInfoSection().find(GlIcon);
expect(commitIcon.exists()).toBe(true); expect(commitIcon.exists()).toBe(true);
expect(commitIcon.props('name')).toBe('commit'); expect(commitIcon.props('name')).toBe('commit');
...@@ -71,7 +70,7 @@ describe('Release block footer', () => { ...@@ -71,7 +70,7 @@ describe('Release block footer', () => {
}); });
it('renders the tag icon', () => { it('renders the tag icon', () => {
const commitIcon = tagInfoSection().find(Icon); const commitIcon = tagInfoSection().find(GlIcon);
expect(commitIcon.exists()).toBe(true); expect(commitIcon.exists()).toBe(true);
expect(commitIcon.props('name')).toBe('tag'); expect(commitIcon.props('name')).toBe('tag');
......
import $ from 'jquery'; import $ from 'jquery';
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import { GlIcon } from '@gitlab/ui';
import EvidenceBlock from '~/releases/components/evidence_block.vue'; import EvidenceBlock from '~/releases/components/evidence_block.vue';
import ReleaseBlock from '~/releases/components/release_block.vue'; import ReleaseBlock from '~/releases/components/release_block.vue';
import ReleaseBlockFooter from '~/releases/components/release_block_footer.vue'; import ReleaseBlockFooter from '~/releases/components/release_block_footer.vue';
import timeagoMixin from '~/vue_shared/mixins/timeago'; import timeagoMixin from '~/vue_shared/mixins/timeago';
import { release as originalRelease } from '../mock_data'; import { release as originalRelease } from '../mock_data';
import Icon from '~/vue_shared/components/icon.vue';
import * as commonUtils from '~/lib/utils/common_utils'; import * as commonUtils from '~/lib/utils/common_utils';
import { BACK_URL_PARAM } from '~/releases/constants'; import { BACK_URL_PARAM } from '~/releases/constants';
import * as urlUtility from '~/lib/utils/url_utility'; import * as urlUtility from '~/lib/utils/url_utility';
...@@ -247,7 +247,7 @@ describe('Release block', () => { ...@@ -247,7 +247,7 @@ describe('Release block', () => {
it('renders the milestone icon', () => { it('renders the milestone icon', () => {
expect( expect(
milestoneListLabel() milestoneListLabel()
.find(Icon) .find(GlIcon)
.exists(), .exists(),
).toBe(true); ).toBe(true);
}); });
......
...@@ -4,7 +4,7 @@ exports[`IssueStatusIcon renders "failed" state correctly 1`] = ` ...@@ -4,7 +4,7 @@ exports[`IssueStatusIcon renders "failed" state correctly 1`] = `
<div <div
class="report-block-list-icon failed" class="report-block-list-icon failed"
> >
<icon-stub <gl-icon-stub
data-qa-selector="status_failed_icon" data-qa-selector="status_failed_icon"
name="status_failed_borderless" name="status_failed_borderless"
size="24" size="24"
...@@ -16,7 +16,7 @@ exports[`IssueStatusIcon renders "neutral" state correctly 1`] = ` ...@@ -16,7 +16,7 @@ exports[`IssueStatusIcon renders "neutral" state correctly 1`] = `
<div <div
class="report-block-list-icon neutral" class="report-block-list-icon neutral"
> >
<icon-stub <gl-icon-stub
data-qa-selector="status_neutral_icon" data-qa-selector="status_neutral_icon"
name="dash" name="dash"
size="24" size="24"
...@@ -28,7 +28,7 @@ exports[`IssueStatusIcon renders "success" state correctly 1`] = ` ...@@ -28,7 +28,7 @@ exports[`IssueStatusIcon renders "success" state correctly 1`] = `
<div <div
class="report-block-list-icon success" class="report-block-list-icon success"
> >
<icon-stub <gl-icon-stub
data-qa-selector="status_success_icon" data-qa-selector="status_success_icon"
name="status_success_borderless" name="status_success_borderless"
size="24" size="24"
......
...@@ -13,7 +13,7 @@ exports[`Confidential Issue Sidebar Block renders for confidential = false and i ...@@ -13,7 +13,7 @@ exports[`Confidential Issue Sidebar Block renders for confidential = false and i
data-placement="left" data-placement="left"
title="" title=""
> >
<icon-stub <gl-icon-stub
aria-hidden="true" aria-hidden="true"
name="eye" name="eye"
size="16" size="16"
...@@ -38,7 +38,7 @@ exports[`Confidential Issue Sidebar Block renders for confidential = false and i ...@@ -38,7 +38,7 @@ exports[`Confidential Issue Sidebar Block renders for confidential = false and i
class="no-value sidebar-item-value" class="no-value sidebar-item-value"
data-testid="not-confidential" data-testid="not-confidential"
> >
<icon-stub <gl-icon-stub
aria-hidden="true" aria-hidden="true"
class="sidebar-item-icon inline" class="sidebar-item-icon inline"
name="eye" name="eye"
...@@ -65,7 +65,7 @@ exports[`Confidential Issue Sidebar Block renders for confidential = false and i ...@@ -65,7 +65,7 @@ exports[`Confidential Issue Sidebar Block renders for confidential = false and i
data-placement="left" data-placement="left"
title="" title=""
> >
<icon-stub <gl-icon-stub
aria-hidden="true" aria-hidden="true"
name="eye" name="eye"
size="16" size="16"
...@@ -98,7 +98,7 @@ exports[`Confidential Issue Sidebar Block renders for confidential = false and i ...@@ -98,7 +98,7 @@ exports[`Confidential Issue Sidebar Block renders for confidential = false and i
class="no-value sidebar-item-value" class="no-value sidebar-item-value"
data-testid="not-confidential" data-testid="not-confidential"
> >
<icon-stub <gl-icon-stub
aria-hidden="true" aria-hidden="true"
class="sidebar-item-icon inline" class="sidebar-item-icon inline"
name="eye" name="eye"
...@@ -125,7 +125,7 @@ exports[`Confidential Issue Sidebar Block renders for confidential = true and is ...@@ -125,7 +125,7 @@ exports[`Confidential Issue Sidebar Block renders for confidential = true and is
data-placement="left" data-placement="left"
title="" title=""
> >
<icon-stub <gl-icon-stub
aria-hidden="true" aria-hidden="true"
name="eye-slash" name="eye-slash"
size="16" size="16"
...@@ -149,7 +149,7 @@ exports[`Confidential Issue Sidebar Block renders for confidential = true and is ...@@ -149,7 +149,7 @@ exports[`Confidential Issue Sidebar Block renders for confidential = true and is
<div <div
class="value sidebar-item-value hide-collapsed" class="value sidebar-item-value hide-collapsed"
> >
<icon-stub <gl-icon-stub
aria-hidden="true" aria-hidden="true"
class="sidebar-item-icon inline is-active" class="sidebar-item-icon inline is-active"
name="eye-slash" name="eye-slash"
...@@ -176,7 +176,7 @@ exports[`Confidential Issue Sidebar Block renders for confidential = true and is ...@@ -176,7 +176,7 @@ exports[`Confidential Issue Sidebar Block renders for confidential = true and is
data-placement="left" data-placement="left"
title="" title=""
> >
<icon-stub <gl-icon-stub
aria-hidden="true" aria-hidden="true"
name="eye-slash" name="eye-slash"
size="16" size="16"
...@@ -208,7 +208,7 @@ exports[`Confidential Issue Sidebar Block renders for confidential = true and is ...@@ -208,7 +208,7 @@ exports[`Confidential Issue Sidebar Block renders for confidential = true and is
<div <div
class="value sidebar-item-value hide-collapsed" class="value sidebar-item-value hide-collapsed"
> >
<icon-stub <gl-icon-stub
aria-hidden="true" aria-hidden="true"
class="sidebar-item-icon inline is-active" class="sidebar-item-icon inline is-active"
name="eye-slash" name="eye-slash"
......
...@@ -13,7 +13,7 @@ exports[`SidebarTodo template renders component container element with proper da ...@@ -13,7 +13,7 @@ exports[`SidebarTodo template renders component container element with proper da
title="" title=""
type="button" type="button"
> >
<icon-stub <gl-icon-stub
class="todo-undone" class="todo-undone"
name="todo-done" name="todo-done"
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 SidebarTodos from '~/sidebar/components/todo_toggle/todo.vue'; import SidebarTodos from '~/sidebar/components/todo_toggle/todo.vue';
import Icon from '~/vue_shared/components/icon.vue';
const defaultProps = { const defaultProps = {
issuableId: 1, issuableId: 1,
...@@ -45,11 +44,11 @@ describe('SidebarTodo', () => { ...@@ -45,11 +44,11 @@ describe('SidebarTodo', () => {
expect( expect(
wrapper wrapper
.find(Icon) .find(GlIcon)
.classes() .classes()
.join(' '), .join(' '),
).toStrictEqual(iconClass); ).toStrictEqual(iconClass);
expect(wrapper.find(Icon).props('name')).toStrictEqual(icon); expect(wrapper.find(GlIcon).props('name')).toStrictEqual(icon);
expect(wrapper.find('button').text()).toBe(label); expect(wrapper.find('button').text()).toBe(label);
}, },
); );
...@@ -82,7 +81,7 @@ describe('SidebarTodo', () => { ...@@ -82,7 +81,7 @@ describe('SidebarTodo', () => {
it('renders button icon when `collapsed` prop is `true`', () => { it('renders button icon when `collapsed` prop is `true`', () => {
createComponent({ collapsed: true }); createComponent({ collapsed: true });
expect(wrapper.find(Icon).props('name')).toBe('todo-done'); expect(wrapper.find(GlIcon).props('name')).toBe('todo-done');
}); });
it('renders loading icon when `isActionActive` prop is true', () => { it('renders loading icon when `isActionActive` prop is true', () => {
...@@ -94,7 +93,7 @@ describe('SidebarTodo', () => { ...@@ -94,7 +93,7 @@ describe('SidebarTodo', () => {
it('hides button icon when `isActionActive` prop is true', () => { it('hides button icon when `isActionActive` prop is true', () => {
createComponent({ collapsed: true, isActionActive: true }); createComponent({ collapsed: true, isActionActive: true });
expect(wrapper.find(Icon).isVisible()).toBe(false); expect(wrapper.find(GlIcon).isVisible()).toBe(false);
}); });
}); });
}); });
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlIcon } from '@gitlab/ui';
import MrWidgetIcon from '~/vue_merge_request_widget/components/mr_widget_icon.vue'; import MrWidgetIcon from '~/vue_merge_request_widget/components/mr_widget_icon.vue';
import Icon from '~/vue_shared/components/icon.vue';
const TEST_ICON = 'commit'; const TEST_ICON = 'commit';
...@@ -21,6 +21,6 @@ describe('MrWidgetIcon', () => { ...@@ -21,6 +21,6 @@ describe('MrWidgetIcon', () => {
it('renders icon and container', () => { it('renders icon and container', () => {
expect(wrapper.is('.circle-icon-container')).toBe(true); expect(wrapper.is('.circle-icon-container')).toBe(true);
expect(wrapper.find(Icon).props('name')).toEqual(TEST_ICON); expect(wrapper.find(GlIcon).props('name')).toEqual(TEST_ICON);
}); });
}); });
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlIcon } from '@gitlab/ui';
import CommitsHeader from '~/vue_merge_request_widget/components/states/commits_header.vue'; import CommitsHeader from '~/vue_merge_request_widget/components/states/commits_header.vue';
import Icon from '~/vue_shared/components/icon.vue';
describe('Commits header component', () => { describe('Commits header component', () => {
let wrapper; let wrapper;
...@@ -23,7 +23,7 @@ describe('Commits header component', () => { ...@@ -23,7 +23,7 @@ describe('Commits header component', () => {
const findHeaderWrapper = () => wrapper.find('.js-mr-widget-commits-count'); const findHeaderWrapper = () => wrapper.find('.js-mr-widget-commits-count');
const findCommitToggle = () => wrapper.find('.commit-edit-toggle'); const findCommitToggle = () => wrapper.find('.commit-edit-toggle');
const findIcon = () => wrapper.find(Icon); const findIcon = () => wrapper.find(GlIcon);
const findCommitsCountMessage = () => wrapper.find('.commits-count-message'); const findCommitsCountMessage = () => wrapper.find('.commits-count-message');
const findTargetBranchMessage = () => wrapper.find('.label-branch'); const findTargetBranchMessage = () => wrapper.find('.label-branch');
const findModifyButton = () => wrapper.find('.modify-message-button'); const findModifyButton = () => wrapper.find('.modify-message-button');
......
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