Public tags design updates (#2078)
* update styles of name tags * update screenshots * update screenshots * fix tests * update screenshot
@@ -0,0 +1,3 @@
|
||||
<svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.621 4.353 5.176 9.798a.69.69 0 1 1-.974-.974l5.444-5.446H5.108a.69.69 0 0 1 0-1.378H12v6.892a.69.69 0 1 1-1.379 0V4.353Z" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 239 B |
@@ -78,6 +78,7 @@
|
||||
| "key"
|
||||
| "lightning_navbar"
|
||||
| "lightning"
|
||||
| "link_external"
|
||||
| "link"
|
||||
| "lock"
|
||||
| "minus"
|
||||
|
||||
@@ -19,6 +19,10 @@ const semanticTokens = {
|
||||
link_hovered: {
|
||||
'default': 'blue.400',
|
||||
},
|
||||
icon_link_external: {
|
||||
'default': 'gray.300',
|
||||
_dark: 'gray.500',
|
||||
},
|
||||
icon_info: {
|
||||
'default': 'gray.400',
|
||||
_dark: 'gray.500',
|
||||
|
||||
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 48 KiB |
@@ -10,21 +10,24 @@ type Props = {
|
||||
}
|
||||
|
||||
const MarketplaceAppIntegrationIcon = ({ external, internalWallet }: Props) => {
|
||||
const [ icon, iconColor, text ] = React.useMemo(() => {
|
||||
const [ icon, iconColor, text, boxSize ] = React.useMemo(() => {
|
||||
let icon: IconName = 'integration/partial';
|
||||
let color = 'gray.400';
|
||||
let text = 'This app opens in Blockscout without Blockscout wallet functionality. Use your external web3 wallet to connect directly to this application';
|
||||
let boxSize = 5;
|
||||
|
||||
if (external) {
|
||||
icon = 'arrows/north-east';
|
||||
icon = 'link_external';
|
||||
color = 'icon_link_external';
|
||||
text = 'This app opens in a separate tab';
|
||||
boxSize = 4;
|
||||
} else if (internalWallet) {
|
||||
icon = 'integration/full';
|
||||
color = 'green.500';
|
||||
text = 'This app opens in Blockscout and your Blockscout wallet connects automatically';
|
||||
}
|
||||
|
||||
return [ icon, color, text ];
|
||||
return [ icon, color, text, boxSize ];
|
||||
}, [ external, internalWallet ]);
|
||||
|
||||
return (
|
||||
@@ -37,7 +40,7 @@ const MarketplaceAppIntegrationIcon = ({ external, internalWallet }: Props) => {
|
||||
>
|
||||
<IconSvg
|
||||
name={ icon }
|
||||
boxSize={ 5 }
|
||||
boxSize={ boxSize }
|
||||
color={ iconColor }
|
||||
position="relative"
|
||||
cursor="pointer"
|
||||
|
||||
@@ -17,6 +17,10 @@ const hooksConfig = {
|
||||
},
|
||||
};
|
||||
|
||||
test.beforeEach(async({ mockTextAd }) => {
|
||||
await mockTextAd();
|
||||
});
|
||||
|
||||
test.describe('fetched bytecode', () => {
|
||||
test('should refetch address query', async({ render, mockApiResponse, createSocket, page }) => {
|
||||
const addressApiUrl = await mockApiResponse('address', addressMock.validator, { pathParams: { hash: addressMock.hash } });
|
||||
|
||||
@@ -151,7 +151,7 @@ const Marketplace = () => {
|
||||
<MenuItem key={ label } as="a" href={ href } target="_blank" py={ 2 } px={ 4 }>
|
||||
<IconSvg name={ icon } boxSize={ 4 } mr={ 2.5 }/>
|
||||
{ label }
|
||||
<IconSvg name="arrows/north-east" boxSize={ 4 } color="gray.400" ml={ 2 }/>
|
||||
<IconSvg name="link_external" boxSize={ 3 } color="icon_link_external" ml={ 2 }/>
|
||||
</MenuItem>
|
||||
)) }
|
||||
</MenuList>
|
||||
|
||||
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 211 KiB After Width: | Height: | Size: 211 KiB |
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 123 KiB |
|
Before Width: | Height: | Size: 219 KiB After Width: | Height: | Size: 219 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
@@ -40,7 +40,7 @@ const EntityTagPopover = ({ data, children }: Props) => {
|
||||
<PopoverTrigger>
|
||||
{ children }
|
||||
</PopoverTrigger>
|
||||
<PopoverContent bgColor={ bgColor } borderRadius="sm" maxW="300px" w="fit-content">
|
||||
<PopoverContent bgColor={ bgColor } borderRadius="sm" maxW="280px" w="fit-content">
|
||||
<PopoverArrow bgColor={ bgColor }/>
|
||||
<DarkMode>
|
||||
<PopoverBody color="white" p={ 2 } fontSize="sm" display="flex" flexDir="column" rowGap={ 2 }>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.4 KiB |
@@ -30,7 +30,7 @@ const LinkExternal = ({ href, children, className, isLoading, variant, iconColor
|
||||
return (
|
||||
<Skeleton className={ className } { ...styleProps } bgColor="inherit">
|
||||
{ children }
|
||||
<Box boxSize={ 4 } display="inline-block"/>
|
||||
<Box boxSize={ 3 } display="inline-block"/>
|
||||
</Skeleton>
|
||||
);
|
||||
}
|
||||
@@ -38,7 +38,7 @@ const LinkExternal = ({ href, children, className, isLoading, variant, iconColor
|
||||
return (
|
||||
<Box className={ className } { ...styleProps }>
|
||||
{ children }
|
||||
<Skeleton boxSize={ 4 } verticalAlign="middle" display="inline-block"/>
|
||||
<Skeleton boxSize={ 3 } verticalAlign="middle" display="inline-block"/>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -46,7 +46,7 @@ const LinkExternal = ({ href, children, className, isLoading, variant, iconColor
|
||||
return (
|
||||
<Link className={ className } { ...styleProps } target="_blank" href={ href } onClick={ onClick }>
|
||||
{ children }
|
||||
<IconSvg name="arrows/north-east" boxSize={ 4 } verticalAlign="middle" color={ iconColor ?? 'gray.400' } flexShrink={ 0 }/>
|
||||
<IconSvg name="link_external" boxSize={ 3 } verticalAlign="middle" color={ iconColor ?? 'icon_link_external' } flexShrink={ 0 }/>
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -69,7 +69,7 @@ const NavLink = ({ item, isCollapsed, px, className, onClick, disableActiveState
|
||||
<NavLinkIcon item={ item }/>
|
||||
<Text { ...styleProps.textProps } as="span" ml={ 3 }>
|
||||
<span>{ item.text }</span>
|
||||
{ !isInternalLink && <IconSvg name="arrows/north-east" boxSize={ 4 } color="text_secondary" verticalAlign="middle"/> }
|
||||
{ !isInternalLink && <IconSvg name="link_external" boxSize={ 3 } color="icon_link_external" verticalAlign="middle"/> }
|
||||
</Text>
|
||||
{ isHighlighted && (
|
||||
<LightningLabel iconColor={ styleProps.itemProps.bgColor } isCollapsed={ isCollapsed }/>
|
||||
|
||||
@@ -42,7 +42,7 @@ const SearchBarSuggestApp = ({ data, isMobile, searchTerm, onClick }: Props) =>
|
||||
>
|
||||
<span dangerouslySetInnerHTML={{ __html: highlightText(data.title, searchTerm) }}/>
|
||||
</Text>
|
||||
{ data.external && <IconSvg name="arrows/north-east" boxSize={ 4 } verticalAlign="middle" flexShrink={ 0 }/> }
|
||||
{ data.external && <IconSvg name="link_external" color="icon_link_external" boxSize={ 3 } verticalAlign="middle" flexShrink={ 0 }/> }
|
||||
</Flex>
|
||||
<Text
|
||||
variant="secondary"
|
||||
@@ -81,7 +81,15 @@ const SearchBarSuggestApp = ({ data, isMobile, searchTerm, onClick }: Props) =>
|
||||
>
|
||||
{ data.description }
|
||||
</Text>
|
||||
{ data.external && <IconSvg name="arrows/north-east" boxSize={ 4 } verticalAlign="middle" color="text_secondary" flexShrink={ 0 }/> }
|
||||
{ data.external && (
|
||||
<IconSvg
|
||||
name="link_external"
|
||||
color="icon_link_external"
|
||||
boxSize={ 3 }
|
||||
verticalAlign="middle"
|
||||
flexShrink={ 0 }
|
||||
/>
|
||||
) }
|
||||
</Flex>
|
||||
);
|
||||
})();
|
||||
|
||||
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -39,12 +39,13 @@ test.beforeEach(async({ mockApiResponse, mockAssetResponse }) => {
|
||||
await mockApiResponse('address', addressMock.contract, { pathParams: { hash } });
|
||||
await mockApiResponse('token_instance_transfers_count', { transfers_count: 42 }, { pathParams: { id: tokenInstanceMock.unique.id, hash } });
|
||||
await mockAssetResponse('http://localhost:3000/nft-marketplace-logo.png', './playwright/mocks/image_s.jpg');
|
||||
await mockAssetResponse(tokenInstanceMock.unique.image_url as string, './playwright/mocks/image_md.jpg');
|
||||
});
|
||||
|
||||
test('base view +@dark-mode +@mobile', async({ render, page }) => {
|
||||
const component = await render(
|
||||
<MetadataUpdateProvider>
|
||||
<TokenInstanceDetails data={ tokenInstanceMock.unique } token={ tokenInfoERC721a }/>
|
||||
<TokenInstanceDetails data={{ ...tokenInstanceMock.unique, image_url: null }} token={ tokenInfoERC721a }/>
|
||||
</MetadataUpdateProvider>,
|
||||
);
|
||||
await expect(component).toHaveScreenshot({
|
||||
|
||||
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |