Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-icons upgrade from 2.2.7 to 4.10.1 #1586

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/jaeger-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@
"react-dom": "^18.2.0",
"react-ga": "^3.3.1",
"react-helmet": "^6.1.0",
"react-icons": "2.2.7",
"react-icons": "^4.10.1",
"react-metrics": "^2.3.2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed?

"react-redux": "^5.0.6",
"react-router-dom": "4.3.1",
"react-router-redux": "5.0.0-alpha.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ import * as React from 'react';
import { Checkbox, Popover } from 'antd';
import cx from 'classnames';
import { TLayoutVertex } from '@jaegertracing/plexus/lib/types';
import IoAndroidLocate from 'react-icons/lib/io/android-locate';
import MdVisibilityOff from 'react-icons/lib/md/visibility-off';
import { IoLocationSharp } from 'react-icons/io5';
import { RiEyeCloseLine } from 'react-icons/ri';

import { connect } from 'react-redux';
import { bindActionCreators, Dispatch } from 'redux';

Expand Down Expand Up @@ -326,15 +327,15 @@ export class UnconnectedDdgNodeContent extends React.PureComponent<TProps, TStat
{!isFocalNode && (
<a className="DdgNodeContent--actionsItem" onClick={this.focusPaths} role="button">
<span className="DdgNodeContent--actionsItemIconWrapper">
<IoAndroidLocate />
<IoLocationSharp />
</span>
<span className="DdgNodeContent--actionsItemText">Focus paths through this node</span>
</a>
)}
{!isFocalNode && (
<a className="DdgNodeContent--actionsItem" onClick={this.hideVertex} role="button">
<span className="DdgNodeContent--actionsItemIconWrapper">
<MdVisibilityOff />
<RiEyeCloseLine />
</span>
<span className="DdgNodeContent--actionsItemText">Hide node</span>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import React from 'react';
import { shallow } from 'enzyme';
import IoChevronDown from 'react-icons/lib/io/chevron-down';
import { IoChevronDownOutline } from 'react-icons/io5';

import ChevronDown from './ChevronDown';

Expand All @@ -27,7 +27,7 @@ describe('ChevronDown', () => {
const wrapper = shallow(<ChevronDown className={className} style={style} />);

expect(wrapper.hasClass(className)).toBe(true);
expect(wrapper.find(IoChevronDown).prop('style')).toBe(style);
expect(wrapper.find(IoChevronDownOutline).prop('style')).toBe(style);
});

it('does not add `undefined` as a className when not given a className', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

import * as React from 'react';
import IoChevronDown from 'react-icons/lib/io/chevron-down';
import { IoChevronDownOutline } from 'react-icons/io5';

import './ChevronDown.css';

Expand All @@ -25,7 +25,7 @@ type TProps = {
function ChevronDown(props: TProps) {
const { className, style } = props;
const cls = `Ddg--Header--ChevronDown ${className || ''}`;
return <IoChevronDown className={cls} style={style} />;
return <IoChevronDownOutline className={cls} style={style} />;
}

export default React.memo(ChevronDown);
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

import React, { PureComponent } from 'react';
import { Popover } from 'antd';
import SortAmountAsc from 'react-icons/lib/fa/sort-amount-asc.js';
import IoChevronRight from 'react-icons/lib/io/chevron-right';
import { FaSortAmountUpAlt } from 'react-icons/fa';
import { IoChevronForwardOutline } from 'react-icons/io5';

import ChevronDown from '../ChevronDown';
import { trackHopChange } from '../../index.track';
Expand Down Expand Up @@ -48,7 +48,9 @@ export default class Selector extends PureComponent<TProps> {
const { direction } = this.props;
return (
<React.Fragment key={`${distance} ${direction} ${suffix}`}>
{Boolean(showChevron) && <IoChevronRight className={`${CLASSNAME}--ChevronRight is-${fullness}`} />}
{Boolean(showChevron) && (
<IoChevronForwardOutline className={`${CLASSNAME}--ChevronRight is-${fullness}`} />
)}
<button
className={`${CLASSNAME}--btn is-${fullness} ${CLASSNAME}--${suffix}`}
type="button"
Expand Down Expand Up @@ -109,7 +111,7 @@ export default class Selector extends PureComponent<TProps> {
title={`Visible ${lowercaseLabel}`}
>
<span className={CLASSNAME}>
<SortAmountAsc className={`${CLASSNAME}--AscIcon is-${streamText}`} />
<FaSortAmountUpAlt className={`${CLASSNAME}--AscIcon is-${streamText}`} />
{streamLabel}
{furthestBtn}
<span className={`${CLASSNAME}--delimiter`}>/</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
import React from 'react';
import { shallow } from 'enzyme';
import { Tooltip } from 'antd';
import MdVisibility from 'react-icons/lib/md/visibility';
import MdVisibilityOff from 'react-icons/lib/md/visibility-off';
import { RiEyeLine, RiEyeCloseLine } from 'react-icons/ri';

import Header from './index';
import HopsSelector from './HopsSelector';
Expand Down Expand Up @@ -120,16 +119,16 @@ describe('<Header>', () => {
expect(getMatchesInfo().text()).not.toEqual(expectedHiddenCount);
expect(getTooltip().prop('title')).toBe(expectedTitle);
expect(getBtn().prop('disabled')).toBe(true);
expect(wrapper.find(MdVisibility)).toHaveLength(1);
expect(wrapper.find(MdVisibilityOff)).toHaveLength(0);
expect(wrapper.find(RiEyeLine)).toHaveLength(1);
expect(wrapper.find(RiEyeCloseLine)).toHaveLength(0);

wrapper.setProps({ hiddenUiFindMatches: new Set() });
expect(getMatchesInfo().text()).toEqual(expectedFindCount);
expect(getMatchesInfo().text()).not.toEqual(expectedHiddenCount);
expect(getTooltip().prop('title')).toBe(expectedTitle);
expect(getBtn().prop('disabled')).toBe(true);
expect(wrapper.find(MdVisibility)).toHaveLength(1);
expect(wrapper.find(MdVisibilityOff)).toHaveLength(0);
expect(wrapper.find(RiEyeLine)).toHaveLength(1);
expect(wrapper.find(RiEyeCloseLine)).toHaveLength(0);
});

it('renders both visible and hidden counts if both are provided', () => {
Expand All @@ -139,8 +138,8 @@ describe('<Header>', () => {
expect(getMatchesInfo().text()).toEqual(expectedHiddenCount);
expect(getTooltip().prop('title')).toBe(expectedHiddenTitle);
expect(getBtn().prop('disabled')).toBe(false);
expect(wrapper.find(MdVisibility)).toHaveLength(1);
expect(wrapper.find(MdVisibilityOff)).toHaveLength(1);
expect(wrapper.find(RiEyeLine)).toHaveLength(1);
expect(wrapper.find(RiEyeCloseLine)).toHaveLength(1);
});

it('renders 0 with correct tooltip if there are no visible nor hidden matches', () => {
Expand All @@ -150,8 +149,8 @@ describe('<Header>', () => {
expect(getMatchesInfo().text()).toBe('0');
expect(getTooltip().prop('title')).toBe(expectedTitle);
expect(getBtn().prop('disabled')).toBe(true);
expect(wrapper.find(MdVisibility)).toHaveLength(0);
expect(wrapper.find(MdVisibilityOff)).toHaveLength(0);
expect(wrapper.find(RiEyeLine)).toHaveLength(0);
expect(wrapper.find(RiEyeCloseLine)).toHaveLength(0);
});

it('renders 0 with correct tooltip if there are no matches but there are hidden matches', () => {
Expand All @@ -162,8 +161,8 @@ describe('<Header>', () => {
expect(getMatchesInfo().text()).toEqual(expectedHiddenCount);
expect(getTooltip().prop('title')).toBe(expectedHiddenTitle);
expect(getBtn().prop('disabled')).toBe(false);
expect(wrapper.find(MdVisibility)).toHaveLength(1);
expect(wrapper.find(MdVisibilityOff)).toHaveLength(1);
expect(wrapper.find(RiEyeLine)).toHaveLength(1);
expect(wrapper.find(RiEyeCloseLine)).toHaveLength(1);
});

it('renders correct plurality in tooltip', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

import * as React from 'react';
import { Icon, Input, Tooltip } from 'antd';
import MdVisibility from 'react-icons/lib/md/visibility';
import MdVisibilityOff from 'react-icons/lib/md/visibility-off';
import { RiEyeLine, RiEyeCloseLine } from 'react-icons/ri';

import HopsSelector from './HopsSelector';
import NameSelector from '../../common/NameSelector';
Expand Down Expand Up @@ -74,7 +73,7 @@ export default class Header extends React.PureComponent<TProps> {
hiddenInfo = (
<span className="DdgHeader--uiFindInfo--hidden">
{size}
<MdVisibilityOff className="DdgHeader--uiFindInfo--icon" />
<RiEyeCloseLine className="DdgHeader--uiFindInfo--icon" />
</span>
);
}
Expand All @@ -90,7 +89,7 @@ export default class Header extends React.PureComponent<TProps> {
type="button"
>
{uiFindCount}
{(uiFindCount !== 0 || hasHidden) && <MdVisibility className="DdgHeader--uiFindInfo--icon" />}
{(uiFindCount !== 0 || hasHidden) && <RiEyeLine className="DdgHeader--uiFindInfo--icon" />}
{hiddenInfo}
</button>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

import * as React from 'react';
import { Modal, Table } from 'antd';
import MdExitToApp from 'react-icons/lib/md/exit-to-app';
import MdInfoOutline from 'react-icons/lib/md/info-outline';
import { RiLogoutBoxLine } from 'react-icons/ri';
import { MdInfoOutline } from 'react-icons/md';

import { TDdgVertex } from '../../../model/ddg/types';
import { TPathAgnosticDecorationSchema } from '../../../model/path-agnostic-decorations/types';
Expand Down Expand Up @@ -102,7 +102,7 @@ export default class SidePanel extends React.PureComponent<TProps> {
type="button"
onClick={this.clearSelected}
>
<MdExitToApp />
<RiLogoutBoxLine />
</button>
<div className="Ddg--SidePanel--DecorationBtns">
{this.decorations.map(({ acronym, id }) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import moment from 'moment';
import memoizeOne from 'memoize-one';
import PropTypes from 'prop-types';
import queryString from 'query-string';
import IoHelp from 'react-icons/lib/io/help';
import { IoMdHelp } from 'react-icons/io';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { Field, reduxForm, formValueSelector } from 'redux-form';
Expand Down Expand Up @@ -345,7 +345,7 @@ export class SearchFormImpl extends React.PureComponent {
</div>
}
>
<IoHelp className="SearchForm--hintTrigger" />
<IoMdHelp className="SearchForm--hintTrigger" />
</Popover>
</div>
}
Expand Down Expand Up @@ -380,7 +380,7 @@ export class SearchFormImpl extends React.PureComponent {
</h3>
}
>
<IoHelp className="SearchForm--hintTrigger" />
<IoMdHelp className="SearchForm--hintTrigger" />
</Popover>
</div>
}
Expand Down Expand Up @@ -416,7 +416,7 @@ export class SearchFormImpl extends React.PureComponent {
</h3>
}
>
<IoHelp className="SearchForm--hintTrigger" />
<IoMdHelp className="SearchForm--hintTrigger" />
</Popover>
</div>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { Link } from 'react-router-dom';
import { sortBy } from 'lodash';
import moment from 'moment';

import IoAlert from 'react-icons/lib/io/alert';
import { IoAlertCircleOutline } from 'react-icons/io5';

import { trackConversions, EAltViewActions } from './index.track';
import * as markers from './ResultItem.markers';
Expand Down Expand Up @@ -117,7 +117,7 @@ export default class ResultItem extends React.PureComponent<Props, State> {
style={{ borderLeftColor: colorGenerator.getColorByKey(name) }}
>
{this.state.erroredServices.has(name) && (
<IoAlert className="ResultItem--errorIcon" />
<IoAlertCircleOutline className="ResultItem--errorIcon" />
)}
{name} ({count})
</Tag>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

import * as React from 'react';
import IoChevronDown from 'react-icons/lib/io/chevron-down';
import { IoChevronDownOutline } from 'react-icons/io5';

import TraceTimelineLink from './TraceTimelineLink';
import RelativeDate from '../../common/RelativeDate';
Expand Down Expand Up @@ -91,7 +91,7 @@ export default function TraceHeader(props: Props) {
<span className="u-tx-muted">Select a Trace...</span>
)}
</span>
<IoChevronDown className="TraecDiffHeader--traceTitleChevron" />
<IoChevronDownOutline className="TraecDiffHeader--traceTitleChevron" />
</h1>
<AttrsComponent startTime={startTime} duration={duration} totalSpans={totalSpans} />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ import { Button, Input } from 'antd';
import _get from 'lodash/get';
import _maxBy from 'lodash/maxBy';
import _values from 'lodash/values';
import IoAndroidArrowBack from 'react-icons/lib/io/android-arrow-back';
import IoIosFilingOutline from 'react-icons/lib/io/ios-filing-outline';
import MdKeyboardArrowRight from 'react-icons/lib/md/keyboard-arrow-right';
import { IoArrowBackOutline, IoDocumentOutline, IoChevronForwardOutline } from 'react-icons/io5';
import { Link } from 'react-router-dom';

import AltViewOptions from './AltViewOptions';
Expand Down Expand Up @@ -163,7 +161,7 @@ export function TracePageHeaderFn(props: TracePageHeaderEmbedProps & { forwarded
<div className="TracePageHeader--titleRow">
{toSearch && (
<Link className="TracePageHeader--back" to={toSearch}>
<IoAndroidArrowBack />
<IoArrowBackOutline />
</Link>
)}
{links && links.length > 0 && <ExternalLinks links={links} />}
Expand All @@ -174,7 +172,7 @@ export function TracePageHeaderFn(props: TracePageHeaderEmbedProps & { forwarded
role="switch"
aria-checked={!slimView}
>
<MdKeyboardArrowRight
<IoChevronForwardOutline
className={`TracePageHeader--detailToggle ${!slimView ? 'is-expanded' : ''}`}
/>
{title}
Expand Down Expand Up @@ -203,7 +201,7 @@ export function TracePageHeaderFn(props: TracePageHeaderEmbedProps & { forwarded
)}
{showArchiveButton && (
<Button className="ub-mr2 ub-flex ub-items-center" htmlType="button" onClick={onArchiveClicked}>
<IoIosFilingOutline className="TracePageHeader--archiveIcon" />
<IoDocumentOutline className="TracePageHeader--archiveIcon" />
Archive Trace
</Button>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import * as React from 'react';
import { Button, Input, Tooltip } from 'antd';
import cx from 'classnames';
import IoAndroidLocate from 'react-icons/lib/io/android-locate';
import { IoLocationSharp } from 'react-icons/io5';

import * as markers from './TracePageSearchBar.markers';
import { trackFilter } from '../index.track';
Expand Down Expand Up @@ -102,7 +102,7 @@ export function TracePageSearchBarFn(props: TracePageSearchBarProps & { forwarde
htmlType="button"
onClick={focusUiFindMatches}
>
<IoAndroidLocate />
<IoLocationSharp />
</Button>
<Button
className={btnClass}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@
// limitations under the License.

import * as React from 'react';
import IoAlert from 'react-icons/lib/io/alert';
import IoArrowRightA from 'react-icons/lib/io/arrow-right-a';
import IoNetwork from 'react-icons/lib/io/network';
import MdFileUpload from 'react-icons/lib/md/file-upload';
import { IoAlertCircleOutline, IoChevronForwardOutline, IoGitNetworkOutline } from 'react-icons/io5';
import { MdCloudUpload } from 'react-icons/md';
import ReferencesButton from './ReferencesButton';
import TimelineRow from './TimelineRow';
import { formatDuration, ViewedBoundsFunctionType } from './utils';
Expand Down Expand Up @@ -149,18 +147,18 @@ export default class SpanBarRow extends React.PureComponent<SpanBarRowProps> {
<span
className={`span-svc-name ${isParent && !isChildrenExpanded ? 'is-children-collapsed' : ''}`}
>
{showErrorIcon && <IoAlert className="SpanBarRow--errorIcon" />}
{showErrorIcon && <IoAlertCircleOutline className="SpanBarRow--errorIcon" />}
{serviceName}{' '}
{rpc && (
<span>
<IoArrowRightA />{' '}
<IoChevronForwardOutline />{' '}
<i className="SpanBarRow--rpcColorMarker" style={{ background: rpc.color }} />
{rpc.serviceName}
</span>
)}
{noInstrumentedServer && (
<span>
<IoArrowRightA />{' '}
<IoChevronForwardOutline />{' '}
<i
className="SpanBarRow--rpcColorMarker"
style={{ background: noInstrumentedServer.color }}
Expand All @@ -177,7 +175,7 @@ export default class SpanBarRow extends React.PureComponent<SpanBarRowProps> {
tooltipText="Contains multiple references"
focusSpan={focusSpan}
>
<IoNetwork />
<IoGitNetworkOutline />
</ReferencesButton>
)}
{span.subsidiarilyReferencedBy && span.subsidiarilyReferencedBy.length > 0 && (
Expand All @@ -188,7 +186,7 @@ export default class SpanBarRow extends React.PureComponent<SpanBarRowProps> {
}`}
focusSpan={focusSpan}
>
<MdFileUpload />
<MdCloudUpload />
</ReferencesButton>
)}
</div>
Expand Down
Loading