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

[FLASK] Update UI related to MetaMask Snaps Platform trademark (#18172)

* Update UI related to MetaMask Snaps Platform trademark

* Remove redundant UI text according to new designs

* Fix lint errors

* Fix e2e test expectation

* Fix lint in test

* Fix e2e test expectation

* Fix some UI parts

* Update CSS for noSnaps message

* Add next design iteration

* Add minor fix

* Update locale message

* Fix learn more text size

* Refactor usage of design system components

---------

Co-authored-by: Erik Marks <rekmarks@protonmail.com>
This commit is contained in:
David Drazic 2023-03-21 16:52:13 +01:00 committed by GitHub
parent d6b49ae383
commit 0847917df4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 78 additions and 115 deletions

View File

@ -1320,9 +1320,6 @@
"etherscanViewOn": { "etherscanViewOn": {
"message": "Auf Etherscan anzeigen" "message": "Auf Etherscan anzeigen"
}, },
"expandExperience": {
"message": "Erweitern Sie Ihre Web3-Erfahrung"
},
"expandView": { "expandView": {
"message": "Ansicht erweitern" "message": "Ansicht erweitern"
}, },
@ -1955,9 +1952,6 @@
"malformedData": { "malformedData": {
"message": "Fehlerhafte Daten" "message": "Fehlerhafte Daten"
}, },
"manageSnaps": {
"message": "Verwalten Sie Ihre installierten Snaps"
},
"max": { "max": {
"message": "Max." "message": "Max."
}, },

View File

@ -1320,9 +1320,6 @@
"etherscanViewOn": { "etherscanViewOn": {
"message": "Προβολή στην Etherscan" "message": "Προβολή στην Etherscan"
}, },
"expandExperience": {
"message": "Επεκτείνετε την εμπειρία σας στο web3 με τα Snap του MetaMask"
},
"expandView": { "expandView": {
"message": "Ανάπτυξη Προβολής" "message": "Ανάπτυξη Προβολής"
}, },
@ -1955,9 +1952,6 @@
"malformedData": { "malformedData": {
"message": "Παραμορφωμένα δεδομένα" "message": "Παραμορφωμένα δεδομένα"
}, },
"manageSnaps": {
"message": "Διαχειριστείτε τα εγκατεστημένα Snap σας"
},
"max": { "max": {
"message": "Μέγ." "message": "Μέγ."
}, },

View File

@ -1344,18 +1344,21 @@
"etherscanViewOn": { "etherscanViewOn": {
"message": "View on Etherscan" "message": "View on Etherscan"
}, },
"expandExperience": {
"message": "Expand your web3 experience with MetaMask Snaps"
},
"expandView": { "expandView": {
"message": "Expand view" "message": "Expand view"
}, },
"experimental": { "experimental": {
"message": "Experimental" "message": "Experimental"
}, },
"exploreMetaMaskSnaps": {
"message": "Explore MetaMask Snaps"
},
"exportPrivateKey": { "exportPrivateKey": {
"message": "Export private key" "message": "Export private key"
}, },
"extendWalletWithSnaps": {
"message": "Extend the wallet experience."
},
"externalExtension": { "externalExtension": {
"message": "External extension" "message": "External extension"
}, },
@ -1997,9 +2000,6 @@
"malformedData": { "malformedData": {
"message": "Malformed data" "message": "Malformed data"
}, },
"manageSnaps": {
"message": "Manage your installed snaps"
},
"max": { "max": {
"message": "Max" "message": "Max"
}, },
@ -2285,7 +2285,7 @@
"message": "No NFTs yet" "message": "No NFTs yet"
}, },
"noSnaps": { "noSnaps": {
"message": "No Snaps installed" "message": "You don't have any snaps installed."
}, },
"noThanksVariant2": { "noThanksVariant2": {
"message": "No, thanks." "message": "No, thanks."

View File

@ -1320,9 +1320,6 @@
"etherscanViewOn": { "etherscanViewOn": {
"message": "Ver en Etherscan" "message": "Ver en Etherscan"
}, },
"expandExperience": {
"message": "Amplíe su experiencia web3 con complementos de MetaMask"
},
"expandView": { "expandView": {
"message": "Expandir vista" "message": "Expandir vista"
}, },
@ -1955,9 +1952,6 @@
"malformedData": { "malformedData": {
"message": "Datos con formato incorrecto" "message": "Datos con formato incorrecto"
}, },
"manageSnaps": {
"message": "Administre sus complementos instalados"
},
"max": { "max": {
"message": "Máx." "message": "Máx."
}, },

View File

@ -1320,9 +1320,6 @@
"etherscanViewOn": { "etherscanViewOn": {
"message": "Afficher sur Etherscan" "message": "Afficher sur Etherscan"
}, },
"expandExperience": {
"message": "Développez votre expérience web3 avec les Snaps MetaMask"
},
"expandView": { "expandView": {
"message": "Agrandir la vue" "message": "Agrandir la vue"
}, },
@ -1955,9 +1952,6 @@
"malformedData": { "malformedData": {
"message": "Données malformées" "message": "Données malformées"
}, },
"manageSnaps": {
"message": "Gérez vos Snaps installés"
},
"max": { "max": {
"message": "Max." "message": "Max."
}, },

View File

@ -1320,9 +1320,6 @@
"etherscanViewOn": { "etherscanViewOn": {
"message": "Etherscan पर देखें" "message": "Etherscan पर देखें"
}, },
"expandExperience": {
"message": "MetaMask स्नैप्स के साथ अपने web3 अनुभव का विस्तार करें"
},
"expandView": { "expandView": {
"message": "दृश्य का विस्तार करें" "message": "दृश्य का विस्तार करें"
}, },
@ -1955,9 +1952,6 @@
"malformedData": { "malformedData": {
"message": "विकृत डेटा" "message": "विकृत डेटा"
}, },
"manageSnaps": {
"message": "अपने इंस्टाल किए गए स्नैप्स मैनेज करें"
},
"max": { "max": {
"message": "अधिकतम" "message": "अधिकतम"
}, },

View File

@ -1320,9 +1320,6 @@
"etherscanViewOn": { "etherscanViewOn": {
"message": "Lihat di Etherscan" "message": "Lihat di Etherscan"
}, },
"expandExperience": {
"message": "Perluas pengalaman web3 Anda dengan MetaMask Snaps"
},
"expandView": { "expandView": {
"message": "Perluas tampilan" "message": "Perluas tampilan"
}, },
@ -1955,9 +1952,6 @@
"malformedData": { "malformedData": {
"message": "Format data salah" "message": "Format data salah"
}, },
"manageSnaps": {
"message": "Kelola Snap yang Anda instal"
},
"max": { "max": {
"message": "Maks" "message": "Maks"
}, },

View File

@ -1320,9 +1320,6 @@
"etherscanViewOn": { "etherscanViewOn": {
"message": "Etherscanで表示" "message": "Etherscanで表示"
}, },
"expandExperience": {
"message": "MetaMask Snaps で web3 エクスペリエンスを拡張"
},
"expandView": { "expandView": {
"message": "ビューを展開" "message": "ビューを展開"
}, },
@ -1955,9 +1952,6 @@
"malformedData": { "malformedData": {
"message": "不正な形式のデータ" "message": "不正な形式のデータ"
}, },
"manageSnaps": {
"message": "インストールされたスナップの管理"
},
"max": { "max": {
"message": "最大" "message": "最大"
}, },

View File

@ -1320,9 +1320,6 @@
"etherscanViewOn": { "etherscanViewOn": {
"message": "Etherscan에서 보기" "message": "Etherscan에서 보기"
}, },
"expandExperience": {
"message": "MetaMask 스냅으로 web3 경험을 확대하세요"
},
"expandView": { "expandView": {
"message": "보기 확장" "message": "보기 확장"
}, },
@ -1955,9 +1952,6 @@
"malformedData": { "malformedData": {
"message": "잘못된 데이터" "message": "잘못된 데이터"
}, },
"manageSnaps": {
"message": "설치된 스냅을 관리하세요"
},
"max": { "max": {
"message": "최대" "message": "최대"
}, },

View File

@ -1320,9 +1320,6 @@
"etherscanViewOn": { "etherscanViewOn": {
"message": "Ver no Etherscan" "message": "Ver no Etherscan"
}, },
"expandExperience": {
"message": "Expanda sua experiência web3 com os snaps da MetaMask"
},
"expandView": { "expandView": {
"message": "Expandir exibição" "message": "Expandir exibição"
}, },
@ -1955,9 +1952,6 @@
"malformedData": { "malformedData": {
"message": "Dados inválidos" "message": "Dados inválidos"
}, },
"manageSnaps": {
"message": "Gerencie seus snaps instalados"
},
"max": { "max": {
"message": "Máximo" "message": "Máximo"
}, },

View File

@ -1320,9 +1320,6 @@
"etherscanViewOn": { "etherscanViewOn": {
"message": "Посмотреть на Etherscan" "message": "Посмотреть на Etherscan"
}, },
"expandExperience": {
"message": "Расширьте свои возможности web3 с помощью MetaMask Snaps"
},
"expandView": { "expandView": {
"message": "Развернуть представление" "message": "Развернуть представление"
}, },
@ -1955,9 +1952,6 @@
"malformedData": { "malformedData": {
"message": "Искаженные данные" "message": "Искаженные данные"
}, },
"manageSnaps": {
"message": "Управляйте установленными снапами"
},
"max": { "max": {
"message": "Макс." "message": "Макс."
}, },

View File

@ -1320,9 +1320,6 @@
"etherscanViewOn": { "etherscanViewOn": {
"message": "Tingnan sa Etherscan" "message": "Tingnan sa Etherscan"
}, },
"expandExperience": {
"message": "Palawakin ang iyong karanasan sa web3 gamit ang MetaMask Snaps"
},
"expandView": { "expandView": {
"message": "I-expand ang view" "message": "I-expand ang view"
}, },
@ -1955,9 +1952,6 @@
"malformedData": { "malformedData": {
"message": "Pangit na datos" "message": "Pangit na datos"
}, },
"manageSnaps": {
"message": "Pamahalaan ang iyong mga naka-install na snap"
},
"max": { "max": {
"message": "Max" "message": "Max"
}, },

View File

@ -1320,9 +1320,6 @@
"etherscanViewOn": { "etherscanViewOn": {
"message": "Etherscan'de görüntüle" "message": "Etherscan'de görüntüle"
}, },
"expandExperience": {
"message": "MetaMask Snap'leri ile web3 deneyimini genişlet"
},
"expandView": { "expandView": {
"message": "Görünümü genişlet" "message": "Görünümü genişlet"
}, },
@ -1955,9 +1952,6 @@
"malformedData": { "malformedData": {
"message": "Hatalı biçimlendirilmiş veri" "message": "Hatalı biçimlendirilmiş veri"
}, },
"manageSnaps": {
"message": "Yüklü snap'lerini yönet"
},
"max": { "max": {
"message": "Maksimum" "message": "Maksimum"
}, },

View File

@ -1320,9 +1320,6 @@
"etherscanViewOn": { "etherscanViewOn": {
"message": "Xem trên Etherscan" "message": "Xem trên Etherscan"
}, },
"expandExperience": {
"message": "Mở rộng trải nghiệm web3 của bạn với MetaMask Snap"
},
"expandView": { "expandView": {
"message": "Mở rộng cửa sổ xem" "message": "Mở rộng cửa sổ xem"
}, },
@ -1955,9 +1952,6 @@
"malformedData": { "malformedData": {
"message": "Dữ liệu không đúng định dạng" "message": "Dữ liệu không đúng định dạng"
}, },
"manageSnaps": {
"message": "Quản lý các Snap đã cài đặt"
},
"max": { "max": {
"message": "Tối đa" "message": "Tối đa"
}, },

View File

@ -1320,9 +1320,6 @@
"etherscanViewOn": { "etherscanViewOn": {
"message": "在 Etherscan 上查看" "message": "在 Etherscan 上查看"
}, },
"expandExperience": {
"message": "扩展MetaMask Snap的web3体验"
},
"expandView": { "expandView": {
"message": "展开视图" "message": "展开视图"
}, },
@ -1955,9 +1952,6 @@
"malformedData": { "malformedData": {
"message": "格式错误的数据" "message": "格式错误的数据"
}, },
"manageSnaps": {
"message": "管理已安装的Snap"
},
"max": { "max": {
"message": "最大" "message": "最大"
}, },

View File

@ -145,9 +145,12 @@ describe('Test Snap Management', function () {
// check the results of the removal // check the results of the removal
await driver.delay(2000); await driver.delay(2000);
const removeResult = await driver.findElement( const removeResult = await driver.findElement(
'.snap-list-tab__container--no-snaps', '.snap-list-tab__container--no-snaps_inner',
);
assert.equal(
await removeResult.getText(),
"You don't have any snaps installed.",
); );
assert.equal(await removeResult.getText(), 'No Snaps installed');
}, },
); );
}); });

