-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 mixins @include H1
- @include H9
in SCSS with Text component
#20496
Replace deprecated mixins @include H1
- @include H9
in SCSS with Text component
#20496
Comments
@include H1
- @include H9
in CSS and replace with Text component@include H1
- @include H9
in CSS with Text component
@include H1
- @include H9
in CSS with Text component@include H1
- @include H9
in SCSS with Text component
metamask-extension/ui/pages/unlock-page/index.scss Lines 37 to 38 in 982a1b2
@georgewrmarshall Do I have to put |
@include H1
- @include H9
in SCSS with Text component@include H1
- @include H9
in SCSS with Text component
Hey @subhajit20, this issue is to replace the jsx associated with the mixin with the
Would be replaced with
Then the scss can be removed here
This updates the deprecated styles and reduces the amount of CSS that is loaded improving the consistency and the performance of the extension. I would like to point out that this is a very important page so it will need a lot of scrutinizing and review. Which means adding before/after screenshots which will require the extension to be running on your local In fact I think any UI updates to the unlock screen page are so important that it would require some marketing mentions that we updated it. I would suggest leaving the styles for this one. |
@georgewrmarshall in every single page that has |
@georgewrmarshall hey this is being shown while running yarn start. |
@georgewrmarshall Hey can you help me out with this test issue? I have replaced the
|
Hey @georgewrmarshall , PR #20700 |
@georgewrmarshall Hey, made a pr. |
Description
Currently, the extension is using outdated mixins
@include H1
-@include H9
. This CSS should be removed and the JSX associated with these styles replaced with theText
component. This will reduce the amount of CSS in the extension and improve the cohesiveness of the UI.This is a massive undertaking by itself and creating a single PR would be too large. Smaller PRs can be submitted against this issue to ensure easier review and gradual improvements.
Technical Details
Text
component (ui/components/component-library/text/text.tsx
) or appropriate component from the component-library.Text
component. For example,display: flex
can be replaced withdisplay={Display.Flex}
prop on theText
component. Check out all the available style utility props in the Text docs in storybook.Text
component has avariant
prop that can be used to set the font size and weight. Use theTextVariant
enum (ui/helpers/constants/design-system.ts
) to set the appropriate variant.@include H1
=><Text variant={TextVariant.displayMd}>
@include H2
=><Text variant={TextVariant.displayLg}>
@include H3
=><Text variant={TextVariant.headingMd}>
@include H4
=><Text variant={TextVariant.headingSm}>
@include H5
=><Text variant={TextVariant.bodyMd}>
@include H6
=><Text variant={TextVariant.bodyMd}>
@include H7
=><Text variant={TextVariant.bodySm}>
@include H8
=><Text variant={TextVariant.bodyXs}>
@include H9
=><Text variant={TextVariant.bodyXs}>
Acceptance Criteria
@include H1
-@include H9
are completely replaced with theText
component or appropriate component from the component-libraryIf the acceptance criteria is not met, PRs may be closed.
Difficulty: Intermediate
Good first issue for: External contributors who are familiar with running the extension locally, have knowledge of React, component props, Jest tests, linting, and Storybook, and want to contribute to improving the cohesiveness of UI in the extension
The text was updated successfully, but these errors were encountered: