-
Notifications
You must be signed in to change notification settings - Fork 5k
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: /ui #20076
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
b704a97
to
ccafb3a
Compare
Codecov Report
@@ Coverage Diff @@
## develop #20076 +/- ##
===========================================
- Coverage 69.46% 69.46% -0.01%
===========================================
Files 992 992
Lines 37452 37452
Branches 10042 10042
===========================================
- Hits 26015 26013 -2
- Misses 11437 11439 +2
|
Builds ready [ccafb3a]
Page Load Metrics (1403 ± 27 ms)
Bundle size diffs
|
ui/components/app/custom-spending-cap/__snapshots__/custom-spending-cap.test.js.snap
Show resolved
Hide resolved
@@ -24,7 +24,7 @@ exports[`CustomSpendingCap should match snapshot 1`] = ` | |||
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline" | |||
> | |||
<h6 | |||
class="box mm-text mm-text--body-sm-bold box--display-inline-block box--flex-direction-row box--color-text-default" | |||
class="mm-box mm-text mm-text--body-sm-bold mm-box--display-inline-block mm-box--color-text-default" | |||
for="custom-spending-cap" | |||
tag="label" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shouldn't be passed to the html element
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types'; | |||
import React from 'react'; | |||
|
|||
import { BackgroundColor } from '../../../helpers/constants/design-system'; | |||
import { Text } from '../../component-library/text/deprecated'; | |||
import { Text } from '../../component-library'; | |||
|
|||
import Card from '../card'; | |||
import Box from '../box'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Box from component-library
@@ -3,8 +3,14 @@ import PropTypes from 'prop-types'; | |||
import { I18nContext } from '../../../contexts/i18n'; | |||
import Box from '../box'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Box from component-library
cd83d39
to
661641f
Compare
import { ButtonLink, Icon, IconName } from '../../component-library'; | ||
import { Text } from '../../component-library/text/deprecated'; | ||
import { ButtonLink, Icon, IconName, Text } from '../../component-library'; | ||
|
||
import { | ||
AlignItems, | ||
TextAlign, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -4,8 +4,7 @@ import classnames from 'classnames'; | |||
import InfoIconInverted from '../icon/info-icon-inverted.component'; | |||
import { Severity, TextColor } from '../../../helpers/constants/design-system'; | |||
import { MILLISECOND } from '../../../../shared/constants/time'; | |||
import { ButtonIcon, IconName, IconSize } from '../../component-library'; | |||
import { Text } from '../../component-library/text/deprecated'; | |||
import { ButtonIcon, IconName, IconSize, Text } from '../../component-library'; | |||
|
|||
/** | |||
* @deprecated `<Callout />` has been deprecated in favor of the `<BannerAlert />` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IconName, | ||
Text, | ||
Box, | ||
} from '../../component-library'; | ||
|
||
export default class EditableLabel extends Component { | ||
static propTypes = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
display={DISPLAY.FLEX} | ||
justifyContent={JustifyContent.CENTER} | ||
display={Display.Flex} | ||
justifyContent={JustifyContent.center} | ||
className="notranslate" | ||
variant={TextVariant.bodyLgMedium} | ||
data-testid="srp_text" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as="h6" | ||
variant={TextVariant.bodySm} | ||
color={TextColor.textAlternative} | ||
display={Display.InlineBlock} | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1,7 +1,7 @@ | |||
import React from 'react'; | |||
import PropTypes from 'prop-types'; | |||
import classNames from 'classnames'; | |||
import { Text } from '../../component-library/text/deprecated'; | |||
import { Text } from '../../component-library'; | |||
import { TextVariant } from '../../../helpers/constants/design-system'; | |||
import Tooltip from '../tooltip/tooltip'; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{t('view')} | ||
</Text> | ||
<Button className="nft-info__button" variant={BUTTON_VARIANT.LINK}> | ||
{t('view')} | ||
</Button> | ||
</Box> | ||
</Box> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -6,7 +6,7 @@ import { | |||
TextVariant, | |||
} from '../../../helpers/constants/design-system'; | |||
import { DECIMAL_REGEX } from '../../../../shared/constants/tokens'; | |||
import { Text } from '../../component-library/text/deprecated'; | |||
import { Text } from '../../component-library'; | |||
|
|||
export default function NumericInput({ | |||
detailText = '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IconName, | ||
IconSize, | ||
Text, | ||
} from '../../component-library'; | ||
|
||
const defaultHeaderProps = { | ||
padding: [6, 4, 4], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; | |||
import classNames from 'classnames'; | |||
import { I18nContext } from '../../../contexts/i18n'; | |||
import { Color, TextVariant } from '../../../helpers/constants/design-system'; | |||
import { Text } from '../../component-library/text/deprecated'; | |||
import { Text } from '../../component-library'; | |||
|
|||
function Connector({ isFirst, isLast }) { | |||
if (isFirst) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -9,7 +9,7 @@ import { | |||
} from '../../../helpers/constants/design-system'; | |||
|
|||
import InfoTooltip from '../info-tooltip/info-tooltip'; | |||
import { Text } from '../../component-library/text/deprecated'; | |||
import { Text } from '../../component-library'; | |||
|
|||
const styles = { | |||
root: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
40c6f62
to
23696d1
Compare
@@ -49,8 +49,7 @@ exports[`Add Network Modal should render 1`] = ` | |||
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline" | |||
> | |||
<h6 | |||
class="box mm-text mm-text--body-sm-bold box--display-inline-block box--flex-direction-row box--color-text-default" | |||
tag="label" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removes prop being passed down to html attribute
@@ -58,8 +58,7 @@ exports[`Onboarding Create Password Render should match snapshot 1`] = ` | |||
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline" | |||
> | |||
<h6 | |||
class="box mm-text mm-text--body-sm-bold box--display-inline-block box--flex-direction-row box--color-text-default" | |||
tag="label" | |||
class="mm-box mm-text mm-text--body-sm-bold mm-box--display-inline-block mm-box--color-text-default" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removes prop being passed down to html attribute
173a3e6
to
05f6764
Compare
Builds ready [875ae63]
Page Load Metrics (1563 ± 103 ms)
Bundle size diffs
|
Explanation
Currently, there are deprecated instances of the
Text
component that use the JavaScript version of theBox
component. This PR updates those deprecated import paths to the new component in theui/components/ui
folder as well as snapshots. There should be no visual or component API difference between the two. Just className changes which will touch many snapshotsScreenshots/Screencaps
I have added Before/After screencasts to ensure no visual regressions have occurred to components with some significant updates other than snapshot updates in the code comments
Manual Testing Steps
Pre-merge author checklist
Pre-merge reviewer checklist
If further QA is required (e.g. new feature, complex testing steps, large refactor), add the
Extension QA Board
label.In this case, a QA Engineer approval will be be required.