diff --git a/client/src/components/Indicator/Indicator.test.tsx b/client/src/components/Indicator/Indicator.test.tsx index ff886e24..1561e039 100644 --- a/client/src/components/Indicator/Indicator.test.tsx +++ b/client/src/components/Indicator/Indicator.test.tsx @@ -93,7 +93,6 @@ describe('test rendering of Indicator value sub-text', () => { , ); expect(asFragment()).toMatchSnapshot(); - console.log(asFragment()); }); it('renders the "below 90 percentile"', () => { const {asFragment} = render( diff --git a/client/src/components/J40Header/__snapshots__/J40Header.test.tsx.snap b/client/src/components/J40Header/__snapshots__/J40Header.test.tsx.snap index 4388cad5..5b534457 100644 --- a/client/src/components/J40Header/__snapshots__/J40Header.test.tsx.snap +++ b/client/src/components/J40Header/__snapshots__/J40Header.test.tsx.snap @@ -320,7 +320,17 @@ exports[`rendering of the J40Header checks if component renders 1`] = `

- Download new technical support and other documentation and + Download new + + technical support + + and other documentation and sending feedback - has been extended to May 25, 2022. + via the Request for Information has been extended to May 25, 2022.

diff --git a/client/src/components/LinkTypeWrapper/LinkTypeWrapper.tsx b/client/src/components/LinkTypeWrapper/LinkTypeWrapper.tsx index 83e2b0bc..68d46736 100644 --- a/client/src/components/LinkTypeWrapper/LinkTypeWrapper.tsx +++ b/client/src/components/LinkTypeWrapper/LinkTypeWrapper.tsx @@ -1,11 +1,13 @@ import React from 'react'; -import {Link} from 'gatsby-plugin-intl'; +import {Link, useIntl} from 'gatsby-plugin-intl'; import {Link as TrussLink} from '@trussworks/react-uswds'; +import {IDefineMessage} from '../../data/copy/common'; + interface ILinkTypeWrapper { linkText?: string; internal?: boolean; - url?: string; + url: string | IDefineMessage; openUrlNewTab?: boolean; className?: string; dataCy?: string; @@ -29,9 +31,16 @@ interface ILinkTypeWrapper { * @returns */ const LinkTypeWrapper = (props:ILinkTypeWrapper) => { + const intl = useIntl(); + let {url} = props; + + if (url && typeof url !== `string`) { + url = intl.formatMessage(url); + } + if (props.internal) { return ( - {props.linkText} @@ -42,7 +51,7 @@ const LinkTypeWrapper = (props:ILinkTypeWrapper) => { { : {props.linkText} diff --git a/client/src/components/PublicEvent/PublicEvent.tsx b/client/src/components/PublicEvent/PublicEvent.tsx index c5354a9a..6a9c8b65 100644 --- a/client/src/components/PublicEvent/PublicEvent.tsx +++ b/client/src/components/PublicEvent/PublicEvent.tsx @@ -36,7 +36,6 @@ const PublicEvent = ({event}:IPublicEvent) => { const isEventExpired = new Date() > event.DATE; - console.log('event and date: ', event.NAME, event.DATE, isEventExpired); return ( { const intl = useIntl(); @@ -28,12 +30,33 @@ const PublicVideoBox = () => { >
- {intl.formatMessage(PUBLIC_COPY.PUBLIC_ENG_VIDEO.BUTTON_TEXT)} + {intl.formatMessage(PUBLIC_COPY.PUBLIC_ENG_VIDEO.BUTTON1_TEXT)}
{intl.formatMessage(PUBLIC_COPY.PUBLIC_ENG_VIDEO.IMG_ALT_TEXT)} +
+ +
+ + diff --git a/client/src/components/PublicVideoBox/__snapshots__/PublicVideoBox.test.tsx.snap b/client/src/components/PublicVideoBox/__snapshots__/PublicVideoBox.test.tsx.snap index a814db3b..2e49f8de 100644 --- a/client/src/components/PublicVideoBox/__snapshots__/PublicVideoBox.test.tsx.snap +++ b/client/src/components/PublicVideoBox/__snapshots__/PublicVideoBox.test.tsx.snap @@ -39,6 +39,26 @@ exports[`rendering of the PublicVideoBox checks if component renders 1`] = ` + + + diff --git a/client/src/components/RequestForInfo/__snapshots__/RequestForInfo.test.tsx.snap b/client/src/components/RequestForInfo/__snapshots__/RequestForInfo.test.tsx.snap index 1684d743..21930c6c 100644 --- a/client/src/components/RequestForInfo/__snapshots__/RequestForInfo.test.tsx.snap +++ b/client/src/components/RequestForInfo/__snapshots__/RequestForInfo.test.tsx.snap @@ -41,7 +41,7 @@ exports[`rendering of the RequestForInfo checks if component renders 1`] = ` > sending feedback - has been extended to May 25, 2022. + via the Request for Information has been extended to May 25, 2022.

diff --git a/client/src/data/copy/common.tsx b/client/src/data/copy/common.tsx index 7d379181..c9368d6d 100644 --- a/client/src/data/copy/common.tsx +++ b/client/src/data/copy/common.tsx @@ -5,6 +5,12 @@ import {FormattedDate, FormattedMessage} from 'gatsby-plugin-intl'; import {defineMessages} from 'react-intl'; import LinkTypeWrapper from '../../components/LinkTypeWrapper'; +export interface IDefineMessage { + id: string, + defaultMessage: string, + description: string, +}; + /* * i18n curried functions from react-intl (aka format.js) * using ver3 of the docs as this is what gatsby-plugin-intl uses: @@ -15,10 +21,11 @@ export const italicFn = (str:string) => {str}; export const boldFn = (str:string) => {str}; export const simpleLink = (href:string) => (str:string) => {str}; // eslint-disable-next-line max-len -export const linkFn = (to:string, isInternal:boolean, isOpenNewTab:boolean) => (str:string) => ; +export const linkFn = (to:string | IDefineMessage, isInternal:boolean, isOpenNewTab:boolean) => (str:string) => ; export const FEEDBACK_EMAIL = 'Screeningtool-Support@omb.eop.gov'; + // Beta Banner export const BETA_BANNER = defineMessages({ TITLE: { @@ -34,6 +41,13 @@ export const BETA_BANNER = defineMessages({ }, }); +export const TSD = defineMessages({ + URL: { + id: 'common.pages.tsd.url', + defaultMessage: `https://static-data-screeningtool.geoplatform.gov/data-pipeline/data/score/downloadable/cejst_technical_support_document.pdf`, + description: 'Navigate to the Alerts on any page. This will be the link to the techinical support document.', + }, +}); // Alerts // Expiration month is zero-based: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getMonth @@ -49,7 +63,7 @@ export const ALERTS = { EXPIRATION_DATE: ALERT_1_EXPIRATION_DATE, ALERT_1_DESCRIPTION: sending feedback has been extended to {expDate1}.`} + defaultMessage={`The public comment period for sending feedback via the Request for Information has been extended to {expDate1}.`} description={`Alert body that appears on landing page.`} values={{ link1: linkFn('https://www.federalregister.gov/documents/2022/04/25/2022-08774/climate-and-economic-justice-screening-tool-beta-version', false, true), @@ -71,9 +85,10 @@ export const ALERTS = { }), ALERT_2_DESCRIPTION: send feedback.`} + defaultMessage={`Download new technical support and other documentation and send feedback.`} description={`Alert title that appears at the top of pages.`} values={{ + link1: linkFn(TSD.URL, false, true), link2: linkFn(`mailto:${FEEDBACK_EMAIL}`, false, true), }} />, @@ -243,3 +258,5 @@ export const CONSOLE_ERROR = defineMessages({ description: 'Navigate to the about page. This is console error staging URL', }, }); + + diff --git a/client/src/data/copy/publicEngage.tsx b/client/src/data/copy/publicEngage.tsx index a21896f3..519855b2 100644 --- a/client/src/data/copy/publicEngage.tsx +++ b/client/src/data/copy/publicEngage.tsx @@ -79,16 +79,26 @@ export const PUBLIC_ENG_VIDEO = defineMessages({ defaultMessage: `Watch a recorded version of the CEJST training on YouTube.`, description: 'Navigate to the the public engagement page, there will be box that allows users to watch previously recorded videos. This is that box body text.', }, - BUTTON_TEXT: { - id: 'public.eng.page.video.box.button.text', + BUTTON1_TEXT: { + id: 'public.eng.page.video.box.button1.text', defaultMessage: `Watch on YouTube`, description: 'Navigate to the the public engagement page, there will be box that allows users to watch previously recorded videos. This is that box button text.', }, - IMG_ALT_TEXT: { - id: 'public.eng.page.video.box.button.img.alt.text', + IMG_ALT_TEXT1: { + id: 'public.eng.page.video.box.button.img.alt.text1', defaultMessage: `the icon to show that this button will open in a new tab`, description: 'Navigate to the the public engagement page, there will be box that allows users to watch previously recorded videos. This is alt tag of the image in the button.', }, + BUTTON2_TEXT: { + id: 'public.eng.page.video.box.button2.text', + defaultMessage: `Download slide deck`, + description: 'Navigate to the the public engagement page, there will be box that allows users to watch previously recorded videos. This is the button text for the second button.', + }, + IMG_ALT_TEXT2: { + id: 'public.eng.page.video.box.button.img.alt.text2', + defaultMessage: `the icon to show that this button will download the file`, + description: 'Navigate to the the public engagement page, there will be box that allows users to watch previously recorded videos. This is alt tag of the image in the 2nd button.', + }, }); export const PUBLIC_ENG_BUTTON = defineMessages({ @@ -190,6 +200,7 @@ export const EVENT_FIELDS = defineMessages({ }); // All events dates are set one day ahead of actual date to account for timezone differences +// Note: all events in this events in this array must be in chronological order starting with the oldest event. export const EVENTS = [ { DATE: new Date(2022, 2, 10), diff --git a/client/src/intl/en.json b/client/src/intl/en.json index 3c96ff53..c34a8582 100644 --- a/client/src/intl/en.json +++ b/client/src/intl/en.json @@ -92,7 +92,7 @@ "description": "Navigate to the About page. This is the about page title text" }, "common.pages.alerts.additional_docs_available.description": { - "defaultMessage": "Download new technical support and other documentation and send feedback.", + "defaultMessage": "Download new technical support and other documentation and send feedback.", "description": "Alert title that appears at the top of pages." }, "common.pages.alerts.census.tract.title": { @@ -100,7 +100,7 @@ "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}.", + "defaultMessage": "The public comment period for sending feedback via the Request for Information has been extended to {expDate1}.", "description": "Alert body that appears on landing page." }, "common.pages.alerts.public_comment_period.title": { @@ -231,6 +231,10 @@ "defaultMessage": "Technical Support Document", "description": "Navigate to the about page. This is Header navigate item to the technical support document page" }, + "common.pages.tsd.url": { + "defaultMessage": "https://static-data-screeningtool.geoplatform.gov/data-pipeline/data/score/downloadable/cejst_technical_support_document.pdf", + "description": "Navigate to the Alerts on any page. This will be the link to the techinical support document." + }, "contact.page.census.tract.feedback.para1": { "defaultMessage": "To provide feedback about a specific census tract, either select the send feedback button after selecting a census tract on the Explore the map page or use the email address provided above. Please include the census tract ID, county, and state or territory information, in addition to your feedback.", "description": "Navigate to the contact page, this is the census tract feedback section" @@ -1487,14 +1491,22 @@ "defaultMessage": "Watch a recorded version of the CEJST training on YouTube.", "description": "Navigate to the the public engagement page, there will be box that allows users to watch previously recorded videos. This is that box body text." }, - "public.eng.page.video.box.button.img.alt.text": { + "public.eng.page.video.box.button.img.alt.text1": { "defaultMessage": "the icon to show that this button will open in a new tab", "description": "Navigate to the the public engagement page, there will be box that allows users to watch previously recorded videos. This is alt tag of the image in the button." }, - "public.eng.page.video.box.button.text": { + "public.eng.page.video.box.button.img.alt.text2": { + "defaultMessage": "the icon to show that this button will download the file", + "description": "Navigate to the the public engagement page, there will be box that allows users to watch previously recorded videos. This is alt tag of the image in the 2nd button." + }, + "public.eng.page.video.box.button1.text": { "defaultMessage": "Watch on YouTube", "description": "Navigate to the the public engagement page, there will be box that allows users to watch previously recorded videos. This is that box button text." }, + "public.eng.page.video.box.button2.text": { + "defaultMessage": "Download slide deck", + "description": "Navigate to the the public engagement page, there will be box that allows users to watch previously recorded videos. This is the button text for the second button." + }, "public.eng.page.video.box.title.text": { "defaultMessage": "Can't make an upcoming session?", "description": "Navigate to the the public engagement page, there will be box that allows users to watch previously recorded videos. This is that box title text." diff --git a/client/src/pages/public-engagement.tsx b/client/src/pages/public-engagement.tsx index f46722ec..5c98715a 100644 --- a/client/src/pages/public-engagement.tsx +++ b/client/src/pages/public-engagement.tsx @@ -16,6 +16,10 @@ interface IPublicEngagementPageProps { const PublicEngagementPage = ({location}: IPublicEngagementPageProps) => { const intl = useIntl(); + // The reverse() is an in-place algorithm and so a temporary variable is needed: + const events = [...PUBLIC_ENG_COPY.EVENTS]; + events.reverse(); + return ( @@ -47,7 +51,7 @@ const PublicEngagementPage = ({location}: IPublicEngagementPageProps) => { - {PUBLIC_ENG_COPY.EVENTS.map((event, index) => )} + {events.map((event, index) => )} diff --git a/client/src/pages/tests/__snapshots__/about.test.tsx.snap b/client/src/pages/tests/__snapshots__/about.test.tsx.snap index 58d7747c..f739e893 100644 --- a/client/src/pages/tests/__snapshots__/about.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/about.test.tsx.snap @@ -320,7 +320,17 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

- Download new technical support and other documentation and + Download new + + technical support + + and other documentation and sending feedback - has been extended to May 25, 2022. + via the Request for Information has been extended to May 25, 2022.

diff --git a/client/src/pages/tests/__snapshots__/contact.test.tsx.snap b/client/src/pages/tests/__snapshots__/contact.test.tsx.snap index 777c5315..43349f96 100644 --- a/client/src/pages/tests/__snapshots__/contact.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/contact.test.tsx.snap @@ -320,7 +320,17 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

- Download new technical support and other documentation and + Download new + + technical support + + and other documentation and sending feedback - has been extended to May 25, 2022. + via the Request for Information has been extended to May 25, 2022.

@@ -512,7 +522,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis > sending feedback - has been extended to May 25, 2022. + via the Request for Information 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 27652043..41a062d2 100644 --- a/client/src/pages/tests/__snapshots__/downloads.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/downloads.test.tsx.snap @@ -320,7 +320,17 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

- Download new technical support and other documentation and + Download new + + technical support + + and other documentation and sending feedback - has been extended to May 25, 2022. + via the Request for Information has been extended to May 25, 2022.

diff --git a/client/src/pages/tests/__snapshots__/freqAskedQuestions.test.tsx.snap b/client/src/pages/tests/__snapshots__/freqAskedQuestions.test.tsx.snap index e51e04e2..e4e64993 100644 --- a/client/src/pages/tests/__snapshots__/freqAskedQuestions.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/freqAskedQuestions.test.tsx.snap @@ -320,7 +320,17 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

- Download new technical support and other documentation and + Download new + + technical support + + and other documentation and sending feedback - has been extended to May 25, 2022. + via the Request for Information has been extended to May 25, 2022.

diff --git a/client/src/pages/tests/__snapshots__/methodology.test.tsx.snap b/client/src/pages/tests/__snapshots__/methodology.test.tsx.snap index 6c77334e..ae3d2f28 100644 --- a/client/src/pages/tests/__snapshots__/methodology.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/methodology.test.tsx.snap @@ -320,7 +320,17 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

- Download new technical support and other documentation and + Download new + + technical support + + and other documentation and sending feedback - has been extended to May 25, 2022. + via the Request for Information has been extended to May 25, 2022.

diff --git a/client/src/pages/tests/__snapshots__/publicEng.test.tsx.snap b/client/src/pages/tests/__snapshots__/publicEng.test.tsx.snap index 940bfb90..00546c21 100644 --- a/client/src/pages/tests/__snapshots__/publicEng.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/publicEng.test.tsx.snap @@ -320,7 +320,17 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

- Download new technical support and other documentation and + Download new + + technical support + + and other documentation and sending feedback - has been extended to May 25, 2022. + via the Request for Information has been extended to May 25, 2022.

@@ -437,173 +447,16 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis >

- CEJST training session #1 -

-

- - The White House Council on Environmental Quality (CEQ), in partnership with the U.S. Digital - Service, is hosting a series of 'Training Webinars' for users of the Climate and Economic - Justice Screening Tool. These webinars are an opportunity for members of the public to learn how to - use the current version of the tool. The presenters at these webinars will be available to - provide technical support and address issues related to accessing and using the tool. - -

-

- - Event info - - : March 9th (4:00 - 5:00 PM EST) -

-

- + CEJST listening session #4 -

- - -
  • - Alt text -
    -

    - CEJST training session #2 -

    -

    - - The White House Council on Environmental Quality (CEQ), in partnership with the U.S. Digital - Service, is hosting a series of 'Training Webinars' for users of the Climate and Economic - Justice Screening Tool. These webinars are an opportunity for members of the public to learn how to - use the current version of the tool. The presenters at these webinars will be available to - provide technical support and address issues related to accessing and using the tool. - -

    -

    - - Event info - - : March 10th (4:00 - 5:00 PM EST) -

    -

    - - - -

    -
    -
  • -
  • - Alt text -
    -

    - CEJST training session #3 -

    -

    - - The White House Council on Environmental Quality (CEQ), in partnership with the U.S. Digital - Service, is hosting a series of 'Training Webinars' for users of the Climate and Economic - Justice Screening Tool. These webinars are an opportunity for members of the public to learn how to - use the current version of the tool. The presenters at these webinars will be available to - provide technical support and address issues related to accessing and using the tool. - -

    -

    - - Event info - - : March 16th (4:00 - 5:00 PM EST) -

    -

    - - - -

    -
    -
  • -
  • - Alt text - -
  • -
  • - Alt text -
    -

    - CEJST Public WHEJAC meeting day two -

    -

    - - The White House Environmental Justice Advisory Council is also soliciting feedback on the beta version of the Climate and Economic Justice Screening Tool at its public meeting. The link above has additional details. - -

    -

    - - Event info - - : March 31th (3:00 - 7:30 PM EST) -

    -

    - @@ -815,25 +620,13 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

    - - CEJST listening session #3 - + CEJST Public WHEJAC meeting day two

    - CEQ is hosting public listening sessions to seek input and feedback on the beta version of the - tool, including on the datasets it includes and the methodology it uses. This feedback is critical - to the development and enhancement of the tool. This feedback will help CEQ update and refine the - tool to ensure that it reflects the environmental, climate and other challenges that communities - are experiencing. + The White House Environmental Justice Advisory Council is also soliciting feedback on the beta version of the Climate and Economic Justice Screening Tool at its public meeting. The link above has additional details.

    Event info - : May 10th (4:00 PM EST) + : March 31th (3:00 - 7:30 PM EST)

    +

    +
    +
  • +
  • + Alt text +
    +

    + CEJST listening session #1

    Event info - : May 19th (4:00 PM EST) + : March 22nd (4:00 - 5:00 PM EST)

    + +

    +
    +
  • +
  • + Alt text +
    +

    + CEJST training session #3 +

    +

    + + The White House Council on Environmental Quality (CEQ), in partnership with the U.S. Digital + Service, is hosting a series of 'Training Webinars' for users of the Climate and Economic + Justice Screening Tool. These webinars are an opportunity for members of the public to learn how to + use the current version of the tool. The presenters at these webinars will be available to + provide technical support and address issues related to accessing and using the tool. + +

    +

    + + Event info + + : March 16th (4:00 - 5:00 PM EST) +

    +

    + + + +

    +
    +
  • +
  • + Alt text +
    +

    + CEJST training session #2 +

    +

    + + The White House Council on Environmental Quality (CEQ), in partnership with the U.S. Digital + Service, is hosting a series of 'Training Webinars' for users of the Climate and Economic + Justice Screening Tool. These webinars are an opportunity for members of the public to learn how to + use the current version of the tool. The presenters at these webinars will be available to + provide technical support and address issues related to accessing and using the tool. + +

    +

    + + Event info + + : March 10th (4:00 - 5:00 PM EST) +

    +

    + + + +

    +
    +
  • +
  • + Alt text +
    +

    + CEJST training session #1 +

    +

    + + The White House Council on Environmental Quality (CEQ), in partnership with the U.S. Digital + Service, is hosting a series of 'Training Webinars' for users of the Climate and Economic + Justice Screening Tool. These webinars are an opportunity for members of the public to learn how to + use the current version of the tool. The presenters at these webinars will be available to + provide technical support and address issues related to accessing and using the tool. + +

    +

    + + Event info + + : March 9th (4:00 - 5:00 PM EST) +

    +

    + +

    + + + diff --git a/client/src/pages/tests/__snapshots__/techSupportDoc.test.tsx.snap b/client/src/pages/tests/__snapshots__/techSupportDoc.test.tsx.snap index 26549044..a3937964 100644 --- a/client/src/pages/tests/__snapshots__/techSupportDoc.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/techSupportDoc.test.tsx.snap @@ -320,7 +320,17 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

    - Download new technical support and other documentation and + Download new + + technical support + + and other documentation and sending feedback - has been extended to May 25, 2022. + via the Request for Information has been extended to May 25, 2022.