From c9caa97ce3b5bfa931ebe0cd3a1c7a4f830ccfe9 Mon Sep 17 00:00:00 2001 From: Vim <86254807+vim-usds@users.noreply.github.com> Date: Tue, 14 Dec 2021 11:02:05 -0500 Subject: [PATCH] Remove GU and VI (#1028) - comment out GU and VI code - remove search from feature flag - keep comment on search production bug when wrapping div - add note on territories - add territories copy to constants --- client/src/components/J40Map.tsx | 9 +++-- client/src/components/MapWrapper/index.tsx | 8 ++++ .../src/components/territoryFocusControl.tsx | 20 +++++----- client/src/data/copy/explore.tsx | 37 ++++++++++++++++++- 4 files changed, 59 insertions(+), 15 deletions(-) diff --git a/client/src/components/J40Map.tsx b/client/src/components/J40Map.tsx index 1d63ee39..4123534b 100644 --- a/client/src/components/J40Map.tsx +++ b/client/src/components/J40Map.tsx @@ -157,7 +157,10 @@ const J40Map = ({location}: IJ40Interface) => { {/* - The MapSearch component is wrapped in a div in order for MapSearch to render correctly in a production build. + The MapSearch component is no longer wrapped in a div in order to allow this feature + to be behind a feature flag. This was causing a bug for MapSearch to render + correctly in a production build. Leaving this comment here in case future flags are + needed in this component When the MapSearch component is placed behind a feature flag without a div wrapping MapSearch, the production build will inject CSS due to the null in the false conditional @@ -168,9 +171,7 @@ const J40Map = ({location}: IJ40Interface) => { to ensure the production build works and that MapSearch and the map (ReactMapGL) render correctly. */} -
- {'sr' in flags ? : null} -
+ {
+ + + +

{EXPLORE_COPY.NOTE_ON_TERRITORIES.INTRO}

+

{EXPLORE_COPY.NOTE_ON_TERRITORIES.PARA_1}

+

{EXPLORE_COPY.NOTE_ON_TERRITORIES.PARA_2}

+
+
); }; diff --git a/client/src/components/territoryFocusControl.tsx b/client/src/components/territoryFocusControl.tsx index 0ec073b0..fb7e21f1 100644 --- a/client/src/components/territoryFocusControl.tsx +++ b/client/src/components/territoryFocusControl.tsx @@ -66,10 +66,10 @@ const TerritoryFocusControl = ({goToPlace}: ITerritoryFocusControl) => { short: intl.formatMessage(EXPLORE_COPY.MAP.PR_SHORT), long: intl.formatMessage(EXPLORE_COPY.MAP.PR_LONG), }, - { - short: intl.formatMessage(EXPLORE_COPY.MAP.GU_SHORT), - long: intl.formatMessage(EXPLORE_COPY.MAP.GU_LONG), - }, + // { + // short: intl.formatMessage(EXPLORE_COPY.MAP.GU_SHORT), + // long: intl.formatMessage(EXPLORE_COPY.MAP.GU_LONG), + // }, { short: intl.formatMessage(EXPLORE_COPY.MAP.AS_SHORT), long: intl.formatMessage(EXPLORE_COPY.MAP.AS_LONG), @@ -78,10 +78,10 @@ const TerritoryFocusControl = ({goToPlace}: ITerritoryFocusControl) => { short: intl.formatMessage(EXPLORE_COPY.MAP.MP_SHORT), long: intl.formatMessage(EXPLORE_COPY.MAP.MP_LONG), }, - { - short: intl.formatMessage(EXPLORE_COPY.MAP.VI_SHORT), - long: intl.formatMessage(EXPLORE_COPY.MAP.VI_LONG), - }, + // { + // short: intl.formatMessage(EXPLORE_COPY.MAP.VI_SHORT), + // long: intl.formatMessage(EXPLORE_COPY.MAP.VI_LONG), + // }, ]; // the offset for this array should map the territories variable const territoriesIconClassName = [ @@ -89,10 +89,10 @@ const TerritoryFocusControl = ({goToPlace}: ITerritoryFocusControl) => { 'mapboxgl-ctrl-zoom-to-ak', 'mapboxgl-ctrl-zoom-to-hi', 'mapboxgl-ctrl-zoom-to-pr', - 'mapboxgl-ctrl-zoom-to-gu', + // 'mapboxgl-ctrl-zoom-to-gu', 'mapboxgl-ctrl-zoom-to-as', 'mapboxgl-ctrl-zoom-to-mp', - 'mapboxgl-ctrl-zoom-to-vi', + // 'mapboxgl-ctrl-zoom-to-vi', ]; return ( diff --git a/client/src/data/copy/explore.tsx b/client/src/data/copy/explore.tsx index 5b3c12a4..840f7695 100644 --- a/client/src/data/copy/explore.tsx +++ b/client/src/data/copy/explore.tsx @@ -153,6 +153,7 @@ export const MAP = defineMessages({ }, }); + // Side Panel copy export const SIDE_PANEL_INITIAL_STATE = defineMessages({ TITLE: { @@ -407,7 +408,6 @@ export const SIDE_PANEL_INDICATORS = defineMessages({ }, }); - export const SIDE_PANEL_INDICATOR_DESCRIPTION = defineMessages({ EXP_AG_LOSS: { id: 'areaDetail.indicator.description.exp.ag.loss', @@ -576,6 +576,41 @@ export const DOWNLOAD_DRAFT = { />, }; +export const NOTE_ON_TERRITORIES = { + INTRO: , + PARA_1: Methodology & data, + }} + />, + PARA_2: , + +}; export const HOW_YOU_CAN_HELP_LIST_ITEMS = { HEADING: