Commit 6d80f571 authored by Lukas Eipert's avatar Lukas Eipert

Utilize GitLab UI icon component: environments to performance_bar

This replaces all the usages of ~/vue_shared/components/icon.vue with
the corresponding GitLab UI component for all components from
environments to performance_bar (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>
import { GlLoadingIcon } from '@gitlab/ui';
import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { __, s__, sprintf } from '~/locale';
import { formatTime } from '~/lib/utils/datetime_utility';
import Icon from '~/vue_shared/components/icon.vue';
import eventHub from '../event_hub';
import tooltip from '../../vue_shared/directives/tooltip';
......@@ -11,7 +10,7 @@ export default {
tooltip,
},
components: {
Icon,
GlIcon,
GlLoadingIcon,
},
props: {
......@@ -80,8 +79,8 @@ export default {
data-toggle="dropdown"
>
<span>
<icon name="play" />
<icon name="chevron-down" />
<gl-icon name="play" />
<gl-icon name="chevron-down" />
<gl-loading-icon v-if="isLoading" />
</span>
</button>
......@@ -97,7 +96,7 @@ export default {
>
<span class="flex-fill">{{ action.name }}</span>
<span v-if="action.scheduledAt" class="text-secondary">
<icon name="clock" />
<gl-icon name="clock" />
{{ remainingTime(action) }}
</span>
</button>
......
......@@ -5,15 +5,14 @@
*/
import $ from 'jquery';
import { GlTooltipDirective } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { s__ } from '~/locale';
import eventHub from '../event_hub';
import LoadingButton from '../../vue_shared/components/loading_button.vue';
export default {
components: {
Icon,
GlIcon,
LoadingButton,
},
directives: {
......@@ -65,6 +64,6 @@ export default {
data-target="#delete-environment-modal"
@click="onClick"
>
<icon name="remove" />
<gl-icon name="remove" />
</loading-button>
</template>
<script>
/* eslint-disable @gitlab/vue-require-i18n-strings */
import { isEmpty } from 'lodash';
import { GlTooltipDirective } from '@gitlab/ui';
import { GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import timeagoMixin from '~/vue_shared/mixins/timeago';
import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue';
import CommitComponent from '~/vue_shared/components/commit.vue';
import Icon from '~/vue_shared/components/icon.vue';
import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate.vue';
import eventHub from '../event_hub';
import ActionsComponent from './environment_actions.vue';
......@@ -30,7 +29,7 @@ export default {
ActionsComponent,
CommitComponent,
ExternalUrlComponent,
Icon,
GlIcon,
MonitoringButtonComponent,
PinComponent,
DeleteComponent,
......@@ -535,7 +534,7 @@ export default {
</div>
<span v-if="shouldRenderDeployBoard" class="deploy-board-icon" @click="toggleDeployBoard">
<icon :name="deployIconName" />
<gl-icon :name="deployIconName" />
</span>
<span
......@@ -560,9 +559,9 @@ export default {
role="button"
@click="onClickFolder"
>
<icon :name="folderIconName" class="folder-icon" />
<gl-icon :name="folderIconName" class="folder-icon" />
<icon name="folder" class="folder-icon" />
<gl-icon name="folder" class="folder-icon" />
<span> {{ model.folderName }} </span>
......
<script>
import { GlDeprecatedButton, GlTooltipDirective } from '@gitlab/ui';
import { GlDeprecatedButton, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale';
/**
* Renders the Monitoring (Metrics) link in environments table.
*/
import Icon from '~/vue_shared/components/icon.vue';
export default {
components: {
Icon,
GlIcon,
GlDeprecatedButton,
},
directives: {
......@@ -37,6 +35,6 @@ export default {
rel="noopener noreferrer nofollow"
variant="default"
>
<icon name="chart" />
<gl-icon name="chart" />
</gl-deprecated-button>
</template>
......@@ -3,14 +3,13 @@
* Renders a prevent auto-stop button.
* Used in environments table.
*/
import { GlDeprecatedButton, GlTooltipDirective } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { GlDeprecatedButton, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale';
import eventHub from '../event_hub';
export default {
components: {
Icon,
GlIcon,
GlDeprecatedButton,
},
directives: {
......@@ -37,6 +36,6 @@ export default {
:aria-label="$options.title"
@click="onPinClick"
>
<icon name="thumbtack" />
<gl-icon name="thumbtack" />
</gl-deprecated-button>
</template>
......@@ -10,14 +10,14 @@ import {
GlLoadingIcon,
GlModalDirective,
GlDeprecatedButton,
GlIcon,
} from '@gitlab/ui';
import { s__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import eventHub from '../event_hub';
export default {
components: {
Icon,
GlIcon,
GlLoadingIcon,
GlDeprecatedButton,
},
......@@ -81,7 +81,7 @@ export default {
class="d-none d-md-block text-secondary"
@click="onClick"
>
<icon v-if="isLastDeployment" name="repeat" /> <icon v-else name="redo" />
<gl-icon v-if="isLastDeployment" name="repeat" /> <gl-icon v-else name="redo" />
<gl-loading-icon v-if="isLoading" />
</gl-deprecated-button>
</template>
......@@ -3,13 +3,12 @@
* Renders a terminal button to open a web terminal.
* Used in environments table.
*/
import { GlTooltipDirective } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale';
export default {
components: {
Icon,
GlIcon,
},
directives: {
GlTooltip: GlTooltipDirective,
......@@ -42,6 +41,6 @@ export default {
:class="{ disabled: disabled }"
class="btn terminal-button d-none d-sm-none d-md-block text-secondary"
>
<icon name="terminal" />
<gl-icon name="terminal" />
</a>
</template>
......@@ -11,10 +11,10 @@ import {
GlDeprecatedDropdown,
GlDeprecatedDropdownItem,
GlDeprecatedDropdownDivider,
GlIcon,
} from '@gitlab/ui';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { __, sprintf, n__ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate.vue';
import Stacktrace from './stacktrace.vue';
import TrackEventDirective from '~/vue_shared/directives/track_event';
......@@ -38,7 +38,7 @@ export default {
GlLink,
GlLoadingIcon,
TooltipOnTruncate,
Icon,
GlIcon,
Stacktrace,
GlBadge,
GlAlert,
......@@ -397,7 +397,7 @@ export default {
data-testid="external-url-link"
>
<span class="text-truncate">{{ error.externalUrl }}</span>
<icon name="external-link" class="ml-1 flex-shrink-0" />
<gl-icon name="external-link" class="ml-1 flex-shrink-0" />
</gl-link>
</li>
<li v-if="error.firstReleaseVersion">
......
<script>
import { GlTooltip, GlSprintf } from '@gitlab/ui';
import { GlTooltip, GlSprintf, GlIcon } from '@gitlab/ui';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import FileIcon from '~/vue_shared/components/file_icon.vue';
import Icon from '~/vue_shared/components/icon.vue';
export default {
components: {
ClipboardButton,
FileIcon,
Icon,
GlIcon,
GlSprintf,
},
directives: {
......@@ -80,7 +79,7 @@ export default {
<div ref="header" class="file-title file-title-flex-parent">
<div class="file-header-content d-flex align-content-center">
<div v-if="hasCode" class="d-inline-block cursor-pointer" @click="toggle()">
<icon :name="collapseIcon" :size="16" aria-hidden="true" class="gl-mr-2" />
<gl-icon :name="collapseIcon" :size="16" aria-hidden="true" class="gl-mr-2" />
</div>
<file-icon :file-name="filePath" :size="18" aria-hidden="true" css-classes="gl-mr-2" />
<strong
......
<script>
import { mapActions, mapState } from 'vuex';
import { GlFormInput } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { GlFormInput, GlIcon } from '@gitlab/ui';
import LoadingButton from '~/vue_shared/components/loading_button.vue';
export default {
components: { GlFormInput, Icon, LoadingButton },
components: { GlFormInput, GlIcon, LoadingButton },
computed: {
...mapState(['apiHost', 'connectError', 'connectSuccessful', 'isLoadingProjects', 'token']),
tokenInputState() {
......@@ -64,7 +63,7 @@ export default {
:loading="isLoadingProjects"
@click="fetchProjects"
/>
<icon
<gl-icon
v-show="connectSuccessful"
class="js-error-tracking-connect-success gl-ml-2 text-success align-middle"
:aria-label="__('Projects Successfully Retrieved')"
......
<script>
import { debounce } from 'lodash';
import { mapActions } from 'vuex';
import Icon from '~/vue_shared/components/icon.vue';
import { GlIcon } from '@gitlab/ui';
import eventHub from '../event_hub';
import frequentItemsMixin from './frequent_items_mixin';
export default {
components: {
Icon,
GlIcon,
},
mixins: [frequentItemsMixin],
data() {
......@@ -49,6 +49,6 @@ export default {
type="search"
class="form-control"
/>
<icon v-if="!searchQuery" name="search" class="search-icon" />
<gl-icon v-if="!searchQuery" name="search" class="search-icon" />
</div>
</template>
<script>
import { GlButton, GlFormGroup, GlFormInput, GlFormCheckbox } from '@gitlab/ui';
import { GlButton, GlFormGroup, GlFormInput, GlFormCheckbox, GlIcon } from '@gitlab/ui';
import { mapState, mapActions } from 'vuex';
import Icon from '~/vue_shared/components/icon.vue';
export default {
components: {
......@@ -9,7 +8,7 @@ export default {
GlFormCheckbox,
GlFormGroup,
GlFormInput,
Icon,
GlIcon,
},
data() {
return { placeholderUrl: 'https://my-url.grafana.net/' };
......@@ -89,7 +88,7 @@ export default {
rel="noopener noreferrer"
>
{{ __('More information') }}
<icon name="external-link" class="vertical-align-middle" />
<gl-icon name="external-link" class="vertical-align-middle" />
</a>
</p>
</gl-form-group>
......
<script>
import { GlIcon } from '@gitlab/ui';
import tooltip from '~/vue_shared/directives/tooltip';
import icon from '~/vue_shared/components/icon.vue';
import eventHub from '../event_hub';
import { COMMON_STR } from '../constants';
export default {
components: {
icon,
GlIcon,
},
directives: {
tooltip,
......@@ -56,7 +56,7 @@ export default {
class="leave-group btn btn-xs no-expand gl-text-gray-500 gl-ml-5"
@click.prevent="onLeaveGroup"
>
<icon name="leave" class="position-top-0" />
<gl-icon name="leave" class="position-top-0" />
</a>
<a
v-if="group.canEdit"
......@@ -68,7 +68,7 @@ export default {
data-placement="bottom"
class="edit-group btn btn-xs no-expand gl-text-gray-500 gl-ml-5"
>
<icon name="settings" class="position-top-0 align-middle" />
<gl-icon name="settings" class="position-top-0 align-middle" />
</a>
</div>
</template>
<script>
import icon from '~/vue_shared/components/icon.vue';
import { GlIcon } from '@gitlab/ui';
export default {
components: {
icon,
GlIcon,
},
props: {
isGroupOpen: {
......@@ -21,5 +21,5 @@ export default {
</script>
<template>
<span class="folder-caret gl-mr-2"> <icon :size="10" :name="iconClass" /> </span>
<span class="folder-caret gl-mr-2"> <gl-icon :size="10" :name="iconClass" /> </span>
</template>
<script>
import { GlIcon } from '@gitlab/ui';
import tooltip from '~/vue_shared/directives/tooltip';
import icon from '~/vue_shared/components/icon.vue';
export default {
components: {
icon,
GlIcon,
},
directives: {
tooltip,
......@@ -57,6 +57,6 @@ export default {
:title="title"
data-container="body"
>
<icon :name="iconName" /> <span v-if="isValuePresent" class="stat-value"> {{ value }} </span>
<gl-icon :name="iconName" /> <span v-if="isValuePresent" class="stat-value"> {{ value }} </span>
</span>
</template>
<script>
import icon from '~/vue_shared/components/icon.vue';
import { GlIcon } from '@gitlab/ui';
import { ITEM_TYPE } from '../constants';
export default {
components: {
icon,
GlIcon,
},
props: {
itemType: {
......@@ -29,5 +29,5 @@ export default {
</script>
<template>
<span class="item-type-icon"> <icon :name="iconClass" /> </span>
<span class="item-type-icon"> <gl-icon :name="iconClass" /> </span>
</template>
<script>
import { GlTooltipDirective } from '@gitlab/ui';
import { GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import Suggestion from './item.vue';
import query from '../queries/issues.query.graphql';
export default {
components: {
Suggestion,
Icon,
GlIcon,
},
directives: {
GlTooltip: GlTooltipDirective,
......@@ -70,7 +69,7 @@ export default {
<div v-show="showSuggestions" class="form-group row issuable-suggestions">
<div v-once class="col-form-label col-sm-2 pt-0">
{{ __('Similar issues') }}
<icon
<gl-icon
v-gl-tooltip.bottom
:title="$options.helpText"
:aria-label="$options.helpText"
......
<script>
/* eslint-disable @gitlab/vue-require-i18n-strings */
import { uniqueId } from 'lodash';
import { GlLink, GlTooltip, GlTooltipDirective } from '@gitlab/ui';
import { GlLink, GlTooltip, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import UserAvatarImage from '~/vue_shared/components/user_avatar/user_avatar_image.vue';
import TimeagoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
import timeago from '~/vue_shared/mixins/timeago';
......@@ -12,7 +11,7 @@ export default {
components: {
GlTooltip,
GlLink,
Icon,
GlIcon,
UserAvatarImage,
TimeagoTooltip,
},
......@@ -68,7 +67,7 @@ export default {
<template>
<div class="suggestion-item">
<div class="d-flex align-items-center">
<icon
<gl-icon
v-if="suggestion.confidential"
v-gl-tooltip.bottom
:title="__('Confidential')"
......@@ -84,7 +83,7 @@ export default {
</gl-link>
</div>
<div class="text-secondary suggestion-footer">
<icon
<gl-icon
ref="state"
:name="stateIcon"
:class="{
......@@ -134,7 +133,7 @@ export default {
:title="tooltipTitle"
class="suggestion-help-hover gl-ml-3 text-tertiary"
>
<icon :name="icon" /> {{ count }}
<gl-icon :name="icon" /> {{ count }}
</span>
</span>
</div>
......
<script>
import { throttle, isEmpty } from 'lodash';
import { mapGetters, mapState, mapActions } from 'vuex';
import { GlLoadingIcon } from '@gitlab/ui';
import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils';
import { isScrolledToBottom } from '~/lib/utils/scroll_utils';
import { polyfillSticky } from '~/lib/utils/sticky';
import CiHeader from '~/vue_shared/components/header_ci_component.vue';
import Callout from '~/vue_shared/components/callout.vue';
import Icon from '~/vue_shared/components/icon.vue';
import EmptyState from './empty_state.vue';
import EnvironmentsBlock from './environments_block.vue';
import ErasedBlock from './erased_block.vue';
......@@ -27,7 +26,7 @@ export default {
EmptyState,
EnvironmentsBlock,
ErasedBlock,
Icon,
GlIcon,
Log,
LogTopBar,
StuckBlock,
......@@ -266,7 +265,7 @@ export default {
:class="{ 'sticky-top border-bottom-0': hasTrace }"
data-testid="archived-job"
>
<icon name="lock" class="align-text-bottom" />
<gl-icon name="lock" class="align-text-bottom" />
{{ __('This job is archived. Only the complete pipeline can be retried.') }}
</div>
<!-- job log -->
......
<script>
import { GlLink } from '@gitlab/ui';
import { GlLink, GlIcon } from '@gitlab/ui';
import tooltip from '~/vue_shared/directives/tooltip';
import CiIcon from '~/vue_shared/components/ci_icon.vue';
import Icon from '~/vue_shared/components/icon.vue';
import delayedJobMixin from '~/jobs/mixins/delayed_job_mixin';
import { sprintf } from '~/locale';
export default {
components: {
CiIcon,
Icon,
GlIcon,
GlLink,
},
directives: {
......@@ -56,7 +55,7 @@ export default {
data-boundary="viewport"
class="js-job-link d-flex"
>
<icon
<gl-icon
v-if="isActive"
name="arrow-right"
class="js-arrow-right icon-arrow-right position-absolute d-block"
......@@ -66,7 +65,7 @@ export default {
<span class="text-truncate w-100">{{ job.name ? job.name : job.id }}</span>
<icon v-if="job.retried" name="retry" class="js-retry-icon" />
<gl-icon v-if="job.retried" name="retry" class="js-retry-icon" />
</gl-link>
</div>
</template>
<script>
import { GlTooltipDirective, GlLink, GlDeprecatedButton } from '@gitlab/ui';
import { GlTooltipDirective, GlLink, GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import { polyfillSticky } from '~/lib/utils/sticky';
import Icon from '~/vue_shared/components/icon.vue';
import { numberToHumanSize } from '~/lib/utils/number_utils';
import { __, sprintf } from '~/locale';
import scrollDown from '../svg/scroll_down.svg';
export default {
components: {
Icon,
GlIcon,
GlLink,
GlDeprecatedButton,
},
......@@ -95,7 +94,7 @@ export default {
class="controllers-buttons"
data-testid="job-raw-link-controller"
>
<icon name="doc-text" />
<gl-icon name="doc-text" />
</gl-link>
<gl-link
......@@ -108,7 +107,7 @@ export default {
data-testid="job-log-erase-link"
data-method="post"
>
<icon name="remove" />
<gl-icon name="remove" />
</gl-link>
<!-- eo links -->
......@@ -121,7 +120,7 @@ export default {
data-testid="job-controller-scroll-top"
@click="handleScrollToTop"
>
<icon name="scroll_up" />
<gl-icon name="scroll_up" />
</gl-deprecated-button>
</div>
......
<script>
import Icon from '~/vue_shared/components/icon.vue';
import { GlIcon } from '@gitlab/ui';
import LineNumber from './line_number.vue';
import DurationBadge from './duration_badge.vue';
export default {
components: {
Icon,
GlIcon,
LineNumber,
DurationBadge,
},
......@@ -47,7 +47,7 @@ export default {
role="button"
@click="handleOnClick"
>
<icon :name="iconName" class="arrow position-absolute" />
<gl-icon :name="iconName" class="arrow position-absolute" />
<line-number :line-number="line.lineNumber" :path="path" />
<span
v-for="(content, i) in line.content"
......
<script>
import { uniqueId } from 'lodash';
import { mapActions } from 'vuex';
import { GlDeprecatedButton } from '@gitlab/ui';
import { GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import { s__, sprintf } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
export default {
name: 'ManualVariablesForm',
components: {
GlDeprecatedButton,
Icon,
GlIcon,
},
props: {
action: {
......@@ -141,7 +140,7 @@ export default {
class="btn-transparent btn-blank w-25"
@click="deleteVariable(variable.id)"
>
<icon name="clear" />
<gl-icon name="clear" />
</gl-deprecated-button>
</div>
</div>
......
<script>
import { isEmpty } from 'lodash';
import { mapActions, mapState } from 'vuex';
import { GlLink, GlDeprecatedButton } from '@gitlab/ui';
import { GlLink, GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale';
import timeagoMixin from '~/vue_shared/mixins/timeago';
import { timeIntervalInWords } from '~/lib/utils/datetime_utility';
import Icon from '~/vue_shared/components/icon.vue';
import DetailRow from './sidebar_detail_row.vue';
import ArtifactsBlock from './artifacts_block.vue';
import TriggerBlock from './trigger_block.vue';
......@@ -19,7 +18,7 @@ export default {
ArtifactsBlock,
CommitBlock,
DetailRow,
Icon,
GlIcon,
TriggerBlock,
StagesDropdown,
JobsContainer,
......@@ -157,7 +156,7 @@ export default {
class="js-terminal-link btn btn-primary btn-inverted visible-md-block visible-lg-block float-left"
target="_blank"
>
{{ __('Debug') }} <icon name="external-link" :size="14" />
{{ __('Debug') }} <gl-icon name="external-link" :size="14" />
</gl-link>
</div>
......
......@@ -11,12 +11,12 @@ import {
GlNewDropdownItem as GlDropdownItem,
GlModal,
GlTooltipDirective,
GlIcon,
} from '@gitlab/ui';
import { __, s__ } from '~/locale';
import Translate from '~/vue_shared/translate';
import TrackEventDirective from '~/vue_shared/directives/track_event';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import Icon from '~/vue_shared/components/icon.vue';
import { alertsValidator, queriesValidator } from '../validators';
import { OPERATORS } from '../constants';
......@@ -44,7 +44,7 @@ export default {
GlDropdownItem,
GlModal,
GlLink,
Icon,
GlIcon,
},
directives: {
GlTooltip: GlTooltipDirective,
......@@ -242,7 +242,7 @@ export default {
<template #description>
<div class="d-flex align-items-center">
{{ __('Single or combined queries') }}
<icon
<gl-icon
v-gl-tooltip="$options.alertQueryText.descriptionTooltip"
name="question"
class="gl-ml-2"
......
<script>
import { isEmpty, omit, throttle } from 'lodash';
import { GlLink, GlTooltip, GlResizeObserverDirective } from '@gitlab/ui';
import { GlLink, GlTooltip, GlResizeObserverDirective, GlIcon } from '@gitlab/ui';
import { GlAreaChart, GlLineChart, GlChartSeriesLabel } from '@gitlab/ui/dist/charts';
import { s__ } from '~/locale';
import { getSvgIconPathContent } from '~/lib/utils/icon_utils';
import Icon from '~/vue_shared/components/icon.vue';
import { panelTypes, chartHeight, lineTypes, lineWidths, legendLayoutTypes } from '../../constants';
import { getYAxisOptions, getTimeAxisOptions, getChartGrid, getTooltipFormatter } from './options';
import { annotationsYAxis, generateAnnotationsSeries } from './annotations';
......@@ -27,7 +26,7 @@ export default {
GlTooltip,
GlChartSeriesLabel,
GlLink,
Icon,
GlIcon,
},
directives: {
GlResizeObserverDirective,
......@@ -407,7 +406,7 @@ export default {
{{ __('Deployed') }}
</template>
<div slot="tooltipContent" class="d-flex align-items-center">
<icon name="commit" class="mr-2" />
<gl-icon name="commit" class="mr-2" />
<gl-link :href="tooltip.commitUrl">{{ tooltip.sha }}</gl-link>
</div>
</template>
......
......@@ -2,7 +2,7 @@
import { mapActions, mapState, mapGetters } from 'vuex';
import VueDraggable from 'vuedraggable';
import Mousetrap from 'mousetrap';
import { GlButton, GlModalDirective, GlTooltipDirective } from '@gitlab/ui';
import { GlButton, GlModalDirective, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import DashboardHeader from './dashboard_header.vue';
import DashboardPanel from './dashboard_panel.vue';
import { s__ } from '~/locale';
......@@ -10,7 +10,6 @@ import { deprecatedCreateFlash as createFlash } from '~/flash';
import { ESC_KEY } from '~/lib/utils/keys';
import { mergeUrlParams, updateHistory } from '~/lib/utils/url_utility';
import invalidUrl from '~/lib/utils/invalid_url';
import Icon from '~/vue_shared/components/icon.vue';
import GraphGroup from './graph_group.vue';
import EmptyState from './empty_state.vue';
......@@ -33,7 +32,7 @@ export default {
VueDraggable,
DashboardHeader,
DashboardPanel,
Icon,
GlIcon,
GlButton,
GraphGroup,
EmptyState,
......@@ -473,7 +472,7 @@ export default {
@click="removePanel(groupData.key, groupData.panels, graphIndex)"
>
<a class="mx-2 p-2 draggable-remove-link" :aria-label="__('Remove')">
<icon name="close" />
<gl-icon name="close" />
</a>
</div>
......
......@@ -10,10 +10,10 @@ import {
GlSearchBoxByType,
GlModalDirective,
GlTooltipDirective,
GlIcon,
} from '@gitlab/ui';
import { mergeUrlParams, redirectTo } from '~/lib/utils/url_utility';
import invalidUrl from '~/lib/utils/invalid_url';
import Icon from '~/vue_shared/components/icon.vue';
import DateTimePicker from '~/vue_shared/components/date_time_picker/date_time_picker.vue';
import DashboardsDropdown from './dashboards_dropdown.vue';
......@@ -26,7 +26,7 @@ import { timezones } from '../format_date';
export default {
components: {
Icon,
GlIcon,
GlButton,
GlNewDropdown,
GlLoadingIcon,
......@@ -260,7 +260,7 @@ export default {
target="_blank"
rel="noopener noreferrer"
>
{{ __('View full dashboard') }} <icon name="external-link" />
{{ __('View full dashboard') }} <gl-icon name="external-link" />
</gl-button>
</div>
......
<script>
import { mapGetters, mapActions } from 'vuex';
import { GlTooltipDirective } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { GlTooltipDirective, GlIcon } from '@gitlab/ui';
import discussionNavigation from '../mixins/discussion_navigation';
export default {
......@@ -9,7 +8,7 @@ export default {
GlTooltip: GlTooltipDirective,
},
components: {
Icon,
GlIcon,
},
mixins: [discussionNavigation],
computed: {
......@@ -60,7 +59,7 @@ export default {
:class="{ 'line-resolve-btn is-active': allResolved, 'line-resolve-text': !allResolved }"
>
<template v-if="allResolved">
<icon name="check-circle-filled" />
<gl-icon name="check-circle-filled" />
{{ __('All threads resolved') }}
</template>
<template v-else>
......@@ -79,7 +78,7 @@ export default {
:title="s__('Resolve all threads in new issue')"
class="new-issue-for-discussion btn btn-default discussion-create-issue-btn"
>
<icon name="issue-new" />
<gl-icon name="issue-new" />
</a>
</div>
<div v-if="isLoggedIn && !allResolved" class="btn-group btn-group-sm" role="group">
......@@ -92,7 +91,7 @@ export default {
data-track-property="click_next_unresolved_thread_top"
@click="jumpToNextDiscussion"
>
<icon name="comment-next" />
<gl-icon name="comment-next" />
</button>
</div>
<div class="btn-group btn-group-sm" role="group">
......@@ -102,7 +101,7 @@ export default {
class="btn btn-default toggle-all-discussions-btn"
@click="handleExpandDiscussions"
>
<icon :name="allExpanded ? 'angle-up' : 'angle-down'" />
<gl-icon :name="allExpanded ? 'angle-up' : 'angle-down'" />
</button>
</div>
</div>
......
<script>
import $ from 'jquery';
import { mapGetters, mapActions } from 'vuex';
import { GlIcon } from '@gitlab/ui';
import { getLocationHash, doesHashExistInUrl } from '../../lib/utils/url_utility';
import Icon from '~/vue_shared/components/icon.vue';
import {
DISCUSSION_FILTERS_DEFAULT_VALUE,
HISTORY_ONLY_FILTER_VALUE,
......@@ -14,7 +14,7 @@ import notesEventHub from '../event_hub';
export default {
components: {
Icon,
GlIcon,
},
props: {
filters: {
......@@ -120,7 +120,7 @@ export default {
data-toggle="dropdown"
aria-expanded="false"
>
{{ currentFilter.title }} <icon name="chevron-down" />
{{ currentFilter.title }} <gl-icon name="chevron-down" />
</button>
<div
ref="dropdownMenu"
......
<script>
import { GlButton } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { GlButton, GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale';
import notesEventHub from '../event_hub';
......@@ -8,7 +7,7 @@ import notesEventHub from '../event_hub';
export default {
components: {
GlButton,
Icon,
GlIcon,
},
computed: {
timelineContent() {
......@@ -35,7 +34,7 @@ export default {
<template>
<li class="timeline-entry note note-wrapper discussion-filter-note js-discussion-filter-note">
<div class="timeline-icon d-none d-lg-flex">
<icon name="comment" />
<gl-icon name="comment" />
</div>
<div class="timeline-content">
<div ref="timelineContent" v-html="timelineContent"></div>
......
<script>
import { GlTooltipDirective } from '@gitlab/ui';
import icon from '~/vue_shared/components/icon.vue';
import { GlTooltipDirective, GlIcon } from '@gitlab/ui';
import discussionNavigation from '../mixins/discussion_navigation';
export default {
name: 'JumpToNextDiscussionButton',
components: {
icon,
GlIcon,
},
directives: {
GlTooltip: GlTooltipDirective,
......@@ -33,7 +32,7 @@ export default {
data-track-property="click_next_unresolved_thread"
@click="jumpToNextRelativeDiscussion(fromDiscussionId)"
>
<icon name="comment-next" />
<gl-icon name="comment-next" />
</button>
</div>
</template>
<script>
import { GlLink } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { GlLink, GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale';
import Issuable from '~/vue_shared/mixins/issuable';
import issuableStateMixin from '../mixins/issuable_state';
export default {
components: {
Icon,
GlIcon,
GlLink,
},
mixins: [Issuable, issuableStateMixin],
......@@ -28,7 +27,7 @@ export default {
<template>
<div class="disabled-comment text-center">
<span class="issuable-note-warning inline">
<icon :size="16" name="lock" class="icon" />
<gl-icon :size="16" name="lock" class="icon" />
<span v-if="isProjectArchived">
{{ projectArchivedWarning }}
<gl-link :href="archivedProjectDocsPath" target="_blank" class="learn-more">
......
<script>
import { mapGetters } from 'vuex';
import { GlLoadingIcon, GlTooltipDirective } from '@gitlab/ui';
import { GlLoadingIcon, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale';
import resolvedStatusMixin from '~/batch_comments/mixins/resolved_status';
import Icon from '~/vue_shared/components/icon.vue';
import ReplyButton from './note_actions/reply_button.vue';
import eventHub from '~/sidebar/event_hub';
import Api from '~/api';
......@@ -12,7 +11,7 @@ import { deprecatedCreateFlash as flash } from '~/flash';
export default {
name: 'NoteActions',
components: {
Icon,
GlIcon,
ReplyButton,
GlLoadingIcon,
},
......@@ -189,7 +188,7 @@ export default {
@click="onResolve"
>
<template v-if="!isResolving">
<icon :name="isResolved ? 'check-circle-filled' : 'check-circle'" />
<gl-icon :name="isResolved ? 'check-circle-filled' : 'check-circle'" />
</template>
<gl-loading-icon v-else inline />
</button>
......@@ -203,9 +202,9 @@ export default {
title="Add reaction"
data-position="right"
>
<icon class="link-highlight award-control-icon-neutral" name="slight-smile" />
<icon class="link-highlight award-control-icon-positive" name="smiley" />
<icon class="link-highlight award-control-icon-super-positive" name="smiley" />
<gl-icon class="link-highlight award-control-icon-neutral" name="slight-smile" />
<gl-icon class="link-highlight award-control-icon-positive" name="smiley" />
<gl-icon class="link-highlight award-control-icon-super-positive" name="smiley" />
</a>
</div>
<reply-button
......@@ -222,7 +221,7 @@ export default {
class="note-action-button js-note-edit btn btn-transparent qa-note-edit-button"
@click="onEdit"
>
<icon name="pencil" class="link-highlight" />
<gl-icon name="pencil" class="link-highlight" />
</button>
</div>
<div v-if="showDeleteAction" class="note-actions-item">
......@@ -233,7 +232,7 @@ export default {
class="note-action-button js-note-delete btn btn-transparent"
@click="onDelete"
>
<icon name="remove" class="link-highlight" />
<gl-icon name="remove" class="link-highlight" />
</button>
</div>
<div v-else-if="shouldShowActionsDropdown" class="dropdown more-actions note-actions-item">
......@@ -245,7 +244,7 @@ export default {
data-toggle="dropdown"
@click="closeTooltip"
>
<icon class="icon" name="ellipsis_v" />
<gl-icon class="icon" name="ellipsis_v" />
</button>
<ul class="dropdown-menu more-actions-dropdown dropdown-open-left">
<li v-if="canReportAsAbuse">
......
<script>
import { GlTooltipDirective, GlDeprecatedButton } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { GlTooltipDirective, GlDeprecatedButton, GlIcon } from '@gitlab/ui';
export default {
name: 'ReplyButton',
components: {
Icon,
GlIcon,
GlDeprecatedButton,
},
directives: {
......@@ -26,7 +25,7 @@ export default {
:title="__('Reply to comment')"
@click="$emit('startReplying')"
>
<icon name="comment" class="link-highlight" />
<gl-icon name="comment" class="link-highlight" />
</gl-deprecated-button>
</div>
</template>
<script>
import { mapActions, mapGetters } from 'vuex';
import { GlTooltipDirective } from '@gitlab/ui';
import { GlTooltipDirective, GlIcon } from '@gitlab/ui';
import diffLineNoteFormMixin from '~/notes/mixins/diff_line_note_form';
import { s__, __ } from '~/locale';
import { clearDraft, getDiscussionReplyKey } from '~/lib/utils/autosave';
import icon from '~/vue_shared/components/icon.vue';
import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue';
import DraftNote from '~/batch_comments/components/draft_note.vue';
import { deprecatedCreateFlash as Flash } from '../../flash';
......@@ -22,7 +21,7 @@ import DiscussionActions from './discussion_actions.vue';
export default {
name: 'NoteableDiscussion',
components: {
icon,
GlIcon,
userAvatarLink,
diffDiscussionHeader,
noteSignedOutWidget,
......
<script>
import { uniqBy } from 'lodash';
import Icon from '~/vue_shared/components/icon.vue';
import { GlIcon } from '@gitlab/ui';
import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue';
import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
export default {
components: {
Icon,
GlIcon,
UserAvatarLink,
TimeAgoTooltip,
},
......@@ -44,7 +44,7 @@ export default {
<template>
<li :class="className" class="replies-toggle js-toggle-replies">
<template v-if="collapsed">
<icon name="chevron-right" @click.native="toggle" />
<gl-icon name="chevron-right" @click.native="toggle" />
<div>
<user-avatar-link
v-for="author in uniqueAuthors"
......@@ -71,7 +71,7 @@ export default {
class="collapse-replies-btn js-collapse-replies qa-collapse-replies"
@click="toggle"
>
<icon name="chevron-down" /> {{ s__('Notes|Collapse replies') }}
<gl-icon name="chevron-down" /> {{ s__('Notes|Collapse replies') }}
</span>
</li>
</template>
<script>
import { GlIcon } from '@gitlab/ui';
import RequestWarning from './request_warning.vue';
import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
import Icon from '~/vue_shared/components/icon.vue';
export default {
components: {
RequestWarning,
GlModal: DeprecatedModal2,
Icon,
GlIcon,
},
props: {
currentRequest: {
......@@ -104,7 +104,7 @@ export default {
type="button"
:aria-label="__('Toggle backtrace')"
>
<icon :size="12" name="ellipsis_h" />
<gl-icon :size="12" name="ellipsis_h" />
</button>
</div>
<pre v-if="item.backtrace" class="backtrace-row js-toggle-content mt-2">{{
......
<script>
import { GlDeprecatedButton, GlLink } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { GlDeprecatedButton, GlLink, GlIcon } from '@gitlab/ui';
import PersistentUserCallout from '~/persistent_user_callout';
export default {
components: {
GlDeprecatedButton,
GlLink,
Icon,
GlIcon,
},
props: {
canaryDeploymentFeatureId: {
......@@ -65,6 +64,8 @@ export default {
>
</div>
<div class="ml-auto pr-2 canary-deployment-callout-close js-close"><icon name="close" /></div>
<div class="ml-auto pr-2 canary-deployment-callout-close js-close">
<gl-icon name="close" />
</div>
</div>
</template>
import { shallowMount } from '@vue/test-utils';
import { TEST_HOST } from 'helpers/test_constants';
import { GlLoadingIcon } from '@gitlab/ui';
import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import eventHub from '~/environments/event_hub';
import EnvironmentActions from '~/environments/components/environment_actions.vue';
import Icon from '~/vue_shared/components/icon.vue';
describe('EnvironmentActions Component', () => {
let vm;
......@@ -17,7 +16,7 @@ describe('EnvironmentActions Component', () => {
});
it('should render a dropdown button with 2 icons', () => {
expect(vm.find('.dropdown-new').findAll(Icon).length).toBe(2);
expect(vm.find('.dropdown-new').findAll(GlIcon).length).toBe(2);
});
it('should render a dropdown button with aria-label description', () => {
......
import { shallowMount } from '@vue/test-utils';
import { GlIcon } from '@gitlab/ui';
import MonitoringComponent from '~/environments/components/environment_monitoring.vue';
import Icon from '~/vue_shared/components/icon.vue';
describe('Monitoring Component', () => {
let wrapper;
......@@ -15,7 +15,7 @@ describe('Monitoring Component', () => {
});
};
const findIcons = () => wrapper.findAll(Icon);
const findIcons = () => wrapper.findAll(GlIcon);
const findIconsByName = name => findIcons().filter(icon => icon.props('name') === name);
beforeEach(() => {
......
import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedButton } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import eventHub from '~/environments/event_hub';
import PinComponent from '~/environments/components/environment_pin.vue';
......@@ -32,7 +31,7 @@ describe('Pin Component', () => {
});
it('should render the component with thumbtack icon', () => {
expect(wrapper.find(Icon).props('name')).toBe('thumbtack');
expect(wrapper.find(GlIcon).props('name')).toBe('thumbtack');
});
it('should emit onPinClick when clicked', () => {
......
import { shallowMount } from '@vue/test-utils';
import { GlSprintf } from '@gitlab/ui';
import { GlSprintf, GlIcon } from '@gitlab/ui';
import { trimText } from 'helpers/text_helper';
import StackTraceEntry from '~/error_tracking/components/stacktrace_entry.vue';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import FileIcon from '~/vue_shared/components/file_icon.vue';
import Icon from '~/vue_shared/components/icon.vue';
describe('Stacktrace Entry', () => {
let wrapper;
......@@ -39,7 +38,7 @@ describe('Stacktrace Entry', () => {
mountComponent({ lines });
expect(wrapper.find(StackTraceEntry).exists()).toBe(true);
expect(wrapper.find(ClipboardButton).exists()).toBe(true);
expect(wrapper.find(Icon).exists()).toBe(true);
expect(wrapper.find(GlIcon).exists()).toBe(true);
expect(wrapper.find(FileIcon).exists()).toBe(true);
expect(wrapper.find('table').exists()).toBe(false);
});
......@@ -57,7 +56,7 @@ describe('Stacktrace Entry', () => {
it('should hide collapse icon and render error fn name and error line when there is no code block', () => {
const extraInfo = { errorLine: 34, errorFn: 'errorFn', errorColumn: 77 };
mountComponent({ expanded: false, lines: [], ...extraInfo });
expect(wrapper.find(Icon).exists()).toBe(false);
expect(wrapper.find(GlIcon).exists()).toBe(false);
expect(trimText(findFileHeaderContent())).toContain(
`in ${extraInfo.errorFn} at line ${extraInfo.errorLine}:${extraInfo.errorColumn}`,
);
......
......@@ -83,7 +83,7 @@ exports[`grafana integration component default state to match the default snapsh
More information
<icon-stub
<gl-icon-stub
class="vertical-align-middle"
name="external-link"
size="16"
......
import { shallowMount } from '@vue/test-utils';
import { GlTooltip, GlLink } from '@gitlab/ui';
import { GlTooltip, GlLink, GlIcon } from '@gitlab/ui';
import { TEST_HOST } from 'jest/helpers/test_constants';
import Icon from '~/vue_shared/components/icon.vue';
import UserAvatarImage from '~/vue_shared/components/user_avatar/user_avatar_image.vue';
import Suggestion from '~/issuable_suggestions/components/item.vue';
import mockData from '../mock_data';
......@@ -48,7 +47,7 @@ describe('Issuable suggestions suggestion component', () => {
it('renders icon', () => {
createComponent();
const icon = vm.find(Icon);
const icon = vm.find(GlIcon);
expect(icon.props('name')).toBe('issue-open-m');
});
......@@ -71,7 +70,7 @@ describe('Issuable suggestions suggestion component', () => {
state: 'closed',
});
const icon = vm.find(Icon);
const icon = vm.find(GlIcon);
expect(icon.props('name')).toBe('issue-close');
});
......@@ -112,7 +111,7 @@ describe('Issuable suggestions suggestion component', () => {
const count = vm.findAll('.suggestion-counts span').at(0);
expect(count.text()).toContain('1');
expect(count.find(Icon).props('name')).toBe('thumb-up');
expect(count.find(GlIcon).props('name')).toBe('thumb-up');
});
it('renders notes count', () => {
......@@ -121,7 +120,7 @@ describe('Issuable suggestions suggestion component', () => {
const count = vm.findAll('.suggestion-counts span').at(1);
expect(count.text()).toContain('2');
expect(count.find(Icon).props('name')).toBe('comment');
expect(count.find(GlIcon).props('name')).toBe('comment');
});
});
......@@ -131,7 +130,7 @@ describe('Issuable suggestions suggestion component', () => {
confidential: true,
});
const icon = vm.find(Icon);
const icon = vm.find(GlIcon);
expect(icon.props('name')).toBe('eye-slash');
expect(icon.attributes('title')).toBe('Confidential');
......
......@@ -12,7 +12,7 @@ exports[`JumpToNextDiscussionButton matches the snapshot 1`] = `
data-track-property="click_next_unresolved_thread"
title="Jump to next unresolved thread"
>
<icon-stub
<gl-icon-stub
name="comment-next"
size="16"
/>
......
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