1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 09:23:21 +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": {
"message": "Hoppla! Da hat etwas nicht geklappt."
},
"source": {
"message": "Quelle"
},
"speedUp": {
"message": "Beschleunigen"
},

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3246,9 +3246,6 @@
"somethingWentWrong": {
"message": "哎呀!出了点问题。"
},
"source": {
"message": "来源"
},
"speedUp": {
"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 () {
const expectedImageSource =
'https://bafkreifvhjdf6ve4jfv6qytqtux5nd4nwnelioeiqx5x2ez5yrgrzk7ypi.ipfs.dweb.link';
await withFixtures(
{
dapp: true,
@ -57,11 +55,6 @@ describe('View ERC1155 NFT details', function () {
const nftImage = await driver.findElement('.nft-item__container');
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(
'.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 () {
const expectedImageSource =
'data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM1MCIgd2lkdGg9IjM1MCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdGggaWQ9Ik15UGF0aCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJyZWQiIGQ9Ik0xMCw5MCBROTAsOTAgOTAsNDUgUTkwLDEwIDUwLDEwIFExMCwxMCAxMCw0MCBRMTAsNzAgNDUsNzAgUTcwLDcwIDc1LDUwIiAvPjwvZGVmcz48dGV4dD48dGV4dFBhdGggaHJlZj0iI015UGF0aCI+UXVpY2sgYnJvd24gZm94IGp1bXBzIG92ZXIgdGhlIGxhenkgZG9nLjwvdGV4dFBhdGg+PC90ZXh0Pjwvc3ZnPg==';
await withFixtures(
{
dapp: true,
@ -56,11 +54,6 @@ describe('View NFT details', function () {
const nftImage = await driver.findElement('.nft-item__container');
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(
'.nft-details__contract-wrapper',
);

View File

@ -141,27 +141,6 @@ exports[`NFT Details should match minimal props and state snapshot 1`] = `
</h6>
</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
class="box box--display-flex box--flex-direction-row"
>

View File

@ -67,7 +67,6 @@ export default function NftDetails({ nft }) {
standard,
isCurrentlyOwned,
lastSale,
imageThumbnail,
} = nft;
const t = useI18nContext();
const history = useHistory();
@ -87,7 +86,6 @@ export default function NftDetails({ nft }) {
);
const nftImageAlt = getNftImageAlt(nft);
const nftImageURL = getAssetImageURL(imageOriginal ?? image, ipfsGateway);
const isDataURI = nftImageURL.startsWith('data:');
const formattedTimestamp = formatDate(
new Date(lastSale?.event_timestamp).getTime(),
@ -309,72 +307,6 @@ export default function NftDetails({ nft }) {
</Box>
</>
) : 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}>
<Text
color={TextColor.textDefault}