Change Explore the tool to Explore the map (#1552)

* Change Explore the tool to Explore the map

- update all snapshots
- update gherkin tests
- new en.json is created

* Update Alert copy

- update expiration date

* Update es.json ids from tool to map

* Commit latest es.json with local changes

* Rebase main, remove intl errors in console

- change from map to tool in side panel (3 places)
- make survey button route to spanish site
- make survey button open in new tab
- remove all intl errors in console on each page
- remove rebase artifact from es.json
- update all snapshots

* Correct wasterwater typo
This commit is contained in:
Vim 2022-05-10 20:23:23 -04:00 committed by GitHub
commit 1293a52b18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 888 additions and 868 deletions

View file

@ -1,8 +1,8 @@
/* eslint-disable quotes */
// External Libs:
import React from 'react';
import { useIntl } from 'gatsby-plugin-intl';
import { Accordion, Button } from '@trussworks/react-uswds';
import {useIntl} from 'gatsby-plugin-intl';
import {Accordion, Button} from '@trussworks/react-uswds';
// Components:
import Category from '../Category';
@ -41,7 +41,7 @@ export interface indicatorInfo {
threshold?: number,
}
const AreaDetail = ({ properties, hash }: IAreaDetailProps) => {
const AreaDetail = ({properties, hash}: IAreaDetailProps) => {
const intl = useIntl();
// console.log the properties of the census that is selected:
@ -72,44 +72,44 @@ const AreaDetail = ({ properties, hash }: IAreaDetailProps) => {
if (sidePanelState === constants.SIDE_PANEL_STATE_VALUES.ISLAND_AREAS) {
if (indicatorName === 'lowMedInc') {
return properties.hasOwnProperty(constants
.ISLAND_AREAS_LOW_MEDIAN_INCOME_LOW_HS_EDU_PERCENTILE_FIELD) ?
.ISLAND_AREAS_LOW_MEDIAN_INCOME_LOW_HS_EDU_PERCENTILE_FIELD) ?
properties[constants.ISLAND_AREAS_LOW_MEDIAN_INCOME_LOW_HS_EDU_PERCENTILE_FIELD] : null;
}
if (indicatorName === 'unemploy') {
return properties.hasOwnProperty(constants
.ISLAND_AREAS_UNEMPLOYMENT_LOW_HS_EDU_PERCENTILE_FIELD) ?
.ISLAND_AREAS_UNEMPLOYMENT_LOW_HS_EDU_PERCENTILE_FIELD) ?
properties[constants.ISLAND_AREAS_UNEMPLOYMENT_LOW_HS_EDU_PERCENTILE_FIELD] : null;
}
if (indicatorName === 'poverty') {
return properties.hasOwnProperty(constants
.ISLAND_AREAS_POVERTY_LOW_HS_EDU_PERCENTILE_FIELD) ?
.ISLAND_AREAS_POVERTY_LOW_HS_EDU_PERCENTILE_FIELD) ?
properties[constants.ISLAND_AREAS_POVERTY_LOW_HS_EDU_PERCENTILE_FIELD] : null;
}
if (indicatorName === 'highSchool') {
return properties.hasOwnProperty(constants
.ISLAND_AREAS_HS_EDU_PERCENTAGE_FIELD) ?
.ISLAND_AREAS_HS_EDU_PERCENTAGE_FIELD) ?
properties[constants.ISLAND_AREAS_HS_EDU_PERCENTAGE_FIELD] : null;
}
}
if (indicatorName === 'lowMedInc') {
return properties.hasOwnProperty(constants
.LOW_MEDIAN_INCOME_PERCENTILE) ?
.LOW_MEDIAN_INCOME_PERCENTILE) ?
properties[constants.LOW_MEDIAN_INCOME_PERCENTILE] : null;
}
if (indicatorName === 'unemploy') {
return properties.hasOwnProperty(constants
.UNEMPLOYMENT_PROPERTY_PERCENTILE) ?
.UNEMPLOYMENT_PROPERTY_PERCENTILE) ?
properties[constants.UNEMPLOYMENT_PROPERTY_PERCENTILE] : null;
}
if (indicatorName === 'poverty') {
return properties.hasOwnProperty(constants
.POVERTY_BELOW_100_PERCENTILE) ?
.POVERTY_BELOW_100_PERCENTILE) ?
properties[constants.POVERTY_BELOW_100_PERCENTILE] : null;
}
if (indicatorName === 'highSchool') {
return properties.hasOwnProperty(constants
.HIGH_SCHOOL_PROPERTY_PERCENTILE) ?
.HIGH_SCHOOL_PROPERTY_PERCENTILE) ?
properties[constants.HIGH_SCHOOL_PROPERTY_PERCENTILE] : null;
}
};
@ -124,44 +124,44 @@ const AreaDetail = ({ properties, hash }: IAreaDetailProps) => {
if (sidePanelState === constants.SIDE_PANEL_STATE_VALUES.ISLAND_AREAS) {
if (indicatorName === 'lowMedInc') {
return properties.hasOwnProperty(constants
.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_LOW_MEDIAN_INCOME) ?
.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_LOW_MEDIAN_INCOME) ?
properties[constants.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_LOW_MEDIAN_INCOME] : null;
}
if (indicatorName === 'unemploy') {
return properties.hasOwnProperty(constants
.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_UNEMPLOYMENT) ?
.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_UNEMPLOYMENT) ?
properties[constants.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_UNEMPLOYMENT] : null;
}
if (indicatorName === 'poverty') {
return properties.hasOwnProperty(constants
.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_BELOW_100_POVERTY) ?
.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_BELOW_100_POVERTY) ?
properties[constants.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_BELOW_100_POVERTY] : null;
}
if (indicatorName === 'highSchool') {
return properties.hasOwnProperty(constants
.ISLAND_AREA_LOW_HS_EDU) ?
.ISLAND_AREA_LOW_HS_EDU) ?
properties[constants.ISLAND_AREA_LOW_HS_EDU] : null;
}
}
if (indicatorName === 'lowMedInc') {
return properties.hasOwnProperty(constants
.IS_EXCEEDS_THRESH_FOR_LOW_MEDIAN_INCOME) ?
.IS_EXCEEDS_THRESH_FOR_LOW_MEDIAN_INCOME) ?
properties[constants.IS_EXCEEDS_THRESH_FOR_LOW_MEDIAN_INCOME] : null;
}
if (indicatorName === 'unemploy') {
return properties.hasOwnProperty(constants
.IS_EXCEEDS_THRESH_FOR_UNEMPLOYMENT) ?
.IS_EXCEEDS_THRESH_FOR_UNEMPLOYMENT) ?
properties[constants.IS_EXCEEDS_THRESH_FOR_UNEMPLOYMENT] : null;
}
if (indicatorName === 'poverty') {
return properties.hasOwnProperty(constants
.IS_EXCEEDS_THRESH_FOR_BELOW_100_POVERTY) ?
.IS_EXCEEDS_THRESH_FOR_BELOW_100_POVERTY) ?
properties[constants.IS_EXCEEDS_THRESH_FOR_BELOW_100_POVERTY] : null;
}
if (indicatorName === 'highSchool') {
return properties.hasOwnProperty(constants
.IS_LOW_HS_EDUCATION_LOW_HIGHER_ED_PRIORITIZED) &&
.IS_LOW_HS_EDUCATION_LOW_HIGHER_ED_PRIORITIZED) &&
properties[constants.IS_LOW_HS_EDUCATION_LOW_HIGHER_ED_PRIORITIZED] == 1 ?
true : false;
}

