From 0129ea913f8e27102a695ca8b399ded9e2f63668 Mon Sep 17 00:00:00 2001 From: David Walsh Date: Fri, 28 Jul 2023 18:18:22 -0500 Subject: [PATCH] Fix #20162 - Add Whats New for Global Menu (#20244) --- app/_locales/en/messages.json | 9 + app/images/global-menu-block-explorer.svg | 827 ++++++++++++++++++++++ shared/notifications/index.js | 19 + test/e2e/fixture-builder.js | 5 + 4 files changed, 860 insertions(+) create mode 100644 app/images/global-menu-block-explorer.svg diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index fdd3a614d..99d3c8a92 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -2737,6 +2737,15 @@ "notifications21Title": { "message": "Introducing new and refreshed Swaps!" }, + "notifications22ActionText": { + "message": "Got it" + }, + "notifications22Description": { + "message": "💡 Just click the global menu or account menu to find them!" + }, + "notifications22Title": { + "message": "Looking for your account details or the block explorer URL?" + }, "notifications3ActionText": { "message": "Read more", "description": "The 'call to action' on the button, or link, of the 'Stay secure' notification. Upon clicking, users will be taken to a page about security on the metamask support website." diff --git a/app/images/global-menu-block-explorer.svg b/app/images/global-menu-block-explorer.svg new file mode 100644 index 000000000..728459030 --- /dev/null +++ b/app/images/global-menu-block-explorer.svg @@ -0,0 +1,827 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/shared/notifications/index.js b/shared/notifications/index.js index a5a689f3a..bc74e3222 100644 --- a/shared/notifications/index.js +++ b/shared/notifications/index.js @@ -114,6 +114,14 @@ export const UI_NOTIFICATIONS = { width: '100%', }, }, + 22: { + id: 22, + date: null, + image: { + src: 'images/global-menu-block-explorer.svg', + width: '100%', + }, + }, }; export const getTranslatedUINotifications = (t, locale) => { @@ -313,5 +321,16 @@ export const getTranslatedUINotifications = (t, locale) => { ) : '', }, + 22: { + ...UI_NOTIFICATIONS[22], + title: t('notifications22Title'), + description: t('notifications22Description'), + actionText: t('notifications22ActionText'), + date: UI_NOTIFICATIONS[22].date + ? new Intl.DateTimeFormat(formattedLocale).format( + new Date(UI_NOTIFICATIONS[22].date), + ) + : '', + }, }; }; diff --git a/test/e2e/fixture-builder.js b/test/e2e/fixture-builder.js index bbbcd49cf..ed3e3aaac 100644 --- a/test/e2e/fixture-builder.js +++ b/test/e2e/fixture-builder.js @@ -141,6 +141,11 @@ function defaultFixture() { id: 21, isShown: true, }, + 22: { + date: null, + id: 22, + isShown: true, + }, }, }, AppStateController: {