-
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(28081): design tweak for network badge #29324
Changes from 4 commits
573e5a7
b6f2ae4
7d7970b
584d0b7
a2d9da4
c305a09
c27d151
b7f2147
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -172,7 +172,7 @@ exports[`SnapUIAddress renders Ethereum address 1`] = ` | |
<rect | ||
fill="#F29602" | ||
height="32" | ||
transform="translate(-2.81750896228304 4.951916544006229) rotate(230.4 16 16)" | ||
transform="translate(-2.8175089622830405 4.951916544006229) rotate(230.4 16 16)" | ||
width="32" | ||
x="0" | ||
y="0" | ||
|
@@ -476,7 +476,7 @@ exports[`SnapUIAddress renders legacy Ethereum address 1`] = ` | |
<rect | ||
fill="#F29602" | ||
height="32" | ||
transform="translate(-2.81750896228304 4.951916544006229) rotate(230.4 16 16)" | ||
transform="translate(-2.8175089622830405 4.951916544006229) rotate(230.4 16 16)" | ||
width="32" | ||
x="0" | ||
y="0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I found that these snapshots update regardless of changes not sure if we want to include them or not 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I found similar thing in weird svg snapshot failure, FAIL ui/components/multichain/connect-accounts-modal/connect-accounts-modal.test.tsx (5.461 s), and this one only failed in github actions There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trying to manually applying those snapshot changes locally and see how it goes 🙇🏻♀️ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed: c27d151 |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,7 @@ import { | |
getMultichainShouldShowFiat, | ||
} from '../../../selectors/multichain'; | ||
import { useMultichainAccountTotalFiatBalance } from '../../../hooks/useMultichainAccountTotalFiatBalance'; | ||
import { ConnectedStatus } from '../connected-status/connected-status'; | ||
import { ConnectedStatus } from '../connected-status'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Path simplification |
||
///: BEGIN:ONLY_INCLUDE_IF(build-mmi) | ||
import { getCustodianIconForAddress } from '../../../selectors/institutional/selectors'; | ||
import { useTheme } from '../../../hooks/useTheme'; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ export const DefaultStory = Template.bind({}); | |
|
||
export const NotConnectedStory = Template.bind({}); | ||
NotConnectedStory.args = { | ||
badgeBackgroundColor: Color.borderMuted, | ||
badgeBackgroundColor: BackgroundColor.iconAlternative, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
badgeBorderColor: BackgroundColor.backgroundDefault, | ||
}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,7 +74,7 @@ export const BadgeStatus: React.FC<BadgeStatusProps> = ({ | |
backgroundColor={badgeBackgroundColor} | ||
borderRadius={BorderRadius.full} | ||
borderColor={badgeBorderColor} | ||
borderWidth={isConnectedAndNotActive ? 2 : 4} | ||
borderWidth={2} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
/> | ||
} | ||
> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,9 +88,9 @@ export const ConnectedSiteMenu = ({ | |
borderColor={ | ||
isConnectedtoOtherAccountOrSnap | ||
? BorderColor.successDefault | ||
: BackgroundColor.backgroundDefault | ||
: BorderColor.backgroundDefault | ||
} | ||
borderWidth={isConnectedtoOtherAccountOrSnap ? 2 : 3} | ||
borderWidth={2} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
/> | ||
} | ||
> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,11 +43,11 @@ export const ConnectedStatus: React.FC<ConnectedStatusProps> = ({ | |
status = STATUS_CONNECTED_TO_ANOTHER_ACCOUNT; | ||
} | ||
|
||
let badgeBorderColor = BackgroundColor.backgroundDefault; // TODO: Replace it once border-color has this value. | ||
let badgeBackgroundColor = Color.borderMuted; // //TODO: Replace it once Background color has this value. | ||
let badgeBorderColor = BorderColor.backgroundDefault; // TODO: Replace it once border-color has this value. | ||
let badgeBackgroundColor = BackgroundColor.iconAlternative; | ||
Comment on lines
-47
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks George ! that makes sense ! |
||
let tooltipText = t('statusNotConnected'); | ||
if (status === STATUS_CONNECTED) { | ||
badgeBorderColor = BackgroundColor.backgroundDefault; | ||
badgeBorderColor = BorderColor.backgroundDefault; | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore: type 'string' can't be used to index type '{}' | ||
badgeBackgroundColor = BackgroundColor.successDefault; | ||
|
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.
Before
After