From 995887aa927d9622dfdead0ddc1a2e6ade7fccc0 Mon Sep 17 00:00:00 2001 From: David Walsh Date: Mon, 8 May 2023 09:50:13 -0500 Subject: [PATCH] UX: Multichain: Ensure network picker renders properly for long and short names (#18974) * UX: Multichain: Ensure network picker renders properly for long and short network names * Updatte ui/components/multichain/app-header/app-header.js Co-authored-by: George Marshall * Update ui/components/multichain/app-header/app-header.js Co-authored-by: George Marshall * Update ui/components/multichain/app-header/app-header.js Co-authored-by: George Marshall * Update ui/components/multichain/app-header/app-header.js Co-authored-by: George Marshall * Update ui/components/multichain/app-header/app-header.js Co-authored-by: George Marshall * Update ui/components/multichain/app-header/app-header.scss Co-authored-by: George Marshall * Update ui/components/multichain/app-header/app-header.scss Co-authored-by: George Marshall * Fix jest issue --------- Co-authored-by: George Marshall --- .../__snapshots__/app-header.test.js.snap | 36 ++++++++++--------- .../multichain/app-header/app-header.js | 35 +++++++++++------- .../multichain/app-header/app-header.scss | 2 +- 3 files changed, 42 insertions(+), 31 deletions(-) diff --git a/ui/components/multichain/app-header/__snapshots__/app-header.test.js.snap b/ui/components/multichain/app-header/__snapshots__/app-header.test.js.snap index 81e4fd326..d4cb98b3c 100644 --- a/ui/components/multichain/app-header/__snapshots__/app-header.test.js.snap +++ b/ui/components/multichain/app-header/__snapshots__/app-header.test.js.snap @@ -8,24 +8,26 @@ exports[`App Header should match snapshot 1`] = `
-
-

- Goerli -

- - +
+ G +
+

+ Goerli +

+ + +
{ onClick={networkOpenCallback} display={[DISPLAY.FLEX, DISPLAY.NONE]} // show on popover hide on desktop /> - + {popupStatus ? null : ( +
+ +
+ )} {showProductTour && popupStatus && multichainProductTourStep === 1 ? ( @@ -316,12 +321,16 @@ export const AppHeader = ({ onClick }) => { padding={2} gap={2} > - dispatch(toggleNetworkMenu())} - className="multichain-app-header__contents__network-picker" - /> + {popupStatus ? null : ( +
+ dispatch(toggleNetworkMenu())} + className="multichain-app-header__contents__network-picker" + /> +
+ )} { diff --git a/ui/components/multichain/app-header/app-header.scss b/ui/components/multichain/app-header/app-header.scss index 1bf3cbd82..e7a341711 100644 --- a/ui/components/multichain/app-header/app-header.scss +++ b/ui/components/multichain/app-header/app-header.scss @@ -30,7 +30,7 @@ } &__network-picker { - max-width: 200px; + max-width: 250px; } &--avatar-network {