-
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
Replaced ActionableMessage and Deprecated Button #20443
Replaced ActionableMessage and Deprecated Button #20443
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. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #20443 +/- ##
===========================================
- Coverage 68.82% 68.81% -0.00%
===========================================
Files 1034 1034
Lines 41166 41166
Branches 10994 10994
===========================================
- Hits 28329 28327 -2
- Misses 12837 12839 +2
☔ View full report in Codecov by Sentry. |
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.
Hey @pritam1813, great start I've left a couple suggestions.
<Button | ||
type="link" | ||
variant={BUTTON_VARIANT.LINK} | ||
key="confirm-add-suggested-token-duplicate-warning" | ||
className="confirm-add-suggested-token__link" |
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.
import ActionableMessage from '../../components/ui/actionable-message/actionable-message'; | ||
import Button from '../../components/ui/button'; | ||
import { | ||
BUTTON_VARIANT, |
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.
I believe BUTTON_VARIANT
has now been deprecated in favor of the ButtonVariant
enum. Could you please replace?
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.
Ok, replaced the enum.
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.
Currently, I am facing this bug #19818, as a result I couldn't update the screenshot. Any suggestion on how to avoid this bug ? I am on Ubuntu.
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.
Hey @kumavis, would it be possible to support @pritam1813 on his lavamoat issue?
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.
This is looking great @pritam1813! Made a small suggestion to add some margins so it adds some space between the text and banner alert
return ( | ||
hasDuplicateAddress(suggestedTokens, tokens) && ( | ||
<ActionableMessage | ||
message={t('knownTokenWarning', [ | ||
<BannerAlert severity={Severity.Warning}> |
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.
Let's add a margin top here
<BannerAlert severity={Severity.Warning}> | |
<BannerAlert severity={Severity.Warning} marginTop={4}> |
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! Thanks for your contribution @pritam1813
Explanation
ActionableMessage
withBannerAlert
inui/pages/confirm-add-suggested-token/confirm-add-suggested-token.js
<Button />
component (ui/components/component-library) with new<Button />
component (ui/components/component-library/button/button.js) inside theBannerAlert
component.Screenshots/Screencaps
Before
Token With Same Symbol But Different Address (Before)
Token With Duplicate Contract Address (Before)
After
Token With Same Symbol But Different Address (After)
Token With Duplicate Contract Address (After)
Manual Testing Steps
Pre-merge author checklist
Pre-merge reviewer checklist
If further QA is required (e.g. new feature, complex testing steps, large refactor), add the
Extension QA Board
label.In this case, a QA Engineer approval will be be required.