Commit 853a5a50 authored by Lukas Eipert's avatar Lukas Eipert

Utilize GitLab UI icon component: badges to diffs

This replaces all the usages of ~/vue_shared/components/icon.vue with
the corresponding GitLab UI component for all components from badges to
diffs (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 { GlLoadingIcon, GlTooltipDirective } from '@gitlab/ui'; import { GlLoadingIcon, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
// name: 'Badge' is a false positive: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/25 // name: 'Badge' is a false positive: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/25
// eslint-disable-next-line @gitlab/require-i18n-strings // eslint-disable-next-line @gitlab/require-i18n-strings
name: 'Badge', name: 'Badge',
components: { components: {
Icon, GlIcon,
GlLoadingIcon, GlLoadingIcon,
}, },
directives: { directives: {
...@@ -84,7 +83,7 @@ export default { ...@@ -84,7 +83,7 @@ export default {
<div v-show="hasError" class="btn-group"> <div v-show="hasError" class="btn-group">
<div class="btn btn-default btn-sm disabled"> <div class="btn btn-default btn-sm disabled">
<icon :size="16" class="gl-ml-3 gl-mr-3" name="doc-image" aria-hidden="true" /> <gl-icon :size="16" class="gl-ml-3 gl-mr-3" name="doc-image" aria-hidden="true" />
</div> </div>
<div class="btn btn-default btn-sm disabled"> <div class="btn btn-default btn-sm disabled">
<span class="gl-ml-3 gl-mr-3">{{ s__('Badges|No badge image') }}</span> <span class="gl-ml-3 gl-mr-3">{{ s__('Badges|No badge image') }}</span>
...@@ -99,7 +98,7 @@ export default { ...@@ -99,7 +98,7 @@ export default {
type="button" type="button"
@click="reloadImage" @click="reloadImage"
> >
<icon :size="16" name="retry" /> <gl-icon :size="16" name="retry" />
</button> </button>
</div> </div>
</template> </template>
<script> <script>
import { mapActions, mapState } from 'vuex'; import { mapActions, mapState } from 'vuex';
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import { PROJECT_BADGE } from '../constants'; import { PROJECT_BADGE } from '../constants';
import Badge from './badge.vue'; import Badge from './badge.vue';
...@@ -10,7 +9,7 @@ export default { ...@@ -10,7 +9,7 @@ export default {
name: 'BadgeListRow', name: 'BadgeListRow',
components: { components: {
Badge, Badge,
Icon, GlIcon,
GlLoadingIcon, GlLoadingIcon,
}, },
props: { props: {
...@@ -58,7 +57,7 @@ export default { ...@@ -58,7 +57,7 @@ export default {
type="button" type="button"
@click="editBadge(badge)" @click="editBadge(badge)"
> >
<icon :size="16" :aria-label="__('Edit')" name="pencil" /> <gl-icon :size="16" :aria-label="__('Edit')" name="pencil" />
</button> </button>
<button <button
:disabled="badge.isDeleting" :disabled="badge.isDeleting"
...@@ -68,7 +67,7 @@ export default { ...@@ -68,7 +67,7 @@ export default {
data-target="#delete-badge-modal" data-target="#delete-badge-modal"
@click="updateBadgeInModal(badge)" @click="updateBadgeInModal(badge)"
> >
<icon :size="16" :aria-label="__('Delete')" name="remove" /> <gl-icon :size="16" :aria-label="__('Delete')" name="remove" />
</button> </button>
<gl-loading-icon v-show="badge.isDeleting" :inline="true" /> <gl-loading-icon v-show="badge.isDeleting" :inline="true" />
</div> </div>
......
<script> <script>
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { sprintf, n__ } from '~/locale'; import { sprintf, n__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import DraftsCount from './drafts_count.vue'; import DraftsCount from './drafts_count.vue';
import PublishButton from './publish_button.vue'; import PublishButton from './publish_button.vue';
import PreviewItem from './preview_item.vue'; import PreviewItem from './preview_item.vue';
...@@ -10,7 +9,7 @@ import PreviewItem from './preview_item.vue'; ...@@ -10,7 +9,7 @@ import PreviewItem from './preview_item.vue';
export default { export default {
components: { components: {
GlLoadingIcon, GlLoadingIcon,
Icon, GlIcon,
DraftsCount, DraftsCount,
PublishButton, PublishButton,
PreviewItem, PreviewItem,
...@@ -71,7 +70,7 @@ export default { ...@@ -71,7 +70,7 @@ export default {
> >
{{ __('Finish review') }} {{ __('Finish review') }}
<drafts-count /> <drafts-count />
<icon name="angle-up" /> <gl-icon name="angle-up" />
</button> </button>
<div <div
class="dropdown-menu dropdown-menu-large dropdown-menu-right dropdown-open-top" class="dropdown-menu dropdown-menu-large dropdown-menu-right dropdown-open-top"
...@@ -87,7 +86,7 @@ export default { ...@@ -87,7 +86,7 @@ export default {
class="dropdown-title-button dropdown-menu-close" class="dropdown-title-button dropdown-menu-close"
@click="toggleReviewDropdown" @click="toggleReviewDropdown"
> >
<icon name="close" /> <gl-icon name="close" />
</button> </button>
</div> </div>
<div class="dropdown-content"> <div class="dropdown-content">
......
<script> <script>
import { mapActions, mapGetters } from 'vuex'; import { mapActions, mapGetters } from 'vuex';
import { GlSprintf } from '@gitlab/ui'; import { GlSprintf, GlIcon } from '@gitlab/ui';
import { IMAGE_DIFF_POSITION_TYPE } from '~/diffs/constants'; import { IMAGE_DIFF_POSITION_TYPE } from '~/diffs/constants';
import { sprintf, __ } from '~/locale'; import { sprintf, __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import resolvedStatusMixin from '../mixins/resolved_status'; import resolvedStatusMixin from '../mixins/resolved_status';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { import {
...@@ -14,7 +13,7 @@ import { ...@@ -14,7 +13,7 @@ import {
export default { export default {
components: { components: {
Icon, GlIcon,
GlSprintf, GlSprintf,
}, },
mixins: [resolvedStatusMixin, glFeatureFlagsMixin()], mixins: [resolvedStatusMixin, glFeatureFlagsMixin()],
...@@ -101,7 +100,7 @@ export default { ...@@ -101,7 +100,7 @@ export default {
@click="scrollToDraft(draft)" @click="scrollToDraft(draft)"
> >
<span class="review-preview-item-header"> <span class="review-preview-item-header">
<icon class="flex-shrink-0" :name="iconName" /> <gl-icon class="flex-shrink-0" :name="iconName" />
<span <span
class="bold text-nowrap" class="bold text-nowrap"
:class="{ 'gl-align-items-center': glFeatures.multilineComments }" :class="{ 'gl-align-items-center': glFeatures.multilineComments }"
...@@ -138,7 +137,7 @@ export default { ...@@ -138,7 +137,7 @@ export default {
v-if="draft.discussion_id && resolvedStatusMessage" v-if="draft.discussion_id && resolvedStatusMessage"
class="review-preview-item-footer draft-note-resolution p-0" class="review-preview-item-footer draft-note-resolution p-0"
> >
<icon class="gl-mr-3" name="status_success" /> {{ resolvedStatusMessage }} <gl-icon class="gl-mr-3" name="status_success" /> {{ resolvedStatusMessage }}
</span> </span>
</button> </button>
</template> </template>
<script> <script>
import { sortBy } from 'lodash'; import { sortBy } from 'lodash';
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import { GlLabel, GlTooltipDirective } from '@gitlab/ui'; import { GlLabel, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import issueCardInner from 'ee_else_ce/boards/mixins/issue_card_inner'; import issueCardInner from 'ee_else_ce/boards/mixins/issue_card_inner';
import { sprintf, __ } from '~/locale'; import { sprintf, __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate.vue'; import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate.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 IssueDueDate from './issue_due_date.vue'; import IssueDueDate from './issue_due_date.vue';
...@@ -15,7 +14,7 @@ import { isScopedLabel } from '~/lib/utils/common_utils'; ...@@ -15,7 +14,7 @@ import { isScopedLabel } from '~/lib/utils/common_utils';
export default { export default {
components: { components: {
GlLabel, GlLabel,
Icon, GlIcon,
UserAvatarLink, UserAvatarLink,
TooltipOnTruncate, TooltipOnTruncate,
IssueDueDate, IssueDueDate,
...@@ -148,7 +147,7 @@ export default { ...@@ -148,7 +147,7 @@ export default {
<div> <div>
<div class="d-flex board-card-header" dir="auto"> <div class="d-flex board-card-header" dir="auto">
<h4 class="board-card-title gl-mb-0 gl-mt-0"> <h4 class="board-card-title gl-mb-0 gl-mt-0">
<icon <gl-icon
v-if="issue.blocked" v-if="issue.blocked"
v-gl-tooltip v-gl-tooltip
name="issue-block" name="issue-block"
...@@ -156,7 +155,7 @@ export default { ...@@ -156,7 +155,7 @@ export default {
class="issue-blocked-icon gl-mr-2" class="issue-blocked-icon gl-mr-2"
:aria-label="__('Blocked issue')" :aria-label="__('Blocked issue')"
/> />
<icon <gl-icon
v-if="issue.confidential" v-if="issue.confidential"
v-gl-tooltip v-gl-tooltip
name="eye-slash" name="eye-slash"
......
<script> <script>
import dateFormat from 'dateformat'; import dateFormat from 'dateformat';
import { GlTooltip } from '@gitlab/ui'; import { GlTooltip, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { __ } from '~/locale'; import { __ } from '~/locale';
import { import {
getDayDifference, getDayDifference,
...@@ -12,7 +11,7 @@ import { ...@@ -12,7 +11,7 @@ import {
export default { export default {
components: { components: {
Icon, GlIcon,
GlTooltip, GlTooltip,
}, },
props: { props: {
...@@ -87,7 +86,7 @@ export default { ...@@ -87,7 +86,7 @@ export default {
<template> <template>
<span> <span>
<span ref="issueDueDate" :class="cssClass" class="board-card-info card-number"> <span ref="issueDueDate" :class="cssClass" class="board-card-info card-number">
<icon :class="{ 'text-danger': isPastDue }" class="board-card-info-icon" name="calendar" /> <gl-icon :class="{ 'text-danger': isPastDue }" class="board-card-info-icon" name="calendar" />
<time :class="{ 'text-danger': isPastDue }" datetime="date" class="board-card-info-text">{{ <time :class="{ 'text-danger': isPastDue }" datetime="date" class="board-card-info-text">{{
body body
}}</time> }}</time>
......
<script> <script>
import { GlTooltip } from '@gitlab/ui'; import { GlTooltip, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { parseSeconds, stringifyTime } from '~/lib/utils/datetime_utility'; import { parseSeconds, stringifyTime } from '~/lib/utils/datetime_utility';
import boardsStore from '../stores/boards_store'; import boardsStore from '../stores/boards_store';
export default { export default {
components: { components: {
Icon, GlIcon,
GlTooltip, GlTooltip,
}, },
props: { props: {
...@@ -34,7 +33,7 @@ export default { ...@@ -34,7 +33,7 @@ export default {
<template> <template>
<span> <span>
<span ref="issueTimeEstimate" class="board-card-info card-number"> <span ref="issueTimeEstimate" class="board-card-info card-number">
<icon name="hourglass" class="board-card-info-icon" /><time class="board-card-info-text">{{ <gl-icon name="hourglass" class="board-card-info-icon" /><time class="board-card-info-text">{{
timeEstimate timeEstimate
}}</time> }}</time>
</span> </span>
......
<script> <script>
import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils'; import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils';
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import ModalStore from '../../stores/modal_store'; import ModalStore from '../../stores/modal_store';
import IssueCardInner from '../issue_card_inner.vue'; import IssueCardInner from '../issue_card_inner.vue';
export default { export default {
components: { components: {
IssueCardInner, IssueCardInner,
Icon, GlIcon,
}, },
props: { props: {
issueLinkBase: { issueLinkBase: {
...@@ -135,7 +135,7 @@ export default { ...@@ -135,7 +135,7 @@ export default {
@click="toggleIssue($event, issue)" @click="toggleIssue($event, issue)"
> >
<issue-card-inner :issue="issue" :issue-link-base="issueLinkBase" :root-path="rootPath" /> <issue-card-inner :issue="issue" :issue-link-base="issueLinkBase" :root-path="rootPath" />
<icon <gl-icon
v-if="issue.selected" v-if="issue.selected"
:aria-label="'Issue #' + issue.id + ' selected'" :aria-label="'Issue #' + issue.id + ' selected'"
name="mobile-issue-close" name="mobile-issue-close"
......
<script> <script>
import { GlLink } from '@gitlab/ui'; import { GlLink, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import ModalStore from '../../stores/modal_store'; import ModalStore from '../../stores/modal_store';
import boardsStore from '../../stores/boards_store'; import boardsStore from '../../stores/boards_store';
export default { export default {
components: { components: {
GlLink, GlLink,
Icon, GlIcon,
}, },
data() { data() {
return { return {
...@@ -29,7 +28,7 @@ export default { ...@@ -29,7 +28,7 @@ export default {
<div class="dropdown inline"> <div class="dropdown inline">
<button class="dropdown-menu-toggle" type="button" data-toggle="dropdown" aria-expanded="false"> <button class="dropdown-menu-toggle" type="button" data-toggle="dropdown" aria-expanded="false">
<span :style="{ backgroundColor: selected.label.color }" class="dropdown-label-box"> </span> <span :style="{ backgroundColor: selected.label.color }" class="dropdown-label-box"> </span>
{{ selected.title }} <icon name="chevron-down" class="dropdown-menu-toggle-icon" /> {{ selected.title }} <gl-icon name="chevron-down" class="dropdown-menu-toggle-icon" />
</button> </button>
<div class="dropdown-menu dropdown-menu-selectable dropdown-menu-drop-up"> <div class="dropdown-menu dropdown-menu-selectable dropdown-menu-drop-up">
<ul> <ul>
......
<script> <script>
import $ from 'jquery'; import $ from 'jquery';
import { escape } from 'lodash'; import { escape } from 'lodash';
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { __ } from '~/locale'; import { __ } from '~/locale';
import eventHub from '../eventhub'; import eventHub from '../eventhub';
import Api from '../../api'; import Api from '../../api';
...@@ -11,7 +10,7 @@ import { featureAccessLevel } from '~/pages/projects/shared/permissions/constant ...@@ -11,7 +10,7 @@ import { featureAccessLevel } from '~/pages/projects/shared/permissions/constant
export default { export default {
name: 'BoardProjectSelect', name: 'BoardProjectSelect',
components: { components: {
Icon, GlIcon,
GlLoadingIcon, GlLoadingIcon,
}, },
props: { props: {
...@@ -105,13 +104,13 @@ export default { ...@@ -105,13 +104,13 @@ export default {
data-toggle="dropdown" data-toggle="dropdown"
aria-expanded="false" aria-expanded="false"
> >
{{ selectedProjectName }} <icon name="chevron-down" class="dropdown-menu-toggle-icon" /> {{ selectedProjectName }} <gl-icon name="chevron-down" class="dropdown-menu-toggle-icon" />
</button> </button>
<div class="dropdown-menu dropdown-menu-selectable dropdown-menu-full-width"> <div class="dropdown-menu dropdown-menu-selectable dropdown-menu-full-width">
<div class="dropdown-title">{{ __('Projects') }}</div> <div class="dropdown-title">{{ __('Projects') }}</div>
<div class="dropdown-input"> <div class="dropdown-input">
<input class="dropdown-input-field" type="search" :placeholder="__('Search projects')" /> <input class="dropdown-input-field" type="search" :placeholder="__('Search projects')" />
<icon name="search" class="dropdown-input-search" data-hidden="true" /> <gl-icon name="search" class="dropdown-input-search" data-hidden="true" />
</div> </div>
<div class="dropdown-content"></div> <div class="dropdown-content"></div>
<div class="dropdown-loading"><gl-loading-icon /></div> <div class="dropdown-loading"><gl-loading-icon /></div>
......
<script> <script>
import { GlDeprecatedDropdown, GlDeprecatedDropdownItem } from '@gitlab/ui'; import { GlDeprecatedDropdown, GlDeprecatedDropdownItem, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
GlDeprecatedDropdown, GlDeprecatedDropdown,
GlDeprecatedDropdownItem, GlDeprecatedDropdownItem,
Icon, GlIcon,
}, },
props: { props: {
projects: { projects: {
...@@ -41,17 +40,17 @@ export default { ...@@ -41,17 +40,17 @@ export default {
<gl-deprecated-dropdown toggle-class="d-flex align-items-center w-100" class="w-100"> <gl-deprecated-dropdown toggle-class="d-flex align-items-center w-100" class="w-100">
<template #button-content> <template #button-content>
<span class="str-truncated-100 mr-2"> <span class="str-truncated-100 mr-2">
<icon name="lock" /> <gl-icon name="lock" />
{{ dropdownText }} {{ dropdownText }}
</span> </span>
<icon name="chevron-down" class="ml-auto" /> <gl-icon name="chevron-down" class="ml-auto" />
</template> </template>
<gl-deprecated-dropdown-item <gl-deprecated-dropdown-item
v-for="project in projects" v-for="project in projects"
:key="project.id" :key="project.id"
@click="selectProject(project)" @click="selectProject(project)"
> >
<icon <gl-icon
name="mobile-issue-close" name="mobile-issue-close"
:class="{ icon: project.id !== selectedProject.id }" :class="{ icon: project.id !== selectedProject.id }"
class="js-active-project-check" class="js-active-project-check"
......
<script> <script>
import { GlFormInput, GlLink, GlFormGroup, GlFormRadioGroup, GlLoadingIcon } from '@gitlab/ui'; import {
GlFormInput,
GlLink,
GlFormGroup,
GlFormRadioGroup,
GlLoadingIcon,
GlIcon,
} from '@gitlab/ui';
import { debounce } from 'lodash'; import { debounce } from 'lodash';
import { __, s__ } from '~/locale'; import { __, s__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import csrf from '~/lib/utils/csrf'; import csrf from '~/lib/utils/csrf';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import statusCodes from '~/lib/utils/http_status'; import statusCodes from '~/lib/utils/http_status';
...@@ -37,7 +43,7 @@ export default { ...@@ -37,7 +43,7 @@ export default {
GlFormGroup, GlFormGroup,
GlFormRadioGroup, GlFormRadioGroup,
GlLoadingIcon, GlLoadingIcon,
Icon, GlIcon,
}, },
props: { props: {
formOperation: { formOperation: {
...@@ -229,7 +235,7 @@ export default { ...@@ -229,7 +235,7 @@ export default {
{{ s__('Metrics|Must be a valid PromQL query.') }} {{ s__('Metrics|Must be a valid PromQL query.') }}
<gl-link href="https://prometheus.io/docs/prometheus/latest/querying/basics/" tabindex="-1"> <gl-link href="https://prometheus.io/docs/prometheus/latest/querying/basics/" tabindex="-1">
{{ s__('Metrics|Prometheus Query Documentation') }} {{ s__('Metrics|Prometheus Query Documentation') }}
<icon name="external-link" :size="12" /> <gl-icon name="external-link" :size="12" />
</gl-link> </gl-link>
</span> </span>
</gl-form-group> </gl-form-group>
......
<script> <script>
import iconCycleAnalyticsSplash from 'icons/_icon_cycle_analytics_splash.svg'; import iconCycleAnalyticsSplash from 'icons/_icon_cycle_analytics_splash.svg';
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
export default { export default {
components: { components: {
Icon, GlIcon,
}, },
props: { props: {
documentationLink: { documentationLink: {
...@@ -32,7 +32,7 @@ export default { ...@@ -32,7 +32,7 @@ export default {
type="button" type="button"
@click="dismissOverviewDialog" @click="dismissOverviewDialog"
> >
<icon name="close" /> <gl-icon name="close" />
</button> </button>
<div class="svg-container" v-html="iconCycleAnalyticsSplash"></div> <div class="svg-container" v-html="iconCycleAnalyticsSplash"></div>
<div class="inner-content"> <div class="inner-content">
......
...@@ -3,14 +3,12 @@ import { GlIcon } from '@gitlab/ui'; ...@@ -3,14 +3,12 @@ import { GlIcon } from '@gitlab/ui';
import userAvatarImage from '../../vue_shared/components/user_avatar/user_avatar_image.vue'; import userAvatarImage from '../../vue_shared/components/user_avatar/user_avatar_image.vue';
import limitWarning from './limit_warning_component.vue'; import limitWarning from './limit_warning_component.vue';
import totalTime from './total_time_component.vue'; import totalTime from './total_time_component.vue';
import icon from '../../vue_shared/components/icon.vue';
export default { export default {
components: { components: {
userAvatarImage, userAvatarImage,
totalTime, totalTime,
limitWarning, limitWarning,
icon,
GlIcon, GlIcon,
}, },
props: { props: {
...@@ -60,7 +58,7 @@ export default { ...@@ -60,7 +58,7 @@ export default {
</template> </template>
<template v-else> <template v-else>
<span v-if="mergeRequest.branch" class="merge-request-branch"> <span v-if="mergeRequest.branch" class="merge-request-branch">
<icon :size="16" name="fork" /> <gl-icon :size="16" name="fork" />
<a :href="mergeRequest.branch.url"> {{ mergeRequest.branch.name }} </a> <a :href="mergeRequest.branch.url"> {{ mergeRequest.branch.name }} </a>
</span> </span>
</template> </template>
......
<script> <script>
import { GlIcon } from '@gitlab/ui';
import userAvatarImage from '../../vue_shared/components/user_avatar/user_avatar_image.vue'; import userAvatarImage from '../../vue_shared/components/user_avatar/user_avatar_image.vue';
import iconBranch from '../svg/icon_branch.svg'; import iconBranch from '../svg/icon_branch.svg';
import limitWarning from './limit_warning_component.vue'; import limitWarning from './limit_warning_component.vue';
import totalTime from './total_time_component.vue'; import totalTime from './total_time_component.vue';
import icon from '../../vue_shared/components/icon.vue';
export default { export default {
components: { components: {
userAvatarImage, userAvatarImage,
totalTime, totalTime,
limitWarning, limitWarning,
icon, GlIcon,
}, },
props: { props: {
items: { items: {
...@@ -44,7 +44,7 @@ export default { ...@@ -44,7 +44,7 @@ export default {
<user-avatar-image :img-src="build.author.avatarUrl" /> <user-avatar-image :img-src="build.author.avatarUrl" />
<h5 class="item-title"> <h5 class="item-title">
<a :href="build.url" class="pipeline-id"> #{{ build.id }} </a> <a :href="build.url" class="pipeline-id"> #{{ build.id }} </a>
<icon :size="16" name="fork" /> <gl-icon :size="16" name="fork" />
<a :href="build.branch.url" class="ref-name"> {{ build.branch.name }} </a> <a :href="build.branch.url" class="ref-name"> {{ build.branch.name }} </a>
<span class="icon-branch" v-html="iconBranch"> </span> <span class="icon-branch" v-html="iconBranch"> </span>
<a :href="build.commitUrl" class="commit-sha"> {{ build.shortSha }} </a> <a :href="build.commitUrl" class="commit-sha"> {{ build.shortSha }} </a>
......
<script> <script>
import { GlIcon } from '@gitlab/ui';
import iconBuildStatus from '../svg/icon_build_status.svg'; import iconBuildStatus from '../svg/icon_build_status.svg';
import iconBranch from '../svg/icon_branch.svg'; import iconBranch from '../svg/icon_branch.svg';
import limitWarning from './limit_warning_component.vue'; import limitWarning from './limit_warning_component.vue';
import totalTime from './total_time_component.vue'; import totalTime from './total_time_component.vue';
import icon from '../../vue_shared/components/icon.vue';
export default { export default {
components: { components: {
totalTime, totalTime,
limitWarning, limitWarning,
icon, GlIcon,
}, },
props: { props: {
items: { items: {
...@@ -46,7 +46,7 @@ export default { ...@@ -46,7 +46,7 @@ export default {
<span class="icon-build-status" v-html="iconBuildStatus"> </span> <span class="icon-build-status" v-html="iconBuildStatus"> </span>
<a :href="build.url" class="item-build-name"> {{ build.name }} </a> &middot; <a :href="build.url" class="item-build-name"> {{ build.name }} </a> &middot;
<a :href="build.url" class="pipeline-id"> #{{ build.id }} </a> <a :href="build.url" class="pipeline-id"> #{{ build.id }} </a>
<icon :size="16" name="fork" /> <gl-icon :size="16" name="fork" />
<a :href="build.branch.url" class="ref-name"> {{ build.branch.name }} </a> <a :href="build.branch.url" class="ref-name"> {{ build.branch.name }} </a>
<span class="icon-branch" v-html="iconBranch"> </span> <span class="icon-branch" v-html="iconBranch"> </span>
<a :href="build.commitUrl" class="commit-sha"> {{ build.shortSha }} </a> <a :href="build.commitUrl" class="commit-sha"> {{ build.shortSha }} </a>
......
<script> <script>
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import { deprecatedCreateFlash as Flash } from '~/flash'; import { deprecatedCreateFlash as Flash } from '~/flash';
import NavigationTabs from '~/vue_shared/components/navigation_tabs.vue'; import NavigationTabs from '~/vue_shared/components/navigation_tabs.vue';
...@@ -7,14 +7,13 @@ import eventHub from '../eventhub'; ...@@ -7,14 +7,13 @@ import eventHub from '../eventhub';
import DeployKeysService from '../service'; import DeployKeysService from '../service';
import DeployKeysStore from '../store'; import DeployKeysStore from '../store';
import KeysPanel from './keys_panel.vue'; import KeysPanel from './keys_panel.vue';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
KeysPanel, KeysPanel,
NavigationTabs, NavigationTabs,
GlLoadingIcon, GlLoadingIcon,
Icon, GlIcon,
}, },
props: { props: {
endpoint: { endpoint: {
...@@ -125,8 +124,8 @@ export default { ...@@ -125,8 +124,8 @@ export default {
/> />
<template v-else-if="hasKeys"> <template v-else-if="hasKeys">
<div class="top-area scrolling-tabs-container inner-page-scroll-tabs"> <div 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 :tabs="tabs" scope="deployKeys" @onChangeTab="onChangeTab" /> <navigation-tabs :tabs="tabs" scope="deployKeys" @onChangeTab="onChangeTab" />
</div> </div>
......
<script> <script>
import { head, tail } from 'lodash'; import { head, tail } from 'lodash';
import { GlIcon } from '@gitlab/ui';
import { s__, sprintf } from '~/locale'; import { s__, 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';
import timeagoMixin from '~/vue_shared/mixins/timeago'; import timeagoMixin from '~/vue_shared/mixins/timeago';
...@@ -10,7 +10,7 @@ import actionBtn from './action_btn.vue'; ...@@ -10,7 +10,7 @@ import actionBtn from './action_btn.vue';
export default { export default {
components: { components: {
actionBtn, actionBtn,
icon, GlIcon,
}, },
directives: { directives: {
tooltip, tooltip,
...@@ -130,7 +130,7 @@ export default { ...@@ -130,7 +130,7 @@ export default {
class="label deploy-project-label" class="label deploy-project-label"
> >
<span> {{ firstProject.project.full_name }} </span> <span> {{ firstProject.project.full_name }} </span>
<icon :name="firstProject.can_push ? 'lock-open' : 'lock'" /> <gl-icon :name="firstProject.can_push ? 'lock-open' : 'lock'" />
</a> </a>
<a <a
v-if="isExpandable" v-if="isExpandable"
...@@ -151,7 +151,7 @@ export default { ...@@ -151,7 +151,7 @@ export default {
class="label deploy-project-label" class="label deploy-project-label"
> >
<span> {{ deployKeysProject.project.full_name }} </span> <span> {{ deployKeysProject.project.full_name }} </span>
<icon :name="deployKeysProject.can_push ? 'lock-open' : 'lock'" /> <gl-icon :name="deployKeysProject.can_push ? 'lock-open' : 'lock'" />
</a> </a>
</template> </template>
<span v-else class="text-secondary">{{ __('None') }}</span> <span v-else class="text-secondary">{{ __('None') }}</span>
...@@ -161,7 +161,7 @@ export default { ...@@ -161,7 +161,7 @@ export default {
<div role="rowheader" class="table-mobile-header">{{ __('Created') }}</div> <div role="rowheader" class="table-mobile-header">{{ __('Created') }}</div>
<div class="table-mobile-content text-secondary key-created-at"> <div class="table-mobile-content text-secondary key-created-at">
<span v-tooltip :title="tooltipTitle(deployKey.created_at)"> <span v-tooltip :title="tooltipTitle(deployKey.created_at)">
<icon name="calendar" /> <span>{{ timeFormatted(deployKey.created_at) }}</span> <gl-icon name="calendar" /> <span>{{ timeFormatted(deployKey.created_at) }}</span>
</span> </span>
</div> </div>
</div> </div>
...@@ -178,7 +178,7 @@ export default { ...@@ -178,7 +178,7 @@ export default {
class="btn btn-default text-secondary" class="btn btn-default text-secondary"
data-container="body" data-container="body"
> >
<icon name="pencil" /> <gl-icon name="pencil" />
</a> </a>
<action-btn <action-btn
v-if="isRemovable" v-if="isRemovable"
...@@ -189,7 +189,7 @@ export default { ...@@ -189,7 +189,7 @@ export default {
type="remove" type="remove"
data-container="body" data-container="body"
> >
<icon name="remove" /> <gl-icon name="remove" />
</action-btn> </action-btn>
<action-btn <action-btn
v-else-if="isEnabled" v-else-if="isEnabled"
...@@ -200,7 +200,7 @@ export default { ...@@ -200,7 +200,7 @@ export default {
type="disable" type="disable"
data-container="body" data-container="body"
> >
<icon name="cancel" /> <gl-icon name="cancel" />
</action-btn> </action-btn>
</div> </div>
</div> </div>
......
<script> <script>
import { GlLoadingIcon, GlIcon, GlIntersectionObserver } from '@gitlab/ui'; import { GlLoadingIcon, GlIcon, GlIntersectionObserver } from '@gitlab/ui';
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';
import { n__, __ } from '~/locale'; import { n__, __ } from '~/locale';
import { DESIGN_ROUTE_NAME } from '../../router/constants'; import { DESIGN_ROUTE_NAME } from '../../router/constants';
...@@ -10,7 +9,6 @@ export default { ...@@ -10,7 +9,6 @@ export default {
GlLoadingIcon, GlLoadingIcon,
GlIntersectionObserver, GlIntersectionObserver,
GlIcon, GlIcon,
Icon,
Timeago, Timeago,
}, },
props: { props: {
...@@ -132,7 +130,7 @@ export default { ...@@ -132,7 +130,7 @@ export default {
<div class="card-body p-0 d-flex-center overflow-hidden position-relative"> <div class="card-body p-0 d-flex-center overflow-hidden position-relative">
<div v-if="icon.name" data-testid="designEvent" class="design-event position-absolute"> <div v-if="icon.name" data-testid="designEvent" class="design-event position-absolute">
<span :title="icon.tooltip" :aria-label="icon.tooltip"> <span :title="icon.tooltip" :aria-label="icon.tooltip">
<icon :name="icon.name" :size="18" :class="icon.classes" /> <gl-icon :name="icon.name" :size="18" :class="icon.classes" />
</span> </span>
</div> </div>
<gl-intersection-observer @appear="onAppear"> <gl-intersection-observer @appear="onAppear">
...@@ -164,7 +162,7 @@ export default { ...@@ -164,7 +162,7 @@ export default {
</span> </span>
</div> </div>
<div v-if="notesCount" class="ml-auto d-flex align-items-center text-secondary"> <div v-if="notesCount" class="ml-auto d-flex align-items-center text-secondary">
<icon name="comments" class="ml-1" /> <gl-icon name="comments" class="ml-1" />
<span :aria-label="notesLabel" class="ml-1"> <span :aria-label="notesLabel" class="ml-1">
{{ notesCount }} {{ notesCount }}
</span> </span>
......
<script> <script>
import { GlLoadingIcon, GlIcon, GlIntersectionObserver } from '@gitlab/ui'; import { GlLoadingIcon, GlIcon, GlIntersectionObserver } from '@gitlab/ui';
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';
import { n__, __ } from '~/locale'; import { n__, __ } from '~/locale';
import { DESIGN_ROUTE_NAME } from '../../router/constants'; import { DESIGN_ROUTE_NAME } from '../../router/constants';
...@@ -10,7 +9,6 @@ export default { ...@@ -10,7 +9,6 @@ export default {
GlLoadingIcon, GlLoadingIcon,
GlIntersectionObserver, GlIntersectionObserver,
GlIcon, GlIcon,
Icon,
Timeago, Timeago,
}, },
props: { props: {
...@@ -132,7 +130,7 @@ export default { ...@@ -132,7 +130,7 @@ export default {
<div class="card-body p-0 d-flex-center overflow-hidden position-relative"> <div class="card-body p-0 d-flex-center overflow-hidden position-relative">
<div v-if="icon.name" data-testid="designEvent" class="design-event position-absolute"> <div v-if="icon.name" data-testid="designEvent" class="design-event position-absolute">
<span :title="icon.tooltip" :aria-label="icon.tooltip"> <span :title="icon.tooltip" :aria-label="icon.tooltip">
<icon :name="icon.name" :size="18" :class="icon.classes" /> <gl-icon :name="icon.name" :size="18" :class="icon.classes" />
</span> </span>
</div> </div>
<gl-intersection-observer @appear="onAppear"> <gl-intersection-observer @appear="onAppear">
...@@ -164,7 +162,7 @@ export default { ...@@ -164,7 +162,7 @@ export default {
</span> </span>
</div> </div>
<div v-if="notesCount" class="ml-auto d-flex align-items-center text-secondary"> <div v-if="notesCount" class="ml-auto d-flex align-items-center text-secondary">
<icon name="comments" class="ml-1" /> <gl-icon name="comments" class="ml-1" />
<span :aria-label="notesLabel" class="ml-1"> <span :aria-label="notesLabel" class="ml-1">
{{ notesCount }} {{ notesCount }}
</span> </span>
......
<script> <script>
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlDeprecatedButton, 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 Pagination from './pagination.vue'; import Pagination from './pagination.vue';
import DeleteButton from '../delete_button.vue'; import DeleteButton from '../delete_button.vue';
...@@ -11,7 +10,7 @@ import { DESIGNS_ROUTE_NAME } from '../../router/constants'; ...@@ -11,7 +10,7 @@ import { DESIGNS_ROUTE_NAME } from '../../router/constants';
export default { export default {
components: { components: {
Icon, GlIcon,
Pagination, Pagination,
DeleteButton, DeleteButton,
GlDeprecatedButton, GlDeprecatedButton,
...@@ -104,7 +103,7 @@ export default { ...@@ -104,7 +103,7 @@ export default {
:aria-label="s__('DesignManagement|Go back to designs')" :aria-label="s__('DesignManagement|Go back to designs')"
class="mr-3 text-plain d-flex justify-content-center align-items-center" class="mr-3 text-plain d-flex justify-content-center align-items-center"
> >
<icon :size="18" name="close" /> <gl-icon :size="18" name="close" />
</router-link> </router-link>
<div class="overflow-hidden d-flex align-items-center"> <div class="overflow-hidden d-flex align-items-center">
<h2 class="m-0 str-truncated-100 gl-font-base">{{ filename }}</h2> <h2 class="m-0 str-truncated-100 gl-font-base">{{ filename }}</h2>
...@@ -112,7 +111,7 @@ export default { ...@@ -112,7 +111,7 @@ export default {
</div> </div>
<pagination :id="id" class="ml-auto flex-shrink-0" /> <pagination :id="id" class="ml-auto flex-shrink-0" />
<gl-deprecated-button :href="image" class="mr-2"> <gl-deprecated-button :href="image" class="mr-2">
<icon :size="18" name="download" /> <gl-icon :size="18" name="download" />
</gl-deprecated-button> </gl-deprecated-button>
<delete-button <delete-button
v-if="isLatestVersion && canDeleteDesign" v-if="isLatestVersion && canDeleteDesign"
...@@ -120,7 +119,7 @@ export default { ...@@ -120,7 +119,7 @@ export default {
button-variant="danger" button-variant="danger"
@deleteSelectedDesigns="$emit('delete')" @deleteSelectedDesigns="$emit('delete')"
> >
<icon :size="18" name="remove" /> <gl-icon :size="18" name="remove" />
</delete-button> </delete-button>
</header> </header>
</template> </template>
<script> <script>
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import { DESIGN_ROUTE_NAME } from '../../router/constants'; import { DESIGN_ROUTE_NAME } from '../../router/constants';
export default { export default {
components: { components: {
Icon, GlIcon,
}, },
props: { props: {
design: { design: {
...@@ -43,6 +43,6 @@ export default { ...@@ -43,6 +43,6 @@ export default {
:aria-label="title" :aria-label="title"
class="btn btn-default" class="btn btn-default"
> >
<icon :name="iconName" /> <gl-icon :name="iconName" />
</router-link> </router-link>
</template> </template>
...@@ -5,7 +5,6 @@ import { GlButtonGroup, GlButton, GlIcon, GlTooltipDirective } from '@gitlab/ui' ...@@ -5,7 +5,6 @@ import { GlButtonGroup, GlButton, GlIcon, GlTooltipDirective } from '@gitlab/ui'
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
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 Icon from '~/vue_shared/components/icon.vue';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue'; import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue'; import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
...@@ -39,7 +38,6 @@ import { setUrlParams } from '../../lib/utils/url_utility'; ...@@ -39,7 +38,6 @@ import { setUrlParams } from '../../lib/utils/url_utility';
export default { export default {
components: { components: {
UserAvatarLink, UserAvatarLink,
Icon,
ClipboardButton, ClipboardButton,
TimeAgoTooltip, TimeAgoTooltip,
CommitPipelineStatus, CommitPipelineStatus,
...@@ -156,7 +154,7 @@ export default { ...@@ -156,7 +154,7 @@ export default {
type="button" type="button"
:aria-label="__('Toggle commit description')" :aria-label="__('Toggle commit description')"
> >
<icon :size="12" name="ellipsis_h" /> <gl-icon :size="12" name="ellipsis_h" />
</button> </button>
<div class="committer"> <div class="committer">
......
<script> <script>
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
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: {
Icon, GlIcon,
TimeAgo, TimeAgo,
}, },
props: { props: {
...@@ -29,7 +29,7 @@ export default { ...@@ -29,7 +29,7 @@ export default {
aria-expanded="false" aria-expanded="false"
> >
<span> {{ selectedVersionName }} </span> <span> {{ selectedVersionName }} </span>
<icon :size="12" name="angle-down" class="position-absolute" /> <gl-icon :size="12" name="angle-down" class="position-absolute" />
</a> </a>
<div class="dropdown-menu dropdown-select dropdown-menu-selectable"> <div class="dropdown-menu dropdown-select dropdown-menu-selectable">
<div class="dropdown-content"> <div class="dropdown-content">
......
<script> <script>
import { mapActions } from 'vuex'; import { mapActions } from 'vuex';
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import noteableDiscussion from '../../notes/components/noteable_discussion.vue'; import noteableDiscussion from '../../notes/components/noteable_discussion.vue';
export default { export default {
components: { components: {
noteableDiscussion, noteableDiscussion,
Icon, GlIcon,
}, },
props: { props: {
discussions: { discussions: {
...@@ -70,7 +70,7 @@ export default { ...@@ -70,7 +70,7 @@ export default {
class="js-diff-notes-toggle" class="js-diff-notes-toggle"
@click="toggleDiscussion({ discussionId: discussion.id })" @click="toggleDiscussion({ discussionId: discussion.id })"
> >
<icon v-if="discussion.expanded" name="collapse" class="collapse-icon" /> <gl-icon v-if="discussion.expanded" name="collapse" class="collapse-icon" />
<template v-else> <template v-else>
{{ index + 1 }} {{ index + 1 }}
</template> </template>
......
<script> <script>
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import { GlIcon } from '@gitlab/ui';
import { deprecatedCreateFlash as createFlash } from '~/flash'; import { deprecatedCreateFlash as createFlash } from '~/flash';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import { UNFOLD_COUNT, INLINE_DIFF_VIEW_TYPE, PARALLEL_DIFF_VIEW_TYPE } from '../constants'; import { UNFOLD_COUNT, INLINE_DIFF_VIEW_TYPE, PARALLEL_DIFF_VIEW_TYPE } from '../constants';
import * as utils from '../store/utils'; import * as utils from '../store/utils';
import tooltip from '../../vue_shared/directives/tooltip'; import tooltip from '../../vue_shared/directives/tooltip';
...@@ -26,7 +26,7 @@ export default { ...@@ -26,7 +26,7 @@ export default {
tooltip, tooltip,
}, },
components: { components: {
Icon, GlIcon,
}, },
props: { props: {
fileHash: { fileHash: {
...@@ -237,7 +237,7 @@ export default { ...@@ -237,7 +237,7 @@ export default {
:title="__('Expand up')" :title="__('Expand up')"
@click="handleExpandLines(EXPAND_UP)" @click="handleExpandLines(EXPAND_UP)"
> >
<icon :size="12" name="expand-up" aria-hidden="true" /> <gl-icon :size="12" name="expand-up" aria-hidden="true" />
</a> </a>
<a class="mx-2 cursor-pointer js-unfold-all" @click="handleExpandLines()"> <a class="mx-2 cursor-pointer js-unfold-all" @click="handleExpandLines()">
<span>{{ s__('Diffs|Show unchanged lines') }}</span> <span>{{ s__('Diffs|Show unchanged lines') }}</span>
...@@ -251,7 +251,7 @@ export default { ...@@ -251,7 +251,7 @@ export default {
:title="__('Expand down')" :title="__('Expand down')"
@click="handleExpandLines(EXPAND_DOWN)" @click="handleExpandLines(EXPAND_DOWN)"
> >
<icon :size="12" name="expand-down" aria-hidden="true" /> <gl-icon :size="12" name="expand-down" aria-hidden="true" />
</a> </a>
</div> </div>
</td> </td>
......
<script> <script>
import { escape } from 'lodash'; import { escape } from 'lodash';
import { mapActions, mapGetters } from 'vuex'; import { mapActions, mapGetters } from 'vuex';
import { GlDeprecatedButton, GlTooltipDirective, GlLoadingIcon } from '@gitlab/ui'; import { GlDeprecatedButton, GlTooltipDirective, GlLoadingIcon, GlIcon } from '@gitlab/ui';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue'; import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import Icon from '~/vue_shared/components/icon.vue';
import FileIcon from '~/vue_shared/components/file_icon.vue'; import FileIcon from '~/vue_shared/components/file_icon.vue';
import { truncateSha } from '~/lib/utils/text_utility'; import { truncateSha } from '~/lib/utils/text_utility';
import { __, s__, sprintf } from '~/locale'; import { __, s__, sprintf } from '~/locale';
...@@ -18,7 +17,7 @@ export default { ...@@ -18,7 +17,7 @@ export default {
GlDeprecatedButton, GlDeprecatedButton,
ClipboardButton, ClipboardButton,
EditButton, EditButton,
Icon, GlIcon,
FileIcon, FileIcon,
DiffStats, DiffStats,
}, },
...@@ -162,7 +161,7 @@ export default { ...@@ -162,7 +161,7 @@ export default {
@click.self="handleToggleFile" @click.self="handleToggleFile"
> >
<div class="file-header-content"> <div class="file-header-content">
<icon <gl-icon
v-if="collapsible" v-if="collapsible"
ref="collapseIcon" ref="collapseIcon"
:name="collapseIcon" :name="collapseIcon"
...@@ -237,7 +236,7 @@ export default { ...@@ -237,7 +236,7 @@ export default {
type="button" type="button"
@click="toggleFileDiscussionWrappers(diffFile)" @click="toggleFileDiscussionWrappers(diffFile)"
> >
<icon name="comment" /> <gl-icon name="comment" />
</gl-deprecated-button> </gl-deprecated-button>
</span> </span>
...@@ -273,8 +272,8 @@ export default { ...@@ -273,8 +272,8 @@ export default {
@click="toggleFullDiff(diffFile.file_path)" @click="toggleFullDiff(diffFile.file_path)"
> >
<gl-loading-icon v-if="diffFile.isLoadingFullFile" color="dark" inline /> <gl-loading-icon v-if="diffFile.isLoadingFullFile" color="dark" inline />
<icon v-else-if="diffFile.isShowingFullFile" name="doc-changes" /> <gl-icon v-else-if="diffFile.isShowingFullFile" name="doc-changes" />
<icon v-else name="doc-expand" /> <gl-icon v-else name="doc-expand" />
</gl-deprecated-button> </gl-deprecated-button>
<gl-deprecated-button <gl-deprecated-button
ref="viewButton" ref="viewButton"
...@@ -287,7 +286,7 @@ export default { ...@@ -287,7 +286,7 @@ export default {
data-track-property="diff_toggle_view_sha" data-track-property="diff_toggle_view_sha"
:title="viewFileButtonText" :title="viewFileButtonText"
> >
<icon name="doc-text" /> <gl-icon name="doc-text" />
</gl-deprecated-button> </gl-deprecated-button>
<a <a
...@@ -303,7 +302,7 @@ export default { ...@@ -303,7 +302,7 @@ export default {
data-track-property="diff_toggle_external" data-track-property="diff_toggle_external"
class="btn btn-file-option" class="btn btn-file-option"
> >
<icon name="external-link" /> <gl-icon name="external-link" />
</a> </a>
</div> </div>
</div> </div>
......
<script> <script>
import { GlTooltipDirective } from '@gitlab/ui'; import { GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { n__ } from '~/locale'; import { n__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import { truncate } from '~/lib/utils/text_utility'; import { truncate } from '~/lib/utils/text_utility';
import UserAvatarImage from '~/vue_shared/components/user_avatar/user_avatar_image.vue'; import UserAvatarImage from '~/vue_shared/components/user_avatar/user_avatar_image.vue';
import { COUNT_OF_AVATARS_IN_GUTTER, LENGTH_OF_AVATAR_TOOLTIP } from '../constants'; import { COUNT_OF_AVATARS_IN_GUTTER, LENGTH_OF_AVATAR_TOOLTIP } from '../constants';
export default { export default {
components: { components: {
Icon, GlIcon,
UserAvatarImage, UserAvatarImage,
}, },
directives: { directives: {
...@@ -68,7 +67,7 @@ export default { ...@@ -68,7 +67,7 @@ export default {
class="diff-notes-collapse js-diff-comment-avatar js-diff-comment-button" class="diff-notes-collapse js-diff-comment-avatar js-diff-comment-button"
@click="$emit('toggleLineDiscussions')" @click="$emit('toggleLineDiscussions')"
> >
<icon :size="12" name="collapse" /> <gl-icon :size="12" name="collapse" />
</button> </button>
<template v-else> <template v-else>
<user-avatar-image <user-avatar-image
......
<script> <script>
import { isNumber } from 'lodash'; import { isNumber } from 'lodash';
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import { n__ } from '~/locale'; import { n__ } from '~/locale';
export default { export default {
components: { Icon }, components: { GlIcon },
props: { props: {
addedLines: { addedLines: {
type: Number, type: Number,
...@@ -46,7 +46,7 @@ export default { ...@@ -46,7 +46,7 @@ export default {
}" }"
> >
<div v-if="hasDiffFiles" class="diff-stats-group"> <div v-if="hasDiffFiles" class="diff-stats-group">
<icon name="doc-code" class="diff-stats-icon text-secondary" /> <gl-icon name="doc-code" class="diff-stats-icon text-secondary" />
<span class="text-secondary bold">{{ diffFilesCountText }} {{ filesText }}</span> <span class="text-secondary bold">{{ diffFilesCountText }} {{ filesText }}</span>
</div> </div>
<div <div
......
<script> <script>
import { GlTooltipDirective, GlDeprecatedButton } from '@gitlab/ui'; import { GlTooltipDirective, GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
GlDeprecatedButton, GlDeprecatedButton,
Icon, GlIcon,
}, },
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
...@@ -59,7 +58,7 @@ export default { ...@@ -59,7 +58,7 @@ export default {
class="rounded-0 js-edit-blob" class="rounded-0 js-edit-blob"
@click.native="handleEditClick" @click.native="handleEditClick"
> >
<icon name="pencil" /> <gl-icon name="pencil" />
</gl-deprecated-button> </gl-deprecated-button>
</span> </span>
</template> </template>
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
import { mapActions, mapGetters } from 'vuex'; import { mapActions, mapGetters } from 'vuex';
import { isArray } from 'lodash'; import { isArray } from 'lodash';
import imageDiffMixin from 'ee_else_ce/diffs/mixins/image_diff'; import imageDiffMixin from 'ee_else_ce/diffs/mixins/image_diff';
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
export default { export default {
name: 'ImageDiffOverlay', name: 'ImageDiffOverlay',
components: { components: {
Icon, GlIcon,
}, },
mixins: [imageDiffMixin], mixins: [imageDiffMixin],
props: { props: {
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
type="button" type="button"
@click="clickedToggle(discussion)" @click="clickedToggle(discussion)"
> >
<icon v-if="showCommentIcon" name="image-comment-dark" /> <gl-icon v-if="showCommentIcon" name="image-comment-dark" />
<template v-else> <template v-else>
{{ toggleText(discussion, index) }} {{ toggleText(discussion, index) }}
</template> </template>
...@@ -127,7 +127,7 @@ export default { ...@@ -127,7 +127,7 @@ export default {
class="btn-transparent comment-indicator" class="btn-transparent comment-indicator"
type="button" type="button"
> >
<icon name="image-comment-dark" /> <gl-icon name="image-comment-dark" />
</button> </button>
</div> </div>
</template> </template>
<script> <script>
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
GlDeprecatedButton, GlDeprecatedButton,
Icon, GlIcon,
}, },
computed: { computed: {
...mapGetters('diffs', ['isInlineView', 'isParallelView']), ...mapGetters('diffs', ['isInlineView', 'isParallelView']),
...@@ -31,7 +30,7 @@ export default { ...@@ -31,7 +30,7 @@ export default {
data-toggle="dropdown" data-toggle="dropdown"
data-display="static" data-display="static"
> >
<icon name="settings" /> <icon name="chevron-down" /> <gl-icon name="settings" /> <gl-icon name="chevron-down" />
</button> </button>
<div class="dropdown-menu dropdown-menu-right p-2 pt-3 pb-3"> <div class="dropdown-menu dropdown-menu-right p-2 pt-3 pb-3">
<div> <div>
......
<script> <script>
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import { GlTooltipDirective } from '@gitlab/ui'; import { GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { s__, sprintf } from '~/locale'; import { s__, sprintf } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import FileTree from '~/vue_shared/components/file_tree.vue'; import FileTree from '~/vue_shared/components/file_tree.vue';
import DiffFileRow from './diff_file_row.vue'; import DiffFileRow from './diff_file_row.vue';
...@@ -11,7 +10,7 @@ export default { ...@@ -11,7 +10,7 @@ export default {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
}, },
components: { components: {
Icon, GlIcon,
FileTree, FileTree,
}, },
props: { props: {
...@@ -66,7 +65,7 @@ export default { ...@@ -66,7 +65,7 @@ export default {
<div class="tree-list-holder d-flex flex-column"> <div class="tree-list-holder d-flex flex-column">
<div class="gl-mb-3 position-relative tree-list-search d-flex"> <div class="gl-mb-3 position-relative tree-list-search d-flex">
<div class="flex-fill d-flex"> <div class="flex-fill d-flex">
<icon name="search" class="position-absolute tree-list-icon" /> <gl-icon name="search" class="position-absolute tree-list-icon" />
<label for="diff-tree-search" class="sr-only">{{ $options.searchPlaceholder }}</label> <label for="diff-tree-search" class="sr-only">{{ $options.searchPlaceholder }}</label>
<input <input
id="diff-tree-search" id="diff-tree-search"
...@@ -83,7 +82,7 @@ export default { ...@@ -83,7 +82,7 @@ export default {
class="position-absolute bg-transparent tree-list-icon tree-list-clear-icon border-0 p-0" class="position-absolute bg-transparent tree-list-icon tree-list-clear-icon border-0 p-0"
@click="clearSearch" @click="clearSearch"
> >
<icon name="close" /> <gl-icon name="close" />
</button> </button>
</div> </div>
</div> </div>
......
<script> <script>
import { GlLink } from '@gitlab/ui'; import { GlLink, GlIcon } from '@gitlab/ui';
import UserAvatarImage from '~/vue_shared/components/user_avatar/user_avatar_image.vue'; import UserAvatarImage from '~/vue_shared/components/user_avatar/user_avatar_image.vue';
import TotalTime from './total_time_component.vue'; import TotalTime from './total_time_component.vue';
import Icon from '~/vue_shared/components/icon.vue';
import iconBranch from '../svg/icon_branch.svg'; import iconBranch from '../svg/icon_branch.svg';
import iconBuildStatus from '../svg/icon_build_status.svg'; import iconBuildStatus from '../svg/icon_build_status.svg';
...@@ -10,7 +9,7 @@ export default { ...@@ -10,7 +9,7 @@ export default {
components: { components: {
UserAvatarImage, UserAvatarImage,
TotalTime, TotalTime,
Icon, GlIcon,
GlLink, GlLink,
}, },
props: { props: {
...@@ -55,7 +54,7 @@ export default { ...@@ -55,7 +54,7 @@ export default {
<gl-link :href="url" class="item-build-name">{{ name }}</gl-link> &middot; <gl-link :href="url" class="item-build-name">{{ name }}</gl-link> &middot;
</template> </template>
<gl-link :href="url" class="pipeline-id">#{{ id }}</gl-link> <gl-link :href="url" class="pipeline-id">#{{ id }}</gl-link>
<icon :size="16" name="fork" /> <gl-icon :size="16" name="fork" />
<gl-link :href="branch.url" class="ref-name">{{ branch.name }}</gl-link> <gl-link :href="branch.url" class="ref-name">{{ branch.name }}</gl-link>
<span class="icon-branch" v-html="iconBranch"></span> <span class="icon-branch" v-html="iconBranch"></span>
<gl-link :href="commitUrl" class="commit-sha">{{ shortSha }}</gl-link> <gl-link :href="commitUrl" class="commit-sha">{{ shortSha }}</gl-link>
......
<script> <script>
import { GlTooltip } from '@gitlab/ui'; import { GlTooltip, GlIcon } from '@gitlab/ui';
import icon from '~/vue_shared/components/icon.vue';
export default { export default {
name: 'IssueCardWeight', name: 'IssueCardWeight',
components: { components: {
icon, GlIcon,
GlTooltip, GlTooltip,
}, },
props: { props: {
...@@ -30,7 +29,7 @@ export default { ...@@ -30,7 +29,7 @@ export default {
tabindex="1" tabindex="1"
v-on="$listeners" v-on="$listeners"
> >
<icon name="weight" class="board-card-info-icon" /> <gl-icon name="weight" class="board-card-info-icon" />
<span class="board-card-info-text"> {{ weight }} </span> <span class="board-card-info-text"> {{ weight }} </span>
<gl-tooltip <gl-tooltip
:target="() => $refs.itemWeight" :target="() => $refs.itemWeight"
......
...@@ -59,7 +59,7 @@ exports[`Design management list item component with notes renders item with mult ...@@ -59,7 +59,7 @@ exports[`Design management list item component with notes renders item with mult
<div <div
class="ml-auto d-flex align-items-center text-secondary" class="ml-auto d-flex align-items-center text-secondary"
> >
<icon-stub <gl-icon-stub
class="ml-1" class="ml-1"
name="comments" name="comments"
size="16" size="16"
...@@ -129,7 +129,7 @@ exports[`Design management list item component with notes renders item with sing ...@@ -129,7 +129,7 @@ exports[`Design management list item component with notes renders item with sing
<div <div
class="ml-auto d-flex align-items-center text-secondary" class="ml-auto d-flex align-items-center text-secondary"
> >
<icon-stub <gl-icon-stub
class="ml-1" class="ml-1"
name="comments" name="comments"
size="16" size="16"
......
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { createLocalVue, shallowMount } from '@vue/test-utils';
import { GlIcon, GlLoadingIcon, GlIntersectionObserver } from '@gitlab/ui'; import { GlIcon, GlLoadingIcon, GlIntersectionObserver } from '@gitlab/ui';
import VueRouter from 'vue-router'; import VueRouter from 'vue-router';
import Icon from '~/vue_shared/components/icon.vue';
import Item from '~/design_management/components/list/item.vue'; import Item from '~/design_management/components/list/item.vue';
const localVue = createLocalVue(); const localVue = createLocalVue();
...@@ -20,7 +19,7 @@ describe('Design management list item component', () => { ...@@ -20,7 +19,7 @@ describe('Design management list item component', () => {
let wrapper; let wrapper;
const findDesignEvent = () => wrapper.find('[data-testid="designEvent"]'); const findDesignEvent = () => wrapper.find('[data-testid="designEvent"]');
const findEventIcon = () => findDesignEvent().find(Icon); const findEventIcon = () => findDesignEvent().find(GlIcon);
const findLoadingIcon = () => wrapper.find(GlLoadingIcon); const findLoadingIcon = () => wrapper.find(GlLoadingIcon);
function createComponent({ function createComponent({
......
...@@ -59,7 +59,7 @@ exports[`Design management list item component with notes renders item with mult ...@@ -59,7 +59,7 @@ exports[`Design management list item component with notes renders item with mult
<div <div
class="ml-auto d-flex align-items-center text-secondary" class="ml-auto d-flex align-items-center text-secondary"
> >
<icon-stub <gl-icon-stub
class="ml-1" class="ml-1"
name="comments" name="comments"
size="16" size="16"
...@@ -129,7 +129,7 @@ exports[`Design management list item component with notes renders item with sing ...@@ -129,7 +129,7 @@ exports[`Design management list item component with notes renders item with sing
<div <div
class="ml-auto d-flex align-items-center text-secondary" class="ml-auto d-flex align-items-center text-secondary"
> >
<icon-stub <gl-icon-stub
class="ml-1" class="ml-1"
name="comments" name="comments"
size="16" size="16"
......
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { createLocalVue, shallowMount } from '@vue/test-utils';
import { GlIcon, GlLoadingIcon, GlIntersectionObserver } from '@gitlab/ui'; import { GlIcon, GlLoadingIcon, GlIntersectionObserver } from '@gitlab/ui';
import VueRouter from 'vue-router'; import VueRouter from 'vue-router';
import Icon from '~/vue_shared/components/icon.vue';
import Item from '~/design_management_legacy/components/list/item.vue'; import Item from '~/design_management_legacy/components/list/item.vue';
const localVue = createLocalVue(); const localVue = createLocalVue();
...@@ -20,7 +19,7 @@ describe('Design management list item component', () => { ...@@ -20,7 +19,7 @@ describe('Design management list item component', () => {
let wrapper; let wrapper;
const findDesignEvent = () => wrapper.find('[data-testid="designEvent"]'); const findDesignEvent = () => wrapper.find('[data-testid="designEvent"]');
const findEventIcon = () => findDesignEvent().find(Icon); const findEventIcon = () => findDesignEvent().find(GlIcon);
const findLoadingIcon = () => wrapper.find(GlLoadingIcon); const findLoadingIcon = () => wrapper.find(GlLoadingIcon);
function createComponent({ function createComponent({
......
...@@ -8,7 +8,7 @@ exports[`Design management toolbar component renders design and updated data 1`] ...@@ -8,7 +8,7 @@ exports[`Design management toolbar component renders design and updated data 1`]
aria-label="Go back to designs" aria-label="Go back to designs"
class="mr-3 text-plain d-flex justify-content-center align-items-center" class="mr-3 text-plain d-flex justify-content-center align-items-center"
> >
<icon-stub <gl-icon-stub
name="close" name="close"
size="18" size="18"
/> />
...@@ -41,7 +41,7 @@ exports[`Design management toolbar component renders design and updated data 1`] ...@@ -41,7 +41,7 @@ exports[`Design management toolbar component renders design and updated data 1`]
size="md" size="md"
variant="secondary" variant="secondary"
> >
<icon-stub <gl-icon-stub
name="download" name="download"
size="18" size="18"
/> />
...@@ -52,7 +52,7 @@ exports[`Design management toolbar component renders design and updated data 1`] ...@@ -52,7 +52,7 @@ exports[`Design management toolbar component renders design and updated data 1`]
buttonvariant="danger" buttonvariant="danger"
hasselecteddesigns="true" hasselecteddesigns="true"
> >
<icon-stub <gl-icon-stub
name="remove" name="remove"
size="18" size="18"
/> />
......
...@@ -7,7 +7,7 @@ exports[`Design management pagination button component disables button when no d ...@@ -7,7 +7,7 @@ exports[`Design management pagination button component disables button when no d
disabled="true" disabled="true"
to="[object Object]" to="[object Object]"
> >
<icon-stub <gl-icon-stub
name="angle-right" name="angle-right"
size="16" size="16"
/> />
...@@ -20,7 +20,7 @@ exports[`Design management pagination button component renders router-link 1`] = ...@@ -20,7 +20,7 @@ exports[`Design management pagination button component renders router-link 1`] =
class="btn btn-default" class="btn btn-default"
to="[object Object]" to="[object Object]"
> >
<icon-stub <gl-icon-stub
name="angle-right" name="angle-right"
size="16" size="16"
/> />
......
import { mount, createLocalVue } from '@vue/test-utils'; import { mount, createLocalVue } from '@vue/test-utils';
import { GlIcon } from '@gitlab/ui';
import DiffDiscussions from '~/diffs/components/diff_discussions.vue'; import DiffDiscussions from '~/diffs/components/diff_discussions.vue';
import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue'; import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue';
import NoteableDiscussion from '~/notes/components/noteable_discussion.vue'; import NoteableDiscussion from '~/notes/components/noteable_discussion.vue';
import DiscussionNotes from '~/notes/components/discussion_notes.vue'; import DiscussionNotes from '~/notes/components/discussion_notes.vue';
import Icon from '~/vue_shared/components/icon.vue';
import { createStore } from '~/mr_notes/stores'; import { createStore } from '~/mr_notes/stores';
import '~/behaviors/markdown/render_gfm'; import '~/behaviors/markdown/render_gfm';
import discussionsMockData from '../mock_data/diff_discussions'; import discussionsMockData from '../mock_data/diff_discussions';
...@@ -51,7 +51,7 @@ describe('DiffDiscussions', () => { ...@@ -51,7 +51,7 @@ describe('DiffDiscussions', () => {
const diffNotesToggle = findDiffNotesToggle(); const diffNotesToggle = findDiffNotesToggle();
expect(diffNotesToggle.exists()).toBe(true); expect(diffNotesToggle.exists()).toBe(true);
expect(diffNotesToggle.find(Icon).exists()).toBe(true); expect(diffNotesToggle.find(GlIcon).exists()).toBe(true);
expect(diffNotesToggle.classes('diff-notes-collapse')).toBe(true); expect(diffNotesToggle.classes('diff-notes-collapse')).toBe(true);
}); });
......
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex'; import Vuex from 'vuex';
import { GlIcon } from '@gitlab/ui';
import DiffFileHeader from '~/diffs/components/diff_file_header.vue'; import DiffFileHeader from '~/diffs/components/diff_file_header.vue';
import EditButton from '~/diffs/components/edit_button.vue'; import EditButton from '~/diffs/components/edit_button.vue';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue'; import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import Icon from '~/vue_shared/components/icon.vue';
import diffDiscussionsMockData from '../mock_data/diff_discussions'; import diffDiscussionsMockData from '../mock_data/diff_discussions';
import { truncateSha } from '~/lib/utils/text_utility'; import { truncateSha } from '~/lib/utils/text_utility';
import { diffViewerModes } from '~/ide/constants'; import { diffViewerModes } from '~/ide/constants';
...@@ -70,7 +70,7 @@ describe('DiffFileHeader component', () => { ...@@ -70,7 +70,7 @@ describe('DiffFileHeader component', () => {
const findCollapseIcon = () => wrapper.find({ ref: 'collapseIcon' }); const findCollapseIcon = () => wrapper.find({ ref: 'collapseIcon' });
const findIconByName = iconName => { const findIconByName = iconName => {
const icons = wrapper.findAll(Icon).filter(w => w.props('name') === iconName); const icons = wrapper.findAll(GlIcon).filter(w => w.props('name') === iconName);
if (icons.length === 0) return icons; if (icons.length === 0) return icons;
if (icons.length > 1) { if (icons.length > 1) {
throw new Error(`Multiple icons found for ${iconName}`); throw new Error(`Multiple icons found for ${iconName}`);
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlIcon } from '@gitlab/ui';
import DiffStats from '~/diffs/components/diff_stats.vue'; import DiffStats from '~/diffs/components/diff_stats.vue';
import Icon from '~/vue_shared/components/icon.vue';
const TEST_ADDED_LINES = 100; const TEST_ADDED_LINES = 100;
const TEST_REMOVED_LINES = 200; const TEST_REMOVED_LINES = 200;
...@@ -53,7 +53,7 @@ describe('diff_stats', () => { ...@@ -53,7 +53,7 @@ describe('diff_stats', () => {
describe('files changes', () => { describe('files changes', () => {
const findIcon = name => const findIcon = name =>
wrapper wrapper
.findAll(Icon) .findAll(GlIcon)
.filter(c => c.attributes('name') === name) .filter(c => c.attributes('name') === name)
.at(0).element.parentNode; .at(0).element.parentNode;
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlIcon } from '@gitlab/ui';
import ImageDiffOverlay from '~/diffs/components/image_diff_overlay.vue'; import ImageDiffOverlay from '~/diffs/components/image_diff_overlay.vue';
import { createStore } from '~/mr_notes/stores'; import { createStore } from '~/mr_notes/stores';
import { imageDiffDiscussions } from '../mock_data/diff_discussions'; import { imageDiffDiscussions } from '../mock_data/diff_discussions';
import Icon from '~/vue_shared/components/icon.vue';
describe('Diffs image diff overlay component', () => { describe('Diffs image diff overlay component', () => {
const dimensions = { const dimensions = {
...@@ -64,7 +64,7 @@ describe('Diffs image diff overlay component', () => { ...@@ -64,7 +64,7 @@ describe('Diffs image diff overlay component', () => {
it('renders icon when showCommentIcon is true', () => { it('renders icon when showCommentIcon is true', () => {
createComponent({ showCommentIcon: true }); createComponent({ showCommentIcon: true });
expect(wrapper.find(Icon).exists()).toBe(true); expect(wrapper.find(GlIcon).exists()).toBe(true);
}); });
it('sets badge comment positions', () => { it('sets badge comment positions', () => {
......
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