diff --git a/.circleci/config.yml b/.circleci/config.yml index 6a6a7a4954..3cc717589d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -133,7 +133,7 @@ parameters: default: "main" type: string sandbox_git_branch: # change to feature branch to test deployment - default: "js-283-frontend-updates" + default: "js-152-browser-controls" type: string jobs: build_and_lint: diff --git a/frontend/package.json b/frontend/package.json index 901c15a1b1..094b4e2845 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -10,7 +10,7 @@ "@fortawesome/free-solid-svg-icons": "^5.15.1", "@fortawesome/react-fontawesome": "^0.1.11", "@hookform/error-message": "^0.0.5", - "@trussworks/react-uswds": "^1.12.2", + "@trussworks/react-uswds": "1.11.0", "@use-it/interval": "^1.0.0", "http-proxy-middleware": "^1.0.5", "lodash": "^4.17.20", diff --git a/frontend/src/components/DatePicker.js b/frontend/src/components/DatePicker.js index 3257e5d87e..b3f579f89c 100644 --- a/frontend/src/components/DatePicker.js +++ b/frontend/src/components/DatePicker.js @@ -14,7 +14,7 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { SingleDatePicker } from 'react-dates'; import { OPEN_UP, OPEN_DOWN } from 'react-dates/constants'; -import { Controller } from 'react-hook-form'; +import { Controller } from 'react-hook-form/dist/index.ie11'; import moment from 'moment'; import './DatePicker.css'; diff --git a/frontend/src/components/FormItem.js b/frontend/src/components/FormItem.js index 70d6635de4..1a44644c5a 100644 --- a/frontend/src/components/FormItem.js +++ b/frontend/src/components/FormItem.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { useFormContext } from 'react-hook-form'; +import { useFormContext } from 'react-hook-form/dist/index.ie11'; import { ErrorMessage as ReactHookFormError } from '@hookform/error-message'; import { Label, FormGroup, ErrorMessage, Fieldset, diff --git a/frontend/src/components/MultiSelect.js b/frontend/src/components/MultiSelect.js index fee1bef4ba..1342438c9d 100644 --- a/frontend/src/components/MultiSelect.js +++ b/frontend/src/components/MultiSelect.js @@ -23,7 +23,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import Select, { components } from 'react-select'; -import { Controller } from 'react-hook-form'; +import { Controller } from 'react-hook-form/dist/index.ie11'; import arrowBoth from '../images/arrow-both.svg'; @@ -34,43 +34,6 @@ const DropdownIndicator = (props) => ( ); -const styles = { - container: (provided, state) => { - // To match the focus indicator provided by uswds - const outline = state.isFocused ? '0.25rem solid #2491ff;' : ''; - return { - ...provided, - outline, - }; - }, - groupHeading: (provided) => ({ - ...provided, - fontWeight: 'bold', - fontFamily: 'SourceSansPro', - textTransform: 'capitalize', - fontSize: '14px', - color: '#21272d', - lineHeight: '22px', - }), - control: (provided, state) => ({ - ...provided, - borderColor: '#565c65', - backgroundColor: 'white', - borderRadius: '0', - '&:hover': { - borderColor: '#565c65', - }, - // Match uswds disabled style - opacity: state.isDisabled ? '0.7' : '1', - }), - indicatorsContainer: (provided) => ({ - ...provided, - // The arrow dropdown icon is too far to the right, this pushes it back to the left - marginRight: '4px', - }), - indicatorSeparator: () => ({ display: 'none' }), -}; - function MultiSelect({ name, options, @@ -83,8 +46,47 @@ function MultiSelect({ rules, multiSelectOptions, onItemSelected, + singleRowInput, components: componentReplacements, }) { + const styles = { + container: (provided, state) => { + // To match the focus indicator provided by uswds + const outline = state.isFocused ? '0.25rem solid #2491ff;' : ''; + return { + ...provided, + outline, + }; + }, + groupHeading: (provided) => ({ + ...provided, + fontWeight: 'bold', + fontFamily: 'SourceSansPro', + textTransform: 'capitalize', + fontSize: '14px', + color: '#21272d', + lineHeight: '22px', + }), + control: (provided, state) => ({ + height: singleRowInput ? '38px' : '', + ...provided, + borderColor: '#565c65', + backgroundColor: 'white', + borderRadius: '0', + '&:hover': { + borderColor: '#565c65', + }, + // Match uswds disabled style + opacity: state.isDisabled ? '0.7' : '1', + }), + indicatorsContainer: (provided) => ({ + ...provided, + // The arrow dropdown icon is too far to the right, this pushes it back to the left + marginRight: '4px', + }), + indicatorSeparator: () => ({ display: 'none' }), + }; + /* * @param {Array || Array} - value array. Either an array of strings or array * of objects @@ -196,6 +198,7 @@ MultiSelect.propTypes = { control: PropTypes.object.isRequired, components: PropTypes.shape({}), onItemSelected: PropTypes.func, + singleRowInput: PropTypes.bool, multiSelectOptions: PropTypes.shape({ isClearable: PropTypes.bool, closeMenuOnSelect: PropTypes.bool, @@ -209,6 +212,7 @@ MultiSelect.propTypes = { MultiSelect.defaultProps = { disabled: false, + singleRowInput: false, required: 'Please select at least one item', simple: true, labelProperty: 'label', diff --git a/frontend/src/components/Navigator/__tests__/index.js b/frontend/src/components/Navigator/__tests__/index.js index 658e3dfea3..b14da33210 100644 --- a/frontend/src/components/Navigator/__tests__/index.js +++ b/frontend/src/components/Navigator/__tests__/index.js @@ -5,7 +5,7 @@ import { render, screen, waitFor, within, } from '@testing-library/react'; -import { useFormContext } from 'react-hook-form'; +import { useFormContext } from 'react-hook-form/dist/index.ie11'; import Navigator from '../index'; import { NOT_STARTED } from '../constants'; diff --git a/frontend/src/components/Navigator/components/SideNav.css b/frontend/src/components/Navigator/components/SideNav.css index d917223677..4d9b4881b6 100644 --- a/frontend/src/components/Navigator/components/SideNav.css +++ b/frontend/src/components/Navigator/components/SideNav.css @@ -1,8 +1,8 @@ .smart-hub--navigator-link-active { - background-color: #f8f8f8; - color: #0166ab; + background-color: rgb(248, 248, 248); + color: rgb(1, 102, 171); font-weight: bold; - border-left: 2px solid #0166ab; + border-left: 2px solid rgb(1, 102, 171); text-decoration-line: none; } @@ -13,45 +13,45 @@ width: 100%; height: 100%; font-size: 16px; - color: #12549d; + color: rgb(18, 84, 157); line-height: 24px; } .smart-hub--navigator-list { list-style-type: none; - padding-inline-start: 0; + padding-left: 0; margin: 0; } .smart-hub--navigator-item { width: 100%; height: 40px; - color: #0166ab; + color: rgb(1, 102, 171); } .smart-hub--tag-not-started { background-color: #eceef1; - color: #21272dc1; + color: rgba(33, 39, 45, 0.76); } .smart-hub--tag-in-progress { - background-color: #e2eff7; - color: #0166ab; + background-color: rgb(226, 239, 247); + color: rgb(1, 102, 171); } .smart-hub--tag-complete { - background-color: #e6faedb0; - color: #3a7e5a; + background-color: rgba(230, 250, 237, 0.69); + color: rgb(58, 126, 90); } .smart-hub--tag-submitted { - background-color: #0166ab; - color: #f8f8f8; + background-color: rgb(1, 102, 171); + color: rgb(248, 248, 248); } .smart-hub--tag-needs-action { - background-color: #f9e0e4; - color: #d42240; + background-color: rgb(249, 224, 228); + color: rgb(212, 34, 64); } .smart-hub--tag { @@ -67,7 +67,7 @@ font-family: Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif; font-size: 1.06rem; line-height: 1.5; - color: #005ea2; + color: rgb(0, 94, 162); text-decoration: underline; background: transparent; left: 0; diff --git a/frontend/src/components/Navigator/index.js b/frontend/src/components/Navigator/index.js index 3fe2d420ed..b05bed5950 100644 --- a/frontend/src/components/Navigator/index.js +++ b/frontend/src/components/Navigator/index.js @@ -6,7 +6,7 @@ */ import React, { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; -import { FormProvider, useForm } from 'react-hook-form'; +import { FormProvider, useForm } from 'react-hook-form/dist/index.ie11'; import { Form, Button, diff --git a/frontend/src/components/__tests__/DatePicker.js b/frontend/src/components/__tests__/DatePicker.js index c5e2fc2b79..72a97993e0 100644 --- a/frontend/src/components/__tests__/DatePicker.js +++ b/frontend/src/components/__tests__/DatePicker.js @@ -4,7 +4,7 @@ import { render, screen, fireEvent, waitFor, } from '@testing-library/react'; -import { useForm } from 'react-hook-form'; +import { useForm } from 'react-hook-form/dist/index.ie11'; import DatePicker from '../DatePicker'; // react-dates when opening the calendar in these tests. For details see diff --git a/frontend/src/components/__tests__/MutliSelect.js b/frontend/src/components/__tests__/MutliSelect.js index f08786654e..73abf56c46 100644 --- a/frontend/src/components/__tests__/MutliSelect.js +++ b/frontend/src/components/__tests__/MutliSelect.js @@ -3,7 +3,7 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; import selectEvent from 'react-select-event'; import { act } from 'react-dom/test-utils'; -import { useForm } from 'react-hook-form'; +import { useForm } from 'react-hook-form/dist/index.ie11'; import userEvent from '@testing-library/user-event'; import { Label } from '@trussworks/react-uswds'; diff --git a/frontend/src/fetchers/index.js b/frontend/src/fetchers/index.js index 5b3a26eba6..edb25fcd03 100644 --- a/frontend/src/fetchers/index.js +++ b/frontend/src/fetchers/index.js @@ -10,6 +10,10 @@ export class HTTPError extends Error { export const get = async (url) => { const res = await fetch(url, { credentials: 'same-origin', + headers: { + 'Cache-Control': 'no-cache', + Pragma: 'no-cache', + }, }); if (!res.ok) { throw new HTTPError(res.status, res.statusText); diff --git a/frontend/src/pages/ActivityReport/Pages/Review/Approver/Review.js b/frontend/src/pages/ActivityReport/Pages/Review/Approver/Review.js index b741cd770a..c93acf432e 100644 --- a/frontend/src/pages/ActivityReport/Pages/Review/Approver/Review.js +++ b/frontend/src/pages/ActivityReport/Pages/Review/Approver/Review.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { useFormContext } from 'react-hook-form'; +import { useFormContext } from 'react-hook-form/dist/index.ie11'; import _ from 'lodash'; import { Dropdown, Form, Label, Fieldset, Textarea, Alert, Button, diff --git a/frontend/src/pages/ActivityReport/Pages/Review/Approver/__tests__/index.js b/frontend/src/pages/ActivityReport/Pages/Review/Approver/__tests__/index.js index 8c744b54df..f42238ef23 100644 --- a/frontend/src/pages/ActivityReport/Pages/Review/Approver/__tests__/index.js +++ b/frontend/src/pages/ActivityReport/Pages/Review/Approver/__tests__/index.js @@ -3,7 +3,7 @@ import '@testing-library/jest-dom'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; -import { FormProvider, useForm } from 'react-hook-form'; +import { FormProvider, useForm } from 'react-hook-form/dist/index.ie11'; import Approver from '../index'; import { REPORT_STATUSES } from '../../../../../../Constants'; diff --git a/frontend/src/pages/ActivityReport/Pages/Review/ReviewItem.js b/frontend/src/pages/ActivityReport/Pages/Review/ReviewItem.js index dc287d97f2..7f66804cdb 100644 --- a/frontend/src/pages/ActivityReport/Pages/Review/ReviewItem.js +++ b/frontend/src/pages/ActivityReport/Pages/Review/ReviewItem.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import _ from 'lodash'; -import { useFormContext } from 'react-hook-form'; +import { useFormContext } from 'react-hook-form/dist/index.ie11'; const ReviewItem = ({ label, name, path }) => { const { watch } = useFormContext(); diff --git a/frontend/src/pages/ActivityReport/Pages/Review/ReviewPage.js b/frontend/src/pages/ActivityReport/Pages/Review/ReviewPage.js index 0be343f134..4e598953fb 100644 --- a/frontend/src/pages/ActivityReport/Pages/Review/ReviewPage.js +++ b/frontend/src/pages/ActivityReport/Pages/Review/ReviewPage.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { some } from 'lodash'; -import { useFormContext } from 'react-hook-form'; +import { useFormContext } from 'react-hook-form/dist/index.ie11'; import Section from './ReviewSection'; import ReviewItem from './ReviewItem'; diff --git a/frontend/src/pages/ActivityReport/Pages/Review/Submitter/Draft.js b/frontend/src/pages/ActivityReport/Pages/Review/Submitter/Draft.js index b32f9e40e6..c08f072099 100644 --- a/frontend/src/pages/ActivityReport/Pages/Review/Submitter/Draft.js +++ b/frontend/src/pages/ActivityReport/Pages/Review/Submitter/Draft.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { useFormContext } from 'react-hook-form'; +import { useFormContext } from 'react-hook-form/dist/index.ie11'; import { Dropdown, Form, Fieldset, Textarea, Button, } from '@trussworks/react-uswds'; diff --git a/frontend/src/pages/ActivityReport/Pages/Review/Submitter/__tests__/index.js b/frontend/src/pages/ActivityReport/Pages/Review/Submitter/__tests__/index.js index e7b1d36b7a..383a83e5cf 100644 --- a/frontend/src/pages/ActivityReport/Pages/Review/Submitter/__tests__/index.js +++ b/frontend/src/pages/ActivityReport/Pages/Review/Submitter/__tests__/index.js @@ -3,7 +3,7 @@ import '@testing-library/jest-dom'; import { render, screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; -import { useForm, FormProvider } from 'react-hook-form'; +import { useForm, FormProvider } from 'react-hook-form/dist/index.ie11'; import Submitter from '../index'; import { REPORT_STATUSES } from '../../../../../../Constants'; diff --git a/frontend/src/pages/ActivityReport/Pages/Review/__tests__/ReviewPage.js b/frontend/src/pages/ActivityReport/Pages/Review/__tests__/ReviewPage.js index cbc0182181..c6a5bcf530 100644 --- a/frontend/src/pages/ActivityReport/Pages/Review/__tests__/ReviewPage.js +++ b/frontend/src/pages/ActivityReport/Pages/Review/__tests__/ReviewPage.js @@ -3,7 +3,7 @@ import React from 'react'; import '@testing-library/jest-dom'; import { render, screen } from '@testing-library/react'; import { BrowserRouter } from 'react-router-dom'; -import { FormProvider, useForm } from 'react-hook-form'; +import { FormProvider, useForm } from 'react-hook-form/dist/index.ie11'; import ReviewPage from '../ReviewPage'; const sections = [ diff --git a/frontend/src/pages/ActivityReport/Pages/Review/__tests__/index.js b/frontend/src/pages/ActivityReport/Pages/Review/__tests__/index.js index b6bcfc735a..3fb4b5f347 100644 --- a/frontend/src/pages/ActivityReport/Pages/Review/__tests__/index.js +++ b/frontend/src/pages/ActivityReport/Pages/Review/__tests__/index.js @@ -3,7 +3,7 @@ import '@testing-library/jest-dom'; import { render, screen, waitFor } from '@testing-library/react'; import React from 'react'; import userEvent from '@testing-library/user-event'; -import { FormProvider, useForm } from 'react-hook-form'; +import { FormProvider, useForm } from 'react-hook-form/dist/index.ie11'; import ReviewSubmit from '../index'; import { REPORT_STATUSES } from '../../../../../Constants'; diff --git a/frontend/src/pages/ActivityReport/Pages/__tests__/goalsObjectives.js b/frontend/src/pages/ActivityReport/Pages/__tests__/goalsObjectives.js index 8763f7af53..ff164cc8bc 100644 --- a/frontend/src/pages/ActivityReport/Pages/__tests__/goalsObjectives.js +++ b/frontend/src/pages/ActivityReport/Pages/__tests__/goalsObjectives.js @@ -3,7 +3,7 @@ import '@testing-library/jest-dom'; import { render, screen } from '@testing-library/react'; import fetchMock from 'fetch-mock'; import React from 'react'; -import { FormProvider, useForm } from 'react-hook-form'; +import { FormProvider, useForm } from 'react-hook-form/dist/index.ie11'; import join from 'url-join'; import { Router } from 'react-router-dom'; import { createMemoryHistory } from 'history'; diff --git a/frontend/src/pages/ActivityReport/Pages/__tests__/topicsResources.js b/frontend/src/pages/ActivityReport/Pages/__tests__/topicsResources.js index 75e0f52198..b43bb9cc06 100644 --- a/frontend/src/pages/ActivityReport/Pages/__tests__/topicsResources.js +++ b/frontend/src/pages/ActivityReport/Pages/__tests__/topicsResources.js @@ -2,7 +2,7 @@ import '@testing-library/jest-dom'; import { render, screen } from '@testing-library/react'; import React from 'react'; -import { FormProvider, useForm } from 'react-hook-form'; +import { FormProvider, useForm } from 'react-hook-form/dist/index.ie11'; import { Router } from 'react-router-dom'; import { createMemoryHistory } from 'history'; diff --git a/frontend/src/pages/ActivityReport/Pages/activitySummary.js b/frontend/src/pages/ActivityReport/Pages/activitySummary.js index 6959673bf1..4acdacae2f 100644 --- a/frontend/src/pages/ActivityReport/Pages/activitySummary.js +++ b/frontend/src/pages/ActivityReport/Pages/activitySummary.js @@ -1,7 +1,7 @@ import React, { useEffect, useRef } from 'react'; import PropTypes from 'prop-types'; import { Helmet } from 'react-helmet'; -import { useFormContext } from 'react-hook-form'; +import { useFormContext } from 'react-hook-form/dist/index.ie11'; import { isEmpty } from 'lodash'; import { @@ -265,6 +265,7 @@ const ActivitySummary = ({ register({ required: 'Please enter the duration of the activity', valueAsNumber: true, + pattern: { value: /^\d+(\.[0,5]{1})?$/, message: 'Duration must be rounded to the nearest half hour' }, min: { value: 0, message: 'Duration can not be negative' }, }) } diff --git a/frontend/src/pages/ActivityReport/Pages/components/GoalInput.js b/frontend/src/pages/ActivityReport/Pages/components/GoalInput.js index bba8604447..3c9054b0e2 100644 --- a/frontend/src/pages/ActivityReport/Pages/components/GoalInput.js +++ b/frontend/src/pages/ActivityReport/Pages/components/GoalInput.js @@ -33,7 +33,11 @@ const Input = ({ const selectedGoals = selectProps.value.length; let message; - if (selectedGoals === 0) { + const { value } = props; + + if (value !== '') { + message = ''; + } else if (selectedGoals === 0) { message = 'Select goal(s)'; } else if (selectedGoals === 1) { message = '1 goal selected'; @@ -42,7 +46,7 @@ const Input = ({ } return ( -
+ <> {message} -
+ ); }; diff --git a/frontend/src/pages/ActivityReport/Pages/components/GoalPicker.js b/frontend/src/pages/ActivityReport/Pages/components/GoalPicker.js index db40e34f48..9c5c2a37d1 100644 --- a/frontend/src/pages/ActivityReport/Pages/components/GoalPicker.js +++ b/frontend/src/pages/ActivityReport/Pages/components/GoalPicker.js @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { Button, Label, TextInput, } from '@trussworks/react-uswds'; -import { useFormContext } from 'react-hook-form'; +import { useFormContext } from 'react-hook-form/dist/index.ie11'; import { v4 as uuidv4 } from 'uuid'; import FormItem from '../../../../components/FormItem'; @@ -98,6 +98,7 @@ const GoalPicker = ({ validate: validateGoals, }} options={uniqueAvailableGoals.map((goal) => ({ value: goal.id, label: goal.name }))} + singleRowInput multiSelectOptions={{ isClearable: false, closeMenuOnSelect: true, diff --git a/frontend/src/pages/ActivityReport/Pages/components/Objective.js b/frontend/src/pages/ActivityReport/Pages/components/Objective.js index 3a07e569a1..c252c2971a 100644 --- a/frontend/src/pages/ActivityReport/Pages/components/Objective.js +++ b/frontend/src/pages/ActivityReport/Pages/components/Objective.js @@ -1,6 +1,6 @@ import React, { useState, useRef, useEffect } from 'react'; import PropTypes from 'prop-types'; -import { useFormContext } from 'react-hook-form'; +import { useFormContext } from 'react-hook-form/dist/index.ie11'; import { Tag, Label, Button, TextInput, Dropdown, Grid, } from '@trussworks/react-uswds'; @@ -27,7 +27,7 @@ const Objective = ({ if (firstInput.current) { firstInput.current.focus(); } - }, [firstInput.current]); + }, []); const [editableObject, updateEditableObject] = useState(objective); const onChange = (e) => { diff --git a/frontend/src/pages/ActivityReport/Pages/components/ResourceSelector.js b/frontend/src/pages/ActivityReport/Pages/components/ResourceSelector.js index 3bcb61bf3e..1ecf39a2a0 100644 --- a/frontend/src/pages/ActivityReport/Pages/components/ResourceSelector.js +++ b/frontend/src/pages/ActivityReport/Pages/components/ResourceSelector.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { useFormContext, useFieldArray } from 'react-hook-form'; +import { useFormContext, useFieldArray } from 'react-hook-form/dist/index.ie11'; import { Button, TextInput } from '@trussworks/react-uswds'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; diff --git a/frontend/src/pages/ActivityReport/Pages/components/__tests__/Goal.js b/frontend/src/pages/ActivityReport/Pages/components/__tests__/Goal.js index 19f72e9399..d0625f141d 100644 --- a/frontend/src/pages/ActivityReport/Pages/components/__tests__/Goal.js +++ b/frontend/src/pages/ActivityReport/Pages/components/__tests__/Goal.js @@ -2,7 +2,7 @@ import '@testing-library/jest-dom'; import { render, screen, waitFor } from '@testing-library/react'; import React from 'react'; -import { FormProvider, useForm } from 'react-hook-form'; +import { FormProvider, useForm } from 'react-hook-form/dist/index.ie11'; import userEvent from '@testing-library/user-event'; import Goal from '../Goal'; diff --git a/frontend/src/pages/ActivityReport/Pages/components/__tests__/GoalPicker.js b/frontend/src/pages/ActivityReport/Pages/components/__tests__/GoalPicker.js index 8b41cd6010..fc16e17ffe 100644 --- a/frontend/src/pages/ActivityReport/Pages/components/__tests__/GoalPicker.js +++ b/frontend/src/pages/ActivityReport/Pages/components/__tests__/GoalPicker.js @@ -3,7 +3,7 @@ import '@testing-library/jest-dom'; import userEvent from '@testing-library/user-event'; import { render, screen, waitFor } from '@testing-library/react'; import React from 'react'; -import { FormProvider, useForm } from 'react-hook-form'; +import { FormProvider, useForm } from 'react-hook-form/dist/index.ie11'; import selectEvent from 'react-select-event'; import GoalPicker from '../GoalPicker'; diff --git a/frontend/src/pages/ActivityReport/Pages/components/__tests__/Objective.js b/frontend/src/pages/ActivityReport/Pages/components/__tests__/Objective.js index 882932ffeb..f842a5ca4b 100644 --- a/frontend/src/pages/ActivityReport/Pages/components/__tests__/Objective.js +++ b/frontend/src/pages/ActivityReport/Pages/components/__tests__/Objective.js @@ -2,7 +2,7 @@ import '@testing-library/jest-dom'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; -import { FormProvider, useForm } from 'react-hook-form'; +import { FormProvider, useForm } from 'react-hook-form/dist/index.ie11'; import Objective from '../Objective'; const RenderObjective = ({ diff --git a/frontend/src/pages/ActivityReport/Pages/components/__tests__/ResourceSelector.js b/frontend/src/pages/ActivityReport/Pages/components/__tests__/ResourceSelector.js index 21fd8fe60a..9ae4fef254 100644 --- a/frontend/src/pages/ActivityReport/Pages/components/__tests__/ResourceSelector.js +++ b/frontend/src/pages/ActivityReport/Pages/components/__tests__/ResourceSelector.js @@ -3,7 +3,7 @@ import '@testing-library/jest-dom'; import userEvent from '@testing-library/user-event'; import { render, screen, waitFor } from '@testing-library/react'; import React from 'react'; -import { FormProvider, useForm } from 'react-hook-form'; +import { FormProvider, useForm } from 'react-hook-form/dist/index.ie11'; import ResourceSelector from '../ResourceSelector'; diff --git a/frontend/src/pages/ActivityReport/Pages/goalsObjectives.js b/frontend/src/pages/ActivityReport/Pages/goalsObjectives.js index 9640810228..2d938dbfac 100644 --- a/frontend/src/pages/ActivityReport/Pages/goalsObjectives.js +++ b/frontend/src/pages/ActivityReport/Pages/goalsObjectives.js @@ -5,7 +5,7 @@ import { Fieldset, Label, Textarea, } from '@trussworks/react-uswds'; import useDeepCompareEffect from 'use-deep-compare-effect'; -import { useFormContext } from 'react-hook-form'; +import { useFormContext } from 'react-hook-form/dist/index.ie11'; import { isUndefined } from 'lodash'; import ReviewItem from './Review/ReviewItem'; diff --git a/frontend/src/pages/ActivityReport/Pages/topicsResources.js b/frontend/src/pages/ActivityReport/Pages/topicsResources.js index 76dcc4d490..cf2dbaa3ae 100644 --- a/frontend/src/pages/ActivityReport/Pages/topicsResources.js +++ b/frontend/src/pages/ActivityReport/Pages/topicsResources.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Controller, useFormContext } from 'react-hook-form'; +import { Controller, useFormContext } from 'react-hook-form/dist/index.ie11'; import { Helmet } from 'react-helmet'; import { Fieldset, Label, diff --git a/frontend/src/pages/ActivityReport/index.js b/frontend/src/pages/ActivityReport/index.js index f9872ab4d5..7dcdaccfc8 100644 --- a/frontend/src/pages/ActivityReport/index.js +++ b/frontend/src/pages/ActivityReport/index.js @@ -197,7 +197,7 @@ function ActivityReport({ } const page = pages.find((p) => p.position === position); - history.replace(`/activity-reports/${reportId.current}/${page.path}`, state); + history.push(`/activity-reports/${reportId.current}/${page.path}`, state); }; const onSave = async (data) => { diff --git a/frontend/yarn.lock b/frontend/yarn.lock index befe380cbb..ad6e7d58b0 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -1763,10 +1763,10 @@ dependencies: "@babel/runtime" "^7.12.5" -"@trussworks/react-uswds@^1.12.2": - version "1.13.0" - resolved "https://registry.yarnpkg.com/@trussworks/react-uswds/-/react-uswds-1.13.0.tgz#52ef0beeaae6a3692aea777dc3539a5edf9e517b" - integrity sha512-g9RNupEc9Hm3It4DX1aorTLX0W5twJK+f3pFvBdKch63w4gL8qgocjNmKiW5LUYxGW7WWtoE4bNY8p0A+4qwWQ== +"@trussworks/react-uswds@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@trussworks/react-uswds/-/react-uswds-1.11.0.tgz#f5f01247038792e8fec40c828e32bc78bcc04c95" + integrity sha512-wIFzLM/1aJ0enyt42YFcJRSlEALfRU2qPaVK5955mHmP083l9o2CrnmJDK7La8ebrNxtyhhgrx76K3PwFgRCjQ== "@types/anymatch@*": version "1.3.1"