-
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
refactor: replace Typography with Text component in gas-timing.component.js #27053
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. |
f928a35
to
1b1e99e
Compare
.typography.gas-timing { | ||
color: var(--color-text-alternative); | ||
|
||
.info-tooltip { | ||
display: inline-block; | ||
margin-inline-start: 4px; | ||
|
||
path { | ||
fill: var(--color-error-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.
export const GasTooLowStory: Story = { | ||
args: { | ||
maxFeePerGas: '1', // Simulate low gas fee | ||
maxPriorityFeePerGas: '1', // Simulate low priority fee | ||
gasWarnings: { | ||
maxPriorityFee: GAS_FORM_ERRORS.MAX_PRIORITY_FEE_TOO_LOW, | ||
maxFee: GAS_FORM_ERRORS.MAX_FEE_TOO_LOW, | ||
}, | ||
}, | ||
}; |
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.
@@ -26,7 +26,6 @@ | |||
@import 'edit-gas-fee-popover/edit-gas-tooltip/index'; | |||
@import 'edit-gas-popover/index'; | |||
@import 'gas-details-item/index'; | |||
@import 'gas-timing/index'; |
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.
Removing deleted stylesheet from confirmations style index
fontWeight={FontWeight.Bold} | ||
color={TextColor.textAlternative} |
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.
Instead of changing color via the CSS we are doing using the style utility props
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.
LGTM
maxFeePerGas: '0', | ||
maxPriorityFeePerGas: '0', |
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,6 +4,7 @@ import { Provider } from 'react-redux'; | |||
import configureStore from '../../../../store/store'; | |||
import GasTiming from './gas-timing.component'; | |||
import mockState from '../../../../../test/data/mock-state.json'; | |||
import { GAS_FORM_ERRORS } from '../../../../helpers/constants/gas'; |
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.
Used in new GasTooLowStory
Builds ready [8495d1e]
Page Load Metrics (1830 ± 76 ms)
Bundle size diffs
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #27053 +/- ##
===========================================
- Coverage 70.15% 70.11% -0.05%
===========================================
Files 1425 1426 +1
Lines 49653 49689 +36
Branches 13891 13902 +11
===========================================
+ Hits 34833 34835 +2
- Misses 14820 14854 +34 ☔ View full report in Codecov by Sentry. |
Quality Gate passedIssues Measures |
Builds ready [4aa198b]
Page Load Metrics (2045 ± 79 ms)
Bundle size diffs
|
Quality Gate failedFailed conditions |
Builds ready [6bc33be]
Page Load Metrics (1919 ± 132 ms)
Bundle size diffs
|
OK to merge without SonarCloud Code Analysis |
Description
This pull request replaces the
Typography
component with the newText
component in the fileui/pages/confirmations/components/gas-timing/gas-timing.component.js
. This change is part of the ongoing effort to migrate from the oldTypography
component to the newText
component across the MetaMask extension codebase.The main improvements in this change are:
Text
componentDevin Run Link: https://preview.devin.ai/devin/d0382f35dd004ffba790f08bbd5ffc9c
Related issues
Partially Fixes: #17670
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
If you have any feedback, you can leave comments in the PR and I'll address them in the app!