Skip to content

Commit

Permalink
henry/grwt-3242/chore: quill-icons package update (#17656)
Browse files Browse the repository at this point in the history
* chore: package update

* fix: replace icons

* fix: wrong import

* fix: add color

* fix: failing test

* fix: failing test 2

* fix: change to css variable

* chore: package-lock update

* fix: build fail

* fix: build fail
  • Loading branch information
henry-deriv authored Dec 13, 2024
1 parent a29ece1 commit cf0295f
Show file tree
Hide file tree
Showing 16 changed files with 307 additions and 374 deletions.
620 changes: 277 additions & 343 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/account/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@deriv-com/quill-ui": "1.24.2",
"@deriv/components": "^1.0.0",
"@deriv/hooks": "^1.0.0",
"@deriv/quill-icons": "1.23.3",
"@deriv/quill-icons": "2.2.1",
"@deriv/shared": "^1.0.0",
"@deriv/stores": "^1.0.0",
"@deriv/translations": "^1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { mockStore, StoreProvider } from '@deriv/stores';

jest.mock('@deriv/quill-icons', () => ({
...jest.requireActual('@deriv/quill-icons'),
PartnersProductDerivMt5BrandLightLogoHorizontalIcon: () => 'PartnersProductDerivMt5BrandLightLogoHorizontalIcon',
PartnersProductBrandLightDerivMt5LogoIcon: () => 'PartnersProductBrandLightDerivMt5LogoIcon',
}));

jest.mock('@deriv/api', () => ({
Expand Down Expand Up @@ -45,7 +45,7 @@ describe('<DerivMT5Password />', () => {
expect(
screen.getByText(/use your to log in to your Deriv MT5 accounts on the desktop, web and mobile apps\./i)
).toBeInTheDocument();
expect(screen.queryByText(/PartnersProductDerivMt5BrandLightLogoHorizontalIcon/i)).toBeInTheDocument();
expect(screen.queryByText(/PartnersProductBrandLightDerivMt5LogoIcon/i)).toBeInTheDocument();
expect(screen.getByRole('button', { name: /Change password/i })).toBeInTheDocument();
expect(screen.queryByText(/unlink from/i)).not.toBeInTheDocument();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { AccountsDerivXIcon, BrandDerivLogoCoralIcon, LegacyEmailIcon } from '@d
jest.mock('@deriv/quill-icons', () => ({
AccountsDerivXIcon: jest.fn(() => null),
BrandDerivLogoCoralIcon: jest.fn(() => null),
PartnersProductDerivMt5BrandLightLogoHorizontalIcon: jest.fn(() => null),
PartnersProductBrandLightDerivMt5LogoIcon: jest.fn(() => null),
LegacyEmailIcon: jest.fn(() => null),
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
AccountsDerivXIcon,
BrandDerivLogoCoralIcon,
LegacyEmailIcon,
PartnersProductDerivMt5BrandLightLogoHorizontalIcon,
PartnersProductBrandLightDerivMt5LogoIcon,
} from '@deriv/quill-icons';

type TEmailPasswordTitleProps = {
Expand All @@ -15,7 +15,7 @@ const EmailPasswordTitle = ({ icon, title }: TEmailPasswordTitleProps) => {
const displayIcon = {
deriv_email: <LegacyEmailIcon iconSize='sm' />,
deriv_password: <BrandDerivLogoCoralIcon height={24} width={24} />,
deriv_mt5_password: <PartnersProductDerivMt5BrandLightLogoHorizontalIcon height={24} width={24} />,
deriv_mt5_password: <PartnersProductBrandLightDerivMt5LogoIcon height={24} width={24} />,
deriv_x_password: <AccountsDerivXIcon iconSize='sm' />,
};

Expand Down
2 changes: 1 addition & 1 deletion packages/appstore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@deriv/stores": "^1.0.0",
"@deriv/translations": "^1.0.0",
"@deriv/hooks": "^1.0.0",
"@deriv/quill-icons": "1.23.3",
"@deriv/quill-icons": "2.2.1",
"@deriv/wallets": "^1.0.0",
"classnames": "^2.2.6",
"mobx": "^6.6.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/bot-web-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"@deriv/components": "^1.0.0",
"@deriv/deriv-charts": "^2.7.2",
"@deriv/hooks": "^1.0.0",
"@deriv/quill-icons": "1.23.3",
"@deriv/quill-icons": "2.2.1",
"@deriv/shared": "^1.0.0",
"@deriv/stores": "^1.0.0",
"@deriv/translations": "^1.0.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@
"@deriv/deriv-charts": "^2.7.2",
"@deriv/hooks": "^1.0.0",
"@deriv/p2p": "^0.7.3",
"@deriv/quill-design": "^1.3.2",
"@deriv/quill-icons": "1.23.3",
"@deriv/quill-icons": "2.2.1",
"@deriv/reports": "^1.0.0",
"@deriv/shared": "^1.0.0",
"@deriv/stores": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/App/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import WS from 'Services/ws-methods';
import PropTypes from 'prop-types';
import { BrowserRouter as Router } from 'react-router-dom';
import { Analytics } from '@deriv-com/analytics';
import { BreakpointProvider } from '@deriv/quill-design';
import { BreakpointProvider } from '@deriv-com/quill-ui';
import { APIProvider } from '@deriv/api';
import { CashierStore } from '@deriv/cashier';
import { CFDStore } from '@deriv/cfd';
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
},
"dependencies": {
"@deriv-com/analytics": "1.26.2",
"@deriv/quill-icons": "1.23.3",
"@deriv/quill-icons": "2.2.1",
"@deriv/api-types": "1.0.172",
"@deriv/translations": "^1.0.0",
"@deriv-com/utils": "^0.0.40",
Expand Down
2 changes: 1 addition & 1 deletion packages/trader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"@deriv/stores": "^1.0.0",
"@deriv/translations": "^1.0.0",
"@deriv/utils": "^1.0.0",
"@deriv/quill-icons": "1.23.3",
"@deriv/quill-icons": "2.2.1",
"@lottiefiles/dotlottie-react": "0.7.2",
"@types/react-loadable": "^5.5.6",
"classnames": "^2.2.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/wallets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@deriv-com/ui": "1.36.4",
"@deriv-com/utils": "^0.0.40",
"@deriv/api-v2": "^1.0.0",
"@deriv/quill-icons": "1.23.3",
"@deriv/quill-icons": "2.2.1",
"@deriv/utils": "^1.0.0",
"@tanstack/react-table": "^8.10.3",
"@zxcvbn-ts/core": "^3.0.4",
Expand Down
16 changes: 8 additions & 8 deletions packages/wallets/src/constants/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import {
CurrencyUsdIcon,
CurrencyUsdtIcon,
CurrencyXrpIcon,
DerivProductDerivBotBrandLightLogoHorizontalIcon,
DerivProductDerivGoBrandLightLogoHorizontalIcon,
DerivProductDerivTraderBrandLightLogoHorizontalIcon,
PartnersProductSmarttraderBrandLightLogoIcon,
DerivProductBrandLightDerivBotLogoIcon,
DerivProductBrandLightDerivGoLogoIcon,
DerivProductBrandLightDerivTraderLogoIcon,
PartnersProductBrandLightSmarttraderLogoIcon,
PaymentMethodBitcoinBrandIcon,
PaymentMethodDerivDemoBrandDarkIcon,
PaymentMethodEthereumBrandIcon,
Expand All @@ -33,10 +33,10 @@ import AccountsDmt5GoldIcon from '../public/images/account-dmt5-gold-icon.svg';
import { TCurrencyIconTypes, TIconTypes } from '../types';

export const AppIcons: TIconTypes = {
bot: DerivProductDerivBotBrandLightLogoHorizontalIcon,
derivgo: DerivProductDerivGoBrandLightLogoHorizontalIcon,
smarttrader: PartnersProductSmarttraderBrandLightLogoIcon,
trader: DerivProductDerivTraderBrandLightLogoHorizontalIcon,
bot: DerivProductBrandLightDerivBotLogoIcon,
derivgo: DerivProductBrandLightDerivGoLogoIcon,
smarttrader: PartnersProductBrandLightSmarttraderLogoIcon,
trader: DerivProductBrandLightDerivTraderLogoIcon,
};

export const CFDPlatformIcons: TIconTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const TransactionStatus: React.FC<TTransactionStatus> = ({ transactionType }) =>
<Text align='start' size='sm' weight='bold'>
<Localize i18n_default_text='Transaction status' />
</Text>
{isError && <LegacyWarningIcon iconSize='xs' />}
{isError && <LegacyWarningIcon fill='var(--status-warning)' iconSize='xs' />}
</div>
<Divider color='var(--general-active)' />
<div className='wallets-transaction-status__body'>
Expand Down
12 changes: 6 additions & 6 deletions packages/wallets/src/features/cfd/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import {
AccountsDmt5StandardIcon,
AccountsDmt5SwfIcon,
AccountsDmt5ZrsIcon,
DerivProductDerivXBrandDarkWordmarkIcon,
DerivProductBrandDarkDerivXWordmarkIcon,
LabelPairedLinuxXlIcon,
LabelPairedMacosXlIcon,
LabelPairedWindowsXlIcon,
PartnersProductDerivCtraderBrandDarkWordmarkHorizontalIcon,
PartnersProductDerivMt5BrandLightLogoHorizontalIcon,
PartnersProductBrandDarkDerivCtraderWordmarkIcon,
PartnersProductBrandLightDerivMt5LogoWordmarkIcon,
} from '@deriv/quill-icons';
import { localize, useTranslations } from '@deriv-com/translations';
import AccountsDmt5GoldIcon from '../../public/images/account-dmt5-gold-icon.svg';
Expand Down Expand Up @@ -169,7 +169,7 @@ export const getAppToContentMapper = (
title: localize('MetaTrader 5 MacOS app'),
},
web: {
icon: <PartnersProductDerivMt5BrandLightLogoHorizontalIcon height={32} width={32} />,
icon: <PartnersProductBrandLightDerivMt5LogoWordmarkIcon height={32} width={32} />,
link: mt5TradeAccount ? getWebtraderUrl({ mt5TradeAccount }) : '',
text: localize('Open'),
title: localize('MetaTrader 5 web'),
Expand All @@ -183,8 +183,8 @@ export const getAppToContentMapper = (
}) as const;

export const PlatformToLabelIconMapper = {
ctrader: <PartnersProductDerivCtraderBrandDarkWordmarkHorizontalIcon height={8} width={58} />,
dxtrade: <DerivProductDerivXBrandDarkWordmarkIcon height={10} width={35} />,
ctrader: <PartnersProductBrandDarkDerivCtraderWordmarkIcon height={8} width={58} />,
dxtrade: <DerivProductBrandDarkDerivXWordmarkIcon height={10} width={35} />,
} as const;

export const getServiceMaintenanceMessages = (localize: ReturnType<typeof useTranslations>['localize']) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
AccountsDmt5StandardIcon,
AccountsDmt5SwfIcon,
AccountsDmt5ZrsIcon,
PartnersProductDerivCtraderBrandLightLogoHorizontalIcon,
PartnersProductBrandLightDerivCtraderLogoIcon,
} from '@deriv/quill-icons';
import { useTranslations } from '@deriv-com/translations';
import AccountsDmt5GoldIcon from '../../../../public/images/account-dmt5-gold-icon.svg';
Expand All @@ -31,7 +31,7 @@ export const ACCOUNT_ICONS = {
},
[MT5_PRODUCT.SWAP_FREE]: (props: TProps) => <AccountsDmt5SwfIcon {...props} />,
[CFD_PLATFORMS.DXTRADE]: (props: TProps) => <AccountsDerivXIcon {...props} />,
[CFD_PLATFORMS.CTRADER]: (props: TProps) => <PartnersProductDerivCtraderBrandLightLogoHorizontalIcon {...props} />,
[CFD_PLATFORMS.CTRADER]: (props: TProps) => <PartnersProductBrandLightDerivCtraderLogoIcon {...props} />,
[MT5_PRODUCT.ZERO_SPREAD]: (props: TProps) => <AccountsDmt5ZrsIcon {...props} />,
[MT5_PRODUCT.GOLD]: (props: TProps) => <AccountsDmt5GoldIcon {...props} />,
default: (props: TProps) => <AccountsDmt5CfdsIcon {...props} />,
Expand Down

0 comments on commit cf0295f

Please sign in to comment.