1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

UX: Remove the 'Source' and 'Link' URLs from NFT detail (#20248)

This commit is contained in:
David Walsh 2023-08-04 13:28:34 -05:00 committed by GitHub
parent 29ad914dc9
commit 91f6545c09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 0 additions and 154 deletions

View File

@ -3246,9 +3246,6 @@
"somethingWentWrong": { "somethingWentWrong": {
"message": "Hoppla! Da hat etwas nicht geklappt." "message": "Hoppla! Da hat etwas nicht geklappt."
}, },
"source": {
"message": "Quelle"
},
"speedUp": { "speedUp": {
"message": "Beschleunigen" "message": "Beschleunigen"
}, },

View File

@ -3243,9 +3243,6 @@
"somethingWentWrong": { "somethingWentWrong": {
"message": "Ουπς! Κάτι πήγε στραβά." "message": "Ουπς! Κάτι πήγε στραβά."
}, },
"source": {
"message": "Πηγή"
},
"speedUp": { "speedUp": {
"message": "Επιτάχυνση" "message": "Επιτάχυνση"
}, },

View File

@ -4107,9 +4107,6 @@
"somethingWentWrong": { "somethingWentWrong": {
"message": "Oops! Something went wrong." "message": "Oops! Something went wrong."
}, },
"source": {
"message": "Source"
},
"speedUp": { "speedUp": {
"message": "Speed up" "message": "Speed up"
}, },

View File

@ -3246,9 +3246,6 @@
"somethingWentWrong": { "somethingWentWrong": {
"message": "Lo lamentamos, se produjo un error." "message": "Lo lamentamos, se produjo un error."
}, },
"source": {
"message": "Fuente"
},
"speedUp": { "speedUp": {
"message": "Acelerar" "message": "Acelerar"
}, },

View File

@ -2062,9 +2062,6 @@
"somethingWentWrong": { "somethingWentWrong": {
"message": "Lo lamentamos, se produjo un error." "message": "Lo lamentamos, se produjo un error."
}, },
"source": {
"message": "Fuente"
},
"speedUp": { "speedUp": {
"message": "Acelerar" "message": "Acelerar"
}, },

View File

@ -3246,9 +3246,6 @@
"somethingWentWrong": { "somethingWentWrong": {
"message": "Oups ! Quelque chose a mal tourné. " "message": "Oups ! Quelque chose a mal tourné. "
}, },
"source": {
"message": "Source"
},
"speedUp": { "speedUp": {
"message": "Accélérer" "message": "Accélérer"
}, },

View File

@ -3246,9 +3246,6 @@
"somethingWentWrong": { "somethingWentWrong": {
"message": "ओह! कुछ गलत हो गया।" "message": "ओह! कुछ गलत हो गया।"
}, },
"source": {
"message": "स्रोत"
},
"speedUp": { "speedUp": {
"message": "जल्दी करें" "message": "जल्दी करें"
}, },

View File

@ -3246,9 +3246,6 @@
"somethingWentWrong": { "somethingWentWrong": {
"message": "Ups! Ada yang salah." "message": "Ups! Ada yang salah."
}, },
"source": {
"message": "Sumber"
},
"speedUp": { "speedUp": {
"message": "Percepat" "message": "Percepat"
}, },

View File

@ -3246,9 +3246,6 @@
"somethingWentWrong": { "somethingWentWrong": {
"message": "申し訳ありません。問題が発生しました。" "message": "申し訳ありません。問題が発生しました。"
}, },
"source": {
"message": "ソース"
},
"speedUp": { "speedUp": {
"message": "スピードアップ" "message": "スピードアップ"
}, },

View File

@ -3246,9 +3246,6 @@
"somethingWentWrong": { "somethingWentWrong": {
"message": "죄송합니다! 문제가 생겼습니다." "message": "죄송합니다! 문제가 생겼습니다."
}, },
"source": {
"message": "소스"
},
"speedUp": { "speedUp": {
"message": "가속화" "message": "가속화"
}, },

View File

@ -3246,9 +3246,6 @@
"somethingWentWrong": { "somethingWentWrong": {
"message": "Ops! Algo deu errado." "message": "Ops! Algo deu errado."
}, },
"source": {
"message": "Origem"
},
"speedUp": { "speedUp": {
"message": "Acelerar" "message": "Acelerar"
}, },

View File

@ -2062,9 +2062,6 @@
"somethingWentWrong": { "somethingWentWrong": {
"message": "Opa! Ocorreu algum erro." "message": "Opa! Ocorreu algum erro."
}, },
"source": {
"message": "Fonte"
},
"speedUp": { "speedUp": {
"message": "Acelerar" "message": "Acelerar"
}, },

View File

@ -3246,9 +3246,6 @@
"somethingWentWrong": { "somethingWentWrong": {
"message": "Ой! Что-то пошло не так." "message": "Ой! Что-то пошло не так."
}, },
"source": {
"message": "Источник"
},
"speedUp": { "speedUp": {
"message": "Ускорить" "message": "Ускорить"
}, },

View File

@ -3246,9 +3246,6 @@
"somethingWentWrong": { "somethingWentWrong": {
"message": "Oops! Nagkaproblema." "message": "Oops! Nagkaproblema."
}, },
"source": {
"message": "Pinagmulan"
},
"speedUp": { "speedUp": {
"message": "Pabilisin" "message": "Pabilisin"
}, },

View File

@ -3246,9 +3246,6 @@
"somethingWentWrong": { "somethingWentWrong": {
"message": "Eyvah! Bir şeyler ters gitti." "message": "Eyvah! Bir şeyler ters gitti."
}, },
"source": {
"message": "Kaynak"
},
"speedUp": { "speedUp": {
"message": "Hızlandır" "message": "Hızlandır"
}, },

View File

@ -3246,9 +3246,6 @@
"somethingWentWrong": { "somethingWentWrong": {
"message": "Rất tiếc! Đã xảy ra sự cố." "message": "Rất tiếc! Đã xảy ra sự cố."
}, },
"source": {
"message": "Nguồn"
},
"speedUp": { "speedUp": {
"message": "Tăng tốc" "message": "Tăng tốc"
}, },

View File

@ -3246,9 +3246,6 @@
"somethingWentWrong": { "somethingWentWrong": {
"message": "哎呀!出了点问题。" "message": "哎呀!出了点问题。"
}, },
"source": {
"message": "来源"
},
"speedUp": { "speedUp": {
"message": "加速" "message": "加速"
}, },

View File

@ -16,8 +16,6 @@ describe('View ERC1155 NFT details', function () {
}; };
it('user should be able to view ERC1155 NFT details', async function () { it('user should be able to view ERC1155 NFT details', async function () {
const expectedImageSource =
'https://bafkreifvhjdf6ve4jfv6qytqtux5nd4nwnelioeiqx5x2ez5yrgrzk7ypi.ipfs.dweb.link';
await withFixtures( await withFixtures(
{ {
dapp: true, dapp: true,
@ -57,11 +55,6 @@ describe('View ERC1155 NFT details', function () {
const nftImage = await driver.findElement('.nft-item__container'); const nftImage = await driver.findElement('.nft-item__container');
assert.equal(await nftImage.isDisplayed(), true); assert.equal(await nftImage.isDisplayed(), true);
const nftImageSource = await driver.findElement(
'.nft-details__image-source',
);
assert.equal(await nftImageSource.getText(), expectedImageSource);
const nftContract = await driver.findElement( const nftContract = await driver.findElement(
'.nft-details__contract-wrapper', '.nft-details__contract-wrapper',
); );

View File

@ -16,8 +16,6 @@ describe('View NFT details', function () {
}; };
it('user should be able to view ERC721 NFT details', async function () { it('user should be able to view ERC721 NFT details', async function () {
const expectedImageSource =
'data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM1MCIgd2lkdGg9IjM1MCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdGggaWQ9Ik15UGF0aCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJyZWQiIGQ9Ik0xMCw5MCBROTAsOTAgOTAsNDUgUTkwLDEwIDUwLDEwIFExMCwxMCAxMCw0MCBRMTAsNzAgNDUsNzAgUTcwLDcwIDc1LDUwIiAvPjwvZGVmcz48dGV4dD48dGV4dFBhdGggaHJlZj0iI015UGF0aCI+UXVpY2sgYnJvd24gZm94IGp1bXBzIG92ZXIgdGhlIGxhenkgZG9nLjwvdGV4dFBhdGg+PC90ZXh0Pjwvc3ZnPg==';
await withFixtures( await withFixtures(
{ {
dapp: true, dapp: true,
@ -56,11 +54,6 @@ describe('View NFT details', function () {
const nftImage = await driver.findElement('.nft-item__container'); const nftImage = await driver.findElement('.nft-item__container');
assert.equal(await nftImage.isDisplayed(), true); assert.equal(await nftImage.isDisplayed(), true);
const nftImageSource = await driver.findElement(
'.nft-details__image-source',
);
assert.equal(await nftImageSource.getText(), expectedImageSource);
const nftContract = await driver.findElement( const nftContract = await driver.findElement(
'.nft-details__contract-wrapper', '.nft-details__contract-wrapper',
); );

View File

@ -141,27 +141,6 @@ exports[`NFT Details should match minimal props and state snapshot 1`] = `
</h6> </h6>
</div> </div>
</div> </div>
<div
class="box box--display-flex box--flex-direction-row"
>
<h6
class="mm-box mm-text nft-details__link-title mm-text--body-sm-bold mm-box--margin-right-2 mm-box--margin-bottom-4 mm-box--color-text-default"
>
Source
</h6>
<h6
class="mm-box mm-text nft-details__image-source mm-text--body-sm mm-box--margin-bottom-4 mm-box--color-primary-default"
>
<a
href="https://bafybeiclzx7zfjvuiuwobn5ip3ogc236bjqfjzoblumf4pau4ep6dqramu.ipfs.dweb.link"
rel="noopener noreferrer"
target="_blank"
title="https://bafybeiclzx7zfjvuiuwobn5ip3ogc236bjqfjzoblumf4pau4ep6dqramu.ipfs.dweb.link"
>
https://bafybeiclzx7zfjvuiuwobn5ip3ogc236bjqfjzoblumf4pau4ep6dqramu.ipfs.dweb.link
</a>
</h6>
</div>
<div <div
class="box box--display-flex box--flex-direction-row" class="box box--display-flex box--flex-direction-row"
> >

View File

@ -67,7 +67,6 @@ export default function NftDetails({ nft }) {
standard, standard,
isCurrentlyOwned, isCurrentlyOwned,
lastSale, lastSale,
imageThumbnail,
} = nft; } = nft;
const t = useI18nContext(); const t = useI18nContext();
const history = useHistory(); const history = useHistory();
@ -87,7 +86,6 @@ export default function NftDetails({ nft }) {
); );
const nftImageAlt = getNftImageAlt(nft); const nftImageAlt = getNftImageAlt(nft);
const nftImageURL = getAssetImageURL(imageOriginal ?? image, ipfsGateway); const nftImageURL = getAssetImageURL(imageOriginal ?? image, ipfsGateway);
const isDataURI = nftImageURL.startsWith('data:');
const formattedTimestamp = formatDate( const formattedTimestamp = formatDate(
new Date(lastSale?.event_timestamp).getTime(), new Date(lastSale?.event_timestamp).getTime(),
@ -309,72 +307,6 @@ export default function NftDetails({ nft }) {
</Box> </Box>
</> </>
) : null} ) : null}
<Box display={Display.Flex} flexDirection={FlexDirection.Row}>
<Text
color={TextColor.textDefault}
variant={TextVariant.bodySmBold}
as="h6"
marginBottom={4}
marginRight={2}
className="nft-details__link-title"
>
{t('source')}
</Text>
<Text
variant={TextVariant.bodySm}
as="h6"
marginBottom={4}
className="nft-details__image-source"
color={
isDataURI ? TextColor.textDefault : TextColor.primaryDefault
}
>
{isDataURI ? (
<>{nftImageURL}</>
) : (
<a
target="_blank"
rel="noopener noreferrer"
href={nftImageURL}
title={nftImageURL}
>
{nftImageURL}
</a>
)}
</Text>
</Box>
{imageThumbnail ? (
<Box display={Display.Flex} flexDirection={FlexDirection.Row}>
<Text
color={TextColor.textDefault}
variant={TextVariant.bodySmBold}
as="h6"
marginBottom={4}
marginRight={2}
className="nft-details__link-title"
>
{t('link')}
</Text>
<Text
variant={TextVariant.bodySm}
as="h6"
marginBottom={4}
className="nft-details__image-source"
color={
isDataURI ? TextColor.textDefault : TextColor.primaryDefault
}
>
<a
target="_blank"
rel="noopener noreferrer"
href={nftImageURL}
title={nftImageURL}
>
{imageThumbnail}
</a>
</Text>
</Box>
) : null}
<Box display={Display.Flex} flexDirection={FlexDirection.Row}> <Box display={Display.Flex} flexDirection={FlexDirection.Row}>
<Text <Text
color={TextColor.textDefault} color={TextColor.textDefault}