View file

@ -313,7 +313,7 @@ exports[`rendering of the Categories checks if component renders 1`] = `
</div>
<div>
<h3>
Critical clean water and wasterwater infrastructure
Critical clean water and wastewater infrastructure
</h3>
<p>

View file

@ -4,7 +4,7 @@ exports[`rendering of the HowYouCanHelp checks if various text fields are visibl
<DocumentFragment>
<div>
<h2>
How you can help improve the tool
How you can help improve the map
</h2>
<ul>
<li>
@ -17,7 +17,7 @@ exports[`rendering of the HowYouCanHelp checks if various text fields are visibl
page and send feedback.
</li>
<li>
Use the tool to find communities and
Use the map to find communities and
<a
class="usa-link usa-link--external"
data-cy=""

View file

@ -222,6 +222,8 @@ exports[`J40Footer renders correctly 1`] = `
>
<a
href="https://www.surveymonkey.com/r/cejst-survey"
rel="noreferrer"
target="_blank"
>
<button
class="usa-button"

View file

@ -116,9 +116,9 @@ const J40Header = () => {
const navLinks = [
<Link
to={PAGES_ENDPOINTS.EXPLORE}
key={'explore-tool'}
key={'explore-map'}
activeClassName="usa-current"
data-cy={'nav-link-explore-the-tool'}>
data-cy={'nav-link-explore-the-map'}>
{intl.formatMessage(COMMON_COPY.HEADER.EXPLORE)}
</Link>,
<Link

View file

@ -238,10 +238,10 @@ exports[`rendering of the J40Header checks if component renders 1`] = `
class="usa-nav__primary-item"
>
<a
data-cy="nav-link-explore-the-tool"
data-cy="nav-link-explore-the-map"
href="/en/"
>
Explore the tool
Explore the map
</a>
</li>
<li
@ -315,7 +315,7 @@ exports[`rendering of the J40Header checks if component renders 1`] = `
<h4
class="usa-alert__heading"
>
Additional documentation now available
Improvements to the tool on the Explore the map page
</h4>
<p
class="usa-alert__text"

View file

@ -18,7 +18,7 @@ exports[`rendering of the MapLegend checks if snapshots have changed 1`] = `
class="secondary"
>
Communities identified as disadvantaged by the tool are those that are marginalized, underserved,
Communities identified as disadvantaged by the map are those that are marginalized, underserved,
and overburdened by pollution. These communities are at or above the thresholds in one or
more of eight categories of criteria.

View file

@ -26,7 +26,7 @@ exports[`rendering of the component expects the render to match snapshot 1`] = `
tabindex="0"
>
The tool uses census tracts that represent about 4,000 people, which is the smallest unit of geography for which consistent data can be displayed on the tool.
The tool uses census tracts that represent about 4,000 people, which is the smallest unit of geography for which consistent data can be displayed on the map.
</p>
<img

View file

@ -15,7 +15,7 @@ const SurveyButton = () => {
return (
<J40MainGridContainer className={styles.surveyButtonContainer}>
<a href={href}>
<a href={href} target='_blank' rel="noreferrer">
<Button
type="button"
className={styles.surveyButton}>

View file

@ -8,6 +8,8 @@ exports[`rendering of the SurveyButton checks if component renders 1`] = `
>
<a
href="https://www.surveymonkey.com/r/cejst-survey"
rel="noreferrer"
target="_blank"
>
<button
class="usa-button"

View file

@ -31,7 +31,7 @@ exports[`simulate app starting up, no click on map should match the snapshot of
tabindex="0"
>
The tool uses census tracts that represent about 4,000 people, which is the smallest unit of geography for which consistent data can be displayed on the tool.
The tool uses census tracts that represent about 4,000 people, which is the smallest unit of geography for which consistent data can be displayed on the map.
</p>
<img