From 0cdc44aaaba236309a7db7d37c4cefcae029b914 Mon Sep 17 00:00:00 2001 From: TomNUSDS Date: Mon, 25 Apr 2022 11:57:00 -0700 Subject: [PATCH] Change primary alert message, expiration date, update intl and tests (#1584) * Change primary alert message, expiration date, update intl and tests * Update Request for Info box on Contact page --- client/compiled-lang/en.json | 18 +++-- client/src/components/J40Header/J40Header.tsx | 4 +- .../__snapshots__/J40Header.test.tsx.snap | 34 +++++++++ .../RequestForInfo/RequestForInfo.tsx | 5 +- .../RequestForInfo.test.tsx.snap | 37 +++++++--- client/src/data/copy/common.tsx | 29 +++++--- client/src/intl/en.json | 12 ++-- .../tests/__snapshots__/about.test.tsx.snap | 34 +++++++++ .../tests/__snapshots__/contact.test.tsx.snap | 71 ++++++++++++++++--- .../__snapshots__/downloads.test.tsx.snap | 34 +++++++++ .../freqAskedQuestions.test.tsx.snap | 34 +++++++++ .../__snapshots__/methodology.test.tsx.snap | 34 +++++++++ .../__snapshots__/publicEng.test.tsx.snap | 34 +++++++++ .../techSupportDoc.test.tsx.snap | 34 +++++++++ 14 files changed, 367 insertions(+), 47 deletions(-) diff --git a/client/compiled-lang/en.json b/client/compiled-lang/en.json index 250e3caf..69eec85b 100644 --- a/client/compiled-lang/en.json +++ b/client/compiled-lang/en.json @@ -207,30 +207,38 @@ "value": "About" } ], - "common.pages.alerts.census.tract.description": [ + "common.pages.alerts.public_comment_period.description": [ { "type": 0, - "value": "View improvements made to the display of the information for each census tract and " + "value": "The public comment period for " }, { "children": [ { "type": 0, - "value": "send feedback" + "value": "sending feedback" } ], "type": 8, "value": "link1" }, + { + "type": 0, + "value": " has been extended to " + }, + { + "type": 1, + "value": "expDate1" + }, { "type": 0, "value": "." } ], - "common.pages.alerts.census.tract.title": [ + "common.pages.alerts.public_comment_period.title": [ { "type": 0, - "value": "Improvements to the map on the Explore the tool page" + "value": "Public comment period extended" } ], "common.pages.banner.beta.info": [ diff --git a/client/src/components/J40Header/J40Header.tsx b/client/src/components/J40Header/J40Header.tsx index b4895ad2..85f66041 100644 --- a/client/src/components/J40Header/J40Header.tsx +++ b/client/src/components/J40Header/J40Header.tsx @@ -236,8 +236,8 @@ const J40Header = () => { - {COMMON_COPY.ALERTS.CENSUS_TRACT_DESCRIPTION} + heading={intl.formatMessage(COMMON_COPY.ALERTS.ALERT_1_TITLE.TITLE)}> + {COMMON_COPY.ALERTS.ALERT_1_DESCRIPTION} } diff --git a/client/src/components/J40Header/__snapshots__/J40Header.test.tsx.snap b/client/src/components/J40Header/__snapshots__/J40Header.test.tsx.snap index 831dd58c..d0d74e40 100644 --- a/client/src/components/J40Header/__snapshots__/J40Header.test.tsx.snap +++ b/client/src/components/J40Header/__snapshots__/J40Header.test.tsx.snap @@ -268,6 +268,40 @@ exports[`rendering of the J40Header checks if component renders 1`] = ` +
+
+
+

+ Public comment period extended +

+

+ The public comment period for + + sending feedback + + has been extended to May 25, 2022. +

+
+
+
`; diff --git a/client/src/components/RequestForInfo/RequestForInfo.tsx b/client/src/components/RequestForInfo/RequestForInfo.tsx index 4619d6ad..28e559cd 100644 --- a/client/src/components/RequestForInfo/RequestForInfo.tsx +++ b/client/src/components/RequestForInfo/RequestForInfo.tsx @@ -4,13 +4,16 @@ import {useIntl} from 'gatsby-plugin-intl'; import * as CONTACT_COPY from '../../data/copy/contact'; import * as styles from './RequestForInfo.module.scss'; +import * as COMMON_COPY from '../../data/copy/common'; const RequestForInfo = () => { const intl = useIntl(); + const commentPeriodExpired = new Date < COMMON_COPY.ALERTS.EXPIRATION_DATE; return ( - {CONTACT_COPY.RFI_BOX_BODY} +

{CONTACT_COPY.RFI_BOX_BODY}

+

{commentPeriodExpired && COMMON_COPY.ALERTS.ALERT_1_DESCRIPTION}

); }; diff --git a/client/src/components/RequestForInfo/__snapshots__/RequestForInfo.test.tsx.snap b/client/src/components/RequestForInfo/__snapshots__/RequestForInfo.test.tsx.snap index bfec58d3..37abc432 100644 --- a/client/src/components/RequestForInfo/__snapshots__/RequestForInfo.test.tsx.snap +++ b/client/src/components/RequestForInfo/__snapshots__/RequestForInfo.test.tsx.snap @@ -17,17 +17,32 @@ exports[`rendering of the RequestForInfo checks if component renders 1`] = `
- During the beta period, comments may be submitted on the Climate and Economic Justice Screening Tool via CEQ’s Request for Information available on - - federalregister.gov - - . +

+ During the beta period, comments may be submitted on the Climate and Economic Justice Screening Tool via CEQ’s Request for Information available on + + federalregister.gov + + . +

+

+ The public comment period for + + sending feedback + + has been extended to May 25, 2022. +

diff --git a/client/src/data/copy/common.tsx b/client/src/data/copy/common.tsx index a09b75a9..311fcf92 100644 --- a/client/src/data/copy/common.tsx +++ b/client/src/data/copy/common.tsx @@ -1,7 +1,7 @@ /* eslint-disable max-len */ /* eslint-disable react/display-name */ import React from 'react'; -import {FormattedMessage} from 'gatsby-plugin-intl'; +import {FormattedDate, FormattedMessage} from 'gatsby-plugin-intl'; import {defineMessages} from 'react-intl'; import LinkTypeWrapper from '../../components/LinkTypeWrapper'; @@ -37,21 +37,28 @@ export const BETA_BANNER = defineMessages({ // Alerts // Expiration month is zero-based: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getMonth +const ALERT_1_EXPIRATION_DATE= new Date(2022, 4, 25); // May 25 export const ALERTS = { - CENSUS_TRACT: defineMessages({ + ALERT_1_TITLE: defineMessages({ TITLE: { - id: 'common.pages.alerts.census.tract.title', - defaultMessage: 'Improvements to the map on the Explore the tool page', - description: 'Navigate to any page. This the title of the alert that informs the user that new census tract information is available', + id: 'common.pages.alerts.public_comment_period.title', + defaultMessage: 'Public comment period extended', + description: 'Alert title that appears on landing page.', }, }), - EXPIRATION_DATE: new Date(2022, 3, 15), // Set expiration for Apr 15th 2022. - CENSUS_TRACT_DESCRIPTION: send feedback.`} - description={`Navigate to any page. This the title of the alert that informs the user that new census tract information is available`} + EXPIRATION_DATE: ALERT_1_EXPIRATION_DATE, + ALERT_1_DESCRIPTION: sending feedback has been extended to {expDate1}.`} + description={`Alert body that appears on landing page.`} values={{ - link1: linkFn(`mailto:${FEEDBACK_EMAIL}`, false, true), + link1: linkFn('https://www.federalregister.gov/documents/2022/04/25/2022-08774/climate-and-economic-justice-screening-tool-beta-version', false, true), + expDate1: , }} />, }; diff --git a/client/src/intl/en.json b/client/src/intl/en.json index abffb08f..22eb7860 100644 --- a/client/src/intl/en.json +++ b/client/src/intl/en.json @@ -91,13 +91,13 @@ "defaultMessage": "About", "description": "Navigate to the About page. This is the about page title text" }, - "common.pages.alerts.census.tract.description": { - "defaultMessage": "View improvements made to the display of the information for each census tract and send feedback.", - "description": "Navigate to any page. This the title of the alert that informs the user that new census tract information is available" + "common.pages.alerts.public_comment_period.description": { + "defaultMessage": "The public comment period for sending feedback has been extended to {expDate1}.", + "description": "Alert body that appears on landing page." }, - "common.pages.alerts.census.tract.title": { - "defaultMessage": "Improvements to the map on the Explore the tool page", - "description": "Navigate to any page. This the title of the alert that informs the user that new census tract information is available" + "common.pages.alerts.public_comment_period.title": { + "defaultMessage": "Public comment period extended", + "description": "Alert title that appears on landing page." }, "common.pages.banner.beta.info": { "defaultMessage": "It is an early, in-progress version of the tool with limited datasets that will be regularly updated.", diff --git a/client/src/pages/tests/__snapshots__/about.test.tsx.snap b/client/src/pages/tests/__snapshots__/about.test.tsx.snap index b2913064..4202d265 100644 --- a/client/src/pages/tests/__snapshots__/about.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/about.test.tsx.snap @@ -268,6 +268,40 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis +
+
+
+

+ Public comment period extended +

+

+ The public comment period for + + sending feedback + + has been extended to May 25, 2022. +

+
+
+
+
+
+
+

+ Public comment period extended +

+

+ The public comment period for + + sending feedback + + has been extended to May 25, 2022. +

+
+
+
- During the beta period, comments may be submitted on the Climate and Economic Justice Screening Tool via CEQ’s Request for Information available on - - federalregister.gov - - . +

+ During the beta period, comments may be submitted on the Climate and Economic Justice Screening Tool via CEQ’s Request for Information available on + + federalregister.gov + + . +

+

+ The public comment period for + + sending feedback + + has been extended to May 25, 2022. +

diff --git a/client/src/pages/tests/__snapshots__/downloads.test.tsx.snap b/client/src/pages/tests/__snapshots__/downloads.test.tsx.snap index 917dd82f..e992c954 100644 --- a/client/src/pages/tests/__snapshots__/downloads.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/downloads.test.tsx.snap @@ -268,6 +268,40 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis +
+
+
+

+ Public comment period extended +

+

+ The public comment period for + + sending feedback + + has been extended to May 25, 2022. +

+
+
+
+
+
+
+

+ Public comment period extended +

+

+ The public comment period for + + sending feedback + + has been extended to May 25, 2022. +

+
+
+
+
+
+
+

+ Public comment period extended +

+

+ The public comment period for + + sending feedback + + has been extended to May 25, 2022. +

+
+
+
+
+
+
+

+ Public comment period extended +

+

+ The public comment period for + + sending feedback + + has been extended to May 25, 2022. +

+
+
+
+
+
+
+

+ Public comment period extended +

+

+ The public comment period for + + sending feedback + + has been extended to May 25, 2022. +

+
+
+