Commit 9e145ff9 authored by Paul Slaughter's avatar Paul Slaughter

Merge branch '225938-replace-fa-eyes-slash-icons-with-gitlab-svg-eye-slash-icon' into 'master'

Replace fa-eyes-slash icons with GitLab SVG eye-slash icon

See merge request gitlab-org/gitlab!36602
parents 721a598e d6b45732
...@@ -109,8 +109,10 @@ class GfmAutoComplete { ...@@ -109,8 +109,10 @@ class GfmAutoComplete {
tpl += ' <small class="params"><%- params.join(" ") %></small>'; tpl += ' <small class="params"><%- params.join(" ") %></small>';
} }
if (value.warning && value.icon && value.icon === 'confidential') { if (value.warning && value.icon && value.icon === 'confidential') {
tpl += tpl += `<small class="description gl-display-flex gl-align-items-center">${spriteIcon(
'<small class="description"><em><i class="fa fa-eye-slash" aria-hidden="true"/><%- warning %></em></small>'; 'eye-slash',
's16 gl-mr-2',
)}<em><%- warning %></em></small>`;
} else if (value.warning) { } else if (value.warning) {
tpl += '<small class="description"><em><%- warning %></em></small>'; tpl += '<small class="description"><em><%- warning %></em></small>';
} else if (value.description !== '') { } else if (value.description !== '') {
......
...@@ -230,13 +230,15 @@ export default { ...@@ -230,13 +230,15 @@ export default {
<div class="flex-grow-1"> <div class="flex-grow-1">
<div class="title"> <div class="title">
<span class="issue-title-text"> <span class="issue-title-text">
<i <gl-icon
v-if="issuable.confidential" v-if="issuable.confidential"
v-gl-tooltip v-gl-tooltip
class="fa fa-eye-slash" name="eye-slash"
class="gl-vertical-align-text-bottom"
:size="16"
:title="$options.confidentialTooltipText" :title="$options.confidentialTooltipText"
:aria-label="$options.confidentialTooltipText" :aria-label="$options.confidentialTooltipText"
></i> />
<gl-link <gl-link
:href="issuable.web_url" :href="issuable.web_url"
:target="isJiraIssue ? '_blank' : null" :target="isJiraIssue ? '_blank' : null"
......
...@@ -41,7 +41,7 @@ module IssuesHelper ...@@ -41,7 +41,7 @@ module IssuesHelper
end end
def confidential_icon(issue) def confidential_icon(issue)
icon('eye-slash') if issue.confidential? sprite_icon('eye-slash', size: 16, css_class: 'gl-vertical-align-text-bottom') if issue.confidential?
end end
def award_user_list(awards, current_user, limit: 10) def award_user_list(awards, current_user, limit: 10)
......
---
title: Replace fa-eyes-slash icons with GitLab SVG eye-slash icon
merge_request: 36602
author:
type: performance
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlSprintf, GlLabel } from '@gitlab/ui'; import { GlSprintf, GlLabel, GlIcon } from '@gitlab/ui';
import { TEST_HOST } from 'helpers/test_constants'; import { TEST_HOST } from 'helpers/test_constants';
import { trimText } from 'helpers/text_helper'; import { trimText } from 'helpers/text_helper';
import initUserPopovers from '~/user_popovers'; import initUserPopovers from '~/user_popovers';
...@@ -75,7 +75,9 @@ describe('Issuable component', () => { ...@@ -75,7 +75,9 @@ describe('Issuable component', () => {
window.Date = DateOrig; window.Date = DateOrig;
}); });
const findConfidentialIcon = () => wrapper.find('.fa-eye-slash'); const checkExists = findFn => () => findFn().exists();
const hasConfidentialIcon = () =>
wrapper.findAll(GlIcon).wrappers.some(iconWrapper => iconWrapper.props('name') === 'eye-slash');
const findTaskStatus = () => wrapper.find('.task-status'); const findTaskStatus = () => wrapper.find('.task-status');
const findOpenedAgoContainer = () => wrapper.find('[data-testid="openedByMessage"]'); const findOpenedAgoContainer = () => wrapper.find('[data-testid="openedByMessage"]');
const findMilestone = () => wrapper.find('.js-milestone'); const findMilestone = () => wrapper.find('.js-milestone');
...@@ -169,19 +171,19 @@ describe('Issuable component', () => { ...@@ -169,19 +171,19 @@ describe('Issuable component', () => {
}); });
it.each` it.each`
desc | finder desc | check
${'bulk editing checkbox'} | ${findBulkCheckbox} ${'bulk editing checkbox'} | ${checkExists(findBulkCheckbox)}
${'confidential icon'} | ${findConfidentialIcon} ${'confidential icon'} | ${hasConfidentialIcon}
${'task status'} | ${findTaskStatus} ${'task status'} | ${checkExists(findTaskStatus)}
${'milestone'} | ${findMilestone} ${'milestone'} | ${checkExists(findMilestone)}
${'due date'} | ${findDueDate} ${'due date'} | ${checkExists(findDueDate)}
${'labels'} | ${findLabels} ${'labels'} | ${checkExists(findLabels)}
${'weight'} | ${findWeight} ${'weight'} | ${checkExists(findWeight)}
${'merge request count'} | ${findMergeRequestsCount} ${'merge request count'} | ${checkExists(findMergeRequestsCount)}
${'upvotes'} | ${findUpvotes} ${'upvotes'} | ${checkExists(findUpvotes)}
${'downvotes'} | ${findDownvotes} ${'downvotes'} | ${checkExists(findDownvotes)}
`('does not render $desc', ({ finder }) => { `('does not render $desc', ({ check }) => {
expect(finder().exists()).toBe(false); expect(check()).toBe(false);
}); });
it('show relative reference path', () => { it('show relative reference path', () => {
...@@ -215,7 +217,7 @@ describe('Issuable component', () => { ...@@ -215,7 +217,7 @@ describe('Issuable component', () => {
}); });
it('renders the confidential icon', () => { it('renders the confidential icon', () => {
expect(findConfidentialIcon().exists()).toBe(true); expect(hasConfidentialIcon()).toBe(true);
}); });
}); });
......
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