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

Fix Text inherit variant #21664

Merged
merged 2 commits into from
Nov 2, 2023
Merged

Fix Text inherit variant #21664

merged 2 commits into from
Nov 2, 2023

Conversation

GuillaumeRx
Copy link
Contributor

Description

This moves the Text component &--inherit class higher in the CSS hierarchi to avoid it overwriting any passed props.

Related issues

Fixes: #21626

Manual testing steps

  1. Create a Text component with a bodyMd variant and add a fontWeight prop (like bold)
  2. Observe in the console the font-weight attribute you just set not being overwrited by inherit

Screenshots/Recordings

N/A

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@GuillaumeRx GuillaumeRx requested a review from a team as a code owner November 2, 2023 15:31
Copy link
Contributor

github-actions bot commented Nov 2, 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.

@GuillaumeRx GuillaumeRx added the team-design-system All issues relating to design system in Extension label Nov 2, 2023
Copy link

codecov bot commented Nov 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (81d2c4c) 68.84% compared to head (02d8528) 68.85%.
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #21664   +/-   ##
========================================
  Coverage    68.84%   68.85%           
========================================
  Files         1040     1040           
  Lines        41443    41443           
  Branches     11068    11068           
========================================
+ Hits         28531    28532    +1     
+ Misses       12912    12911    -1     

see 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@metamaskbot
Copy link
Collaborator

Builds ready [02d8528]
Page Load Metrics (1553 ± 304 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint79133102147
domContentLoaded6113097178
load8421491553633304
domInteractive6113097178
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

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.

LGTM! Thanks @GuillaumeRx 🙏

@GuillaumeRx GuillaumeRx merged commit d849353 into develop Nov 2, 2023
9 of 10 checks passed
@GuillaumeRx GuillaumeRx deleted the gr/fix-text-inherit branch November 2, 2023 17:14
@github-actions github-actions bot locked and limited conversation to collaborators Nov 2, 2023
@metamaskbot metamaskbot added the release-11.6.0 Issue or pull request that will be included in release 11.6.0 label Nov 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-11.6.0 Issue or pull request that will be included in release 11.6.0 team-design-system All issues relating to design system in Extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text.inherit overides fontWeight in Text component
4 participants