Skip to content

Commit

Permalink
Production tickets for the week of 12-5-22 (#2117)
Browse files Browse the repository at this point in the history
* remove training from low income card

- update snaphots

* Update npm audit level

* Update query-string lib

* Remove security checks

* Adds security audit back

* Add npm and node version

* remove $

* Remove node versions

* Fix redundant IDs for en.json creation

- closes #2116
- closes #2106

* Update also copy

- update snapshots
- closes #2096

* Update public engagement video

- closes #2102
- updates snapshots

* Correct Prioritization copy >= 1
  • Loading branch information
vim-usds authored Dec 12, 2022
1 parent b97e60b commit c5b201e
Show file tree
Hide file tree
Showing 17 changed files with 2,285 additions and 27,269 deletions.
29,312 changes: 2,132 additions & 27,180 deletions client/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"gatsby-plugin-sitemap": "^4.10.0",
"mapbox-gl": "^1.13.2",
"maplibre-gl": "^1.14.0",
"query-string": "^7.1.1",
"query-string": "^7.1.3",
"react": "^17.0.2",
"react-device-detect": "^1.17.0",
"react-dom": "^17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Categories/Categories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const Categories = () => {
<h2>{METHODOLOGY_COPY.CATEGORY.HEADING}</h2>
<p>{intl.formatMessage(METHODOLOGY_COPY.PAGE.PARA3)}</p>
<p>{intl.formatMessage(METHODOLOGY_COPY.PAGE.PARA4)}</p>
<p>{METHODOLOGY_COPY.FORMULA.PARA4}</p>
<p>{METHODOLOGY_COPY.FORMULA.PARA6}</p>
</Grid>
</Grid>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ exports[`rendering of indicator dataset card checks if component renders 1`] = `
<span>
Used in:
</span>
All categories except for the training and workforce development category
All categories except for the workforce development category
</li>
<li>
<span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
<span>
Used in:
</span>
All categories except for the training and workforce development category
All categories except for the workforce development category
</li>
<li>
<span>
Expand Down
28 changes: 23 additions & 5 deletions client/src/components/PrioritizationCopy2/PrioritizationCopy2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,30 @@ const PrioritizationCopy2 =
) {
// if 2-1
if (percentTractTribal !== null && percentTractTribal == 0) {
prioCopy2Rendered = EXPLORE_COPY.getPrioFRTCopy(`less than 1%`, true);
prioCopy2Rendered = EXPLORE_COPY.getPrioFRTCopy(`less than 1%`, false);
// if 2-2
} else if (percentTractTribal !== null && percentTractTribal >= 0) {
prioCopy2Rendered = EXPLORE_COPY.getPrioFRTCopy(`${percentTractTribal}%`, true);
} else if (percentTractTribal !== null && percentTractTribal >= 1) {
prioCopy2Rendered = EXPLORE_COPY.getPrioFRTCopy(`${percentTractTribal}%`, false);
}
// if 3
// if 3-1
} else if (
totalCategoriesPrioritized === 0 &&
(isAdjacencyThreshMet && !isAdjacencyLowIncome) &&
tribalCountAK === null &&
(tribalCountUS !== null && tribalCountUS >= 1) &&
(percentTractTribal !== null && percentTractTribal == 0)
) {
prioCopy2Rendered = EXPLORE_COPY.getPrioFRTPointsCopy(tribalCountUS, false);
// if 3-2
} else if (
totalCategoriesPrioritized === 0 &&
(isAdjacencyThreshMet && !isAdjacencyLowIncome) &&
tribalCountAK === null &&
(tribalCountUS !== null && tribalCountUS >= 1) &&
(percentTractTribal !== null && percentTractTribal >= 1)
) {
prioCopy2Rendered = EXPLORE_COPY.getPrioFRTPointsCopy(tribalCountUS, false);
// if 3-3
} else if (
(totalCategoriesPrioritized === 0 && !(isAdjacencyThreshMet && isAdjacencyLowIncome)) &&
tribalCountAK === null &&
Expand All @@ -146,7 +164,7 @@ const PrioritizationCopy2 =
isAdjacencyThreshMet && !isAdjacencyLowIncome &&
(tribalCountAK !== null && tribalCountAK >= 1)
) {
prioCopy2Rendered = EXPLORE_COPY.getPrioANVCopy(tribalCountAK, true);
prioCopy2Rendered = EXPLORE_COPY.getPrioANVCopy(tribalCountAK, false);
} else {
prioCopy2Rendered = <></>;
noStyles = true;
Expand Down
9 changes: 5 additions & 4 deletions client/src/components/PublicVideoBox/PublicVideoBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ import launchIcon from '/node_modules/uswds/dist/img/usa-icons/launch.svg';

interface IPublicVideoBox {
isBeta: boolean,
youTubeLink: string,
}

const PublicVideoBox = ({isBeta}:IPublicVideoBox) => {
const PublicVideoBox = ({isBeta, youTubeLink}:IPublicVideoBox) => {
const intl = useIntl();

return (
Expand All @@ -32,7 +33,7 @@ const PublicVideoBox = ({isBeta}:IPublicVideoBox) => {
{isBeta ? PUBLIC_COPY.RICH_COPY.VIDEO_BOX_BODY2 : PUBLIC_COPY.RICH_COPY.VIDEO_BOX_BODY1}
<a
className={styles.publicVideoLink}
href={`https://www.youtube.com/watch?v=QwHWcXbhw28`}
href={youTubeLink}
target={'_blank'}
rel="noreferrer"
>
Expand All @@ -55,15 +56,15 @@ const PublicVideoBox = ({isBeta}:IPublicVideoBox) => {
</div>
</Button>
</a>
<DownloadButton
{isBeta && <DownloadButton
downloadLink={getDownloadFileUrl(process.env.GATSBY_FILE_DL_PATH_BETA_TRAINING_SLIDES_PPT, true)}
buttonText={isBeta ?
intl.formatMessage(PUBLIC_COPY.PUBLIC_ENG_VIDEO.BUTTON2_BETA_TEXT) :
intl.formatMessage(PUBLIC_COPY.PUBLIC_ENG_VIDEO.BUTTON2_TEXT)
}
imageAltTagText={intl.formatMessage(PUBLIC_COPY.PUBLIC_ENG_VIDEO.IMG_ALT_TEXT2)}
color={isBeta ? 'gray' : 'yellow'}
/>
/>}
</SummaryBoxContent>
</SummaryBox>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ exports[`rendering of the PublicVideoBox checks if component renders when it is
<h2
class="usa-summary-box__heading"
>
Need information about the latest version of the tool?
What's new overview
</h2>
<div
class="usa-summary-box__text"
>
See what's new in the version 1.0 of the Climate and Economic Justice Screening tool.
Watch a recorded update from CEQ on the changes in the 1.0 version of the tool.
<a
href="https://www.youtube.com/watch?v=QwHWcXbhw28"
rel="noreferrer"
target="_blank"
>
Expand All @@ -41,26 +40,6 @@ exports[`rendering of the PublicVideoBox checks if component renders when it is
</div>
</button>
</a>
<a
download=""
href="//"
>
<button
class="usa-button"
data-testid="button"
type="button"
>
<div>
<div>
Download slide deck
</div>
<img
alt="the icon to show that this button will download the file"
src="test-file-stub"
/>
</div>
</button>
</a>
</div>
</div>
</div>
Expand Down Expand Up @@ -88,7 +67,6 @@ exports[`rendering of the PublicVideoBox checks if component renders when it is
Watch a recorded version of the beta version of the CEJST training on YouTube.
<a
href="https://www.youtube.com/watch?v=QwHWcXbhw28"
rel="noreferrer"
target="_blank"
>
Expand Down
2 changes: 1 addition & 1 deletion client/src/data/copy/common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const HEADER = defineMessages({
description: 'Navigate to the about page. This is Header navigate item to the technical support document page',
},
PREVIOUS_VERSIONS: {
id: 'common.pages.header.tsd',
id: 'common.pages.header.previous_versions',
defaultMessage: 'Previous versions',
description: 'Navigate to the about page. This is Header navigate item to the technical support document page',
},
Expand Down
34 changes: 9 additions & 25 deletions client/src/data/copy/explore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export const SIDE_PANEL_INITIAL_STATE = defineMessages({
description: '`Navigate to the explore the map page. When the map is in view, click on the map. The side panel will show search',
},
PARA1_PART3: {
id: 'explore.map.page.side.panel.info.para.1.part.2',
id: 'explore.map.page.side.panel.info.para.1.part.3',
defaultMessage: `
, or locate yourself
`,
Expand Down Expand Up @@ -296,7 +296,7 @@ export const SIDE_PANEL_INITIAL_STATE = defineMessages({
description: '`Navigate to the explore the map page. When the map is in view, click on the map. The side panel will show Census tracts are a small unit of geography. They generally have populations of between 1,200 - 8,000 people.',
},
PARA2_PART3: {
id: 'explore.map.page.side.panel.info.para.2.part.2',
id: 'explore.map.page.side.panel.info.para.2.part.3',
defaultMessage: `
of between 1,200 - 8,000 people.
`,
Expand Down Expand Up @@ -359,14 +359,14 @@ export const SIDE_PANEL_INITIAL_STATE = defineMessages({
description: '`Navigate to the explore the map page. When the map is in view, click on the map. The side panel will show Thresholds, or cutoffs, are used to determine if communities in a tract are disadvantaged. Certain burdens use percentages or a simple yes/no.',
},
PARA6_PART1: {
id: 'explore.map.page.side.panel.info.para.6',
id: 'explore.map.page.side.panel.info.para.6.part1',
defaultMessage: `
Land within the boundaries of Federally Recognized Tribes and point locations for Alaska Native Villages are highlighted
`,
description: '`Navigate to the explore the map page. When the map is in view, click on the map. The side panel will show Federally Recognized Tribal lands are also highlighted on the map. These communities are also considered disadvantaged.',
},
PARA6_PART2: {
id: 'explore.map.page.side.panel.info.para.6',
id: 'explore.map.page.side.panel.info.para.6.part2',
defaultMessage: `
on the map. These communities are also considered disadvantaged.
`,
Expand Down Expand Up @@ -662,7 +662,7 @@ export const getPrioNBurdenCopy = (burdens:string) => {
export const getPrioFRTCopy = (amount:string, isAlso:boolean = false) => {
return (
<FormattedMessage
id={'explore.map.page.side.panel.prio.copy.prio.frt.n.perc'}
id={'explore.map.page.side.panel.prio.copy.prio.frt'}
defaultMessage={ 'The lands of Federally Recognized Tribes that cover {amount} of this tract are {also} considered disadvantaged.'}
description={`Navigate to the explore the map page. Click on tract, The lands of Federally Recognized Tribes that cover [#%] of this tract are considered disadvantaged.`}
values={{
Expand All @@ -677,7 +677,7 @@ export const getPrioFRTCopy = (amount:string, isAlso:boolean = false) => {
export const getPrioFRTPointsCopy = (numPoints:string, isAlso:boolean = false) => {
return (
<FormattedMessage
id={'explore.map.page.side.panel.prio.copy.prio.frt.n.perc'}
id={'explore.map.page.side.panel.prio.copy.prio.frt.n.points'}
defaultMessage={ 'The {numPoints} that are Federally Recognized Tribes in this tract are are {also} considered disadvantaged.'}
description={`Navigate to the explore the map page. Click on tract, The {numPoints} that are Federally Recognized Tribes in this tract ares are {also} considered disadvantaged.`}
values={{
Expand All @@ -692,7 +692,7 @@ export const getPrioFRTPointsCopy = (numPoints:string, isAlso:boolean = false) =
export const getPrioANVCopy = (numPoints:number, isAlso:boolean = false) => {
return (
<FormattedMessage
id={'explore.map.page.side.panel.prio.copy.prio.frt.n.perc'}
id={'explore.map.page.side.panel.prio.copy.prio.anv'}
defaultMessage={ 'The {numPoints} Alaska Native Villages in this tract that are Federally Recognized are {also} considered disadvantaged.'}
description={`Navigate to the explore the map page. Click on tract, The {numPoints} of this tract that are Federally Recognized Tribal lands are {also} considered disadvantaged.`}
values={{
Expand All @@ -707,7 +707,7 @@ export const getPrioANVCopy = (numPoints:number, isAlso:boolean = false) => {
export const getPrioAKUSCopy = (numAKpoints:number, numUSpoints:number, isAlso:boolean = false) => {
return (
<FormattedMessage
id={'explore.map.page.side.panel.prio.copy.prio.frt.n.perc'}
id={'explore.map.page.side.panel.prio.copy.prio.akus'}
defaultMessage={ 'The {numAKpoints} Alaska Native Villages and the {numUSpoints} tribes in this tract that are Federally Recognized are {also} considered disadvantaged.'}
description={`Navigate to the explore the map page. Click on tract, The {numAKpoints} Alaska Native Villages and the {numUSpoints} tribes in this tract that are Federally Recognized are considered disadvantaged.`}
values={{
Expand All @@ -723,7 +723,7 @@ export const getPrioAKUSCopy = (numAKpoints:number, numUSpoints:number, isAlso:b
export const getPrioPercAndNumPointsAlsoCopy = (amount:string, numPoints:number) => {
return (
<FormattedMessage
id={'explore.map.page.side.panel.prio.copy.prio.frt.n.perc'}
id={'explore.map.page.side.panel.prio.copy.prio.perc.num.points'}
defaultMessage={ 'The lands of Federally Recognized Tribes that cover {amount} of this tract and the {numPoints} tribes that are Federally Recognized are also considered disadvantaged.'}
description={`Navigate to the explore the map page. Click on tract, The Federally Recognized Tribal lands that cover {amount} of this tract and the {numPoints} tribes that are Federally Recognized are also considered disadvantaged.`}
values={{
Expand Down Expand Up @@ -1337,22 +1337,6 @@ export const SIDE_PANEL_INDICATOR_DESCRIPTION = defineMessages({
`,
description: `Navigate to the explore the map page. When the map is in view, click on the map. The side panel will show an indicator description of Percent of people ages 25 years or older who did not graduate high school`,
},

// Testing
ADJ: {
id: 'explore.map.page.side.panel.indicator.description.ling.iso',
defaultMessage: `
Adjacency percentile?
`,
description: `Navigate to the explore the map page. When the map is in view, click on the map. The side panel will show an indicator about adjacency`,
},
IMP_FLG: {
id: 'explore.map.page.side.panel.indicator.description.ling.iso',
defaultMessage: `
A flag to inform imputation?
`,
description: `Navigate to the explore the map page. When the map is in view, click on the map. The side panel will show an indicator about adjacency`,
},
});

export const SIDE_PANEL_SPACERS = {
Expand Down
6 changes: 3 additions & 3 deletions client/src/data/copy/methodology.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ export const FORMULA = {
boldtag: boldFn,
}}
/>,
PARA4: <FormattedMessage
id={'methodology.page.paragraph.4'}
PARA6: <FormattedMessage
id={'methodology.page.paragraph.6'}
defaultMessage={`
Census tracts are small units of geography. Census tract boundaries for <link1>statistical areas</link1> are determined by the U.S. Census Bureau once every ten years. The tool utilizes the census tract boundaries from 2010. This was chosen because many of the data sources in the tool currently use the 2010
census boundaries.
Expand Down Expand Up @@ -161,7 +161,7 @@ export const CATEGORIES = {
/>,
ALL_EXCEPT_WORKFORCE: <FormattedMessage
id={'methodology.page.datasets.all.except.workforce.used.in.text'}
defaultMessage={`All categories except for the training and workforce development category`}
defaultMessage={`All categories except for the workforce development category`}
description={'Navigate to the methodology page. Navigate to the dataset section. This is the portion of the dataset card Used In text for all methodologies except the workforce development'}
/>,
CLIMATE_CHANGE: {
Expand Down
2 changes: 1 addition & 1 deletion client/src/data/copy/previousVer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const PAGE = defineMessages({

export const CARD = {
TITLE: <FormattedMessage
id={'previous.versions.page.title.text'}
id={'previous.versions.page.card.text'}
defaultMessage={'Beta version'}
description={'Navigate to the previous version page. This is the Cards title text'}
/>,
Expand Down
6 changes: 3 additions & 3 deletions client/src/data/copy/publicEngage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const RICH_COPY = {
PAGE_DESCRIPTION3: <FormattedMessage
id= {`public.eng.page.description3.text`}
defaultMessage={`
As they become available, additional public trainings and engagement opportunities on the Climate and Economic Justice Screening Tool will also be posted on this page. <link1>Sign-up</link1> for updates from CEQ
As they become available, additional public trainings and engagement opportunities on the Climate and Economic Justice Screening Tool will also be posted on this page. <link1>Sign-up</link1> for updates from CEQ.
`}
description={`Navigate to the public engagement page, this will be the publiceng page description 3 text`}
values={{
Expand All @@ -97,7 +97,7 @@ export const RICH_COPY = {
VIDEO_BOX_BODY1: <FormattedMessage
id={ 'public.eng.page.video.box.body.text'}
defaultMessage={ `
See what's new in the version {version} of the Climate and Economic Justice Screening tool.
Watch a recorded update from CEQ on the changes in the 1.0 version of the tool.
`}
description={'Navigate to the public engagement page, there will be box that allows users to watch previously recorded videos. This is that box body text.'}
values={{
Expand All @@ -119,7 +119,7 @@ export const RICH_COPY = {
export const PUBLIC_ENG_VIDEO = defineMessages({
TITLE: {
id: 'public.eng.page.video.box.title.text',
defaultMessage: `Need information about the latest version of the tool?`,
defaultMessage: `What's new overview`,
description: 'Navigate to the public engagement page, there will be box that allows users to watch previously recorded videos. This is that box title text.',
},
TITLE_BETA: {
Expand Down
Loading

0 comments on commit c5b201e

Please sign in to comment.