-
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
ErrorMessagecomponent from the codebase and replaces its usage with the modernBannerAlertcomponent from the component-library. This continues the effort to modernize MetaMask's UI components and remove deprecated code.Key Changes:
ErrorMessagecomponent and all related filesErrorMessageusage inEditGasFeePopoverwithBannerAlertEditGasFeePopoverComponent Migration:
ErrorMessage→BannerAlertwithseverity={BannerAlertSeverity.Danger}Changelog
CHANGELOG entry: null
Related issues
Fixes: #20394
Manual testing steps
yarn storybookyarn testScreenshots/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
ErrorMessageand replaces its usage inEditGasFeePopoverwithBannerAlert, deletes related files, updates styles, and adds a Storybook story.ErrorMessagewithBannerAlert(Danger) inui/pages/confirmations/components/edit-gas-fee-popover/edit-gas-fee-popover.js(usest(INSUFFICIENT_FUNDS_ERROR_KEY)for description).BannerAlertandText.ui/components/ui/error-message/*(component, tests, stories, styles, snapshots).@import 'error-message/index';fromui/components/ui/ui-components.scss..error-messagemargin overrides fromui/pages/confirmations/components/edit-gas-fee-popover/index.scss.EditGasFeePopoverstoryedit-gas-fee-popover.stories.tsxwith mocked providers and args.Written by Cursor Bugbot for commit c4da056. This will update automatically on new commits. Configure here.