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

Part of #17670: Replace Typography with Text component #17766

Closed
wants to merge 7 commits into from
Closed

Part of #17670: Replace Typography with Text component #17766

wants to merge 7 commits into from

Conversation

SawanKumarBhagat
Copy link

@SawanKumarBhagat SawanKumarBhagat commented Feb 15, 2023

…ient

Explanation

replace with and TypographyVarient with TextVarient

Updating Typography to Text
metamask-extension\ui\components\app\asset-list\asset-list.js
metamask-extension\ui\components\app\beta-header\index.js
metamask-extension\ui\components\app\cancel-speedup-popover\cancel-speedup-popover.js
metamask-extension\ui\components\app\confirm-page-container\confirm-page-container.component.js
metamask-extension\ui\components\app\confirm-page-container\confirm-page-container-content\confirm-page-container-content.component.js

Part of: #17670

Screenshots/Screencaps

Before

After

Manual Testing Steps

Pre-merge author checklist

  • I've clearly explained:
    • What problem this PR is solving
    • How this problem was solved
    • How reviewers can test my changes
  • Sufficient automated test coverage has been added

Pre-merge reviewer checklist

  • Manual testing (e.g. pull and build branch, run in browser, test code being changed)
  • PR is linked to the appropriate GitHub issue
  • IF this PR fixes a bug in the release milestone, add this PR to the release milestone

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.

@SawanKumarBhagat SawanKumarBhagat requested a review from a team as a code owner February 15, 2023 12:17
@github-actions
Copy link
Contributor

github-actions bot commented Feb 15, 2023

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.

@SawanKumarBhagat
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

Copy link
Contributor

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution. Could you please add Before/After screenshots as per the acceptance criteria. It's not screenshots of the code it's screenshots of the instances of the Text in the local build or in storybook. Thanks!

color={Color.textAlternative}
variant={TypographyVariant.H6}
fontWeight={FONT_WEIGHT.NORMAL}
variant={TextVariant.bodySm}
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah oversight on my part we need to add html tags here so that some e2e tests pass. I've updated the description of the issue if you'd like to look.

Suggested change
variant={TextVariant.bodySm}
variant={TextVariant.bodySm}
as="h6"

Copy link
Contributor

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

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

Would it be possible to remove the screenshots of the code and add some before and after screenshots of the visual changes? I've also left some more suggestions. You also have some linting issues that you can debug by running yarn lint

<Typography
variant={TypographyVariant.H7}
<Text
variant={TextVariant.bodySm}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
variant={TextVariant.bodySm}
variant={TextVariant.bodySm}
as="h6"

@@ -230,7 +230,7 @@ const ConfirmPageContainer = (props) => {
<ActionableMessage
message={
isBuyableChain ? (
<Typography variant={TypographyVariant.H7} align="left">
<Text variant={TextVariant.bodySm} textAlign="left">
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<Text variant={TextVariant.bodySm} textAlign="left">
<Text variant={TextVariant.bodySm} textAlign="left" as="h6">

) : (
<Typography variant={TypographyVariant.H7} align="left">
<Text variant={TextVariant.bodySm} textAlign="left">
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<Text variant={TextVariant.bodySm} textAlign="left">
<Text variant={TextVariant.bodySm} textAlign="left" as="h6">

boxProps={{ alignItems: AlignItems.center, display: DISPLAY.FLEX }}
variant={TypographyVariant.H6}
variant={TextVariant.bodySm}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
variant={TextVariant.bodySm}
variant={TextVariant.bodySm}
as="h6"

@@ -217,7 +217,7 @@ export default class ConfirmPageContainerContent extends Component {
className="actionable-message--warning"
message={
isBuyableChain ? (
<Typography variant={TypographyVariant.H7} align="left">
<Text variant={TextVariant.bodySm} align="left">
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<Text variant={TextVariant.bodySm} align="left">
<Text variant={TextVariant.bodySm} textAlign="left" as="h6">

) : (
<Typography variant={TypographyVariant.H7} align="left">
<Text variant={TextVariant.bodySm} align="left">
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<Text variant={TextVariant.bodySm} align="left">
<Text variant={TextVariant.bodySm} textAlign="left" as="h6">

@georgewrmarshall
Copy link
Contributor

Hey @SawanKumarBhagat any chance you could do a rebase and make the suggested updates to this PR in the next 2 weeks? Otherwise I will close. Thanks

@github-actions github-actions bot locked and limited conversation to collaborators Apr 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants