From 228aca0da5b19ebbcd3a9903412c2b08dbb385db Mon Sep 17 00:00:00 2001 From: Vim USDS Date: Fri, 9 Sep 2022 15:46:11 -0700 Subject: [PATCH] remove missing icon and reduce subtext font size --- .../__snapshots__/areaDetail.test.tsx.snap | 252 +++--------------- .../Indicator/Indicator.module.scss | 2 +- .../components/Indicator/Indicator.test.tsx | 26 +- client/src/components/Indicator/Indicator.tsx | 19 +- .../__snapshots__/Indicator.test.tsx.snap | 30 +-- 5 files changed, 61 insertions(+), 268 deletions(-) diff --git a/client/src/components/AreaDetail/tests/__snapshots__/areaDetail.test.tsx.snap b/client/src/components/AreaDetail/tests/__snapshots__/areaDetail.test.tsx.snap index dc3db5b1..bc8e76ce 100644 --- a/client/src/components/AreaDetail/tests/__snapshots__/areaDetail.test.tsx.snap +++ b/client/src/components/AreaDetail/tests/__snapshots__/areaDetail.test.tsx.snap @@ -401,12 +401,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for ISL
--
-
- an icon to represent data is unavailable -
+
@@ -707,12 +702,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -738,12 +728,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -771,12 +756,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -804,12 +784,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -837,12 +812,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -945,12 +915,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -976,12 +941,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -1084,12 +1044,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -1115,12 +1070,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -1146,12 +1096,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -1291,12 +1236,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -1322,12 +1262,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -1355,12 +1290,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -1463,12 +1393,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -1494,12 +1419,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -1525,12 +1445,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -1556,12 +1471,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -1587,12 +1497,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -1695,12 +1600,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -1726,12 +1626,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -1834,12 +1729,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -1868,12 +1758,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -1899,12 +1784,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -1930,12 +1810,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -2077,12 +1952,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -2259,12 +2129,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -2295,12 +2160,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for NAT
--
-
- an icon to represent data is unavailable -
+
@@ -2601,12 +2461,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for PUE
--
-
- an icon to represent data is unavailable -
+
@@ -2632,12 +2487,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for PUE
--
-
- an icon to represent data is unavailable -
+
@@ -2854,12 +2704,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for PUE
--
-
- an icon to represent data is unavailable -
+
@@ -2885,12 +2730,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for PUE
--
-
- an icon to represent data is unavailable -
+
@@ -2916,12 +2756,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for PUE
--
-
- an icon to represent data is unavailable -
+
@@ -2947,12 +2782,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for PUE
--
-
- an icon to represent data is unavailable -
+
@@ -2978,12 +2808,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for PUE
--
-
- an icon to represent data is unavailable -
+
@@ -3086,12 +2911,7 @@ exports[`rendering of the Islan areas in AreaDetail checks if indicators for PUE
--
-
- an icon to represent data is unavailable -
+
diff --git a/client/src/components/Indicator/Indicator.module.scss b/client/src/components/Indicator/Indicator.module.scss index 1bd84e8b..3d5c705d 100644 --- a/client/src/components/Indicator/Indicator.module.scss +++ b/client/src/components/Indicator/Indicator.module.scss @@ -81,7 +81,7 @@ align-self: flex-end; text-align: right; @include u-width(8); - @include typeset('sans', '3xs', 2); + @include typeset('sans', 'micro', 2); @include u-text('thin'); } } diff --git a/client/src/components/Indicator/Indicator.test.tsx b/client/src/components/Indicator/Indicator.test.tsx index 92ab4fdf..9336baa3 100644 --- a/client/src/components/Indicator/Indicator.test.tsx +++ b/client/src/components/Indicator/Indicator.test.tsx @@ -46,19 +46,19 @@ describe('rendering of the Indicator', () => { }); }); -describe('test rendering of Indicator value icons', () => { - it('renders the unavailable icon when the value is null', () => { - const {asFragment} = render( - - - , - ); - expect(asFragment()).toMatchSnapshot(); - screen.getByAltText(EXPLORE_COPY.SIDE_PANEL_VALUES.IMG_ALT_TEXT.UNAVAILABLE.defaultMessage); - }); -}); +// describe('test rendering of Indicator value icons', () => { +// it('renders the unavailable icon when the value is null', () => { +// const {asFragment} = render( +// +// +// , +// ); +// expect(asFragment()).toMatchSnapshot(); +// screen.getByAltText(EXPLORE_COPY.SIDE_PANEL_VALUES.IMG_ALT_TEXT.UNAVAILABLE.defaultMessage); +// }); +// }); describe('test rendering of Indicator value sub-text', () => { it('renders the "above 90 percentile"', () => { diff --git a/client/src/components/Indicator/Indicator.tsx b/client/src/components/Indicator/Indicator.tsx index d3729c03..63883b41 100644 --- a/client/src/components/Indicator/Indicator.tsx +++ b/client/src/components/Indicator/Indicator.tsx @@ -8,7 +8,7 @@ import * as constants from '../../data/constants'; import * as EXPLORE_COPY from '../../data/copy/explore'; // @ts-ignore -import unAvailable from '/node_modules/uswds/dist/img/usa-icons/error_outline.svg'; +// import unAvailable from '/node_modules/uswds/dist/img/usa-icons/error_outline.svg'; interface IIndicator { indicator: indicatorInfo, @@ -31,21 +31,18 @@ interface IIndicatorValue { } /** - * This component will determine what indicator's icon should be. Either show the unavailable icon - * or show nothing. + * This component will determine what indicator's icon should be. ATM there are no icons to show, however + * this may change and so leaving a place holder function here for easy change in the future * * @param {number | null} value * @return {JSX.Element} */ export const IndicatorValueIcon = ({value}: IIndicatorValueIcon) => { - const intl = useIntl(); - - return value === null ? ( - {intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_VALUES.IMG_ALT_TEXT.UNAVAILABLE)} - ) : <>; + return value === null ? <> : <>; + // {intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_VALUES.IMG_ALT_TEXT.UNAVAILABLE)} }; /** diff --git a/client/src/components/Indicator/__snapshots__/Indicator.test.tsx.snap b/client/src/components/Indicator/__snapshots__/Indicator.test.tsx.snap index 96a48b8f..27cbe6f0 100644 --- a/client/src/components/Indicator/__snapshots__/Indicator.test.tsx.snap +++ b/client/src/components/Indicator/__snapshots__/Indicator.test.tsx.snap @@ -92,12 +92,7 @@ exports[`renders value correctly for Former defense sites checks if it renders n
--
-
- an icon to represent data is unavailable -
+
@@ -182,12 +177,7 @@ exports[`renders value correctly for abandoned land mines checks if it renders n
--
-
- an icon to represent data is unavailable -
+
@@ -272,12 +262,7 @@ exports[`renders value correctly for historic underinvest. checks if it renders
--
-
- an icon to represent data is unavailable -
+
@@ -344,15 +329,6 @@ exports[`renders value correctly for historic underinvest. checks if it renders `; -exports[`test rendering of Indicator value icons renders the unavailable icon when the value is null 1`] = ` - - an icon to represent data is unavailable - -`; - exports[`test rendering of Indicator value sub-text renders missing data 1`] = `