-
Notifications
You must be signed in to change notification settings - Fork 488
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update icon styles for tokens, contract and more (#1204)
* update border radius for token logos and contract icon * update gaps between icons and text * update NFT icon and create entity * update screenshots
- Loading branch information
Showing
153 changed files
with
218 additions
and
122 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+5 Bytes
(100%)
...ts__/AddressCoinBalance.pw.tsx_dark-color-mode_base-view-dark-mode-mobile-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1 Byte
(100%)
...creenshots__/AddressCoinBalance.pw.tsx_default_base-view-dark-mode-mobile-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10 Bytes
(100%)
...screenshots__/AddressCoinBalance.pw.tsx_mobile_base-view-dark-mode-mobile-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-125 Bytes
(100%)
ui/address/__screenshots__/AddressDetails.pw.tsx_default_token-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-199 Bytes
(100%)
...ddress/__screenshots__/AddressInternalTxs.pw.tsx_default_base-view-mobile-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-95 Bytes
(100%)
ui/address/__screenshots__/AddressInternalTxs.pw.tsx_mobile_base-view-mobile-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+287 Bytes
(100%)
...sTokenTransfers.pw.tsx_default_mobile-with-token-filter-and-no-pagination-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+288 Bytes
(100%)
...ressTokenTransfers.pw.tsx_default_mobile-with-token-filter-and-pagination-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+363 Bytes
(100%)
.../AddressTokenTransfers.pw.tsx_default_with-token-filter-and-no-pagination-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+357 Bytes
(100%)
...s__/AddressTokenTransfers.pw.tsx_default_with-token-filter-and-pagination-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+766 Bytes
(100%)
...ss/__screenshots__/AddressTokens.pw.tsx_dark-color-mode_erc1155-dark-mode-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+898 Bytes
(100%)
ui/address/__screenshots__/AddressTokens.pw.tsx_default_erc1155-dark-mode-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+458 Bytes
(100%)
ui/address/__screenshots__/AddressTokens.pw.tsx_default_mobile-erc1155-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-357 Bytes
(99%)
..._screenshots__/ContractCode.pw.tsx_default_verified-with-multiple-sources-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-90 Bytes
(99%)
...screenshots__/ContractCode.pw.tsx_default_with-proxy-address-alert-mobile-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-133 Bytes
(99%)
..._screenshots__/ContractCode.pw.tsx_default_with-twin-address-alert-mobile-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+43 Bytes
(100%)
..._screenshots__/ContractCode.pw.tsx_mobile_with-proxy-address-alert-mobile-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-100 Bytes
(99%)
...__screenshots__/ContractCode.pw.tsx_mobile_with-twin-address-alert-mobile-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-20 Bytes
(100%)
...ct/__screenshots__/TokenSelect.pw.tsx_dark-color-mode_base-view-dark-mode-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+2 Bytes
(100%)
...hots__/BlockDetails.pw.tsx_dark-color-mode_regular-block-mobile-dark-mode-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2 Bytes
(100%)
ui/block/__screenshots__/BlockDetails.pw.tsx_default_genesis-block-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3 Bytes
(100%)
..._screenshots__/BlockDetails.pw.tsx_default_regular-block-mobile-dark-mode-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3 Bytes
(100%)
ui/block/__screenshots__/BlockDetails.pw.tsx_default_rootstock-custom-fields-1.png
Oops, something went wrong.
Binary file modified
BIN
+2 Bytes
(100%)
...__screenshots__/BlockDetails.pw.tsx_mobile_regular-block-mobile-dark-mode-1.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-101 Bytes
(100%)
...e/__screenshots__/LatestTxs.pw.tsx_dark-color-mode_default-view-dark-mode-1.png
Oops, something went wrong.
Binary file modified
BIN
-106 Bytes
(100%)
ui/home/__screenshots__/LatestTxs.pw.tsx_default_default-view-dark-mode-1.png
Oops, something went wrong.
Binary file modified
BIN
-113 Bytes
(100%)
ui/home/__screenshots__/LatestTxs.pw.tsx_default_mobile-default-view-1.png
Oops, something went wrong.
Binary file modified
BIN
-104 Bytes
(100%)
ui/home/__screenshots__/LatestTxs.pw.tsx_default_socket-new-item-1.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-116 Bytes
(100%)
..._screenshots__/Accounts.pw.tsx_dark-color-mode_base-view-mobile-dark-mode-1.png
Oops, something went wrong.
Binary file modified
BIN
-146 Bytes
(100%)
ui/pages/__screenshots__/Accounts.pw.tsx_default_base-view-mobile-dark-mode-1.png
Oops, something went wrong.
Binary file modified
BIN
-95 Bytes
(100%)
ui/pages/__screenshots__/Accounts.pw.tsx_mobile_base-view-mobile-dark-mode-1.png
Oops, something went wrong.
Binary file modified
BIN
+12 Bytes
(100%)
ui/pages/__screenshots__/Blocks.pw.tsx_dark-color-mode_base-view-dark-mode-1.png
Oops, something went wrong.
Binary file modified
BIN
+17 Bytes
(100%)
ui/pages/__screenshots__/Blocks.pw.tsx_default_base-view-dark-mode-1.png
Oops, something went wrong.
Binary file modified
BIN
+6 Bytes
(100%)
ui/pages/__screenshots__/Blocks.pw.tsx_default_mobile-base-view-1.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
ui/pages/__screenshots__/Blocks.pw.tsx_default_mobile-hidden-fields-1.png
Oops, something went wrong.
Binary file modified
BIN
+9 Bytes
(100%)
ui/pages/__screenshots__/Blocks.pw.tsx_default_new-item-from-socket-1.png
Oops, something went wrong.
Binary file modified
BIN
+12 Bytes
(100%)
ui/pages/__screenshots__/Blocks.pw.tsx_default_socket-error-1.png
Oops, something went wrong.
Binary file modified
BIN
-143 Bytes
(99%)
...screenshots__/CsvExport.pw.tsx_dark-color-mode_base-view-mobile-dark-mode-1.png
Oops, something went wrong.
Binary file modified
BIN
-182 Bytes
(99%)
ui/pages/__screenshots__/CsvExport.pw.tsx_default_base-view-mobile-dark-mode-1.png
Oops, something went wrong.
Binary file modified
BIN
+173 Bytes
(100%)
ui/pages/__screenshots__/CsvExport.pw.tsx_mobile_base-view-mobile-dark-mode-1.png
Oops, something went wrong.
Binary file modified
BIN
-231 Bytes
(100%)
...creenshots__/Home.pw.tsx_dark-color-mode_default-view---default-dark-mode-1.png
Oops, something went wrong.
Binary file modified
BIN
-107 Bytes
(100%)
ui/pages/__screenshots__/Home.pw.tsx_default_default-view-screen-xl-1.png
Oops, something went wrong.
Binary file modified
BIN
-114 Bytes
(100%)
ui/pages/__screenshots__/Home.pw.tsx_default_mobile-base-view-1.png
Oops, something went wrong.
Binary file modified
BIN
-121 Bytes
(100%)
ui/pages/__screenshots__/Token.pw.tsx_default_base-view-1.png
Oops, something went wrong.
Binary file modified
BIN
-119 Bytes
(100%)
ui/pages/__screenshots__/Token.pw.tsx_default_mobile-base-view-1.png
Oops, something went wrong.
Binary file modified
BIN
-25 Bytes
(100%)
ui/pages/__screenshots__/Token.pw.tsx_default_mobile-with-verified-info-1.png
Oops, something went wrong.
Binary file modified
BIN
-17 Bytes
(100%)
ui/pages/__screenshots__/Token.pw.tsx_default_with-verified-info-1.png
Oops, something went wrong.
Binary file modified
BIN
-428 Bytes
(99%)
..._screenshots__/VerifiedAddresses.pw.tsx_default_address-verification-flow-1.png
Oops, something went wrong.
Binary file modified
BIN
-237 Bytes
(100%)
ui/pages/__screenshots__/VerifiedAddresses.pw.tsx_default_base-view-mobile-1.png
Oops, something went wrong.
Binary file modified
BIN
-182 Bytes
(100%)
ui/pages/__screenshots__/VerifiedAddresses.pw.tsx_mobile_base-view-mobile-1.png
Oops, something went wrong.
Binary file modified
BIN
-265 Bytes
(100%)
ui/pages/__screenshots__/VerifiedContracts.pw.tsx_default_base-view-mobile-1.png
Oops, something went wrong.
Binary file modified
BIN
-203 Bytes
(100%)
ui/pages/__screenshots__/VerifiedContracts.pw.tsx_mobile_base-view-mobile-1.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+93 Bytes
(100%)
ui/shared/Page/__screenshots__/PageTitle.pw.tsx_default_default-view-mobile-1.png
Oops, something went wrong.
Binary file modified
BIN
+92 Bytes
(100%)
ui/shared/Page/__screenshots__/PageTitle.pw.tsx_mobile_default-view-mobile-1.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+1.26 KB
(100%)
...kenTransfer/__screenshots__/TokenTransferList.pw.tsx_default_with-tx-info-1.png
Oops, something went wrong.
Binary file modified
BIN
+1.26 KB
(100%)
...Transfer/__screenshots__/TokenTransferList.pw.tsx_default_without-tx-info-1.png
Oops, something went wrong.
Binary file modified
BIN
+1.52 KB
(100%)
...enTransfer/__screenshots__/TokenTransferTable.pw.tsx_default_with-tx-info-1.png
Oops, something went wrong.
Binary file modified
BIN
+1.58 KB
(100%)
...ransfer/__screenshots__/TokenTransferTable.pw.tsx_default_without-tx-info-1.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+24 Bytes
(100%)
...eenshots__/Utilization.pw.tsx_dark-color-mode_gray-color-scheme-dark-mode-1.png
Oops, something went wrong.
Binary file modified
BIN
-9 Bytes
(99%)
...enshots__/Utilization.pw.tsx_dark-color-mode_green-color-scheme-dark-mode-1.png
Oops, something went wrong.
Binary file modified
BIN
-8 Bytes
(99%)
...on/__screenshots__/Utilization.pw.tsx_default_gray-color-scheme-dark-mode-1.png
Oops, something went wrong.
Binary file modified
BIN
-10 Bytes
(99%)
...n/__screenshots__/Utilization.pw.tsx_default_green-color-scheme-dark-mode-1.png
Oops, something went wrong.
Binary file modified
BIN
-142 Bytes
(98%)
.../address/__screenshots__/AddressEntity.pw.tsx_default_contract-unverified-1.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import { test, expect } from '@playwright/experimental-ct-react'; | ||
import React from 'react'; | ||
|
||
import TestApp from 'playwright/TestApp'; | ||
|
||
import NftEntity from './NftEntity'; | ||
|
||
const iconSizes = [ 'md', 'lg' ]; | ||
const hash = '0xd789a607CEac2f0E14867de4EB15b15C9FFB5859'; | ||
|
||
test.use({ viewport: { width: 180, height: 30 } }); | ||
|
||
test.describe('icon sizes', () => { | ||
iconSizes.forEach((size) => { | ||
test(size, async({ mount }) => { | ||
const component = await mount( | ||
<TestApp> | ||
<NftEntity | ||
hash={ hash } | ||
id={ 1042 } | ||
iconSize={ size } | ||
/> | ||
</TestApp>, | ||
); | ||
|
||
await expect(component).toHaveScreenshot(); | ||
}); | ||
}); | ||
}); | ||
|
||
test('loading', async({ mount }) => { | ||
const component = await mount( | ||
<TestApp> | ||
<NftEntity | ||
hash={ hash } | ||
id={ 1042 } | ||
isLoading | ||
/> | ||
</TestApp>, | ||
); | ||
|
||
await expect(component).toHaveScreenshot(); | ||
}); | ||
|
||
test('long id', async({ mount }) => { | ||
const component = await mount( | ||
<TestApp> | ||
<NftEntity | ||
hash={ hash } | ||
id={ 1794350723452223 } | ||
/> | ||
</TestApp>, | ||
); | ||
|
||
await expect(component).toHaveScreenshot(); | ||
}); | ||
|
||
test('customization', async({ mount }) => { | ||
const component = await mount( | ||
<TestApp> | ||
<NftEntity | ||
hash={ hash } | ||
id={ 1042 } | ||
p={ 3 } | ||
borderWidth="1px" | ||
borderColor="blue.700" | ||
/> | ||
</TestApp>, | ||
); | ||
|
||
await expect(component).toHaveScreenshot(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import type { As } from '@chakra-ui/react'; | ||
import { chakra } from '@chakra-ui/react'; | ||
import _omit from 'lodash/omit'; | ||
import React from 'react'; | ||
|
||
import { route } from 'nextjs-routes'; | ||
|
||
import nftPlaceholder from 'icons/nft_shield.svg'; | ||
import * as EntityBase from 'ui/shared/entities/base/components'; | ||
import TruncatedValue from 'ui/shared/TruncatedValue'; | ||
|
||
const Container = EntityBase.Container; | ||
|
||
type IconProps = Pick<EntityProps, 'isLoading' | 'noIcon' | 'iconSize'> & { | ||
asProp?: As; | ||
}; | ||
|
||
const Icon = (props: IconProps) => { | ||
if (props.noIcon) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<EntityBase.Icon | ||
{ ...props } | ||
iconSize={ props.iconSize ?? 'lg' } | ||
asProp={ props.asProp ?? nftPlaceholder } | ||
/> | ||
); | ||
}; | ||
|
||
type LinkProps = EntityBase.LinkBaseProps & Pick<EntityProps, 'hash' | 'id'>; | ||
|
||
const Link = chakra((props: LinkProps) => { | ||
const defaultHref = route({ pathname: '/token/[hash]/instance/[id]', query: { hash: props.hash, id: props.id } }); | ||
|
||
return ( | ||
<EntityBase.Link | ||
{ ...props } | ||
href={ props.href ?? defaultHref } | ||
> | ||
{ props.children } | ||
</EntityBase.Link> | ||
); | ||
}); | ||
|
||
type ContentProps = Omit<EntityBase.ContentBaseProps, 'text'> & Pick<EntityProps, 'id'>; | ||
|
||
const Content = chakra((props: ContentProps) => { | ||
return ( | ||
<TruncatedValue | ||
isLoading={ props.isLoading } | ||
value={ props.id } | ||
/> | ||
); | ||
}); | ||
|
||
export interface EntityProps extends EntityBase.EntityBaseProps { | ||
hash: string; | ||
id: string; | ||
} | ||
|
||
const NftEntity = (props: EntityProps) => { | ||
const linkProps = _omit(props, [ 'className' ]); | ||
const partsProps = _omit(props, [ 'className', 'onClick' ]); | ||
|
||
return ( | ||
<Container className={ props.className } w="100%"> | ||
<Icon { ...partsProps }/> | ||
<Link { ...linkProps }> | ||
<Content { ...partsProps }/> | ||
</Link> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default React.memo(chakra(NftEntity)); | ||
|
||
export { | ||
Container, | ||
Link, | ||
Icon, | ||
Content, | ||
}; |
Binary file added
BIN
+2.38 KB
...hared/entities/nft/__screenshots__/NftEntity.pw.tsx_default_customization-1.png
Oops, something went wrong.
Binary file added
BIN
+2.12 KB
...hared/entities/nft/__screenshots__/NftEntity.pw.tsx_default_icon-sizes-lg-1.png
Oops, something went wrong.
Binary file added
BIN
+1.68 KB
...hared/entities/nft/__screenshots__/NftEntity.pw.tsx_default_icon-sizes-md-1.png
Oops, something went wrong.
Binary file added
BIN
+1.17 KB
ui/shared/entities/nft/__screenshots__/NftEntity.pw.tsx_default_loading-1.png
Oops, something went wrong.
Binary file added
BIN
+3.31 KB
ui/shared/entities/nft/__screenshots__/NftEntity.pw.tsx_default_long-id-1.png
Oops, something went wrong.
Oops, something went wrong.