From 9b4d45a96c4c230079f1dce086bf43c60f442af0 Mon Sep 17 00:00:00 2001 From: Vim <86254807+vim-usds@users.noreply.github.com> Date: Thu, 3 Feb 2022 12:39:49 -0500 Subject: [PATCH] Add Send feedback button census track feedback (#1232) * Add send feedback btn to side panel * Update contact page copy * remove redundant constant --- .../AreaDetail/areaDetail.module.scss | 5 +- .../AreaDetail/areaDetail.module.scss.d.ts | 1 + client/src/components/AreaDetail/index.tsx | 37 +++++++++++++-- .../__snapshots__/areaDetail.test.tsx.snap | 16 +++++++ client/src/data/copy/contact.tsx | 46 +++++++++++++++++++ client/src/data/copy/explore.tsx | 22 +++++++-- .../pages/__snapshots__/contact.test.tsx.snap | 37 +++++++++++++++ client/src/pages/contact.tsx | 4 ++ 8 files changed, 156 insertions(+), 12 deletions(-) diff --git a/client/src/components/AreaDetail/areaDetail.module.scss b/client/src/components/AreaDetail/areaDetail.module.scss index 03f644da..d2769082 100644 --- a/client/src/components/AreaDetail/areaDetail.module.scss +++ b/client/src/components/AreaDetail/areaDetail.module.scss @@ -59,9 +59,8 @@ $sidePanelLabelFontColor: #171716; visibility: hidden; } - .feedbackLink { - font-size: small; - @include u-margin-top(1); + .sendFeedbackBtn { + @include u-margin-top(2); } } diff --git a/client/src/components/AreaDetail/areaDetail.module.scss.d.ts b/client/src/components/AreaDetail/areaDetail.module.scss.d.ts index 03e161a5..67efca70 100644 --- a/client/src/components/AreaDetail/areaDetail.module.scss.d.ts +++ b/client/src/components/AreaDetail/areaDetail.module.scss.d.ts @@ -12,6 +12,7 @@ declare namespace MapModuleScssNamespace { showThresholdExceed:string; hideThresholdExceed:string; categoryHeader:string; + sendFeedbackBtn: string; } } diff --git a/client/src/components/AreaDetail/index.tsx b/client/src/components/AreaDetail/index.tsx index 8eec89ed..480af0be 100644 --- a/client/src/components/AreaDetail/index.tsx +++ b/client/src/components/AreaDetail/index.tsx @@ -2,7 +2,7 @@ // External Libs: import React from 'react'; import {useIntl, FormattedMessage} from 'gatsby-plugin-intl'; -import {Accordion} from '@trussworks/react-uswds'; +import {Accordion, Button} from '@trussworks/react-uswds'; // Components: import Category from '../Category'; @@ -13,6 +13,9 @@ import Indicator from '../Indicator'; import * as styles from './areaDetail.module.scss'; import * as constants from '../../data/constants'; import * as EXPLORE_COPY from '../../data/copy/explore'; +import * as CONTACT_COPY from '../../data/copy/contact'; +// @ts-ignore +// import mailIcon from '/node_modules/uswds/dist/img/usa-icons/mail.svg'; interface IAreaDetailProps { properties: constants.J40Properties, @@ -48,6 +51,10 @@ const AreaDetail = ({properties}:IAreaDetailProps) => { const isCommunityFocus = score >= constants.SCORE_BOUNDARY_THRESHOLD; + const feedbackEmailSubject = `Census tract ID ${blockGroup}, ${countyName}, ${stateName}`; + const feedbackEmailBody = intl.formatMessage(EXPLORE_COPY.SEND_FEEDBACK.EMAIL_BODY); + + // Define each indicator in the side panel with constants from copy file (for intl) // Indicators are grouped by category const expAgLoss:indicatorInfo = { @@ -372,9 +379,13 @@ const AreaDetail = ({properties}:IAreaDetailProps) => { {/* Disadvantaged? */}
+ + To provide feedback about a specific census tract, either select the send feedback button after + finding a tract on the + + Explore the tool + + page or just use the email address provided above. Please + include the census tract ID, county, state or territory information, in addition to your feedback. + +
++ + If there are specific data indicators that could be improved or changed, please include that + information in the body of the email. + +
++ + In addition, you can provide information about data via the + + improvement survey + + . + +
diff --git a/client/src/pages/contact.tsx b/client/src/pages/contact.tsx index a5bc6e34..304c1969 100644 --- a/client/src/pages/contact.tsx +++ b/client/src/pages/contact.tsx @@ -41,6 +41,10 @@ const ContactPage = ({location}: IContactPageProps) => { />, }}/> +{CONTACT_COPY.CENSUS_TRACK_FEEDBACK.PARAGRAPH1}
+{CONTACT_COPY.CENSUS_TRACK_FEEDBACK.PARAGRAPH2}
+{CONTACT_COPY.CENSUS_TRACK_FEEDBACK.PARAGRAPH3}