Commit b3e178f3 authored by Sarah Groff Hennigh-Palermo's avatar Sarah Groff Hennigh-Palermo

Merge branch 'leipert-icons-web-ide' into 'master'

Utilize GitLab UI icon component: Web IDE

See merge request gitlab-org/gitlab!40262
parents 56ee8492 10244b95
<script> <script>
import $ from 'jquery'; import $ from 'jquery';
import { mapActions, mapState } from 'vuex'; import { mapActions, mapState } from 'vuex';
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
import { leftSidebarViews } from '../constants'; import { leftSidebarViews } from '../constants';
export default { export default {
components: { components: {
Icon, GlIcon,
}, },
directives: { directives: {
tooltip, tooltip,
...@@ -48,7 +48,7 @@ export default { ...@@ -48,7 +48,7 @@ export default {
class="ide-sidebar-link js-ide-edit-mode" class="ide-sidebar-link js-ide-edit-mode"
@click.prevent="changedActivityView($event, $options.leftSidebarViews.edit.name)" @click.prevent="changedActivityView($event, $options.leftSidebarViews.edit.name)"
> >
<icon name="code" /> <gl-icon name="code" />
</button> </button>
</li> </li>
<li> <li>
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
class="ide-sidebar-link js-ide-review-mode" class="ide-sidebar-link js-ide-review-mode"
@click.prevent="changedActivityView($event, $options.leftSidebarViews.review.name)" @click.prevent="changedActivityView($event, $options.leftSidebarViews.review.name)"
> >
<icon name="file-modified" /> <gl-icon name="file-modified" />
</button> </button>
</li> </li>
<li> <li>
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
class="ide-sidebar-link js-ide-commit-mode qa-commit-mode-tab" class="ide-sidebar-link js-ide-commit-mode qa-commit-mode-tab"
@click.prevent="changedActivityView($event, $options.leftSidebarViews.commit.name)" @click.prevent="changedActivityView($event, $options.leftSidebarViews.commit.name)"
> >
<icon name="commit" /> <gl-icon name="commit" />
</button> </button>
</li> </li>
</ul> </ul>
......
<script> <script>
/* eslint-disable @gitlab/vue-require-i18n-strings */ /* eslint-disable @gitlab/vue-require-i18n-strings */
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: {
...@@ -34,7 +34,7 @@ export default { ...@@ -34,7 +34,7 @@ export default {
<template> <template>
<a :href="branchHref" class="btn-link d-flex align-items-center"> <a :href="branchHref" class="btn-link d-flex align-items-center">
<span class="d-flex gl-mr-3 ide-search-list-current-icon"> <span class="d-flex gl-mr-3 ide-search-list-current-icon">
<icon v-if="isActive" :size="18" name="mobile-issue-close" /> <gl-icon v-if="isActive" :size="18" name="mobile-issue-close" />
</span> </span>
<span> <span>
<strong> {{ item.name }} </strong> <strong> {{ item.name }} </strong>
......
<script> <script>
import { mapActions, mapState } from 'vuex'; import { mapActions, mapState } from 'vuex';
import { debounce } from 'lodash'; import { debounce } from 'lodash';
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import Item from './item.vue'; import Item from './item.vue';
export default { export default {
components: { components: {
Item, Item,
Icon, GlIcon,
GlLoadingIcon, GlLoadingIcon,
}, },
data() { data() {
...@@ -67,7 +66,7 @@ export default { ...@@ -67,7 +66,7 @@ export default {
class="form-control dropdown-input-field" class="form-control dropdown-input-field"
@input="searchBranches" @input="searchBranches"
/> />
<icon :size="18" name="search" class="ml-3 input-icon" /> <gl-icon :size="18" name="search" class="ml-3 input-icon" />
</label> </label>
<div class="dropdown-content ide-merge-requests-dropdown-content d-flex"> <div class="dropdown-content ide-merge-requests-dropdown-content d-flex">
<gl-loading-icon <gl-loading-icon
......
<script> <script>
import { mapActions } from 'vuex'; import { mapActions } from 'vuex';
import { GlModal } from '@gitlab/ui'; import { GlModal, GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
import ListItem from './list_item.vue'; import ListItem from './list_item.vue';
export default { export default {
components: { components: {
Icon, GlIcon,
ListItem, ListItem,
GlModal, GlModal,
}, },
...@@ -74,7 +73,7 @@ export default { ...@@ -74,7 +73,7 @@ export default {
<div class="ide-commit-list-container"> <div class="ide-commit-list-container">
<header class="multi-file-commit-panel-header d-flex mb-0"> <header class="multi-file-commit-panel-header d-flex mb-0">
<div class="d-flex align-items-center flex-fill"> <div class="d-flex align-items-center flex-fill">
<icon v-once :name="iconName" :size="18" class="gl-mr-3" /> <gl-icon v-once :name="iconName" :size="18" class="gl-mr-3" />
<strong> {{ titleText }} </strong> <strong> {{ titleText }} </strong>
<div class="d-flex ml-auto"> <div class="d-flex ml-auto">
<button <button
...@@ -93,7 +92,7 @@ export default { ...@@ -93,7 +92,7 @@ export default {
data-boundary="viewport" data-boundary="viewport"
@click="openDiscardModal" @click="openDiscardModal"
> >
<icon :size="16" name="remove-all" class="ml-auto mr-auto position-top-0" /> <gl-icon :size="16" name="remove-all" class="ml-auto mr-auto position-top-0" />
</button> </button>
</div> </div>
</div> </div>
......
<script> <script>
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
import { sprintf, n__, __ } from '~/locale'; import { sprintf, n__, __ } from '~/locale';
export default { export default {
components: { components: {
Icon, GlIcon,
}, },
directives: { directives: {
tooltip, tooltip,
...@@ -77,7 +77,7 @@ export default { ...@@ -77,7 +77,7 @@ export default {
data-placement="left" data-placement="left"
class="gl-mb-5" class="gl-mb-5"
> >
<icon v-once :name="iconName" :size="18" /> <gl-icon v-once :name="iconName" :size="18" />
</div> </div>
<div <div
v-tooltip v-tooltip
...@@ -86,7 +86,7 @@ export default { ...@@ -86,7 +86,7 @@ export default {
data-placement="left" data-placement="left"
class="gl-mb-3" class="gl-mb-3"
> >
<icon :name="additionIconName" :size="18" :class="addedFilesIconClass" /> <gl-icon :name="additionIconName" :size="18" :class="addedFilesIconClass" />
</div> </div>
{{ addedFilesLength }} {{ addedFilesLength }}
<div <div
...@@ -96,7 +96,7 @@ export default { ...@@ -96,7 +96,7 @@ export default {
data-placement="left" data-placement="left"
class="gl-mt-3 gl-mb-3" class="gl-mt-3 gl-mb-3"
> >
<icon :name="modifiedIconName" :size="18" :class="modifiedFilesClass" /> <gl-icon :name="modifiedIconName" :size="18" :class="modifiedFilesClass" />
</div> </div>
{{ modifiedFilesLength }} {{ modifiedFilesLength }}
</div> </div>
......
<script> <script>
import { mapActions } from 'vuex'; import { mapActions } from 'vuex';
import { GlIcon } from '@gitlab/ui';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
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 { viewerTypes } from '../../constants'; import { viewerTypes } from '../../constants';
import getCommitIconMap from '../../commit_icon'; import getCommitIconMap from '../../commit_icon';
export default { export default {
components: { components: {
Icon, GlIcon,
FileIcon, FileIcon,
}, },
directives: { directives: {
...@@ -95,7 +95,7 @@ export default { ...@@ -95,7 +95,7 @@ export default {
</span> </span>
<div class="ml-auto d-flex align-items-center"> <div class="ml-auto d-flex align-items-center">
<div class="d-flex align-items-center ide-commit-list-changed-icon"> <div class="d-flex align-items-center ide-commit-list-changed-icon">
<icon :name="iconName" :size="16" :class="iconClass" /> <gl-icon :name="iconName" :size="16" :class="iconClass" />
</div> </div>
</div> </div>
</div> </div>
......
<script> <script>
import { GlIcon } from '@gitlab/ui';
import { __, sprintf } from '../../../locale'; import { __, sprintf } from '../../../locale';
import Icon from '../../../vue_shared/components/icon.vue';
import popover from '../../../vue_shared/directives/popover'; import popover from '../../../vue_shared/directives/popover';
import { MAX_TITLE_LENGTH, MAX_BODY_LENGTH } from '../../constants'; import { MAX_TITLE_LENGTH, MAX_BODY_LENGTH } from '../../constants';
...@@ -9,7 +9,7 @@ export default { ...@@ -9,7 +9,7 @@ export default {
popover, popover,
}, },
components: { components: {
Icon, GlIcon,
}, },
props: { props: {
text: { text: {
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
<li> <li>
{{ __('Commit Message') }} {{ __('Commit Message') }}
<span v-popover="$options.popoverOptions" class="form-text text-muted gl-ml-3"> <span v-popover="$options.popoverOptions" class="form-text text-muted gl-ml-3">
<icon name="question" /> <gl-icon name="question" />
</span> </span>
</li> </li>
</ul> </ul>
......
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { GlIcon } from '@gitlab/ui';
import { n__ } from '~/locale'; import { n__ } from '~/locale';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
import Icon from '~/vue_shared/components/icon.vue';
import ChangedFileIcon from '~/vue_shared/components/changed_file_icon.vue'; import ChangedFileIcon from '~/vue_shared/components/changed_file_icon.vue';
import NewDropdown from './new_dropdown/index.vue'; import NewDropdown from './new_dropdown/index.vue';
import MrFileIcon from './mr_file_icon.vue'; import MrFileIcon from './mr_file_icon.vue';
...@@ -13,7 +13,7 @@ export default { ...@@ -13,7 +13,7 @@ export default {
tooltip, tooltip,
}, },
components: { components: {
Icon, GlIcon,
NewDropdown, NewDropdown,
ChangedFileIcon, ChangedFileIcon,
MrFileIcon, MrFileIcon,
...@@ -69,7 +69,7 @@ export default { ...@@ -69,7 +69,7 @@ export default {
<mr-file-icon v-if="file.mrChange" /> <mr-file-icon v-if="file.mrChange" />
<span v-if="showTreeChangesCount" class="ide-tree-changes"> <span v-if="showTreeChangesCount" class="ide-tree-changes">
{{ changesCount }} {{ changesCount }}
<icon <gl-icon
v-tooltip v-tooltip
:title="folderChangesTooltip" :title="folderChangesTooltip"
:size="12" :size="12"
......
<script> <script>
/* eslint-disable @gitlab/vue-require-i18n-strings */ /* eslint-disable @gitlab/vue-require-i18n-strings */
import { mapActions, mapState, mapGetters } from 'vuex'; import { mapActions, mapState, mapGetters } from 'vuex';
import { GlIcon } from '@gitlab/ui';
import IdeStatusList from './ide_status_list.vue'; import IdeStatusList from './ide_status_list.vue';
import IdeStatusMr from './ide_status_mr.vue'; import IdeStatusMr from './ide_status_mr.vue';
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';
import CiIcon from '../../vue_shared/components/ci_icon.vue'; import CiIcon from '../../vue_shared/components/ci_icon.vue';
...@@ -12,7 +12,7 @@ import { rightSidebarViews } from '../constants'; ...@@ -12,7 +12,7 @@ import { rightSidebarViews } from '../constants';
export default { export default {
components: { components: {
icon, GlIcon,
userAvatarImage, userAvatarImage,
CiIcon, CiIcon,
IdeStatusList, IdeStatusList,
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
{{ latestPipeline.details.status.text }} for {{ latestPipeline.details.status.text }} for
</span> </span>
<icon name="commit" /> <gl-icon name="commit" />
<a <a
v-tooltip v-tooltip
:title="lastCommit.message" :title="lastCommit.message"
......
<script> <script>
import { mapActions, mapState } from 'vuex'; import { mapActions, mapState } from 'vuex';
import { throttle } from 'lodash'; import { throttle } from 'lodash';
import { GlIcon } from '@gitlab/ui';
import { __ } from '../../../locale'; import { __ } from '../../../locale';
import tooltip from '../../../vue_shared/directives/tooltip'; import tooltip from '../../../vue_shared/directives/tooltip';
import Icon from '../../../vue_shared/components/icon.vue';
import ScrollButton from './detail/scroll_button.vue'; import ScrollButton from './detail/scroll_button.vue';
import JobDescription from './detail/description.vue'; import JobDescription from './detail/description.vue';
...@@ -17,7 +17,7 @@ export default { ...@@ -17,7 +17,7 @@ export default {
tooltip, tooltip,
}, },
components: { components: {
Icon, GlIcon,
ScrollButton, ScrollButton,
JobDescription, JobDescription,
}, },
...@@ -76,7 +76,7 @@ export default { ...@@ -76,7 +76,7 @@ export default {
<div class="ide-pipeline build-page d-flex flex-column flex-fill"> <div class="ide-pipeline build-page d-flex flex-column flex-fill">
<header class="ide-job-header d-flex align-items-center"> <header class="ide-job-header d-flex align-items-center">
<button class="btn btn-default btn-sm d-flex" @click="setDetailJob(null)"> <button class="btn btn-default btn-sm d-flex" @click="setDetailJob(null)">
<icon name="chevron-left" /> {{ __('View jobs') }} <gl-icon name="chevron-left" /> {{ __('View jobs') }}
</button> </button>
</header> </header>
<div class="top-bar d-flex border-left-0 mr-3"> <div class="top-bar d-flex border-left-0 mr-3">
......
<script> <script>
import Icon from '../../../../vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import CiIcon from '../../../../vue_shared/components/ci_icon.vue'; import CiIcon from '../../../../vue_shared/components/ci_icon.vue';
export default { export default {
components: { components: {
Icon, GlIcon,
CiIcon, CiIcon,
}, },
props: { props: {
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
<span class="gl-ml-3"> <span class="gl-ml-3">
{{ job.name }} {{ job.name }}
<a :href="job.path" target="_blank" class="ide-external-link position-relative"> <a :href="job.path" target="_blank" class="ide-external-link position-relative">
{{ jobId }} <icon :size="12" name="external-link" /> {{ jobId }} <gl-icon :size="12" name="external-link" />
</a> </a>
</span> </span>
</div> </div>
......
<script> <script>
import { GlIcon } from '@gitlab/ui';
import { __ } from '../../../../locale'; import { __ } from '../../../../locale';
import Icon from '../../../../vue_shared/components/icon.vue';
import tooltip from '../../../../vue_shared/directives/tooltip'; import tooltip from '../../../../vue_shared/directives/tooltip';
const directions = { const directions = {
...@@ -13,7 +13,7 @@ export default { ...@@ -13,7 +13,7 @@ export default {
tooltip, tooltip,
}, },
components: { components: {
Icon, GlIcon,
}, },
props: { props: {
direction: { direction: {
...@@ -58,7 +58,7 @@ export default { ...@@ -58,7 +58,7 @@ export default {
type="button" type="button"
@click="clickedScroll" @click="clickedScroll"
> >
<icon :name="iconName" /> <gl-icon :name="iconName" />
</button> </button>
</div> </div>
</template> </template>
<script> <script>
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import tooltip from '../../../vue_shared/directives/tooltip'; import tooltip from '../../../vue_shared/directives/tooltip';
import Icon from '../../../vue_shared/components/icon.vue';
import CiIcon from '../../../vue_shared/components/ci_icon.vue'; import CiIcon from '../../../vue_shared/components/ci_icon.vue';
import Item from './item.vue'; import Item from './item.vue';
...@@ -10,7 +9,7 @@ export default { ...@@ -10,7 +9,7 @@ export default {
tooltip, tooltip,
}, },
components: { components: {
Icon, GlIcon,
CiIcon, CiIcon,
Item, Item,
GlLoadingIcon, GlLoadingIcon,
...@@ -78,7 +77,7 @@ export default { ...@@ -78,7 +77,7 @@ export default {
<div v-if="!stage.isLoading || stage.jobs.length" class="gl-mr-3 gl-ml-2"> <div v-if="!stage.isLoading || stage.jobs.length" class="gl-mr-3 gl-ml-2">
<span class="badge badge-pill"> {{ jobsCount }} </span> <span class="badge badge-pill"> {{ jobsCount }} </span>
</div> </div>
<icon :name="collapseIcon" class="ide-stage-collapse-icon" /> <gl-icon :name="collapseIcon" class="ide-stage-collapse-icon" />
</div> </div>
<div v-show="!stage.isCollapsed" ref="jobList" class="card-body p-0"> <div v-show="!stage.isCollapsed" ref="jobList" class="card-body p-0">
<gl-loading-icon v-if="showLoadingIcon" /> <gl-loading-icon v-if="showLoadingIcon" />
......
<script> <script>
import Icon from '../../../vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
export default { export default {
components: { components: {
Icon, GlIcon,
}, },
props: { props: {
item: { item: {
...@@ -41,7 +41,7 @@ export default { ...@@ -41,7 +41,7 @@ export default {
<template> <template>
<a :href="mergeRequestHref" class="btn-link d-flex align-items-center"> <a :href="mergeRequestHref" class="btn-link d-flex align-items-center">
<span class="d-flex gl-mr-3 ide-search-list-current-icon"> <span class="d-flex gl-mr-3 ide-search-list-current-icon">
<icon v-if="isActive" :size="18" name="mobile-issue-close" /> <gl-icon v-if="isActive" :size="18" name="mobile-issue-close" />
</span> </span>
<span> <span>
<strong> {{ item.title }} </strong> <strong> {{ item.title }} </strong>
......
<script> <script>
import { mapActions, mapState } from 'vuex'; import { mapActions, mapState } from 'vuex';
import { debounce } from 'lodash'; import { debounce } from 'lodash';
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import Item from './item.vue'; import Item from './item.vue';
import TokenedInput from '../shared/tokened_input.vue'; import TokenedInput from '../shared/tokened_input.vue';
...@@ -16,7 +15,7 @@ export default { ...@@ -16,7 +15,7 @@ export default {
components: { components: {
TokenedInput, TokenedInput,
Item, Item,
Icon, GlIcon,
GlLoadingIcon, GlLoadingIcon,
}, },
data() { data() {
...@@ -85,7 +84,7 @@ export default { ...@@ -85,7 +84,7 @@ export default {
@input="searchMergeRequests" @input="searchMergeRequests"
@removeToken="setSearchType(null)" @removeToken="setSearchType(null)"
/> />
<icon :size="18" name="search" class="ml-3 input-icon" /> <gl-icon :size="18" name="search" class="ml-3 input-icon" />
</label> </label>
<div class="dropdown-content ide-merge-requests-dropdown-content d-flex"> <div class="dropdown-content ide-merge-requests-dropdown-content d-flex">
<gl-loading-icon <gl-loading-icon
...@@ -103,7 +102,7 @@ export default { ...@@ -103,7 +102,7 @@ export default {
@click.stop="setSearchType(searchType)" @click.stop="setSearchType(searchType)"
> >
<span class="d-flex gl-mr-3 ide-search-list-current-icon"> <span class="d-flex gl-mr-3 ide-search-list-current-icon">
<icon :size="18" name="search" /> <gl-icon :size="18" name="search" />
</span> </span>
<span>{{ searchType.label }}</span> <span>{{ searchType.label }}</span>
</button> </button>
......
<script> <script>
import icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
export default { export default {
components: { components: {
icon, GlIcon,
}, },
directives: { directives: {
tooltip, tooltip,
...@@ -13,7 +13,7 @@ export default { ...@@ -13,7 +13,7 @@ export default {
</script> </script>
<template> <template>
<icon <gl-icon
v-tooltip v-tooltip
:title="__('Part of merge request changes')" :title="__('Part of merge request changes')"
:size="12" :size="12"
......
<script> <script>
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import { GlIcon } from '@gitlab/ui';
import DropdownButton from '~/vue_shared/components/dropdown/dropdown_button.vue'; import DropdownButton from '~/vue_shared/components/dropdown/dropdown_button.vue';
import Icon from '~/vue_shared/components/icon.vue';
const EMPTY_LABEL = '-'; const EMPTY_LABEL = '-';
export default { export default {
components: { components: {
Icon, GlIcon,
DropdownButton, DropdownButton,
}, },
props: { props: {
...@@ -33,10 +33,10 @@ export default { ...@@ -33,10 +33,10 @@ export default {
<dropdown-button> <dropdown-button>
<span class="row flex-nowrap"> <span class="row flex-nowrap">
<span class="col-auto flex-fill text-truncate"> <span class="col-auto flex-fill text-truncate">
<icon :size="16" :aria-label="__('Current Branch')" name="branch" /> {{ branchLabel }} <gl-icon :size="16" :aria-label="__('Current Branch')" name="branch" /> {{ branchLabel }}
</span> </span>
<span v-if="showMergeRequests" class="col-5 pl-0 text-truncate"> <span v-if="showMergeRequests" class="col-5 pl-0 text-truncate">
<icon :size="16" :aria-label="__('Merge Request')" name="merge-request" /> <gl-icon :size="16" :aria-label="__('Merge Request')" name="merge-request" />
{{ mergeRequestLabel }} {{ mergeRequestLabel }}
</span> </span>
</span> </span>
......
<script> <script>
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
export default { export default {
...@@ -7,7 +7,7 @@ export default { ...@@ -7,7 +7,7 @@ export default {
tooltip, tooltip,
}, },
components: { components: {
Icon, GlIcon,
}, },
props: { props: {
label: { label: {
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
class="btn-blank" class="btn-blank"
@click.stop.prevent="clicked" @click.stop.prevent="clicked"
> >
<icon :name="icon" :class="iconClasses" /> <gl-icon :name="icon" :class="iconClasses" />
<template v-if="showLabel"> <template v-if="showLabel">
{{ label }} {{ label }}
</template> </template>
......
<script> <script>
import { mapActions } from 'vuex'; import { mapActions } from 'vuex';
import icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import upload from './upload.vue'; import upload from './upload.vue';
import ItemButton from './button.vue'; import ItemButton from './button.vue';
import { modalTypes } from '../../constants'; import { modalTypes } from '../../constants';
...@@ -8,7 +8,7 @@ import NewModal from './modal.vue'; ...@@ -8,7 +8,7 @@ import NewModal from './modal.vue';
export default { export default {
components: { components: {
icon, GlIcon,
upload, upload,
ItemButton, ItemButton,
NewModal, NewModal,
...@@ -67,7 +67,7 @@ export default { ...@@ -67,7 +67,7 @@ export default {
data-qa-selector="dropdown_button" data-qa-selector="dropdown_button"
@click.stop="openDropdown()" @click.stop="openDropdown()"
> >
<icon name="ellipsis_v" /> <icon name="chevron-down" /> <gl-icon name="ellipsis_v" /> <gl-icon name="chevron-down" />
</button> </button>
<ul ref="dropdownMenu" class="dropdown-menu dropdown-menu-right"> <ul ref="dropdownMenu" class="dropdown-menu dropdown-menu-right">
<template v-if="type === 'tree'"> <template v-if="type === 'tree'">
......
<script> <script>
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import { escape } from 'lodash'; import { escape } from 'lodash';
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { sprintf, __ } from '../../../locale'; import { sprintf, __ } from '../../../locale';
import Icon from '../../../vue_shared/components/icon.vue';
import CiIcon from '../../../vue_shared/components/ci_icon.vue'; import CiIcon from '../../../vue_shared/components/ci_icon.vue';
import Tabs from '../../../vue_shared/components/tabs/tabs'; import Tabs from '../../../vue_shared/components/tabs/tabs';
import Tab from '../../../vue_shared/components/tabs/tab.vue'; import Tab from '../../../vue_shared/components/tabs/tab.vue';
...@@ -14,7 +13,7 @@ import IDEServices from '~/ide/services'; ...@@ -14,7 +13,7 @@ import IDEServices from '~/ide/services';
export default { export default {
components: { components: {
Icon, GlIcon,
CiIcon, CiIcon,
Tabs, Tabs,
Tab, Tab,
...@@ -70,7 +69,7 @@ export default { ...@@ -70,7 +69,7 @@ export default {
target="_blank" target="_blank"
class="ide-external-link position-relative" class="ide-external-link position-relative"
> >
#{{ latestPipeline.id }} <icon :size="12" name="external-link" /> #{{ latestPipeline.id }} <gl-icon :size="12" name="external-link" />
</a> </a>
</span> </span>
</header> </header>
......
<script> <script>
import { listen } from 'codesandbox-api'; import { listen } from 'codesandbox-api';
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
Icon, GlIcon,
GlLoadingIcon, GlLoadingIcon,
}, },
props: { props: {
...@@ -97,7 +96,7 @@ export default { ...@@ -97,7 +96,7 @@ export default {
class="ide-navigator-btn d-flex align-items-center d-transparent border-0 bg-transparent" class="ide-navigator-btn d-flex align-items-center d-transparent border-0 bg-transparent"
@click="back" @click="back"
> >
<icon :size="24" name="chevron-left" class="m-auto" /> <gl-icon :size="24" name="chevron-left" class="m-auto" />
</button> </button>
<button <button
:aria-label="s__('IDE|Back')" :aria-label="s__('IDE|Back')"
...@@ -109,7 +108,7 @@ export default { ...@@ -109,7 +108,7 @@ export default {
class="ide-navigator-btn d-flex align-items-center d-transparent border-0 bg-transparent" class="ide-navigator-btn d-flex align-items-center d-transparent border-0 bg-transparent"
@click="forward" @click="forward"
> >
<icon :size="24" name="chevron-right" class="m-auto" /> <gl-icon :size="24" name="chevron-right" class="m-auto" />
</button> </button>
<button <button
:aria-label="s__('IDE|Refresh preview')" :aria-label="s__('IDE|Refresh preview')"
...@@ -117,7 +116,7 @@ export default { ...@@ -117,7 +116,7 @@ export default {
class="ide-navigator-btn d-flex align-items-center d-transparent border-0 bg-transparent" class="ide-navigator-btn d-flex align-items-center d-transparent border-0 bg-transparent"
@click="refresh" @click="refresh"
> >
<icon :size="18" name="retry" class="m-auto" /> <gl-icon :size="18" name="retry" class="m-auto" />
</button> </button>
<div class="position-relative w-100 gl-ml-2"> <div class="position-relative w-100 gl-ml-2">
<input <input
......
<script> <script>
import { GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import icon from '~/vue_shared/components/icon.vue';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
import '~/lib/utils/datetime_utility'; import '~/lib/utils/datetime_utility';
export default { export default {
components: { components: {
icon, GlIcon,
}, },
directives: { directives: {
tooltip, tooltip,
...@@ -29,6 +29,6 @@ export default { ...@@ -29,6 +29,6 @@ export default {
<template> <template>
<span v-if="file.file_lock" v-tooltip :title="lockTooltip" data-container="body"> <span v-if="file.file_lock" v-tooltip :title="lockTooltip" data-container="body">
<icon name="lock" class="file-status-icon" /> <gl-icon name="lock" class="file-status-icon" />
</span> </span>
</template> </template>
<script> <script>
import { mapActions } from 'vuex'; import { mapActions } from 'vuex';
import { GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import FileIcon from '~/vue_shared/components/file_icon.vue'; import FileIcon from '~/vue_shared/components/file_icon.vue';
import Icon from '~/vue_shared/components/icon.vue';
import ChangedFileIcon from '~/vue_shared/components/changed_file_icon.vue'; import ChangedFileIcon from '~/vue_shared/components/changed_file_icon.vue';
import FileStatusIcon from './repo_file_status_icon.vue'; import FileStatusIcon from './repo_file_status_icon.vue';
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
components: { components: {
FileStatusIcon, FileStatusIcon,
FileIcon, FileIcon,
Icon, GlIcon,
ChangedFileIcon, ChangedFileIcon,
}, },
props: { props: {
...@@ -91,7 +91,7 @@ export default { ...@@ -91,7 +91,7 @@ export default {
class="multi-file-tab-close" class="multi-file-tab-close"
@click.stop.prevent="closeFile(tab)" @click.stop.prevent="closeFile(tab)"
> >
<icon v-if="!showChangedIcon" :size="12" name="close" /> <gl-icon v-if="!showChangedIcon" :size="12" name="close" />
<changed-file-icon v-else :file="tab" /> <changed-file-icon v-else :file="tab" />
</button> </button>
</li> </li>
......
<script> <script>
import { GlIcon } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
components: { components: {
Icon, GlIcon,
}, },
props: { props: {
placeholder: { placeholder: {
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
> >
<div class="value-container rounded"> <div class="value-container rounded">
<div class="value">{{ token.label }}</div> <div class="value">{{ token.label }}</div>
<div class="remove-token inverted"><icon :size="10" name="close" /></div> <div class="remove-token inverted"><gl-icon :size="10" name="close" /></div>
</div> </div>
</button> </button>
</div> </div>
......
<script> <script>
import { throttle } from 'lodash'; import { throttle } from 'lodash';
import { GlTooltipDirective, GlLoadingIcon } from '@gitlab/ui'; import { GlTooltipDirective, GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import Icon from '~/vue_shared/components/icon.vue';
import { import {
MSG_TERMINAL_SYNC_CONNECTING, MSG_TERMINAL_SYNC_CONNECTING,
MSG_TERMINAL_SYNC_UPLOADING, MSG_TERMINAL_SYNC_UPLOADING,
...@@ -11,7 +10,7 @@ import { ...@@ -11,7 +10,7 @@ import {
export default { export default {
components: { components: {
Icon, GlIcon,
GlLoadingIcon, GlLoadingIcon,
}, },
directives: { directives: {
...@@ -70,7 +69,7 @@ export default { ...@@ -70,7 +69,7 @@ export default {
<span>{{ __('Terminal') }}:</span> <span>{{ __('Terminal') }}:</span>
<span class="square s16 d-flex-center ml-1" :aria-label="status.text"> <span class="square s16 d-flex-center ml-1" :aria-label="status.text">
<gl-loading-icon v-if="isLoading" inline size="sm" class="d-flex-center" /> <gl-loading-icon v-if="isLoading" inline size="sm" class="d-flex-center" />
<icon v-else-if="status.icon" :name="status.icon" :size="16" /> <gl-icon v-else-if="status.icon" :name="status.icon" :size="16" />
</span> </span>
</div> </div>
</template> </template>
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlIcon } from '@gitlab/ui';
import { createStore } from '~/ide/stores'; import { createStore } from '~/ide/stores';
import { createRouter } from '~/ide/ide_router'; import { createRouter } from '~/ide/ide_router';
import Item from '~/ide/components/branches/item.vue'; import Item from '~/ide/components/branches/item.vue';
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 { projectData } from '../../mock_data'; import { projectData } from '../../mock_data';
...@@ -45,7 +45,7 @@ describe('IDE branch item', () => { ...@@ -45,7 +45,7 @@ describe('IDE branch item', () => {
it('renders branch name and timeago', () => { it('renders branch name and timeago', () => {
expect(wrapper.text()).toContain(TEST_BRANCH.name); expect(wrapper.text()).toContain(TEST_BRANCH.name);
expect(wrapper.find(Timeago).props('time')).toBe(TEST_BRANCH.committedDate); expect(wrapper.find(Timeago).props('time')).toBe(TEST_BRANCH.committedDate);
expect(wrapper.find(Icon).exists()).toBe(false); expect(wrapper.find(GlIcon).exists()).toBe(false);
}); });
it('renders link to branch', () => { it('renders link to branch', () => {
...@@ -60,6 +60,6 @@ describe('IDE branch item', () => { ...@@ -60,6 +60,6 @@ describe('IDE branch item', () => {
it('renders icon if is not active', () => { it('renders icon if is not active', () => {
createComponent({ isActive: true }); createComponent({ isActive: true });
expect(wrapper.find(Icon).exists()).toBe(true); expect(wrapper.find(GlIcon).exists()).toBe(true);
}); });
}); });
...@@ -34,7 +34,7 @@ exports[`IDE pipeline stage renders stage details & icon 1`] = ` ...@@ -34,7 +34,7 @@ exports[`IDE pipeline stage renders stage details & icon 1`] = `
</span> </span>
</div> </div>
<icon-stub <gl-icon-stub
class="ide-stage-collapse-icon" class="ide-stage-collapse-icon"
name="angle-down" name="angle-down"
size="16" size="16"
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import Icon from '~/vue_shared/components/icon.vue'; import { GlIcon } from '@gitlab/ui';
import ScrollButton from '~/ide/components/jobs/detail/scroll_button.vue'; import ScrollButton from '~/ide/components/jobs/detail/scroll_button.vue';
describe('IDE job log scroll button', () => { describe('IDE job log scroll button', () => {
...@@ -27,7 +27,7 @@ describe('IDE job log scroll button', () => { ...@@ -27,7 +27,7 @@ describe('IDE job log scroll button', () => {
beforeEach(() => createComponent({ direction })); beforeEach(() => createComponent({ direction }));
it('returns proper icon name', () => { it('returns proper icon name', () => {
expect(wrapper.find(Icon).props('name')).toBe(icon); expect(wrapper.find(GlIcon).props('name')).toBe(icon);
}); });
it('returns proper title', () => { it('returns proper title', () => {
......
import Vuex from 'vuex'; import Vuex from 'vuex';
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { createLocalVue, shallowMount } from '@vue/test-utils';
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import TerminalSyncStatus from '~/ide/components/terminal_sync/terminal_sync_status.vue'; import TerminalSyncStatus from '~/ide/components/terminal_sync/terminal_sync_status.vue';
import { import {
MSG_TERMINAL_SYNC_CONNECTING, MSG_TERMINAL_SYNC_CONNECTING,
MSG_TERMINAL_SYNC_UPLOADING, MSG_TERMINAL_SYNC_UPLOADING,
MSG_TERMINAL_SYNC_RUNNING, MSG_TERMINAL_SYNC_RUNNING,
} from '~/ide/stores/modules/terminal_sync/messages'; } from '~/ide/stores/modules/terminal_sync/messages';
import Icon from '~/vue_shared/components/icon.vue';
const TEST_MESSAGE = 'lorem ipsum dolar sit'; const TEST_MESSAGE = 'lorem ipsum dolar sit';
const START_LOADING = 'START_LOADING'; const START_LOADING = 'START_LOADING';
...@@ -80,7 +79,7 @@ describe('ide/components/terminal_sync/terminal_sync_status', () => { ...@@ -80,7 +79,7 @@ describe('ide/components/terminal_sync/terminal_sync_status', () => {
if (!icon) { if (!icon) {
it('does not render icon', () => { it('does not render icon', () => {
expect(wrapper.find(Icon).exists()).toBe(false); expect(wrapper.find(GlIcon).exists()).toBe(false);
}); });
it('renders loading icon', () => { it('renders loading icon', () => {
...@@ -88,7 +87,7 @@ describe('ide/components/terminal_sync/terminal_sync_status', () => { ...@@ -88,7 +87,7 @@ describe('ide/components/terminal_sync/terminal_sync_status', () => {
}); });
} else { } else {
it('renders icon', () => { it('renders icon', () => {
expect(wrapper.find(Icon).props('name')).toEqual(icon); expect(wrapper.find(GlIcon).props('name')).toEqual(icon);
}); });
it('does not render loading icon', () => { it('does not render loading icon', () => {
......
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