Unverified Commit fcf7ed0f authored by Marcos Iglesias's avatar Marcos Iglesias Committed by GitHub

Fixes the user search icon (#447)

parent ebd6a96d
...@@ -20,6 +20,11 @@ $dashboards: ( ...@@ -20,6 +20,11 @@ $dashboards: (
mode: "/static/images/icons/logo-mode.svg" mode: "/static/images/icons/logo-mode.svg"
); );
// Map of User names and icon paths
$users: (
users: "/static/images/icons/users.svg",
);
// Given a Map of key/value pairs, generates a new class // Given a Map of key/value pairs, generates a new class
@mixin iconBackgrounds($map){ @mixin iconBackgrounds($map){
@each $name, $url in $map { @each $name, $url in $map {
...@@ -42,6 +47,7 @@ span.icon { ...@@ -42,6 +47,7 @@ span.icon {
// Generate Icons // Generate Icons
@include iconBackgrounds($data-stores); @include iconBackgrounds($data-stores);
@include iconBackgrounds($dashboards); @include iconBackgrounds($dashboards);
@include iconBackgrounds($users);
} }
img.icon { img.icon {
...@@ -177,11 +183,6 @@ img.icon { ...@@ -177,11 +183,6 @@ img.icon {
mask-image: url("/static/images/icons/Up.svg"); mask-image: url("/static/images/icons/Up.svg");
} }
&.icon-users {
-webkit-mask-image: url("/static/images/icons/users.svg");
mask-image: url("/static/images/icons/users.svg");
}
&.icon-more { &.icon-more {
-webkit-mask-image: url("/static/images/icons/More.svg"); -webkit-mask-image: url("/static/images/icons/More.svg");
mask-image: url("/static/images/icons/More.svg"); mask-image: url("/static/images/icons/More.svg");
......
...@@ -9,7 +9,7 @@ import Breadcrumb from 'components/common/Breadcrumb'; ...@@ -9,7 +9,7 @@ import Breadcrumb from 'components/common/Breadcrumb';
import Flag from 'components/common/Flag'; import Flag from 'components/common/Flag';
import ResourceList from 'components/common/ResourceList'; import ResourceList from 'components/common/ResourceList';
import TabsComponent from 'components/common/TabsComponent'; import TabsComponent from 'components/common/TabsComponent';
import { mapDispatchToProps, mapStateToProps, ProfilePage, ProfilePageProps, RouteProps } from '../'; import { mapDispatchToProps, mapStateToProps, ProfilePage, ProfilePageProps, RouteProps } from '.';
import globalState from 'fixtures/globalState'; import globalState from 'fixtures/globalState';
import { getMockRouterProps } from 'fixtures/mockRouter'; import { getMockRouterProps } from 'fixtures/mockRouter';
...@@ -23,7 +23,7 @@ import { ...@@ -23,7 +23,7 @@ import {
OWNED_SOURCE, OWNED_SOURCE,
READ_LABEL, READ_LABEL,
READ_SOURCE, READ_SOURCE,
} from '../constants'; } from './constants';
jest.mock('config/config-utils', () => ({ jest.mock('config/config-utils', () => ({
getDisplayNameByResource: jest.fn(() => 'Resource'), getDisplayNameByResource: jest.fn(() => 'Resource'),
...@@ -370,7 +370,7 @@ describe('ProfilePage', () => { ...@@ -370,7 +370,7 @@ describe('ProfilePage', () => {
}); });
it('renders email link with correct text', () => { it('renders email link with correct text', () => {
expect(wrapper.find('#email-link').find('span').text()).toEqual('test@test.com'); expect(wrapper.find('#email-link').find('.email-link-label').text()).toEqual('test@test.com');
}); });
it('renders profile link with correct href', () => { it('renders profile link with correct href', () => {
...@@ -378,7 +378,7 @@ describe('ProfilePage', () => { ...@@ -378,7 +378,7 @@ describe('ProfilePage', () => {
}); });
it('renders profile link with correct text', () => { it('renders profile link with correct text', () => {
expect(wrapper.find('#profile-link').find('span').text()).toEqual('Employee Profile'); expect(wrapper.find('#profile-link').find('.profile-link-label').text()).toEqual('Employee Profile');
}); });
}); });
}); });
......
...@@ -219,21 +219,21 @@ export class ProfilePage extends React.Component<ProfilePageProps, ProfilePageSt ...@@ -219,21 +219,21 @@ export class ProfilePage extends React.Component<ProfilePageProps, ProfilePageSt
user.is_active && user.is_active &&
<a id="email-link" href={`mailto:${user.email}`} className='btn btn-flat-icon header-link' target='_blank'> <a id="email-link" href={`mailto:${user.email}`} className='btn btn-flat-icon header-link' target='_blank'>
<img className='icon icon-dark icon-mail'/> <img className='icon icon-dark icon-mail'/>
<span className="body-2">{ user.email }</span> <span className="email-link-label body-2">{ user.email }</span>
</a> </a>
} }
{ {
user.is_active && user.profile_url && user.is_active && user.profile_url &&
<a id="profile-link" href={user.profile_url} className='btn btn-flat-icon header-link' target='_blank'> <a id="profile-link" href={user.profile_url} className='btn btn-flat-icon header-link' target='_blank'>
<img className='icon icon-dark icon-users'/> <span className='icon icon-dark icon-users'/>
<span className="body-2">Employee Profile</span> <span className="profile-link-label body-2">Employee Profile</span>
</a> </a>
} }
{ {
user.github_username && user.github_username &&
<a id="github-link" href={`https://github.com/${user.github_username}`} className='btn btn-flat-icon header-link' target='_blank'> <a id="github-link" href={`https://github.com/${user.github_username}`} className='btn btn-flat-icon header-link' target='_blank'>
<img className='icon icon-dark icon-github'/> <img className='icon icon-dark icon-github'/>
<span className="body-2">Github</span> <span className="github-link-label body-2">Github</span>
</a> </a>
} }
</div> </div>
......
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