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

Updating network colors with design tokens #16543

Merged
merged 2 commits into from
Nov 17, 2022
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
65 changes: 24 additions & 41 deletions .storybook/test-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const state = {
{
blockExplorerUrl: 'https://goerli.etherscan.io',
chainId: '0x5',
iconColor: 'var(--goerli)',
iconColor: 'var(--color-network-goerli-default)',
isATestNetwork: true,
labelKey: 'goerli',
providerType: 'goerli',
Expand All @@ -40,7 +40,7 @@ const state = {
{
blockExplorerUrl: 'https://sepolia.etherscan.io',
chainId: '0xaa36a7',
iconColor: 'var(--sepolia)',
iconColor: 'var(--color-network-sepolia-default)',
isATestNetwork: true,
labelKey: 'sepolia',
providerType: 'sepolia',
Expand All @@ -51,7 +51,7 @@ const state = {
{
blockExplorerUrl: '',
chainId: '0x539',
iconColor: 'var(--localhost)',
iconColor: 'var(--color-network-localhost-default)',
isATestNetwork: true,
label: 'Localhost 8545',
providerType: 'rpc',
Expand All @@ -61,7 +61,7 @@ const state = {
{
blockExplorerUrl: 'https://bscscan.com',
chainId: '0x38',
iconColor: 'var(--localhost)',
iconColor: 'var(--color-network-localhost-default)',
isATestNetwork: false,
label: 'Binance Smart Chain',
providerType: 'rpc',
Expand All @@ -71,7 +71,7 @@ const state = {
{
blockExplorerUrl: 'https://cchain.explorer.avax.network/',
chainId: '0xa86a',
iconColor: 'var(--localhost)',
iconColor: 'var(--color-network-localhost-default)',
isATestNetwork: false,
label: 'Avalanche',
providerType: 'rpc',
Expand All @@ -81,7 +81,7 @@ const state = {
{
blockExplorerUrl: 'https://polygonscan.com',
chainId: '0x89',
iconColor: 'var(--localhost)',
iconColor: 'var(--color-network-localhost-default)',
isATestNetwork: false,
label: 'Polygon',
providerType: 'rpc',
Expand Down Expand Up @@ -142,7 +142,7 @@ const state = {
iconUrl:
'https://assets.coingecko.com/coins/images/12256/thumb/falconswap.png?1598534184',
aggregators: ['CoinGecko', '1inch', 'Lifi'],
occurrences:3,
occurrences: 3,
unlisted: false,
},
'0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f': {
Expand Down Expand Up @@ -381,8 +381,7 @@ const state = {
from: '0x64a845a5b02460acf8a3d84503b0d68d028b4bb4',
to: '0xaD6D458402F60fD3Bd25163575031ACDce07538D',
value: '0x0',
data:
'0xa9059cbb000000000000000000000000b19ac54efa18cc3a14a5b821bfec73d284bf0c5e0000000000000000000000000000000000000000000000003782dace9d900000',
data: '0xa9059cbb000000000000000000000000b19ac54efa18cc3a14a5b821bfec73d284bf0c5e0000000000000000000000000000000000000000000000003782dace9d900000',
gas: '0xcb28',
gasPrice: '0x77359400',
},
Expand All @@ -401,8 +400,7 @@ const state = {
from: '0x64a845a5b02460acf8a3d84503b0d68d028b4bb4',
to: '0xaD6D458402F60fD3Bd25163575031ACDce07538D',
value: '0x0',
data:
'0xa9059cbb000000000000000000000000b19ac54efa18cc3a14a5b821bfec73d284bf0c5e0000000000000000000000000000000000000000000000003782dace9d900000',
data: '0xa9059cbb000000000000000000000000b19ac54efa18cc3a14a5b821bfec73d284bf0c5e0000000000000000000000000000000000000000000000003782dace9d900000',
gas: '0xcb28',
gasPrice: '0x77359400',
},
Expand Down Expand Up @@ -582,8 +580,7 @@ const state = {
chainId: '0x38',
dappSuggestedGasFees: null,
firstRetryBlockNumber: '0x9c2686',
hash:
'0xf45e7a751adfc0fbadccc972816baf33eb34543e52ace51f0f8d0d7f357afdc6',
hash: '0xf45e7a751adfc0fbadccc972816baf33eb34543e52ace51f0f8d0d7f357afdc6',
history: [
{
chainId: '0x38',
Expand All @@ -595,8 +592,7 @@ const state = {
status: 'unapproved',
time: 1629582710520,
txParams: {
data:
'0xa9059cbb0000000000000000000000004ef2d5a1d056e7c9e8bcdbf2bd9ac0df749a1c2900000000000000000000000000000000000000000000000029a2241af62c0000',
data: '0xa9059cbb0000000000000000000000004ef2d5a1d056e7c9e8bcdbf2bd9ac0df749a1c2900000000000000000000000000000000000000000000000029a2241af62c0000',
from: '0x17f62b1b2407c41c43e14da0699d6b4b0a521548',
gas: '0x2eb27',
gasPrice: '0x12a05f200',
Expand Down Expand Up @@ -780,8 +776,7 @@ const state = {
blockHash:
'0x30bf5dfa12e460a5d121267c00ba3047a14ba286e0c4fe75fa979010f527cba0',
blockNumber: '9c2688',
data:
'0x00000000000000000000000000000000000000000000000028426c213d688000',
data: '0x00000000000000000000000000000000000000000000000028426c213d688000',
logIndex: '245',
removed: false,
topics: [
Expand All @@ -798,8 +793,7 @@ const state = {
blockHash:
'0x30bf5dfa12e460a5d121267c00ba3047a14ba286e0c4fe75fa979010f527cba0',
blockNumber: '9c2688',
data:
'0x000000000000000000000000000000000000000000000000006a94d74f430000',
data: '0x000000000000000000000000000000000000000000000000006a94d74f430000',
logIndex: '246',
removed: false,
topics: [
Expand All @@ -816,8 +810,7 @@ const state = {
blockHash:
'0x30bf5dfa12e460a5d121267c00ba3047a14ba286e0c4fe75fa979010f527cba0',
blockNumber: '9c2688',
data:
'0x000000000000000000000000000000000000000000000000001ff973cafa8000',
data: '0x000000000000000000000000000000000000000000000000001ff973cafa8000',
logIndex: '247',
removed: false,
topics: [
Expand Down Expand Up @@ -941,8 +934,7 @@ const state = {
submittedTime: 1629582711337,
time: 1629582710520,
txParams: {
data:
'0xa9059cbb0000000000000000000000004ef2d5a1d056e7c9e8bcdbf2bd9ac0df749a1c2900000000000000000000000000000000000000000000000029a2241af62c0000',
data: '0xa9059cbb0000000000000000000000004ef2d5a1d056e7c9e8bcdbf2bd9ac0df749a1c2900000000000000000000000000000000000000000000000029a2241af62c0000',
from: '0x17f62b1b2407c41c43e14da0699d6b4b0a521548',
gas: '0x2eb27',
gasPrice: '0x12a05f200',
Expand Down Expand Up @@ -980,8 +972,7 @@ const state = {
red: null,
words: [10233480, null],
},
data:
'0x00000000000000000000000000000000000000000000000028426c213d688000',
data: '0x00000000000000000000000000000000000000000000000028426c213d688000',
logIndex: {
length: 1,
negative: 0,
Expand Down Expand Up @@ -1013,8 +1004,7 @@ const state = {
red: null,
words: [10233480, null],
},
data:
'0x000000000000000000000000000000000000000000000000006a94d74f430000',
data: '0x000000000000000000000000000000000000000000000000006a94d74f430000',
logIndex: {
length: 1,
negative: 0,
Expand Down Expand Up @@ -1046,8 +1036,7 @@ const state = {
red: null,
words: [10233480, null],
},
data:
'0x000000000000000000000000000000000000000000000000001ff973cafa8000',
data: '0x000000000000000000000000000000000000000000000000001ff973cafa8000',
logIndex: {
length: 1,
negative: 0,
Expand Down Expand Up @@ -1224,8 +1213,7 @@ const state = {
to: '0x045c619e4d29bba3b92769508831b681b83d6a96',
value: '0xbca9bce4d98ca3',
},
hash:
'0x2de9256a7c604586f7ecfd87ae9509851e217f588f9f85feed793c54ed2ce0aa',
hash: '0x2de9256a7c604586f7ecfd87ae9509851e217f588f9f85feed793c54ed2ce0aa',
transactionCategory: 'incoming',
},
'0x320a1fd769373578f78570e5d8f56e89bc7bce9657bb5f4c12d8fe790d471bfd': {
Expand All @@ -1242,8 +1230,7 @@ const state = {
to: '0x045c619e4d29bba3b92769508831b681b83d6a96',
value: '0xcdb08ab4254000',
},
hash:
'0x320a1fd769373578f78570e5d8f56e89bc7bce9657bb5f4c12d8fe790d471bfd',
hash: '0x320a1fd769373578f78570e5d8f56e89bc7bce9657bb5f4c12d8fe790d471bfd',
transactionCategory: 'incoming',
},
'0x8add6c1ea089a8de9b15fa2056b1875360f17916755c88ace9e5092b7a4b1239': {
Expand All @@ -1260,8 +1247,7 @@ const state = {
to: '0x045c619e4d29bba3b92769508831b681b83d6a96',
value: '0xe6ed27d6668000',
},
hash:
'0x8add6c1ea089a8de9b15fa2056b1875360f17916755c88ace9e5092b7a4b1239',
hash: '0x8add6c1ea089a8de9b15fa2056b1875360f17916755c88ace9e5092b7a4b1239',
transactionCategory: 'incoming',
},
'0x50be62ab1cabd03ff104c602c11fdef7a50f3d73c55006d5583ba97950ab1144': {
Expand All @@ -1278,8 +1264,7 @@ const state = {
to: '0x045c619e4d29bba3b92769508831b681b83d6a96',
value: '0x63eb89da4ed00000',
},
hash:
'0x50be62ab1cabd03ff104c602c11fdef7a50f3d73c55006d5583ba97950ab1144',
hash: '0x50be62ab1cabd03ff104c602c11fdef7a50f3d73c55006d5583ba97950ab1144',
transactionCategory: 'incoming',
},
},
Expand Down Expand Up @@ -1512,8 +1497,7 @@ const state = {
from: '0x64a845a5b02460acf8a3d84503b0d68d028b4bb4',
to: '0xaD6D458402F60fD3Bd25163575031ACDce07538D',
value: '0x0',
data:
'0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170',
data: '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170',
gas: '0xea60',
gasPrice: '0x4a817c800',
},
Expand All @@ -1532,8 +1516,7 @@ const state = {
from: '0x983211ce699ea5ab57cc528086154b6db1ad8e55',
to: '0xaD6D458402F60fD3Bd25163575031ACDce07538D',
value: '0x0',
data:
'0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170',
data: '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170',
gas: '0xea60',
gasPrice: '0x4a817c800',
},
Expand Down
4 changes: 2 additions & 2 deletions ui/components/app/flask/experimental-area/index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.experimental-area {
color: var(--flask-purple);
color: var(--color-flask-default);
margin: auto;
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -46,7 +46,7 @@
}

button {
background-color: var(--flask-purple) !important;
background-color: var(--color-flask-default) !important;
border: 0 !important;
color: var(--color-primary-inverse); //@TODO: We don't have a generic inverse color, using this one for now
width: 200px;
Copy link
Contributor Author

@georgewrmarshall georgewrmarshall Nov 16, 2022

Choose a reason for hiding this comment

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

NO VISUAL CHANGES - Gosh it feels good to tick off a long lasting "to do" 😁

Before

Screen Shot 2022-11-16 at 3 28 07 PM

After

Screen Shot 2022-11-16 at 3 26 18 PM

Expand Down
8 changes: 4 additions & 4 deletions ui/css/design-system/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ $color-map: (
'info-inverse': --color-info-inverse,
'info-disabled': --color-info-disabled,
'mainnet': --mainnet,
'goerli': --goerli,
'sepolia': --sepolia,
'localhost': --localhost,
'goerli': --color-network-goerli-default,
'sepolia': --color-network-sepolia-default,
'localhost': --color-network-localhost-default,
'transparent': --transparent,
'flask-purple': --flask-purple,
'flask-purple': --color-flask-default,
'inherit': --inherit,
);
5 changes: 0 additions & 5 deletions ui/css/utilities/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
// Accents
// Everything below this line is part of the new color system
--mainnet: #29b6af;
--goerli: #3099f2;
--sepolia: #cfb5f0;
--localhost: #bbc0c5;
--flask-purple: #8b45b6;
--inherit: inherit;
--transparent: transparent;

// DO NOT CHANGE
// Required for the QR reader to work properly
--qr-code-white-background: #fff;
Copy link
Contributor Author

@georgewrmarshall georgewrmarshall Nov 16, 2022

Choose a reason for hiding this comment

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

Not used anywhere else in the code base. A search after removing resolves in no results

Screen Shot 2022-11-16 at 1 12 06 PMScreen Shot 2022-11-16 at 1 12 11 PMScreen Shot 2022-11-16 at 1 12 15 PMScreen Shot 2022-11-16 at 1 12 20 PM

Expand Down