Skip to content

Commit

Permalink
Update survey links; ref external repo PR #117
Browse files Browse the repository at this point in the history
  • Loading branch information
lscharen committed Jan 30, 2024
1 parent c88df4e commit b116c90
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 29 deletions.
2 changes: 1 addition & 1 deletion client/src/components/AreaDetail/AreaDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ const AreaDetail = ({properties}: IAreaDetailProps) => {
{/* Send Feedback button */}
<a
className={styles.sendFeedbackLink}
href={intl.locale === `es` ? `https://www.surveymonkey.com/r/ZHP6VZZ?tractid=${blockGroup}` : `https://www.surveymonkey.com/r/6GKVCMF?tractid=${blockGroup}`}
href={intl.locale === `es` ? `${constants.CENSUS_TRACT_SURVEY_LINKS.ES}?tractid=${blockGroup}` : `${constants.CENSUS_TRACT_SURVEY_LINKS.EN}?tractid=${blockGroup}`}
target={"_blank"}
rel="noreferrer"
>
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/DatasetContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {hyphenizeString} from '../../../cypress/integration/common/helpers';

import * as styles from './dsContainer.module.scss';
import * as METHODOLOGY_COPY from '../../data/copy/methodology';
import {PAGES_ENDPOINTS} from '../../data/constants';
import {PAGES_ENDPOINTS, DATA_SURVEY_LINKS} from '../../data/constants';
import DatasetsButton from '../DatasetsButton';


Expand All @@ -35,7 +35,7 @@ const DatasetContainer = () => {
<Grid desktop={{col: 1}}>
</Grid>
<Grid desktop={{col: 4}}>
<DatasetsButton href= {intl.locale === 'es' ? 'https://www.surveymonkey.com/r/ZPKY8G9' : 'https://www.surveymonkey.com/r/6G9TQJ8'} />
<DatasetsButton href= {intl.locale === 'es' ? DATA_SURVEY_LINKS.ES : DATA_SURVEY_LINKS.EN} />
</Grid>
</Grid>

Expand Down
5 changes: 3 additions & 2 deletions client/src/components/SurveyButton/SurveyButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ import {Button} from '@trussworks/react-uswds';
import * as styles from './SurveyButton.module.scss';
import * as CONTACT_COPY from '../../data/copy/contact';
import J40MainGridContainer from '../J40MainGridContainer';
import {SITE_SATISFACTION_SURVEY_LINKS} from '../../data/constants';

// @ts-ignore
import launchIcon from '/node_modules/uswds/dist/img/usa-icons/launch.svg';

const SurveyButton = () => {
const intl = useIntl();
const href = intl.locale === 'es' ?
`https://www.surveymonkey.com/r/ZH36CYV` :
`https://www.surveymonkey.com/r/P3LWTSB`;
SITE_SATISFACTION_SURVEY_LINKS.ES :
SITE_SATISFACTION_SURVEY_LINKS.EN;

return (
<J40MainGridContainer className={styles.surveyButtonContainer}>
Expand Down
22 changes: 22 additions & 0 deletions client/src/data/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -357,3 +357,25 @@ export const USWDS_BREAKPOINTS = {
MOBILE_LG: 480,
DESKTOP: 1024,
};

// ********** SURVEY LINKS ***************

export const DATA_SURVEY_LINKS = {
EN: 'https://eop.gov1.qualtrics.com/jfe/form/SV_51EPev2O6jHiaJ8',
ES: 'https://eop.gov1.qualtrics.com/jfe/form/SV_2n0EWXynD1AZyT4',
};

export const SITE_SATISFACTION_SURVEY_LINKS = {
EN: 'https://eop.gov1.qualtrics.com/jfe/form/SV_eA0ZLaxP8gxLfoO',
ES: 'https://eop.gov1.qualtrics.com/jfe/form/SV_bpI7Dn1SBXGOSTY',
};

export const CONTACT_SURVEY_LINKS = {
EN: 'https://eop.gov1.qualtrics.com/jfe/form/SV_cCNgWW4OsfaBlTo',
ES: 'https://eop.gov1.qualtrics.com/jfe/form/SV_2n0EWXynD1AZyT4',
};

export const CENSUS_TRACT_SURVEY_LINKS = {
EN: 'https://eop.gov1.qualtrics.com/jfe/form/SV_8J5wGa8Ya4dMP9c',
ES: 'https://eop.gov1.qualtrics.com/jfe/form/SV_eJXos5X4yekq6cC',
};
14 changes: 7 additions & 7 deletions client/src/data/copy/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {FormattedMessage} from 'gatsby-plugin-intl';

import {italicFn, linkFn} from './common';
import {VERSION_NUMBER} from './methodology';
import {PAGES_ENDPOINTS} from '../constants';
import {PAGES_ENDPOINTS, DATA_SURVEY_LINKS, SITE_SATISFACTION_SURVEY_LINKS, CONTACT_SURVEY_LINKS} from '../constants';

export const EXEC_ORDER_LINK = 'https://www.federalregister.gov/documents/2021/02/01/2021-02177/tackling-the-climate-crisis-at-home-and-abroad#:~:text=Sec.%20223.%20Justice40,40-percent%20goal.';
export const FAQS_LINK = 'https://www.whitehouse.gov/wp-content/uploads/2022/02/CEQ-CEJST-QandA.pdf';
Expand Down Expand Up @@ -251,17 +251,17 @@ export const HOW_YOU_CAN_HELP_LIST_ITEMS = {
defaultMessage={`Provide <link1>general feedback</link1> on the CEJST website`}
description={`Navigate to the about page. You will see How you can help list item 1`}
values={{
link1: linkFn('https://www.surveymonkey.com/r/P3LWTSB', false, true),
link1es: linkFn('https://www.surveymonkey.com/r/ZH36CYV', false, true),
link1: linkFn(SITE_SATISFACTION_SURVEY_LINKS.EN, false, true),
link1es: linkFn(SITE_SATISFACTION_SURVEY_LINKS.ES, false, true),
}}
/>,
LIST_ITEM_2: <FormattedMessage
id={'about.page.how.you.can.help.list.item.2'}
defaultMessage={`Suggest new <link1>data sources</link1>.`}
description={`Navigate to the about page. You will see How you can help list item 2`}
values={{
link1: linkFn('https://www.surveymonkey.com/r/6G9TQJ8', false, true),
link1es: linkFn('https://www.surveymonkey.com/r/ZPKY8G9', false, true),
link1: linkFn(DATA_SURVEY_LINKS.EN, false, true),
link1es: linkFn(DATA_SURVEY_LINKS.ES, false, true),
}}
/>,
LIST_ITEM_3: <FormattedMessage
Expand All @@ -275,8 +275,8 @@ export const HOW_YOU_CAN_HELP_LIST_ITEMS = {
description={`Navigate to the about page. You will see How you can help list item 3`}
values={{
link1: linkFn(PAGES_ENDPOINTS.METHODOLOGY, true, false),
link2: linkFn('https://www.surveymonkey.com/r/5LZ7MNB', false, true),
link2es: linkFn('https://www.surveymonkey.com/r/CGTH5P7', false, true),
link2: linkFn(CONTACT_SURVEY_LINKS.EN, false, true),
link2es: linkFn(CONTACT_SURVEY_LINKS.ES, false, true),
}}
/>,
PARA1: <FormattedMessage
Expand Down
5 changes: 3 additions & 2 deletions client/src/data/copy/contact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React from 'react';
import {defineMessages} from 'react-intl';
import {FormattedDate, FormattedMessage} from 'gatsby-plugin-intl';
import * as COMMON_COPY from './common';
import {CONTACT_SURVEY_LINKS} from '../constants';

export const PAGE_INTRO = defineMessages({
PAGE_TILE: {
Expand Down Expand Up @@ -82,8 +83,8 @@ export const CENSUS_TRACT_FEEDBACK = {
// `}
// description={'Navigate to the survey. Spanish should substitute <link2> to get Spanish link! Already coded to support'}
// values={{
// link1: COMMON_COPY.linkFn('https://www.surveymonkey.com/r/5LZ7MNB', false, true),
// link1es: COMMON_COPY.linkFn('https://www.surveymonkey.com/r/CGTH5P7', false, true),
// link1: COMMON_COPY.linkFn(CONTACT_SURVEY_LINKS.EN, false, true),
// link1es: COMMON_COPY.linkFn(CONTACT_SURVEY_LINKS.ES, false, true),
// }}
// />,
};
Expand Down
6 changes: 3 additions & 3 deletions client/src/data/copy/faqs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import LinkTypeWrapper from '../../components/LinkTypeWrapper';

import {EJSCREEN, EXEC_ORDER_LINK, FED_RECOGNIZED_INDIAN_ENTITIES, CEJST_INSTRUCT, CEJST_MEMO, CEJST_INSTRUCT_ES, CEJST_MEMO_ES} from './about';
import {boldFn, linkFn, FEEDBACK_EMAIL} from './common';
import {PAGES_ENDPOINTS} from '../constants';
import {PAGES_ENDPOINTS, DATA_SURVEY_LINKS, SITE_SATISFACTION_SURVEY_LINKS} from '../constants';
import {EXPLORE_PAGE_LINKS} from './explore';
import {DOWNLOAD_FILES} from './downloads';

Expand Down Expand Up @@ -579,15 +579,15 @@ export const FAQ_ANSWERS = {
defaultMessage={ `The public can also submit <link1>data sources</link1> or ideas for consideration.`}
description={ 'Navigate to the FAQs page, this will be an answer, Q15_P1_2'}
values={{
link1: linkFn('https://www.surveymonkey.com/r/6G9TQJ8', false, true),
link1: linkFn(DATA_SURVEY_LINKS.EN, false, true),
}}
/>,
Q15_P1_3: <FormattedMessage
id={ 'faqs.page.answers.Q15_P1_3'}
defaultMessage={ `The public may also take a <link1>short survey</link1> to help improve the experience of using the tool.`}
description={ 'Navigate to the FAQs page, this will be an answer, Q15_P1_3'}
values={{
link1: linkFn('https://www.surveymonkey.com/r/P3LWTSB', false, true),
link1: linkFn(SITE_SATISFACTION_SURVEY_LINKS.EN, false, true),
}}
/>,
Q15_P1_4: <FormattedMessage
Expand Down
4 changes: 2 additions & 2 deletions client/src/pages/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import SubPageNav from '../components/SubPageNav';

import * as ABOUT_COPY from '../data/copy/about';
import {FEEDBACK_EMAIL} from '../data/copy/common';
import {PAGES_ENDPOINTS, USWDS_BREAKPOINTS} from '../data/constants';
import {PAGES_ENDPOINTS, USWDS_BREAKPOINTS, DATA_SURVEY_LINKS} from '../data/constants';

import accountBalanceIcon // @ts-ignore
from '/node_modules/uswds/dist/img/usa-icons/account_balance.svg';
Expand Down Expand Up @@ -46,7 +46,7 @@ const AboutPage = ({location}: IAboutPageProps) => {

<section className={'page-heading'}>
<h1 data-cy={'about-page-heading'}>{intl.formatMessage(ABOUT_COPY.PAGE.TITLE)}</h1>
<DatasetsButton href= {intl.locale === 'es' ? 'https://www.surveymonkey.com/r/ZPKY8G9' : 'https://www.surveymonkey.com/r/6G9TQJ8'} />
<DatasetsButton href= {intl.locale === 'es' ? DATA_SURVEY_LINKS.ES : DATA_SURVEY_LINKS.EN} />
</section>

<Grid row gap className={'j40-mb5-mt3'}>
Expand Down
3 changes: 2 additions & 1 deletion client/src/pages/contact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import DatasetsButton from '../components/DatasetsButton';

import * as CONTACT_COPY from '../data/copy/contact';
import {FEEDBACK_EMAIL} from '../data/copy/common';
import {DATA_SURVEY_LINKS} from '../data/constants';

interface IContactPageProps {
location: Location;
Expand All @@ -24,7 +25,7 @@ const ContactPage = ({location}: IContactPageProps) => {

<section className={'page-heading'}>
<h1>{intl.formatMessage(CONTACT_COPY.PAGE_INTRO.PAGE_HEADING)}</h1>
<DatasetsButton href= {intl.locale === 'es' ? 'https://www.surveymonkey.com/r/ZPKY8G9' : 'https://www.surveymonkey.com/r/6G9TQJ8'} />
<DatasetsButton href= {intl.locale === 'es' ? DATA_SURVEY_LINKS.ES : DATA_SURVEY_LINKS.EN} />
</section>

<Grid row gap={6}>
Expand Down
4 changes: 2 additions & 2 deletions client/src/pages/downloads.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import ReleaseUpdate from '../components/ReleaseUpdate';
import SubPageNav from '../components/SubPageNav';

import * as DOWNLOADS_COPY from '../data/copy/downloads';
import {PAGES_ENDPOINTS, USWDS_BREAKPOINTS} from '../data/constants';
import {PAGES_ENDPOINTS, USWDS_BREAKPOINTS, DATA_SURVEY_LINKS} from '../data/constants';
interface IDownloadsPageProps {
location: Location;
}
Expand All @@ -26,7 +26,7 @@ const DownloadsPage = ({location}: IDownloadsPageProps) => {

<section className={'page-heading'}>
<h1>{intl.formatMessage(DOWNLOADS_COPY.PAGE_INTRO.PAGE_HEADING1)}</h1>
<DatasetsButton href= {intl.locale === 'es' ? 'https://www.surveymonkey.com/r/ZPKY8G9' : 'https://www.surveymonkey.com/r/6G9TQJ8'} />
<DatasetsButton href= {intl.locale === 'es' ? DATA_SURVEY_LINKS.ES : DATA_SURVEY_LINKS.EN} />
</section>

<Grid row gap className={'j40-mb5-mt3'}>
Expand Down
4 changes: 2 additions & 2 deletions client/src/pages/frequently-asked-questions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Layout from '../components/layout';
import DatasetsButton from '../components/DatasetsButton';
import SubPageNav from '../components/SubPageNav';

import {USWDS_BREAKPOINTS} from '../data/constants';
import {USWDS_BREAKPOINTS, DATA_SURVEY_LINKS} from '../data/constants';
import * as FAQS_COPY from '../data/copy/faqs';
import {PAGES_ENDPOINTS} from '../data/constants';
import {SIDE_PANEL_INIT_STATE_ICON_ALT_TEXT} from '../data/copy/explore';
Expand Down Expand Up @@ -237,7 +237,7 @@ const FAQPage = ({location}: IFAQPageProps) => {

<section className={'page-heading'}>
<h1>{intl.formatMessage(FAQS_COPY.PAGE_INTRO.PAGE_TILE)}</h1>
<DatasetsButton href= {'https://www.surveymonkey.com/r/6G9TQJ8'} />
<DatasetsButton href= {DATA_SURVEY_LINKS.EN} />
</section>

<Grid row gap className={'j40-mb5-mt3'}>
Expand Down
3 changes: 2 additions & 1 deletion client/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Layout from '../components/layout';
import DatasetsButton from '../components/DatasetsButton';

import * as EXPLORE_COPY from '../data/copy/explore';
import {DATA_SURVEY_LINKS} from '../data/constants';

interface IMapPageProps {
location: Location;
Expand All @@ -26,7 +27,7 @@ const ExporeToolPage = ({location}: IMapPageProps) => {

<section className={'page-heading'}>
<h1>{intl.formatMessage(EXPLORE_COPY.PAGE_INTRO.PAGE_HEADING)}</h1>
<DatasetsButton href= {intl.locale === 'es' ? 'https://www.surveymonkey.com/r/ZPKY8G9' : 'https://www.surveymonkey.com/r/6G9TQJ8'} />
<DatasetsButton href= {intl.locale === 'es' ? DATA_SURVEY_LINKS.ES : DATA_SURVEY_LINKS.EN} />
</section>

<Grid row gap className={'j40-mb5-mt3'}>
Expand Down
4 changes: 2 additions & 2 deletions client/src/pages/methodology.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Layout from '../components/layout';
import SubPageNav from '../components/SubPageNav';
import DatasetsButton from '../components/DatasetsButton';

import {USWDS_BREAKPOINTS} from '../data/constants';
import {USWDS_BREAKPOINTS, DATA_SURVEY_LINKS} from '../data/constants';
import * as METHODOLOGY_COPY from '../data/copy/methodology';
import {PAGES_ENDPOINTS} from '../data/constants';

Expand All @@ -29,7 +29,7 @@ const IndexPage = ({location}: MethodPageProps) => {

<section className={'page-heading'}>
<h1>{intl.formatMessage(METHODOLOGY_COPY.PAGE.HEADING)}</h1>
<DatasetsButton href= {intl.locale === 'es' ? 'https://www.surveymonkey.com/r/ZPKY8G9' : 'https://www.surveymonkey.com/r/6G9TQJ8'} />
<DatasetsButton href= {intl.locale === 'es' ? DATA_SURVEY_LINKS.ES : DATA_SURVEY_LINKS.EN} />
</section>

<Grid row gap className={'j40-mt3'}>
Expand Down
4 changes: 2 additions & 2 deletions client/src/pages/previous-versions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import DatasetsButton from '../components/DatasetsButton';
import SubPageNav from '../components/SubPageNav';

import * as PREV_VER_COPY from '../data/copy/previousVer';
import {PAGES_ENDPOINTS, USWDS_BREAKPOINTS} from '../data/constants';
import {PAGES_ENDPOINTS, USWDS_BREAKPOINTS, DATA_SURVEY_LINKS} from '../data/constants';
import {getDownloadFileUrl} from '../data/copy/downloads';

interface IPreviousVersionsProps {
Expand All @@ -33,7 +33,7 @@ const PreviousVersions = ({location}: IPreviousVersionsProps) => {

<section className={'page-heading'}>
<h1 data-cy={'about-page-heading'}>{intl.formatMessage(PREV_VER_COPY.PAGE.TITLE)}</h1>
<DatasetsButton href= {intl.locale === 'es' ? 'https://www.surveymonkey.com/r/ZPKY8G9' : 'https://www.surveymonkey.com/r/6G9TQJ8'} />
<DatasetsButton href= {intl.locale === 'es' ? DATA_SURVEY_LINKS.ES : DATA_SURVEY_LINKS.EN} />
</section>

<Grid row gap className={'j40-mb5-mt3'}>
Expand Down

0 comments on commit b116c90

Please sign in to comment.