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

Update Text import paths: /pages #20117

Merged
merged 2 commits into from
Jul 20, 2023
Merged
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
2 changes: 1 addition & 1 deletion ui/helpers/utils/permission.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import {
AvatarIcon,
///: BEGIN:ONLY_INCLUDE_IN(snaps)
Icon,
Text,
///: END:ONLY_INCLUDE_IN
IconName,
IconSize,
} from '../../components/component-library';
///: BEGIN:ONLY_INCLUDE_IN(snaps)
import { Text } from '../../components/component-library/text/deprecated';
Comment on lines +21 to -26
Copy link
Contributor Author

@georgewrmarshall georgewrmarshall Jul 20, 2023

Choose a reason for hiding this comment

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

Making sure the import is still only included in snaps. This is the only other file in the codebase and it is outside of /pages but thought it would be ok to include in this PR

import { Color, FontWeight, IconColor } from '../constants/design-system';
import {
coinTypeToProtocolName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import {
ButtonLink,
IconName,
Box,
Text,
} from '../../components/component-library';
import { Text } from '../../components/component-library/text/deprecated';
import {
getCurrentChainId,
getRpcPrefsForCurrentProvider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`ConfirmApproveContent Component should render Confirm approve page corr
/>
</div>
<h6
class="box mm-text mm-text--body-sm box--margin-left-1 box--flex-direction-row box--color-text-alternative"
class="mm-box mm-text mm-text--body-sm mm-box--margin-left-1 mm-box--color-text-alternative"
>
https://metamask.github.io/test-dapp/
</h6>
Expand Down Expand Up @@ -195,7 +195,7 @@ exports[`ConfirmApproveContent Component should render Confirm approve page corr
/>
</div>
<h6
class="box mm-text mm-text--body-sm box--margin-left-1 box--flex-direction-row box--color-text-alternative"
class="mm-box mm-text mm-text--body-sm mm-box--margin-left-1 mm-box--color-text-alternative"
>
https://metamask.github.io/test-dapp/
</h6>
Expand Down Expand Up @@ -380,7 +380,7 @@ exports[`ConfirmApproveContent Component should render Confirm approve page corr
/>
</div>
<h6
class="box mm-text mm-text--body-sm box--margin-left-1 box--flex-direction-row box--color-text-alternative"
class="mm-box mm-text mm-text--body-sm mm-box--margin-left-1 mm-box--color-text-alternative"
>
https://metamask.github.io/test-dapp/
</h6>
Expand Down Expand Up @@ -565,7 +565,7 @@ exports[`ConfirmApproveContent Component should render Confirm approve page corr
/>
</div>
<h6
class="box mm-text mm-text--body-sm box--margin-left-1 box--flex-direction-row box--color-text-alternative"
class="mm-box mm-text mm-text--body-sm mm-box--margin-left-1 mm-box--color-text-alternative"
>
https://metamask.github.io/test-dapp/
</h6>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import {
ButtonIcon,
Icon,
IconName,
Text,
} from '../../../components/component-library';
import { Text } from '../../../components/component-library/text/deprecated';
import TransactionDetailItem from '../../../components/app/transaction-detail-item/transaction-detail-item.component';
import UserPreferencedCurrencyDisplay from '../../../components/app/user-preferenced-currency-display';
import { PRIMARY, SECONDARY } from '../../../helpers/constants/common';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import ConfirmTransactionBase from '../confirm-transaction-base';
import { toBuffer } from '../../../shared/modules/buffer-utils';
import Box from '../../components/ui/box';
import { Text } from '../../components/component-library/text/deprecated';
import { Text } from '../../components/component-library';
import {
Color,
DISPLAY,
Expand Down
2 changes: 1 addition & 1 deletion ui/pages/create-account/connect-hardware/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import {
BUTTON_VARIANT,
BUTTON_SIZES,
Button,
Text,
} from '../../../components/component-library';
import { Text } from '../../../components/component-library/text/deprecated';
import ZENDESK_URLS from '../../../helpers/constants/zendesk-url';
import { TextColor } from '../../../helpers/constants/design-system';
import SelectHardware from './select-hardware';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ exports[`Desktop Pairing page should render otp component 1`] = `
</div>
<h3
align="center"
class="box mm-text mm-text--heading-md box--flex-direction-row box--color-text-default"
class="mm-box mm-text mm-text--heading-md mm-box--color-text-default"
>
Pair with Desktop
</h3>
<p
align="center"
class="box mm-text mm-text--body-md box--margin-top-2 box--flex-direction-row box--color-text-default"
class="mm-box mm-text mm-text--body-md mm-box--margin-top-2 mm-box--color-text-default"
>
Open your MetaMask Desktop and type this code
</p>
Expand All @@ -119,7 +119,7 @@ exports[`Desktop Pairing page should render otp component 1`] = `
>
<h1
align="center"
class="box mm-text desktop-pairing__otp mm-text--display-md box--flex-direction-row box--color-text-default"
class="mm-box mm-text desktop-pairing__otp mm-text--display-md mm-box--color-text-default"
>
123456
</h1>
Expand All @@ -130,7 +130,7 @@ exports[`Desktop Pairing page should render otp component 1`] = `
>
<p
align="center"
class="box mm-text desktop-pairing__countdown-timer mm-text--body-md box--padding-2 box--flex-direction-row box--color-text-default box--background-color-background-default box--rounded-xl"
class="mm-box mm-text desktop-pairing__countdown-timer mm-text--body-md mm-box--padding-2 mm-box--color-text-default mm-box--background-color-background-default mm-box--rounded-xl"
>
<span>

Expand All @@ -147,7 +147,7 @@ exports[`Desktop Pairing page should render otp component 1`] = `
</div>
<p
align="center"
class="box mm-text mm-text--body-sm box--flex-direction-row box--color-text-default"
class="mm-box mm-text mm-text--body-sm mm-box--color-text-default"
>
If the pairing is successful, extension will restart and you'll have to re-enter your password.
</p>
Expand Down
3 changes: 1 addition & 2 deletions ui/pages/desktop-pairing/desktop-pairing.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ import {
import Box from '../../components/ui/box/box';
import { useCopyToClipboard } from '../../hooks/useCopyToClipboard';
import Tooltip from '../../components/ui/tooltip';
import { Button } from '../../components/component-library';
import { Text } from '../../components/component-library/text/deprecated';
import { Button, Text } from '../../components/component-library';

export default function DesktopPairingPage({
generateDesktopOtp,
Expand Down
2 changes: 1 addition & 1 deletion ui/pages/home/home.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ import {
///: BEGIN:ONLY_INCLUDE_IN(build-main,build-mmi)
ButtonLink,
///: END:ONLY_INCLUDE_IN
Text,
} from '../../components/component-library';
import { Text } from '../../components/component-library/text/deprecated';

import {
ASSET_ROUTE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import {
BUTTON_SIZES,
BUTTON_VARIANT,
Box,
Text,
} from '../../../components/component-library';
import { Text } from '../../../components/component-library/text/deprecated';
import {
MetaMetricsEventCategory,
MetaMetricsEventName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ exports[`CustodyAccountList renders accounts 1`] = `
for="address-0"
>
<span
class="box mm-text custody-account-list__item__name mm-text--inherit box--padding-right-1 box--flex-direction-row box--color-text-default"
class="mm-box mm-text custody-account-list__item__name mm-text--inherit mm-box--padding-right-1 mm-box--color-text-default"
>
Test Account 1
</span>
Expand All @@ -43,7 +43,7 @@ exports[`CustodyAccountList renders accounts 1`] = `
for="address-0"
>
<span
class="box mm-text custody-account-list__item mm-text--body-md box--display-flex box--flex-direction-row box--color-text-default"
class="mm-box mm-text custody-account-list__item mm-text--body-md mm-box--display-flex mm-box--color-text-default"
>
<a
class="mm-box mm-text mm-button-base mm-button-link mm-button-link--size-auto mm-text--body-md-medium mm-box--padding-right-0 mm-box--padding-left-0 mm-box--display-inline-flex mm-box--justify-content-center mm-box--align-items-center mm-box--color-primary-default mm-box--background-color-transparent"
Expand Down Expand Up @@ -108,7 +108,7 @@ exports[`CustodyAccountList renders accounts 1`] = `
for="address-1"
>
<span
class="box mm-text custody-account-list__item__name mm-text--inherit box--padding-right-1 box--flex-direction-row box--color-text-default"
class="mm-box mm-text custody-account-list__item__name mm-text--inherit mm-box--padding-right-1 mm-box--color-text-default"
>
Test Account 2
</span>
Expand All @@ -118,7 +118,7 @@ exports[`CustodyAccountList renders accounts 1`] = `
for="address-1"
>
<span
class="box mm-text custody-account-list__item mm-text--body-md box--display-flex box--flex-direction-row box--color-text-default"
class="mm-box mm-text custody-account-list__item mm-text--body-md mm-box--display-flex mm-box--color-text-default"
>
<a
class="mm-box mm-text mm-button-base mm-button-link mm-button-link--size-auto mm-text--body-md-medium mm-box--padding-right-0 mm-box--padding-left-0 mm-box--display-inline-flex mm-box--justify-content-center mm-box--align-items-center mm-box--color-primary-default mm-box--background-color-transparent"
Expand Down
2 changes: 1 addition & 1 deletion ui/pages/institutional/connect-custody/account-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import {
ButtonLink,
BUTTON_VARIANT,
BUTTON_SIZES,
Text,
} from '../../../components/component-library';
import { Text } from '../../../components/component-library/text/deprecated';
import { useCopyToClipboard } from '../../../hooks/useCopyToClipboard';

const getButtonLinkHref = (account) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ exports[`CustodyPage renders CustodyPage 2`] = `
/>
</button>
<p
class="box mm-text mm-text--body-md box--flex-direction-row box--color-text-default"
class="mm-box mm-text mm-text--body-md mm-box--color-text-default"
>
Back
</p>
</div>
<h4
class="box mm-text mm-text--body-lg-medium box--margin-top-4 box--flex-direction-row box--color-text-default"
class="mm-box mm-text mm-text--body-lg-medium mm-box--margin-top-4 mm-box--color-text-default"
>
Custodial Accounts
</h4>
<h6
class="box mm-text mm-text--body-md box--margin-top-2 box--margin-bottom-5 box--flex-direction-row box--color-text-default"
class="mm-box mm-text mm-text--body-md mm-box--margin-top-2 mm-box--margin-bottom-5 mm-box--color-text-default"
>
Please choose the custodian you want to connect in order to add or refresh a token.
</h6>
Expand All @@ -75,7 +75,7 @@ exports[`CustodyPage renders CustodyPage 2`] = `
width="32"
/>
<p
class="box mm-text mm-text--body-md box--margin-left-2 box--flex-direction-row box--color-text-default"
class="mm-box mm-text mm-text--body-md mm-box--margin-left-2 mm-box--color-text-default"
>
Saturn Custody
</p>
Expand Down
2 changes: 1 addition & 1 deletion ui/pages/institutional/custody/custody.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import {
BUTTON_SIZES,
BUTTON_VARIANT,
Box,
Text,
} from '../../../components/component-library';
import { Text } from '../../../components/component-library/text/deprecated';
import {
AlignItems,
Display,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
Box,
Button,
BUTTON_VARIANT,
Text,
} from '../../../components/component-library';
import { Text } from '../../../components/component-library/text/deprecated';
import {
TextColor,
TypographyVariant,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ exports[`Interactive Replacement Token Page should reject if there are errors 2`
overflowwrap="break-word"
>
<p
class="box mm-text mm-text--body-md box--flex-direction-row box--color-text-default"
class="mm-box mm-text mm-text--body-md mm-box--color-text-default"
data-testid="connect-error-message"
>
Please go to displayName and click the 'Connect to MMI' button within their user interface to connect your accounts to MMI again.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import {
Button,
BUTTON_VARIANT,
BUTTON_SIZES,
Text,
} from '../../../components/component-library';
import { Text } from '../../../components/component-library/text/deprecated';
import {
OverflowWrap,
TextColor,
Expand Down
12 changes: 6 additions & 6 deletions ui/pages/keychains/__snapshots__/reveal-seed.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ exports[`Reveal Seed Page should match snapshot 1`] = `
class="box page-container box--padding-top-8 box--padding-right-4 box--padding-bottom-8 box--padding-left-4 box--gap-4 box--flex-direction-row"
>
<h2
class="box mm-text mm-text--heading-lg box--flex-direction-row box--color-text-default"
class="mm-box mm-text mm-text--heading-lg mm-box--color-text-default"
>
Secret Recovery Phrase
</h2>
<p
class="box mm-text mm-text--body-md box--flex-direction-row box--color-text-default"
class="mm-box mm-text mm-text--body-md mm-box--color-text-default"
>
<span>

Expand All @@ -26,7 +26,7 @@ exports[`Reveal Seed Page should match snapshot 1`] = `
</a>
provides
<strong
class="box mm-text mm-text--body-md-bold mm-text--font-weight-bold box--flex-direction-row box--color-text-default"
class="mm-box mm-text mm-text--body-md-bold mm-box--color-text-default"
>
full access to your wallet and funds.

Expand All @@ -36,7 +36,7 @@ exports[`Reveal Seed Page should match snapshot 1`] = `
</span>
</p>
<p
class="box mm-text mm-text--body-md box--flex-direction-row box--color-text-default"
class="mm-box mm-text mm-text--body-md mm-box--color-text-default"
>
<span>

Expand All @@ -62,13 +62,13 @@ exports[`Reveal Seed Page should match snapshot 1`] = `
/>
<div>
<p
class="box mm-text mm-text--body-md box--flex-direction-row box--color-text-default"
class="mm-box mm-text mm-text--body-md mm-box--color-text-default"
>
<span>

Make sure no one is looking at your screen.
<strong
class="box mm-text mm-text--body-md-bold mm-text--font-weight-bold box--flex-direction-row box--color-text-default"
class="mm-box mm-text mm-text--body-md-bold mm-box--color-text-default"
>
MetaMask Support will never request this.
</strong>
Expand Down
2 changes: 1 addition & 1 deletion ui/pages/keychains/reveal-seed.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import {
TEXT_FIELD_SIZES,
TEXT_FIELD_TYPES,
BUTTON_SIZES,
Text,
} from '../../components/component-library';
import { Text } from '../../components/component-library/text/deprecated';
import { useI18nContext } from '../../hooks/useI18nContext';
import { MetaMetricsContext } from '../../contexts/metametrics';
import ZENDESK_URLS from '../../helpers/constants/zendesk-url';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
ModalContent,
ModalHeader,
ModalOverlay,
Text,
} from '../../../components/component-library';
import { Text } from '../../../components/component-library/text/deprecated';
import {
AlignItems,
Display,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { Snap } from '@metamask/snaps-utils';
import React, { useState, useEffect } from 'react';
import { shallowEqual, useSelector } from 'react-redux';
import { useHistory } from 'react-router-dom';
import { Box } from '../../../components/component-library';
import { Text } from '../../../components/component-library/text/deprecated';
import { Box, Text } from '../../../components/component-library';
import {
AlignItems,
Display,
Expand Down
Loading