-
Notifications
You must be signed in to change notification settings - Fork 5.4k
chore: remove deprecated ErrorMessage component #36872
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
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. |
✨ Files requiring CODEOWNER review ✨✅ @MetaMask/confirmations (3 files, +104 -8)
|
42cd6d2
to
14ffb4b
Compare
14ffb4b
to
ddfbe83
Compare
editGasMode: EditGasModes.modifyInPlace, | ||
balanceError: false, | ||
}, | ||
}; |
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.
& .error-message { | ||
margin-top: 0; | ||
margin-bottom: 12px; | ||
} |
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.
no longer using this component. this is why we shouldn't use direct CSS classnames from other components in our styles. Very easy to miss
@@ -0,0 +1,84 @@ | |||
import React from 'react'; |
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.
Adding story
<ErrorMessage errorKey={INSUFFICIENT_FUNDS_ERROR_KEY} /> | ||
<BannerAlert | ||
severity={BannerAlertSeverity.Danger} | ||
description={t(INSUFFICIENT_FUNDS_ERROR_KEY)} | ||
marginBottom={1} | ||
/> |
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.
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [d01f9bc]
UI Startup Metrics (1251 ± 74 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [c4da056]
UI Startup Metrics (1225 ± 59 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
This PR removes the deprecated
ErrorMessage
component from the codebase and replaces its usage with the modernBannerAlert
component from the component-library. This continues the effort to modernize MetaMask's UI components and remove deprecated code.Key Changes:
ErrorMessage
component and all related filesErrorMessage
usage inEditGasFeePopover
withBannerAlert
EditGasFeePopover
Component Migration:
ErrorMessage
→BannerAlert
withseverity={BannerAlertSeverity.Danger}
Changelog
CHANGELOG entry: null
Related issues
Fixes: #20394
Manual testing steps
yarn storybook
yarn test
Screenshots/Recordings
N/A - This is a component refactor with no visual changes to end users
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Removes
ErrorMessage
and replaces its usage inEditGasFeePopover
withBannerAlert
, deletes related files, updates styles, and adds a Storybook story.ErrorMessage
withBannerAlert
(Danger
) inui/pages/confirmations/components/edit-gas-fee-popover/edit-gas-fee-popover.js
(usest(INSUFFICIENT_FUNDS_ERROR_KEY)
for description).BannerAlert
andText
.ui/components/ui/error-message/*
(component, tests, stories, styles, snapshots).@import 'error-message/index';
fromui/components/ui/ui-components.scss
..error-message
margin overrides fromui/pages/confirmations/components/edit-gas-fee-popover/index.scss
.EditGasFeePopover
storyedit-gas-fee-popover.stories.tsx
with mocked providers and args.Written by Cursor Bugbot for commit c4da056. This will update automatically on new commits. Configure here.