From e677df794ddac9e600917b9313b1f5c8b0fbf24c Mon Sep 17 00:00:00 2001
From: Vim <86254807+vim-usds@users.noreply.github.com>
Date: Wed, 26 Jan 2022 16:12:33 -0500
Subject: [PATCH] Add external link icons & all outstanding changes from Living
copy (#1173)
* Refactor Footer component
- Make Footer component align to normal folder structure
- Make links in Footer use LinkTypeWrapper, which will allow icon to be added to all external links in one place
* Add Trussworks link to LinkTypeWrapper
* Add icon to SurveyButton comp
* Add launch icon to About page cards
* Add launch icon to FederalRegister link
* Refactor Methodology page
- Add Source and Available for fields to dataset Cards
- refactor data structure for dataset Cards to handle more than 1 source
- update constants file
- modify SASS for source list items
- update snapshots
* Add copy changes; How you can help and territories
* Update methodology section with copy changes
* Swap out all email links with {datasetCardProps.indicator}
+
+ {/* Dataset description */}
-
+
diff --git a/client/src/components/DatasetContainer/tests/__snapshots__/datasetContainer.test.tsx.snap b/client/src/components/DatasetContainer/tests/__snapshots__/datasetContainer.test.tsx.snap
index c2eef2f4..e0ad1bc0 100644
--- a/client/src/components/DatasetContainer/tests/__snapshots__/datasetContainer.test.tsx.snap
+++ b/client/src/components/DatasetContainer/tests/__snapshots__/datasetContainer.test.tsx.snap
@@ -45,29 +45,38 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -79,37 +88,46 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -121,38 +139,47 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
-
+
+
@@ -251,33 +296,42 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -293,32 +347,38 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -335,31 +395,38 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -371,37 +438,43 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -413,34 +486,43 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -456,29 +538,38 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -495,32 +586,42 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -533,35 +634,42 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -578,31 +686,38 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -614,37 +729,43 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -656,37 +777,44 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -704,31 +832,38 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -746,31 +881,38 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -789,10 +931,10 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
Note:
- Unlike most of the other datasets, high values of this indicator indicate low burdens.
- For percentile calculations, the percentile is calculated in reverse order, so that the tract with
- the highest median income relative to area median income (lowest burden on this measure) is at the
- 0th percentile, and the tract with the lowest median income relative to area median income
+ Unlike most of the other datasets, high values of this indicator indicate low burdens.
+ For percentile calculations, the percentile is calculated in reverse order, so that the tract with
+ the highest median income relative to area median income (lowest burden on this measure) is at the
+ 0th percentile, and the tract with the lowest median income relative to area median income
(highest burden on this measure) is at the 100th percentile.
{EXPLORE_COPY.NOTE_ON_TERRITORIES.PARA_1}
{EXPLORE_COPY.NOTE_ON_TERRITORIES.PARA_2}
+{EXPLORE_COPY.NOTE_ON_TERRITORIES.PARA_3}
> diff --git a/client/src/components/SurveyButton/SurveyButton.module.scss b/client/src/components/SurveyButton/SurveyButton.module.scss index cda9d8cc..b2a2c2ad 100644 --- a/client/src/components/SurveyButton/SurveyButton.module.scss +++ b/client/src/components/SurveyButton/SurveyButton.module.scss @@ -15,12 +15,17 @@ @include u-height(6); z-index: 2; - @include u-text("gray-90"); + @include u-text("blue-70v"); @include u-bg("yellow-20v"); &:hover { @include u-bg("yellow-20"); @include u-text("gray-90"); } + + .launchIcon { + height: .8rem; + // @include u-margin-bottom('neg-05'); + } } } diff --git a/client/src/components/SurveyButton/SurveyButton.module.scss.d.ts b/client/src/components/SurveyButton/SurveyButton.module.scss.d.ts index b8c5cbc2..5e9ed98f 100644 --- a/client/src/components/SurveyButton/SurveyButton.module.scss.d.ts +++ b/client/src/components/SurveyButton/SurveyButton.module.scss.d.ts @@ -2,6 +2,7 @@ declare namespace SurveyButtonNamespace { export interface ISurveyButtonScss { surveyButton: string; surveyButtonContainer: string; + launchIcon: string; } } diff --git a/client/src/components/SurveyButton/SurveyButton.tsx b/client/src/components/SurveyButton/SurveyButton.tsx index f2663706..7734c6c3 100644 --- a/client/src/components/SurveyButton/SurveyButton.tsx +++ b/client/src/components/SurveyButton/SurveyButton.tsx @@ -6,6 +6,9 @@ import * as styles from './SurveyButton.module.scss'; import * as CONTACT_COPY from '../../data/copy/contact'; import J40MainGridContainer from '../J40MainGridContainer'; +// @ts-ignore +import launchIcon from '/node_modules/uswds/dist/img/usa-icons-bg/launch--blue-70v.svg'; + export const onClickHandler = () => { Object.assign(document.createElement('a'), {target: '_blank', href: 'https://www.surveymonkey.com/r/cejst-survey'}).click(); }; @@ -19,6 +22,11 @@ const SurveyButton = () => { className={styles.surveyButton} onClick={() => onClickHandler()}> {intl.formatMessage(CONTACT_COPY.PAGE_INTRO.SURVEY_TEXT)} +Note:{` - Unlike most of the other datasets, high values of this indicator indicate low burdens. - For percentile calculations, the percentile is calculated in reverse order, so that the tract with - the highest median income relative to area median income (lowest burden on this measure) is at the - 0th percentile, and the tract with the lowest median income relative to area median income + Unlike most of the other datasets, high values of this indicator indicate low burdens. + For percentile calculations, the percentile is calculated in reverse order, so that the tract with + the highest median income relative to area median income (lowest burden on this measure) is at the + 0th percentile, and the tract with the lowest median income relative to area median income (highest burden on this measure) is at the 100th percentile. `}
, }} />, usedIn: CATEGORIES.HEALTH_BURDENS.METHODOLOGY, - responsibleParty: RESPONSIBLE_PARTIES.CDC_SLEEP, - dateRange: DATE_RANGE.TEN_PLUS_5, + responsibleParty: RESPONSIBLE_PARTIES.CDC, + sources: [ + { + source: SOURCE_LINKS.CDC_SLEEP, + availableFor: AVAILABLE_FOR.ALL_US_DC, + }, + ], }, { domID: 'low-med-inc', @@ -1076,8 +1237,17 @@ export const INDICATORS = [ description= {'description text for workforce dev'} />, usedIn: CATEGORIES.WORKFORCE_DEV.METHODOLOGY, - responsibleParty: RESPONSIBLE_PARTIES.CENSUS_ACS, - dateRange: DATE_RANGE.FIFETEEN_PLUS_4, + responsibleParty: RESPONSIBLE_PARTIES.CENSUS, + sources: [ + { + source: SOURCE_LINKS.CENSUS_ACS_15_19, + availableFor: AVAILABLE_FOR.ALL_US_DC_PR, + }, + { + source: SOURCE_LINKS.CENSUS_ACS_10, + availableFor: AVAILABLE_FOR.AS_NMI, + }, + ], }, { domID: 'ling-iso', @@ -1085,13 +1255,19 @@ export const INDICATORS = [ description:
For general feedback, email
Help improve the site & data
+
diff --git a/client/src/pages/__snapshots__/index.test.tsx.snap b/client/src/pages/__snapshots__/index.test.tsx.snap
index 1e1368c7..d419da4a 100644
--- a/client/src/pages/__snapshots__/index.test.tsx.snap
+++ b/client/src/pages/__snapshots__/index.test.tsx.snap
@@ -319,8 +319,11 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
In
Executive Order 14008
@@ -395,8 +398,11 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
Read more about the Justice40 Initiative in President Biden’s
Executive Order 14008
@@ -587,7 +593,8 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
class="j40-aboutcard-sm-link"
>
Help improve the site & data
+
diff --git a/client/src/pages/__snapshots__/methodology.test.tsx.snap b/client/src/pages/__snapshots__/methodology.test.tsx.snap
index 2808327d..5d885144 100644
--- a/client/src/pages/__snapshots__/methodology.test.tsx.snap
+++ b/client/src/pages/__snapshots__/methodology.test.tsx.snap
@@ -841,29 +841,38 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -875,37 +884,46 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -917,38 +935,47 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
-
+
+
@@ -1047,33 +1092,42 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -1089,32 +1143,38 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -1131,31 +1191,38 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -1167,37 +1234,43 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -1209,34 +1282,43 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -1252,29 +1334,38 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -1291,32 +1382,42 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -1329,35 +1430,42 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -1374,31 +1482,38 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -1410,37 +1525,43 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -1452,37 +1573,44 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -1500,31 +1628,38 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -1542,31 +1677,38 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
+
@@ -1585,10 +1727,10 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
Note:
- Unlike most of the other datasets, high values of this indicator indicate low burdens.
- For percentile calculations, the percentile is calculated in reverse order, so that the tract with
- the highest median income relative to area median income (lowest burden on this measure) is at the
- 0th percentile, and the tract with the lowest median income relative to area median income
+ Unlike most of the other datasets, high values of this indicator indicate low burdens.
+ For percentile calculations, the percentile is calculated in reverse order, so that the tract with
+ the highest median income relative to area median income (lowest burden on this measure) is at the
+ 0th percentile, and the tract with the lowest median income relative to area median income
(highest burden on this measure) is at the 100th percentile.