-
Notifications
You must be signed in to change notification settings - Fork 5k
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: change asset picker button to buttonbase to fix text theming #27127
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. |
@@ -3,12 +3,11 @@ | |||
exports[`AssetPicker matches snapshot 1`] = ` | |||
<DocumentFragment> | |||
<button | |||
class="mm-box mm-text mm-button-base mm-button-base--size-md asset-picker mm-button-primary mm-text--body-md-medium mm-box--padding-2 mm-box--padding-right-2 mm-box--padding-left-2 mm-box--display-flex mm-box--gap-2 mm-box--align-items-center mm-box--color-primary-inverse mm-box--background-color-transparent mm-box--rounded-pill" | |||
class="mm-box mm-text mm-button-base mm-button-base--size-md asset-picker mm-text--body-md-medium mm-box--padding-2 mm-box--padding-right-2 mm-box--padding-left-2 mm-box--display-flex mm-box--gap-2 mm-box--align-items-center mm-box--color-text-default mm-box--background-color-transparent mm-box--rounded-pill" |
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.
All changes in this file are from running yarn test:unit --updateSnapshot
Quality Gate passedIssues Measures |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #27127 +/- ##
========================================
Coverage 69.96% 69.96%
========================================
Files 1442 1442
Lines 50100 50100
Branches 14006 14006
========================================
Hits 35049 35049
Misses 15051 15051 ☔ View full report in Codecov by Sentry. |
Builds ready [bf7e8ab]
Page Load Metrics (1886 ± 131 ms)
Bundle size diffs
|
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 this @jclancy93 🙏
Description
The asset picker in dark mode previously showed the down icon and token symbol in their light mode variants, instead of dark mode. This is because
Button
defaults to the primary variant which hard codes the theme as light mode for all descendant elements. This PR changes the AssetPicker main component from Button to ButtonBase since it does not default to light modeRelated issues
Fixes: #27046
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist