From 54c41b02a96ca57db9834bccbde3cf3408d5e084 Mon Sep 17 00:00:00 2001 From: Vim USDS Date: Fri, 16 Sep 2022 12:53:19 -0700 Subject: [PATCH] Update links colors - Language links - Download links - Simple links - External links - Side panel demographics links - return to top links - update snapshots --- .../__snapshots__/Categories.test.tsx.snap | 38 +++++++++++++++++ .../__snapshots__/CategoryCard.test.tsx.snap | 5 +++ .../src/components/DatasetContainer/index.tsx | 2 +- .../datasetContainer.test.tsx.snap | 1 + .../DownloadLink/DownloadLink.module.scss | 4 ++ .../DownloadLink.module.scss.d.ts | 1 + .../components/DownloadLink/DownloadLink.tsx | 2 +- .../__snapshots__/howYouCanHelp.test.tsx.snap | 1 + .../__snapshots__/J40Footer.spec.tsx.snap | 2 +- .../components/Language/Language.module.scss | 2 + .../LinkTypeWrapper/LinkTypeWrapper.tsx | 2 +- .../linkTypeWrapper.test.tsx.snap | 1 + .../components/SubPageNav/SubPageNav.test.tsx | 8 ++-- .../TractDemographics.module.scss | 2 +- client/src/data/copy/common.tsx | 2 +- .../tests/__snapshots__/about.test.tsx.snap | 4 +- .../tests/__snapshots__/contact.test.tsx.snap | 3 +- .../__snapshots__/downloads.test.tsx.snap | 2 +- .../freqAskedQuestions.test.tsx.snap | 2 +- .../__snapshots__/methodology.test.tsx.snap | 41 ++++++++++++++++++- .../__snapshots__/publicEng.test.tsx.snap | 2 +- .../techSupportDoc.test.tsx.snap | 2 +- 22 files changed, 112 insertions(+), 17 deletions(-) diff --git a/client/src/components/Categories/__snapshots__/Categories.test.tsx.snap b/client/src/components/Categories/__snapshots__/Categories.test.tsx.snap index d414c3da..58c63e41 100644 --- a/client/src/components/Categories/__snapshots__/Categories.test.tsx.snap +++ b/client/src/components/Categories/__snapshots__/Categories.test.tsx.snap @@ -43,18 +43,21 @@ exports[`rendering of the Categories checks if component renders 1`] = ` at or above the 90th percentile for expected agriculture loss rate OR expected building loss rate OR expected population loss rate @@ -68,12 +71,14 @@ exports[`rendering of the Categories checks if component renders 1`] = ` is at or above the 65th percentile for low income AND 80% or more of individuals 15 or older are not enrolled in higher education @@ -102,12 +107,14 @@ exports[`rendering of the Categories checks if component renders 1`] = ` at or above the 90th percentile for energy burden OR PM2.5 in the air @@ -121,12 +128,14 @@ exports[`rendering of the Categories checks if component renders 1`] = ` is at or above the 65th percentile for low income AND 80% or more of individuals 15 or older are not enrolled in higher education @@ -157,12 +166,14 @@ exports[`rendering of the Categories checks if component renders 1`] = ` at or above the 90th percentile for diesel particulate matter exposure or traffic proximity and volume @@ -178,12 +189,14 @@ exports[`rendering of the Categories checks if component renders 1`] = ` is at or above the 65th percentile for low income AND 80% or more of individuals 15 or older are not enrolled in higher education @@ -212,18 +225,21 @@ exports[`rendering of the Categories checks if component renders 1`] = ` at or above the 90th percentile for lead paint AND median home value is at or less than the 90th percentile OR at or above the 90th percentile for the housing cost burden @@ -237,12 +253,14 @@ exports[`rendering of the Categories checks if component renders 1`] = ` is at or above the 65th percentile for low income AND 80% or more of individuals 15 or older are not enrolled in higher education @@ -271,18 +289,21 @@ exports[`rendering of the Categories checks if component renders 1`] = ` at or above the 90th percentile for proximity to hazardous waste facilities OR proximity to National Priorities List (NPL) sites OR proximity to Risk Management Plan (RMP) facilities @@ -296,12 +317,14 @@ exports[`rendering of the Categories checks if component renders 1`] = ` is at or above the 65th percentile for low income AND 80% or more of individuals 15 or older are not enrolled in higher education @@ -330,6 +353,7 @@ exports[`rendering of the Categories checks if component renders 1`] = ` at or above the 90th percentile for wastewater discharge @@ -343,12 +367,14 @@ exports[`rendering of the Categories checks if component renders 1`] = ` is at or above the 65th percentile for low income AND 80% or more of individuals 15 or older are not enrolled in higher education @@ -377,24 +403,28 @@ exports[`rendering of the Categories checks if component renders 1`] = ` at or above the 90th percentile for asthma OR diabetes OR heart disease OR low life expectancy @@ -408,12 +438,14 @@ exports[`rendering of the Categories checks if component renders 1`] = ` is at or above the 65th percentile for low income AND 80% or more of individuals 15 or older are not enrolled in higher education @@ -442,24 +474,28 @@ exports[`rendering of the Categories checks if component renders 1`] = ` at or above the 90th percentile for low median income as a percentage of area median income OR linguistic isolation OR unemployment OR percentage of individuals in households at or below 100% Federal poverty @@ -473,12 +509,14 @@ exports[`rendering of the Categories checks if component renders 1`] = ` 10% or more of adults 25 or older have not attained a high school degree AND 80% or more of individuals 15 or older are not enrolled in higher education diff --git a/client/src/components/CategoryCard/__snapshots__/CategoryCard.test.tsx.snap b/client/src/components/CategoryCard/__snapshots__/CategoryCard.test.tsx.snap index 38c8bc95..b3bf5e4b 100644 --- a/client/src/components/CategoryCard/__snapshots__/CategoryCard.test.tsx.snap +++ b/client/src/components/CategoryCard/__snapshots__/CategoryCard.test.tsx.snap @@ -21,18 +21,21 @@ exports[`rendering of the CategoryCard checks if component renders 1`] = ` at or above the 90th percentile for expected agriculture loss rate OR expected building loss rate OR expected population loss rate @@ -46,12 +49,14 @@ exports[`rendering of the CategoryCard checks if component renders 1`] = ` is at or above the 65th percentile for low income AND 80% or more of individuals 15 or older are not enrolled in higher education diff --git a/client/src/components/DatasetContainer/index.tsx b/client/src/components/DatasetContainer/index.tsx index f5954e71..52104ffd 100644 --- a/client/src/components/DatasetContainer/index.tsx +++ b/client/src/components/DatasetContainer/index.tsx @@ -44,7 +44,7 @@ const DatasetContainer = () => {
- + {METHODOLOGY_COPY.RETURN_TO_TOP.LINK}
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 441b94a2..f41cc2b1 100644 --- a/client/src/components/DatasetContainer/tests/__snapshots__/datasetContainer.test.tsx.snap +++ b/client/src/components/DatasetContainer/tests/__snapshots__/datasetContainer.test.tsx.snap @@ -1377,6 +1377,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
Return to top diff --git a/client/src/components/DownloadLink/DownloadLink.module.scss b/client/src/components/DownloadLink/DownloadLink.module.scss index e9e3357d..6addebd1 100644 --- a/client/src/components/DownloadLink/DownloadLink.module.scss +++ b/client/src/components/DownloadLink/DownloadLink.module.scss @@ -4,4 +4,8 @@ height: 1rem; vertical-align: middle; filter: invert(57%) sepia(6%) saturate(3932%) hue-rotate(163deg) brightness(86%) contrast(88%); +} + +.downloadStyle { + @include u-color('blue-60v'); } \ No newline at end of file diff --git a/client/src/components/DownloadLink/DownloadLink.module.scss.d.ts b/client/src/components/DownloadLink/DownloadLink.module.scss.d.ts index f409f6c7..59ed4cf8 100644 --- a/client/src/components/DownloadLink/DownloadLink.module.scss.d.ts +++ b/client/src/components/DownloadLink/DownloadLink.module.scss.d.ts @@ -1,6 +1,7 @@ declare namespace DownloadLinkNamespace { export interface IDownloadLink { downloadIcon: string; + downloadStyle: string; } } diff --git a/client/src/components/DownloadLink/DownloadLink.tsx b/client/src/components/DownloadLink/DownloadLink.tsx index 0dec1ecb..6cd553e1 100644 --- a/client/src/components/DownloadLink/DownloadLink.tsx +++ b/client/src/components/DownloadLink/DownloadLink.tsx @@ -27,7 +27,7 @@ const DownloadLink = ({href, linkText}:IDownloadLink) => { } return ( <> - {linkText} + {linkText} View the Methodology & data diff --git a/client/src/components/J40Footer/__snapshots__/J40Footer.spec.tsx.snap b/client/src/components/J40Footer/__snapshots__/J40Footer.spec.tsx.snap index 51884a48..45f40f93 100644 --- a/client/src/components/J40Footer/__snapshots__/J40Footer.spec.tsx.snap +++ b/client/src/components/J40Footer/__snapshots__/J40Footer.spec.tsx.snap @@ -79,7 +79,7 @@ exports[`J40Footer renders correctly 1`] = ` class="usa-footer__secondary-link" > Engagement calendar diff --git a/client/src/components/Language/Language.module.scss b/client/src/components/Language/Language.module.scss index ff9b181d..fdc48027 100644 --- a/client/src/components/Language/Language.module.scss +++ b/client/src/components/Language/Language.module.scss @@ -11,6 +11,8 @@ .languageLink { @include u-display("inline-block"); @include u-margin-left(1.5); + @include u-color('blue-60v'); + cursor: pointer; font-size: .8rem; // government banner text size not a token @include u-padding-top('2px'); diff --git a/client/src/components/LinkTypeWrapper/LinkTypeWrapper.tsx b/client/src/components/LinkTypeWrapper/LinkTypeWrapper.tsx index a2fa0b4f..6f20f7c2 100644 --- a/client/src/components/LinkTypeWrapper/LinkTypeWrapper.tsx +++ b/client/src/components/LinkTypeWrapper/LinkTypeWrapper.tsx @@ -41,7 +41,7 @@ const LinkTypeWrapper = (props:ILinkTypeWrapper) => { if (props.internal) { return ( {props.linkText} diff --git a/client/src/components/LinkTypeWrapper/__snapshots__/linkTypeWrapper.test.tsx.snap b/client/src/components/LinkTypeWrapper/__snapshots__/linkTypeWrapper.test.tsx.snap index 55659d6c..40428c40 100644 --- a/client/src/components/LinkTypeWrapper/__snapshots__/linkTypeWrapper.test.tsx.snap +++ b/client/src/components/LinkTypeWrapper/__snapshots__/linkTypeWrapper.test.tsx.snap @@ -28,6 +28,7 @@ exports[`testing all link types tests external links same tab 1`] = ` exports[`testing all link types tests internal links 1`] = ` test link text diff --git a/client/src/components/SubPageNav/SubPageNav.test.tsx b/client/src/components/SubPageNav/SubPageNav.test.tsx index 48e52516..bd666703 100644 --- a/client/src/components/SubPageNav/SubPageNav.test.tsx +++ b/client/src/components/SubPageNav/SubPageNav.test.tsx @@ -16,8 +16,8 @@ describe('rendering of the SubPageNav', () => { const firstLink = container.querySelector(`.usa-sidenav li:nth-child(${firstLinkActive}) a`); const secondLink = container.querySelector(`.usa-sidenav li:nth-child(${secondLinkIndex}) a`); - expect(firstLink?.className).toBe('usa-current'); - expect(secondLink?.className).not.toBe('usa-current'); + expect(firstLink?.className).toBe('usa-link usa-current'); + expect(secondLink?.className).not.toBe('usa-link usa-current'); }); it('checks if the second link is active', () => { @@ -29,7 +29,7 @@ describe('rendering of the SubPageNav', () => { const firstLink = container.querySelector(`.usa-sidenav li:nth-child(${firstLinkActive}) a`); const secondLink = container.querySelector(`.usa-sidenav li:nth-child(${secondLinkIndex}) a`); - expect(secondLink?.className).toBe('usa-current'); - expect(firstLink?.className).not.toBe('usa-current'); + expect(secondLink?.className).toBe('usa-link usa-current'); + expect(firstLink?.className).not.toBe('usa-link usa-current'); }); }); diff --git a/client/src/components/TractDemographics/TractDemographics.module.scss b/client/src/components/TractDemographics/TractDemographics.module.scss index 2ba7bfca..f3df2229 100644 --- a/client/src/components/TractDemographics/TractDemographics.module.scss +++ b/client/src/components/TractDemographics/TractDemographics.module.scss @@ -37,7 +37,7 @@ //emulate a link cursor:pointer; - color:blue; + @include u-color('blue-60v'); text-decoration:underline; min-width: 45px; diff --git a/client/src/data/copy/common.tsx b/client/src/data/copy/common.tsx index 0e28b248..ace71c9e 100644 --- a/client/src/data/copy/common.tsx +++ b/client/src/data/copy/common.tsx @@ -20,7 +20,7 @@ export interface IDefineMessage { * */ export const italicFn = (str:string) => {str}; export const boldFn = (str:string) => {str}; -export const simpleLink = (href:string) => (str:string) => {str}; +export const simpleLink = (href:string) => (str:string) => {str}; // export const downloadLink = (href:string) => (str:string) => {str}; export const downloadLink = (href:string) => (str:string) => ; // eslint-disable-next-line max-len diff --git a/client/src/pages/tests/__snapshots__/about.test.tsx.snap b/client/src/pages/tests/__snapshots__/about.test.tsx.snap index 0734b65a..eaa577f0 100644 --- a/client/src/pages/tests/__snapshots__/about.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/about.test.tsx.snap @@ -607,6 +607,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis class="j40-aboutcard-sm-link" > Methodology & data @@ -661,6 +662,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis class="j40-aboutcard-sm-link" > Explore the map @@ -888,7 +890,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis class="usa-footer__secondary-link" > Engagement calendar diff --git a/client/src/pages/tests/__snapshots__/contact.test.tsx.snap b/client/src/pages/tests/__snapshots__/contact.test.tsx.snap index cf4e404c..9b1da88a 100644 --- a/client/src/pages/tests/__snapshots__/contact.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/contact.test.tsx.snap @@ -400,6 +400,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis To provide feedback about a specific census tract, either select the send feedback button after selecting a census tract on the Explore the map @@ -535,7 +536,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis class="usa-footer__secondary-link" > Engagement calendar diff --git a/client/src/pages/tests/__snapshots__/downloads.test.tsx.snap b/client/src/pages/tests/__snapshots__/downloads.test.tsx.snap index 4e06dc5d..69542a8b 100644 --- a/client/src/pages/tests/__snapshots__/downloads.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/downloads.test.tsx.snap @@ -533,7 +533,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis class="usa-footer__secondary-link" > Engagement calendar diff --git a/client/src/pages/tests/__snapshots__/freqAskedQuestions.test.tsx.snap b/client/src/pages/tests/__snapshots__/freqAskedQuestions.test.tsx.snap index 6e63debc..76ce190f 100644 --- a/client/src/pages/tests/__snapshots__/freqAskedQuestions.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/freqAskedQuestions.test.tsx.snap @@ -428,7 +428,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis class="usa-footer__secondary-link" > Engagement calendar diff --git a/client/src/pages/tests/__snapshots__/methodology.test.tsx.snap b/client/src/pages/tests/__snapshots__/methodology.test.tsx.snap index 1594619a..1058678f 100644 --- a/client/src/pages/tests/__snapshots__/methodology.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/methodology.test.tsx.snap @@ -471,18 +471,21 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis at or above the 90th percentile for expected agriculture loss rate OR expected building loss rate OR expected population loss rate @@ -496,12 +499,14 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis is at or above the 65th percentile for low income AND 80% or more of individuals 15 or older are not enrolled in higher education @@ -530,12 +535,14 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis at or above the 90th percentile for energy burden OR PM2.5 in the air @@ -549,12 +556,14 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis is at or above the 65th percentile for low income AND 80% or more of individuals 15 or older are not enrolled in higher education @@ -585,12 +594,14 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis at or above the 90th percentile for diesel particulate matter exposure or traffic proximity and volume @@ -606,12 +617,14 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis is at or above the 65th percentile for low income AND 80% or more of individuals 15 or older are not enrolled in higher education @@ -640,18 +653,21 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis at or above the 90th percentile for lead paint AND median home value is at or less than the 90th percentile OR at or above the 90th percentile for the housing cost burden @@ -665,12 +681,14 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis is at or above the 65th percentile for low income AND 80% or more of individuals 15 or older are not enrolled in higher education @@ -699,18 +717,21 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis at or above the 90th percentile for proximity to hazardous waste facilities OR proximity to National Priorities List (NPL) sites OR proximity to Risk Management Plan (RMP) facilities @@ -724,12 +745,14 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis is at or above the 65th percentile for low income AND 80% or more of individuals 15 or older are not enrolled in higher education @@ -758,6 +781,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis at or above the 90th percentile for wastewater discharge @@ -771,12 +795,14 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis is at or above the 65th percentile for low income AND 80% or more of individuals 15 or older are not enrolled in higher education @@ -805,24 +831,28 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis at or above the 90th percentile for asthma OR diabetes OR heart disease OR low life expectancy @@ -836,12 +866,14 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis is at or above the 65th percentile for low income AND 80% or more of individuals 15 or older are not enrolled in higher education @@ -870,24 +902,28 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis at or above the 90th percentile for low median income as a percentage of area median income OR linguistic isolation OR unemployment OR percentage of individuals in households at or below 100% Federal poverty @@ -901,12 +937,14 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis 10% or more of adults 25 or older have not attained a high school degree AND 80% or more of individuals 15 or older are not enrolled in higher education @@ -2292,6 +2330,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
Return to top @@ -2377,7 +2416,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis class="usa-footer__secondary-link" > Engagement calendar diff --git a/client/src/pages/tests/__snapshots__/publicEng.test.tsx.snap b/client/src/pages/tests/__snapshots__/publicEng.test.tsx.snap index 0b7ab9f2..ba998e2e 100644 --- a/client/src/pages/tests/__snapshots__/publicEng.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/publicEng.test.tsx.snap @@ -1026,7 +1026,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis class="usa-footer__secondary-link" > Engagement calendar diff --git a/client/src/pages/tests/__snapshots__/techSupportDoc.test.tsx.snap b/client/src/pages/tests/__snapshots__/techSupportDoc.test.tsx.snap index 1a485e4d..4b1835b3 100644 --- a/client/src/pages/tests/__snapshots__/techSupportDoc.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/techSupportDoc.test.tsx.snap @@ -428,7 +428,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis class="usa-footer__secondary-link" > Engagement calendar