-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Replace deprecated Typography with Text component #17670
Comments
Please take note that the current |
Hi, can I work on this? |
Hi @itsAfnanAlam, you're welcome to submit a PR toward this issue please title it |
@georgewrmarshall, working on it. Thanks! |
hi @georgewrmarshall is it up for grabs? if yes can I? |
@Aathirajan I am working on it. |
Great! Glad you mentioned it. |
Hey @itsAfnanAlam and @Aathirajan, this issue is intended to be broken up in to multiple PRs for easy review. I'm listing files engineers would like to, or are working on in the description under "Files being currently converted". You could both comment on the files you would like to convert and I'll add them to the list. See example PR here #17753 |
@georgewrmarshall can you point out some files that need change first and we'll look into them?
We could work on these first. |
Hey @samyabrata-maji, some of those are being worked on see "Files currently being converted" at the bottom section in this issue.
I'll add your name to the list for the available files in that list thanks! |
Hey @georgewrmarshall are all the files being worked by other contributors? Could I contribute in any way? |
@spiritanand Just make sure to let us know which ones you would be working on 👍 |
@samyabrata-maji I did not understand. Are the ones in the ss available for me to work on? |
@georgewrmarshall A quick update:
|
Some of them are available. There are other files too that are not in the ss. |
Hey @spiritanand, you can do a search for
|
Hey! @georgewrmarshall I worked on these files and made a pr #17766 can you check them please? |
Hey @georgewrmarshall , |
Missing release label release-12.2.0 on issue. Adding release label release-12.2.0 on issue, as issue is linked to PR #25176 which has this release label. |
Missing release label release-12.2.0 on issue. Adding release label release-12.2.0 on issue, as issue is linked to PR #25050 which has this release label. |
Missing release label release-12.2.0 on issue. Adding release label release-12.2.0 on issue, as issue is linked to PR #25019 which has this release label. |
Missing release label release-12.2.0 on issue. Adding release label release-12.2.0 on issue, as issue is linked to PR #25017 which has this release label. |
Missing release label release-12.2.0 on issue. Adding release label release-12.2.0 on issue, as issue is linked to PR #25149 which has this release label. |
…ent.js (#27053) ## **Description** This pull request replaces the `Typography` component with the new `Text` component in the file `ui/pages/confirmations/components/gas-timing/gas-timing.component.js`. This change is part of the ongoing effort to migrate from the old `Typography` component to the new `Text` component across the MetaMask extension codebase. The main improvements in this change are: 1. Consistency with the new design system 2. Better maintainability by using the latest component library 3. Improved performance due to the optimized `Text` component Devin Run Link: https://preview.devin.ai/devin/d0382f35dd004ffba790f08bbd5ffc9c [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27053?quickstart=1) ## **Related issues** Partially Fixes: #17670 ## **Manual testing steps** 1. Go to the latest build of storybook in this PR 2. Navigate to the GasTiming component 3. Verify that the component renders correctly with the new Text component 4. Check that all text styles and layouts are preserved ## **Screenshots/Recordings** ### **Before** <img width="757" alt="Screenshot 2024-09-11 at 8 40 05 AM" src="https://github.com/user-attachments/assets/ad1277fd-1e54-4a0d-a5d0-cc2ccb314c9a"> ### **After** <img width="1512" alt="Screenshot 2024-09-11 at 8 43 58 AM" src="https://github.com/user-attachments/assets/e7d94fa3-caea-4af9-b525-ee5914dd9089"> <img width="1510" alt="Screenshot 2024-09-11 at 8 44 35 AM" src="https://github.com/user-attachments/assets/84759078-fe2b-4cc1-be7e-29ef43eda8c5"> ## **Pre-merge author checklist** - [X] I've followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [X] I've completed the PR template to the best of my ability - [X] I've included tests if applicable - [X] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [X] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. If you have any feedback, you can leave comments in the PR and I'll address them in the app! --------- Co-authored-by: georgewrmarshall <[email protected]>
Description
In an effort to reduce duplication and replace our old design system components with new components it would be great to replace all
<Typography />
with<Text />
components. This is a massive undertaking by itself and creating a single PR would be too large. Instead this issue could be broken up into multiple PRs.Technical Details
Typography
components withText
equivalent(make sure to check the component apis as they are slightly different)boxProps
should be migrated appropriately e.g.boxProps={{marginTop: 1}}
=>marginTop={1}
TextVariant
have bold font weight options which can be used instead offontWeight={FONT_WEIGHT.BOLD}
=>variant={TextVariant.bodyMdBold}
Typography
=>Text
component map below for the correctvariant
prop valuesTypography
=>Text
component map<Typography variant={TypographyVariant.H1}>
=><Text variant={TextVariant.displayMd}>
<Typography variant={TypographyVariant.H2}>
=><Text variant={TextVariant.headingLg}>
<Typography variant={TypographyVariant.H3}>
=><Text variant={TextVariant.headingMd}>
<Typography variant={TypographyVariant.H4}>
=><Text variant={TextVariant.headingSm}>
<Typography variant={TypographyVariant.H5}>
=><Text variant={TextVariant.bodyMd}>
<Typography variant={TypographyVariant.H6}>
=><Text variant={TextVariant.bodySm}>
<Typography variant={TypographyVariant.Paragraph}>
=><Text variant={TextVariant.bodyMd
}<Typography variant={TypographyVariant.H7}>
=><Text variant={TextVariant.bodySm}>
<Typography variant={TypographyVariant.H8}>
=><Text variant={TextVariant.bodyXs}>
<Typography variant={TypographyVariant.H9}>
=><Text variant={TextVariant.bodyXs}>
Acceptance Criteria
Typography
components have been replaced with theirText
equivalentPRs that don't meet the acceptance criteria may be closed.
References
Text
component documentationThe text was updated successfully, but these errors were encountered: