Skip to content
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

Merged
merged 8 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exports[`Token Cell should match snapshot 1`] = `
class="mm-box mm-badge-wrapper__badge-container mm-badge-wrapper__badge-container--rectangular-bottom-right"
>
<div
class="mm-box mm-text mm-avatar-base mm-avatar-base--size-xs mm-avatar-network multichain-token-list-item__badge__avatar-network mm-text--body-xs mm-text--text-transform-uppercase mm-box--display-flex mm-box--justify-content-center mm-box--align-items-center mm-box--color-text-default mm-box--background-color-background-alternative mm-box--rounded-md mm-box--border-color-background-default mm-box--border-width-1 box--border-style-solid"
class="mm-box mm-text mm-avatar-base mm-avatar-base--size-xs mm-avatar-network multichain-token-list-item__badge__avatar-network mm-text--body-xs mm-text--text-transform-uppercase mm-box--display-flex mm-box--justify-content-center mm-box--align-items-center mm-box--color-text-default mm-box--background-color-background-default mm-box--rounded-md mm-box--border-color-background-default mm-box--border-width-2 box--border-style-solid"
>
<img
alt="network logo"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The 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 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 🙇🏻‍♀️

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed: c27d151

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ exports[`AccountListItem renders AccountListItem component and shows account nam
style="bottom: -1px; right: 2px;"
>
<div
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-4 box--border-style-solid"
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-2 box--border-style-solid"
/>
</div>
</div>
Expand Down Expand Up @@ -424,7 +424,7 @@ exports[`AccountListItem renders AccountListItem component and shows account nam
style="bottom: -1px; right: 2px;"
>
<div
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-4 box--border-style-solid"
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-2 box--border-style-solid"
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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';
Expand Down
2 changes: 1 addition & 1 deletion ui/components/multichain/badge-status/badge-status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const BadgeStatus: React.FC<BadgeStatusProps> = ({
backgroundColor={badgeBackgroundColor}
borderRadius={BorderRadius.full}
borderColor={badgeBorderColor}
borderWidth={isConnectedAndNotActive ? 2 : 4}
borderWidth={2}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before:
Screenshot 2024-12-18 at 15 29 05

After:
Screenshot 2024-12-18 at 15 08 14

Copy link
Contributor

@georgewrmarshall georgewrmarshall Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated so now the background color of the badge matches the header icon

Before

Screenshot 2024-12-19 at 7 54 10 AMScreenshot 2024-12-19 at 7 54 25 AM

After

Screenshot 2024-12-19 at 7 41 54 AMScreenshot 2024-12-19 at 7 42 08 AM

/>
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ exports[`Connect More Accounts Modal should render correctly 1`] = `
<rect
fill="#FA4300"
height="32"
transform="translate(-1.712066926084717 -0.6920409130150889) rotate(264.3 16 16)"
transform="translate(-1.712066926084717 -0.6920409130150887) rotate(264.3 16 16)"
width="32"
x="0"
y="0"
Expand Down Expand Up @@ -202,7 +202,7 @@ exports[`Connect More Accounts Modal should render correctly 1`] = `
<rect
fill="#FA4300"
height="32"
transform="translate(-1.712066926084717 -0.6920409130150889) rotate(264.3 16 16)"
transform="translate(-1.712066926084717 -0.6920409130150887) rotate(264.3 16 16)"
width="32"
x="0"
y="0"
Expand Down Expand Up @@ -232,7 +232,7 @@ exports[`Connect More Accounts Modal should render correctly 1`] = `
style="bottom: -1px; right: 2px;"
>
<div
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-4 box--border-style-solid"
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-2 box--border-style-solid"
/>
</div>
</div>
Expand Down Expand Up @@ -261,7 +261,7 @@ exports[`Connect More Accounts Modal should render correctly 1`] = `
<rect
fill="#FA4300"
height="32"
transform="translate(-1.712066926084717 -0.6920409130150889) rotate(264.3 16 16)"
transform="translate(-1.712066926084717 -0.6920409130150887) rotate(264.3 16 16)"
width="32"
x="0"
y="0"
Expand Down Expand Up @@ -304,7 +304,7 @@ exports[`Connect More Accounts Modal should render correctly 1`] = `
<rect
fill="#FA4300"
height="32"
transform="translate(-1.712066926084717 -0.6920409130150889) rotate(264.3 16 16)"
transform="translate(-1.712066926084717 -0.6920409130150887) rotate(264.3 16 16)"
width="32"
x="0"
y="0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ exports[`Connected Site Menu should render the site menu in connected state 1`]
style="bottom: -1px; right: -4px; z-index: 1;"
>
<div
class="mm-box multichain-connected-site-menu__badge mm-box--background-color-success-default mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-3 box--border-style-solid"
class="mm-box multichain-connected-site-menu__badge mm-box--background-color-success-default mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-2 box--border-style-solid"
/>
</div>
</div>
Expand Down Expand Up @@ -74,7 +74,7 @@ exports[`Connected Site Menu should render the site menu in not connected state
style="bottom: -1px; right: -4px; z-index: 1;"
>
<div
class="mm-box multichain-connected-site-menu__badge mm-box--background-color-icon-alternative mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-3 box--border-style-solid"
class="mm-box multichain-connected-site-menu__badge mm-box--background-color-icon-alternative mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-2 box--border-style-solid"
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const ConnectedSiteMenu = ({
? BorderColor.successDefault
: BackgroundColor.backgroundDefault
}
borderWidth={isConnectedtoOtherAccountOrSnap ? 2 : 3}
borderWidth={2}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before (not connected):
Screenshot 2024-12-18 at 15 41 03

After (not connected):
Screenshot 2024-12-18 at 15 39 32

Before (connected):
Screenshot 2024-12-18 at 15 41 21

After (connected)
Screenshot 2024-12-18 at 15 39 17
:

/>
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ exports[`Connections Content should render correctly 1`] = `
style="bottom: -1px; right: 2px;"
>
<div
class="mm-box multichain-badge-status__badge mm-box--background-color-success-default mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-4 box--border-style-solid"
class="mm-box multichain-badge-status__badge mm-box--background-color-success-default mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-2 box--border-style-solid"
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ exports[`SendPage render and initialization should render correctly even when a
style="bottom: -1px; right: 2px;"
>
<div
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-4 box--border-style-solid"
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-2 box--border-style-solid"
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ exports[`SendPageYourAccounts render renders correctly 1`] = `
style="bottom: -1px; right: 2px;"
>
<div
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-4 box--border-style-solid"
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-2 box--border-style-solid"
/>
</div>
</div>
Expand Down Expand Up @@ -421,7 +421,7 @@ exports[`SendPageYourAccounts render renders correctly 1`] = `
style="bottom: -1px; right: 2px;"
>
<div
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-4 box--border-style-solid"
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-2 box--border-style-solid"
/>
</div>
</div>
Expand Down Expand Up @@ -720,7 +720,7 @@ exports[`SendPageYourAccounts render renders correctly 1`] = `
style="bottom: -1px; right: 2px;"
>
<div
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-4 box--border-style-solid"
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-2 box--border-style-solid"
/>
</div>
</div>
Expand Down Expand Up @@ -1028,7 +1028,7 @@ exports[`SendPageYourAccounts render renders correctly 1`] = `
style="bottom: -1px; right: 2px;"
>
<div
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-4 box--border-style-solid"
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-2 box--border-style-solid"
/>
</div>
</div>
Expand Down Expand Up @@ -1327,7 +1327,7 @@ exports[`SendPageYourAccounts render renders correctly 1`] = `
style="bottom: -1px; right: 2px;"
>
<div
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-4 box--border-style-solid"
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-2 box--border-style-solid"
/>
</div>
</div>
Expand Down Expand Up @@ -1639,7 +1639,7 @@ exports[`SendPageYourAccounts render renders correctly 1`] = `
style="bottom: -1px; right: 2px;"
>
<div
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-4 box--border-style-solid"
class="mm-box multichain-badge-status__badge mm-box--background-color-border-muted mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-2 box--border-style-solid"
/>
</div>
</div>
Expand Down
Loading
Loading