View File

@ -18,4 +18,12 @@
margin: 8px 0; margin: 8px 0;
max-width: 344px; max-width: 344px;
} }
.snap-list-tab__container--no-snaps_inner {
max-width: 164px;
}
.snap-list-tab__no-snaps_icon {
font-size: 48px;
}
} }

View File

@ -3,19 +3,28 @@ import { useDispatch, useSelector } from 'react-redux';
import { useHistory } from 'react-router-dom'; import { useHistory } from 'react-router-dom';
import SnapSettingsCard from '../../../../components/app/flask/snap-settings-card'; import SnapSettingsCard from '../../../../components/app/flask/snap-settings-card';
import { useI18nContext } from '../../../../hooks/useI18nContext'; import { useI18nContext } from '../../../../hooks/useI18nContext';
import Typography from '../../../../components/ui/typography/typography';
import { import {
TypographyVariant,
FLEX_DIRECTION,
JustifyContent, JustifyContent,
AlignItems, AlignItems,
TextColor, Color,
TEXT_ALIGN,
FLEX_DIRECTION,
Size,
} from '../../../../helpers/constants/design-system'; } from '../../../../helpers/constants/design-system';
import Box from '../../../../components/ui/box'; import Box from '../../../../components/ui/box';
import { SNAPS_VIEW_ROUTE } from '../../../../helpers/constants/routes'; import { SNAPS_VIEW_ROUTE } from '../../../../helpers/constants/routes';
import { disableSnap, enableSnap } from '../../../../store/actions'; import { disableSnap, enableSnap } from '../../../../store/actions';
import { getSnaps } from '../../../../selectors'; import { getSnaps } from '../../../../selectors';
import { handleSettingsRefs } from '../../../../helpers/utils/settings-search'; import { handleSettingsRefs } from '../../../../helpers/utils/settings-search';
import {
BannerTip,
BannerTipLogoType,
ButtonLink,
Icon,
ICON_NAMES,
ICON_SIZES,
Text,
} from '../../../../components/component-library';
const SnapListTab = () => { const SnapListTab = () => {
const t = useI18nContext(); const t = useI18nContext();
@ -42,18 +51,6 @@ const SnapListTab = () => {
<div className="snap-list-tab" ref={settingsRef}> <div className="snap-list-tab" ref={settingsRef}>
{Object.entries(snaps).length ? ( {Object.entries(snaps).length ? (
<div className="snap-list-tab__body"> <div className="snap-list-tab__body">
<Box display="flex" flexDirection={FLEX_DIRECTION.COLUMN}>
<Typography variant={TypographyVariant.H5} marginBottom={2}>
{t('expandExperience')}
</Typography>
<Typography
variant={TypographyVariant.H6}
color={TextColor.textAlternative}
marginBottom={2}
>
{t('manageSnaps')}
</Typography>
</Box>
<div className="snap-list-tab__wrapper"> <div className="snap-list-tab__wrapper">
{Object.entries(snaps).map(([key, snap]) => { {Object.entries(snaps).map(([key, snap]) => {
return ( return (
@ -82,15 +79,54 @@ const SnapListTab = () => {
className="snap-list-tab__container--no-snaps" className="snap-list-tab__container--no-snaps"
width="full" width="full"
height="full" height="full"
justifyContent={JustifyContent.center}
alignItems={AlignItems.center} alignItems={AlignItems.center}
flexDirection={FLEX_DIRECTION.COLUMN}
> >
<Typography <Box
variant={TypographyVariant.H4} className="snap-list-tab__container--no-snaps_inner"
color={TextColor.textAlternative} width="full"
height="full"
flexDirection={FLEX_DIRECTION.COLUMN}
justifyContent={JustifyContent.center}
alignItems={AlignItems.center}
> >
<span>{t('noSnaps')}</span> <Icon
</Typography> name={ICON_NAMES.SNAPS}
color={Color.iconMuted}
className="snap-list-tab__no-snaps_icon"
size={ICON_SIZES.AUTO}
/>
<Text
color={Color.textMuted}
align={TEXT_ALIGN.CENTER}
marginTop={4}
>
{t('noSnaps')}
</Text>
</Box>
<Box
className="snap-list-tab__container--no-snaps_banner-tip"
width="full"
justifyContent={JustifyContent.center}
alignItems={AlignItems.flexEnd}
paddingLeft={4}
paddingRight={4}
paddingBottom={4}
>
<BannerTip
logoType={BannerTipLogoType.Greeting}
title={t('exploreMetaMaskSnaps')}
description={t('extendWalletWithSnaps')}
>
<ButtonLink
size={Size.auto}
href="https://metamask.io/snaps/"
target="_blank"
>
{`${t('learnMoreUpperCase')}`}
</ButtonLink>
</BannerTip>
</Box>
</Box> </Box>
)} )}
</div> </div>