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
This commit is contained in:
TomNUSDS 2022-04-25 11:57:00 -07:00 committed by GitHub
commit 0cdc44aaab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 367 additions and 47 deletions

View file

@ -207,30 +207,38 @@
"value": "About" "value": "About"
} }
], ],
"common.pages.alerts.census.tract.description": [ "common.pages.alerts.public_comment_period.description": [
{ {
"type": 0, "type": 0,
"value": "View improvements made to the display of the information for each census tract and " "value": "The public comment period for "
}, },
{ {
"children": [ "children": [
{ {
"type": 0, "type": 0,
"value": "send feedback" "value": "sending feedback"
} }
], ],
"type": 8, "type": 8,
"value": "link1" "value": "link1"
}, },
{
"type": 0,
"value": " has been extended to "
},
{
"type": 1,
"value": "expDate1"
},
{ {
"type": 0, "type": 0,
"value": "." "value": "."
} }
], ],
"common.pages.alerts.census.tract.title": [ "common.pages.alerts.public_comment_period.title": [
{ {
"type": 0, "type": 0,
"value": "Improvements to the map on the Explore the tool page" "value": "Public comment period extended"
} }
], ],
"common.pages.banner.beta.info": [ "common.pages.banner.beta.info": [

View file

@ -236,8 +236,8 @@ const J40Header = () => {
<Alert <Alert
className={styles.alert} className={styles.alert}
type="info" type="info"
heading={intl.formatMessage(COMMON_COPY.ALERTS.CENSUS_TRACT.TITLE)}> heading={intl.formatMessage(COMMON_COPY.ALERTS.ALERT_1_TITLE.TITLE)}>
{COMMON_COPY.ALERTS.CENSUS_TRACT_DESCRIPTION} {COMMON_COPY.ALERTS.ALERT_1_DESCRIPTION}
</Alert> </Alert>
</J40MainGridContainer> </J40MainGridContainer>
} }

View file

@ -268,6 +268,40 @@ exports[`rendering of the J40Header checks if component renders 1`] = `
</div> </div>
</div> </div>
</div> </div>
<div
class="grid-container-desktop-lg"
data-testid="gridContainer"
>
<div
class="usa-alert usa-alert--info"
data-testid="alert"
>
<div
class="usa-alert__body"
>
<h4
class="usa-alert__heading"
>
Public comment period extended
</h4>
<p
class="usa-alert__text"
>
The public comment period for
<a
class="usa-link usa-link--external"
data-cy=""
href="https://www.federalregister.gov/documents/2022/04/25/2022-08774/climate-and-economic-justice-screening-tool-beta-version"
rel="noreferrer"
target="_blank"
>
sending feedback
</a>
has been extended to May 25, 2022.
</p>
</div>
</div>
</div>
</header> </header>
</DocumentFragment> </DocumentFragment>
`; `;

View file

@ -4,13 +4,16 @@ import {useIntl} from 'gatsby-plugin-intl';
import * as CONTACT_COPY from '../../data/copy/contact'; import * as CONTACT_COPY from '../../data/copy/contact';
import * as styles from './RequestForInfo.module.scss'; import * as styles from './RequestForInfo.module.scss';
import * as COMMON_COPY from '../../data/copy/common';
const RequestForInfo = () => { const RequestForInfo = () => {
const intl = useIntl(); const intl = useIntl();
const commentPeriodExpired = new Date < COMMON_COPY.ALERTS.EXPIRATION_DATE;
return ( return (
<SummaryBox className={styles.rfiBox} heading={intl.formatMessage(CONTACT_COPY.RFI_BOX.TITLE)}> <SummaryBox className={styles.rfiBox} heading={intl.formatMessage(CONTACT_COPY.RFI_BOX.TITLE)}>
{CONTACT_COPY.RFI_BOX_BODY} <p>{CONTACT_COPY.RFI_BOX_BODY}</p>
<p>{commentPeriodExpired && COMMON_COPY.ALERTS.ALERT_1_DESCRIPTION}</p>
</SummaryBox> </SummaryBox>
); );
}; };

View file

@ -17,6 +17,7 @@ exports[`rendering of the RequestForInfo checks if component renders 1`] = `
<div <div
class="usa-summary-box__text" class="usa-summary-box__text"
> >
<p>
During the beta period, comments may be submitted on the Climate and Economic Justice Screening Tool via CEQs Request for Information available on During the beta period, comments may be submitted on the Climate and Economic Justice Screening Tool via CEQs Request for Information available on
<a <a
class="usa-link usa-link--external" class="usa-link usa-link--external"
@ -28,6 +29,20 @@ exports[`rendering of the RequestForInfo checks if component renders 1`] = `
federalregister.gov federalregister.gov
</a> </a>
. .
</p>
<p>
The public comment period for
<a
class="usa-link usa-link--external"
data-cy=""
href="https://www.federalregister.gov/documents/2022/04/25/2022-08774/climate-and-economic-justice-screening-tool-beta-version"
rel="noreferrer"
target="_blank"
>
sending feedback
</a>
has been extended to May 25, 2022.
</p>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,7 +1,7 @@
/* eslint-disable max-len */ /* eslint-disable max-len */
/* eslint-disable react/display-name */ /* eslint-disable react/display-name */
import React from 'react'; import React from 'react';
import {FormattedMessage} from 'gatsby-plugin-intl'; import {FormattedDate, FormattedMessage} from 'gatsby-plugin-intl';
import {defineMessages} from 'react-intl'; import {defineMessages} from 'react-intl';
import LinkTypeWrapper from '../../components/LinkTypeWrapper'; import LinkTypeWrapper from '../../components/LinkTypeWrapper';
@ -37,21 +37,28 @@ export const BETA_BANNER = defineMessages({
// Alerts // Alerts
// Expiration month is zero-based: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getMonth // 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 = { export const ALERTS = {
CENSUS_TRACT: defineMessages({ ALERT_1_TITLE: defineMessages({
TITLE: { TITLE: {
id: 'common.pages.alerts.census.tract.title', id: 'common.pages.alerts.public_comment_period.title',
defaultMessage: 'Improvements to the map on the Explore the tool page', defaultMessage: 'Public comment period extended',
description: 'Navigate to any page. This the title of the alert that informs the user that new census tract information is available', description: 'Alert title that appears on landing page.',
}, },
}), }),
EXPIRATION_DATE: new Date(2022, 3, 15), // Set expiration for Apr 15th 2022. EXPIRATION_DATE: ALERT_1_EXPIRATION_DATE,
CENSUS_TRACT_DESCRIPTION: <FormattedMessage ALERT_1_DESCRIPTION: <FormattedMessage
id={'common.pages.alerts.census.tract.description'} id={'common.pages.alerts.public_comment_period.description'}
defaultMessage={`View improvements made to the display of the information for each census tract and <link1>send feedback</link1>.`} defaultMessage={`The public comment period for <link1>sending feedback</link1> has been extended to {expDate1}.`}
description={`Navigate to any page. This the title of the alert that informs the user that new census tract information is available`} description={`Alert body that appears on landing page.`}
values={{ 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: <FormattedDate
value={ALERT_1_EXPIRATION_DATE}
year="numeric"
month="short"
day="numeric"
/>,
}} }}
/>, />,
}; };

View file

@ -91,13 +91,13 @@
"defaultMessage": "About", "defaultMessage": "About",
"description": "Navigate to the About page. This is the about page title text" "description": "Navigate to the About page. This is the about page title text"
}, },
"common.pages.alerts.census.tract.description": { "common.pages.alerts.public_comment_period.description": {
"defaultMessage": "View improvements made to the display of the information for each census tract and <link1>send feedback</link1>.", "defaultMessage": "The public comment period for <link1>sending feedback</link1> has been extended to {expDate1}.",
"description": "Navigate to any page. This the title of the alert that informs the user that new census tract information is available" "description": "Alert body that appears on landing page."
}, },
"common.pages.alerts.census.tract.title": { "common.pages.alerts.public_comment_period.title": {
"defaultMessage": "Improvements to the map on the Explore the tool page", "defaultMessage": "Public comment period extended",
"description": "Navigate to any page. This the title of the alert that informs the user that new census tract information is available" "description": "Alert title that appears on landing page."
}, },
"common.pages.banner.beta.info": { "common.pages.banner.beta.info": {
"defaultMessage": "It is an early, in-progress version of the tool with limited datasets that will be regularly updated.", "defaultMessage": "It is an early, in-progress version of the tool with limited datasets that will be regularly updated.",

View file

@ -268,6 +268,40 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
</div> </div>
</div> </div>
</div> </div>
<div
class="grid-container-desktop-lg"
data-testid="gridContainer"
>
<div
class="usa-alert usa-alert--info"
data-testid="alert"
>
<div
class="usa-alert__body"
>
<h4
class="usa-alert__heading"
>
Public comment period extended
</h4>
<p
class="usa-alert__text"
>
The public comment period for
<a
class="usa-link usa-link--external"
data-cy=""
href="https://www.federalregister.gov/documents/2022/04/25/2022-08774/climate-and-economic-justice-screening-tool-beta-version"
rel="noreferrer"
target="_blank"
>
sending feedback
</a>
has been extended to May 25, 2022.
</p>
</div>
</div>
</div>
</header> </header>
<main <main
id="main-content" id="main-content"

View file

@ -268,6 +268,40 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
</div> </div>
</div> </div>
</div> </div>
<div
class="grid-container-desktop-lg"
data-testid="gridContainer"
>
<div
class="usa-alert usa-alert--info"
data-testid="alert"
>
<div
class="usa-alert__body"
>
<h4
class="usa-alert__heading"
>
Public comment period extended
</h4>
<p
class="usa-alert__text"
>
The public comment period for
<a
class="usa-link usa-link--external"
data-cy=""
href="https://www.federalregister.gov/documents/2022/04/25/2022-08774/climate-and-economic-justice-screening-tool-beta-version"
rel="noreferrer"
target="_blank"
>
sending feedback
</a>
has been extended to May 25, 2022.
</p>
</div>
</div>
</div>
</header> </header>
<main <main
id="main-content" id="main-content"
@ -392,6 +426,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
<div <div
class="usa-summary-box__text" class="usa-summary-box__text"
> >
<p>
During the beta period, comments may be submitted on the Climate and Economic Justice Screening Tool via CEQs Request for Information available on During the beta period, comments may be submitted on the Climate and Economic Justice Screening Tool via CEQs Request for Information available on
<a <a
class="usa-link usa-link--external" class="usa-link usa-link--external"
@ -403,6 +438,20 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
federalregister.gov federalregister.gov
</a> </a>
. .
</p>
<p>
The public comment period for
<a
class="usa-link usa-link--external"
data-cy=""
href="https://www.federalregister.gov/documents/2022/04/25/2022-08774/climate-and-economic-justice-screening-tool-beta-version"
rel="noreferrer"
target="_blank"
>
sending feedback
</a>
has been extended to May 25, 2022.
</p>
</div> </div>
</div> </div>
</div> </div>

View file

@ -268,6 +268,40 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
</div> </div>
</div> </div>
</div> </div>
<div
class="grid-container-desktop-lg"
data-testid="gridContainer"
>
<div
class="usa-alert usa-alert--info"
data-testid="alert"
>
<div
class="usa-alert__body"
>
<h4
class="usa-alert__heading"
>
Public comment period extended
</h4>
<p
class="usa-alert__text"
>
The public comment period for
<a
class="usa-link usa-link--external"
data-cy=""
href="https://www.federalregister.gov/documents/2022/04/25/2022-08774/climate-and-economic-justice-screening-tool-beta-version"
rel="noreferrer"
target="_blank"
>
sending feedback
</a>
has been extended to May 25, 2022.
</p>
</div>
</div>
</div>
</header> </header>
<main <main
id="main-content" id="main-content"

View file

@ -268,6 +268,40 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
</div> </div>
</div> </div>
</div> </div>
<div
class="grid-container-desktop-lg"
data-testid="gridContainer"
>
<div
class="usa-alert usa-alert--info"
data-testid="alert"
>
<div
class="usa-alert__body"
>
<h4
class="usa-alert__heading"
>
Public comment period extended
</h4>
<p
class="usa-alert__text"
>
The public comment period for
<a
class="usa-link usa-link--external"
data-cy=""
href="https://www.federalregister.gov/documents/2022/04/25/2022-08774/climate-and-economic-justice-screening-tool-beta-version"
rel="noreferrer"
target="_blank"
>
sending feedback
</a>
has been extended to May 25, 2022.
</p>
</div>
</div>
</div>
</header> </header>
<main <main
id="main-content" id="main-content"

View file

@ -268,6 +268,40 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
</div> </div>
</div> </div>
</div> </div>
<div
class="grid-container-desktop-lg"
data-testid="gridContainer"
>
<div
class="usa-alert usa-alert--info"
data-testid="alert"
>
<div
class="usa-alert__body"
>
<h4
class="usa-alert__heading"
>
Public comment period extended
</h4>
<p
class="usa-alert__text"
>
The public comment period for
<a
class="usa-link usa-link--external"
data-cy=""
href="https://www.federalregister.gov/documents/2022/04/25/2022-08774/climate-and-economic-justice-screening-tool-beta-version"
rel="noreferrer"
target="_blank"
>
sending feedback
</a>
has been extended to May 25, 2022.
</p>
</div>
</div>
</div>
</header> </header>
<main <main
id="main-content" id="main-content"

View file

@ -268,6 +268,40 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
</div> </div>
</div> </div>
</div> </div>
<div
class="grid-container-desktop-lg"
data-testid="gridContainer"
>
<div
class="usa-alert usa-alert--info"
data-testid="alert"
>
<div
class="usa-alert__body"
>
<h4
class="usa-alert__heading"
>
Public comment period extended
</h4>
<p
class="usa-alert__text"
>
The public comment period for
<a
class="usa-link usa-link--external"
data-cy=""
href="https://www.federalregister.gov/documents/2022/04/25/2022-08774/climate-and-economic-justice-screening-tool-beta-version"
rel="noreferrer"
target="_blank"
>
sending feedback
</a>
has been extended to May 25, 2022.
</p>
</div>
</div>
</div>
</header> </header>
<main <main
id="main-content" id="main-content"

View file

@ -268,6 +268,40 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
</div> </div>
</div> </div>
</div> </div>
<div
class="grid-container-desktop-lg"
data-testid="gridContainer"
>
<div
class="usa-alert usa-alert--info"
data-testid="alert"
>
<div
class="usa-alert__body"
>
<h4
class="usa-alert__heading"
>
Public comment period extended
</h4>
<p
class="usa-alert__text"
>
The public comment period for
<a
class="usa-link usa-link--external"
data-cy=""
href="https://www.federalregister.gov/documents/2022/04/25/2022-08774/climate-and-economic-justice-screening-tool-beta-version"
rel="noreferrer"
target="_blank"
>
sending feedback
</a>
has been extended to May 25, 2022.
</p>
</div>
</div>
</div>
</header> </header>
<main <main
id="main-content" id="main-content"