From 620fc49a915b723604888bb868e875cf98b0926f Mon Sep 17 00:00:00 2001 From: jeznorth Date: Tue, 9 Nov 2021 10:36:20 -0800 Subject: [PATCH 1/6] WIP --- app/package-lock.json | 6 +- app/package.json | 2 +- .../attachments/AttachmentsList.tsx | 30 +++-- app/src/components/attachments/DropZone.tsx | 4 +- .../attachments/EditReportMetaForm.tsx | 4 +- .../components/attachments/ReportMetaForm.tsx | 6 +- app/src/components/boundary/MapBoundary.tsx | 4 +- .../dialog/EditFileWithMetaDialog.tsx | 3 +- .../dialog/FileUploadWithMetaDialog.tsx | 3 +- .../dialog/ViewFileWithMetaDialog.tsx | 112 +++++++++--------- .../projects/view/ProjectAttachments.tsx | 4 +- .../features/surveys/list/SurveysListPage.tsx | 4 +- .../surveys/view/SurveyAttachments.tsx | 4 +- app/src/styles.scss | 4 - app/src/themes/appTheme.ts | 5 + 15 files changed, 103 insertions(+), 92 deletions(-) diff --git a/app/package-lock.json b/app/package-lock.json index 0a3b6fc64e..a4a73760cf 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1839,9 +1839,9 @@ } }, "@mdi/js": { - "version": "5.9.55", - "resolved": "https://registry.npmjs.org/@mdi/js/-/js-5.9.55.tgz", - "integrity": "sha512-BbeHMgeK2/vjdJIRnx12wvQ6s8xAYfvMmEAVsUx9b+7GiQGQ9Za8jpwp17dMKr9CgKRvemlAM4S7S3QOtEbp4A==" + "version": "6.4.95", + "resolved": "https://registry.npmjs.org/@mdi/js/-/js-6.4.95.tgz", + "integrity": "sha512-b1/P//1D2KOzta8YRGyoSLGsAlWyUHfxzVBhV4e/ppnjM4DfBgay/vWz7Eg5Ee80JZ4zsQz8h54X+KOahtBk5Q==" }, "@mdi/react": { "version": "1.4.0", diff --git a/app/package.json b/app/package.json index f6912d7d3e..b9318a8ca9 100644 --- a/app/package.json +++ b/app/package.json @@ -32,7 +32,7 @@ "@material-ui/pickers": "~3.2.10", "@material-ui/styles": "~4.10.0", "@material-ui/system": "4.11.3", - "@mdi/js": "~5.9.55", + "@mdi/js": "~6.4.95", "@mdi/react": "~1.4.0", "@react-keycloak/web": "~2.1.0", "@react-leaflet/core": "~1.0.2", diff --git a/app/src/components/attachments/AttachmentsList.tsx b/app/src/components/attachments/AttachmentsList.tsx index feeb057cc4..4d18adf385 100644 --- a/app/src/components/attachments/AttachmentsList.tsx +++ b/app/src/components/attachments/AttachmentsList.tsx @@ -4,6 +4,7 @@ import IconButton from '@material-ui/core/IconButton'; import Link from '@material-ui/core/Link'; import Paper from '@material-ui/core/Paper'; import { Theme } from '@material-ui/core/styles/createMuiTheme'; +import ListItemIcon from '@material-ui/core/ListItemIcon'; import makeStyles from '@material-ui/core/styles/makeStyles'; import Table from '@material-ui/core/Table'; import TableBody from '@material-ui/core/TableBody'; @@ -12,7 +13,7 @@ import TableContainer from '@material-ui/core/TableContainer'; import TableHead from '@material-ui/core/TableHead'; import TablePagination from '@material-ui/core/TablePagination'; import TableRow from '@material-ui/core/TableRow'; -import { mdiLockOpenVariantOutline, mdiLockOutline, mdiDotsVertical } from '@mdi/js'; +import { mdiDownload, mdiLockOpenVariantOutline, mdiLockOutline, mdiDotsVertical, mdiInformationOutline, mdiTrashCanOutline } from '@mdi/js'; import Icon from '@mdi/react'; import { IErrorDialogProps } from 'components/dialog/ErrorDialog'; import { DATE_FORMAT } from 'constants/dateTimeFormats'; @@ -461,7 +462,7 @@ const AttachmentItemMenuButton: React.FC = (prop className={classes.uploadMenu} getContentAnchorEl={null} anchorOrigin={{ - vertical: 'bottom', + vertical: 'top', horizontal: 'right' }} transformOrigin={{ @@ -481,16 +482,11 @@ const AttachmentItemMenuButton: React.FC = (prop setAnchorEl(null); }} data-testid="attachment-action-menu-download"> + + + Download File - { - props.handleDeleteFileClick(props.attachment); - setAnchorEl(null); - }} - data-testid="attachment-action-menu-delete"> - Delete File - {props.attachment.fileType === AttachmentType.REPORT && ( { @@ -498,9 +494,23 @@ const AttachmentItemMenuButton: React.FC = (prop setAnchorEl(null); }} data-testid="attachment-action-menu-details"> + + + View Details )} + { + props.handleDeleteFileClick(props.attachment); + setAnchorEl(null); + }} + data-testid="attachment-action-menu-delete"> + + + + Delete File + diff --git a/app/src/components/attachments/DropZone.tsx b/app/src/components/attachments/DropZone.tsx index 738d543eec..3d148ec165 100644 --- a/app/src/components/attachments/DropZone.tsx +++ b/app/src/components/attachments/DropZone.tsx @@ -2,7 +2,7 @@ import Box from '@material-ui/core/Box'; import Link from '@material-ui/core/Link'; import Typography from '@material-ui/core/Typography'; import makeStyles from '@material-ui/core/styles/makeStyles'; -import { mdiUpload } from '@mdi/js'; +import { mdiTrayArrowUp } from '@mdi/js'; import Icon from '@mdi/react'; import React, { useContext } from 'react'; import Dropzone, { FileRejection } from 'react-dropzone'; @@ -93,7 +93,7 @@ export const DropZone: React.FC = (props) - + Drag your {(multiple && 'files') || 'file'} here, or Browse Files diff --git a/app/src/components/attachments/EditReportMetaForm.tsx b/app/src/components/attachments/EditReportMetaForm.tsx index 6f15ab3f42..65b0e8af18 100644 --- a/app/src/components/attachments/EditReportMetaForm.tsx +++ b/app/src/components/attachments/EditReportMetaForm.tsx @@ -70,7 +70,7 @@ const EditReportMetaForm: React.FC = () => { Report Details - + { name="authors" render={(arrayHelpers) => ( - + {values.authors?.map((author, index) => { const authorFirstNameMeta = getFieldMeta(`authors.[${index}].first_name`); const authorLastNameMeta = getFieldMeta(`authors.[${index}].last_name`); diff --git a/app/src/components/attachments/ReportMetaForm.tsx b/app/src/components/attachments/ReportMetaForm.tsx index 868005b150..f36ff6f0b9 100644 --- a/app/src/components/attachments/ReportMetaForm.tsx +++ b/app/src/components/attachments/ReportMetaForm.tsx @@ -38,7 +38,7 @@ export const ReportMetaFormInitialValues: IReportMetaForm = { export const ReportMetaFormYupSchema = yup.object().shape({ title: yup.string().max(300, 'Cannot exceed 300 characters').required('A report title is required'), - description: yup.string().max(300, 'Cannot exceed 50 characters').required('A report summary is required'), + description: yup.string().max(3000, 'Cannot exceed 3000 characters').required('A report summary is required'), year_published: yup .number() .min(1900, 'year must be between 1900 and 2199') @@ -71,7 +71,7 @@ const ReportMetaForm: React.FC = () => { Report Details - + { name="authors" render={(arrayHelpers) => ( - + {values.authors?.map((author, index) => { const authorFirstNameMeta = getFieldMeta(`authors.[${index}].first_name`); const authorLastNameMeta = getFieldMeta(`authors.[${index}].last_name`); diff --git a/app/src/components/boundary/MapBoundary.tsx b/app/src/components/boundary/MapBoundary.tsx index cb49d97e53..9626809a89 100644 --- a/app/src/components/boundary/MapBoundary.tsx +++ b/app/src/components/boundary/MapBoundary.tsx @@ -7,7 +7,7 @@ import React, { useState, useEffect } from 'react'; import Button from '@material-ui/core/Button'; import ComponentDialog from 'components/dialog/ComponentDialog'; import FileUpload from 'components/attachments/FileUpload'; -import { mdiUploadOutline } from '@mdi/js'; +import { mdiTrayArrowUp } from '@mdi/js'; import Icon from '@mdi/react'; import MapContainer from 'components/map/MapContainer'; import { Feature } from 'geojson'; @@ -139,7 +139,7 @@ const MapBoundary: React.FC = (props) => { color="primary" data-testid="boundary_file-upload" variant="outlined" - startIcon={} + startIcon={} onClick={() => setOpenUploadBoundary(true)}> Upload Boundary diff --git a/app/src/components/dialog/EditFileWithMetaDialog.tsx b/app/src/components/dialog/EditFileWithMetaDialog.tsx index 3337c99106..877bbc9821 100644 --- a/app/src/components/dialog/EditFileWithMetaDialog.tsx +++ b/app/src/components/dialog/EditFileWithMetaDialog.tsx @@ -129,8 +129,7 @@ const EditFileWithMetaDialog: React.FC = (props) = onClick={formikProps.submitForm} color="primary" variant="contained" - disabled={isSaving} - autoFocus> + disabled={isSaving}> Save {isSaving && } diff --git a/app/src/components/dialog/FileUploadWithMetaDialog.tsx b/app/src/components/dialog/FileUploadWithMetaDialog.tsx index 09096549ad..613d9c84fd 100644 --- a/app/src/components/dialog/FileUploadWithMetaDialog.tsx +++ b/app/src/components/dialog/FileUploadWithMetaDialog.tsx @@ -140,8 +140,7 @@ const FileUploadWithMetaDialog: React.FC = (prop onClick={formikProps.submitForm} color="primary" variant="contained" - disabled={isFinishing} - autoFocus> + disabled={isFinishing}> Finish {isFinishing && } diff --git a/app/src/components/dialog/ViewFileWithMetaDialog.tsx b/app/src/components/dialog/ViewFileWithMetaDialog.tsx index f3ffd81eab..777fbf911f 100644 --- a/app/src/components/dialog/ViewFileWithMetaDialog.tsx +++ b/app/src/components/dialog/ViewFileWithMetaDialog.tsx @@ -5,7 +5,7 @@ import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import Grid from '@material-ui/core/Grid'; import Typography from '@material-ui/core/Typography'; -import { mdiDownload, mdiPencilOutline } from '@mdi/js'; +import { mdiTrayArrowDown, mdiPencilOutline } from '@mdi/js'; import Icon from '@mdi/react'; import { DATE_FORMAT } from 'constants/dateTimeFormats'; import { IGetReportMetaData } from 'interfaces/useProjectApi.interface'; @@ -39,61 +39,64 @@ const ViewFileWithMetaDialog: React.FC = (props) = return ( <> - + - - - {reportMetaData?.title} - - {showEditButton && ( - + + {reportMetaData?.title} + + + + Last modified:{' '} + {getFormattedDateRangeString( + DATE_FORMAT.ShortMediumDateFormat, + reportMetaData?.last_modified || '' )} + -
- - - - Last modified{' '} - {getFormattedDateRangeString( - DATE_FORMAT.ShortMediumDateFormat, - reportMetaData?.last_modified || '' - )} - - - - - {reportMetaData?.description} - - - - - Year Published - - - {reportMetaData?.year_published} - - - - - Authors - - - {reportMetaData?.authors - ?.map((author) => [author.first_name, author.last_name].join(' ')) - .join(', ')} - - + + {showEditButton && ( + + )} + + + + + + + Summary + + + {reportMetaData?.description} + + + + + Year Published + + + {reportMetaData?.year_published} + + + + + Authors + + + {reportMetaData?.authors + ?.map((author) => [author.first_name, author.last_name].join(' ')) + .join(', ')} + -
+
@@ -101,11 +104,10 @@ const ViewFileWithMetaDialog: React.FC = (props) = onClick={props.onDownload} color="primary" variant="contained" - autoFocus - startIcon={}> + startIcon={}> Download Report ({props.attachmentSize}) - diff --git a/app/src/features/projects/view/ProjectAttachments.tsx b/app/src/features/projects/view/ProjectAttachments.tsx index d726dafdbf..660bafe51d 100644 --- a/app/src/features/projects/view/ProjectAttachments.tsx +++ b/app/src/features/projects/view/ProjectAttachments.tsx @@ -5,7 +5,7 @@ import MenuItem from '@material-ui/core/MenuItem'; import { Theme } from '@material-ui/core/styles/createMuiTheme'; import makeStyles from '@material-ui/core/styles/makeStyles'; import Typography from '@material-ui/core/Typography'; -import { mdiMenuDown, mdiUpload } from '@mdi/js'; +import { mdiMenuDown, mdiTrayArrowUp } from '@mdi/js'; import Icon from '@mdi/react'; import AttachmentsList from 'components/attachments/AttachmentsList'; import { IUploadHandler } from 'components/attachments/FileUploadItem'; @@ -138,7 +138,7 @@ const ProjectAttachments: React.FC = () => { aria-controls="basic-menu" aria-haspopup="true" aria-expanded={open ? 'true' : undefined} - startIcon={} + startIcon={} endIcon={} data-testid="click-ellipsis" onClick={handleClick}> diff --git a/app/src/features/surveys/list/SurveysListPage.tsx b/app/src/features/surveys/list/SurveysListPage.tsx index 575ebc49ca..3969654844 100644 --- a/app/src/features/surveys/list/SurveysListPage.tsx +++ b/app/src/features/surveys/list/SurveysListPage.tsx @@ -1,7 +1,7 @@ import Box from '@material-ui/core/Box'; import Button from '@material-ui/core/Button'; import Typography from '@material-ui/core/Typography'; -import { mdiUploadOutline } from '@mdi/js'; +import { mdiPlus } from '@mdi/js'; import Icon from '@mdi/react'; import { IGetProjectForViewResponse } from 'interfaces/useProjectApi.interface'; import { IGetSurveysListResponse } from 'interfaces/useSurveyApi.interface'; @@ -55,7 +55,7 @@ const SurveysListPage: React.FC = (props) => { diff --git a/app/src/features/surveys/view/SurveyAttachments.tsx b/app/src/features/surveys/view/SurveyAttachments.tsx index e66f09333a..e3f2686aa4 100644 --- a/app/src/features/surveys/view/SurveyAttachments.tsx +++ b/app/src/features/surveys/view/SurveyAttachments.tsx @@ -5,7 +5,7 @@ import MenuItem from '@material-ui/core/MenuItem'; import { Theme } from '@material-ui/core/styles/createMuiTheme'; import makeStyles from '@material-ui/core/styles/makeStyles'; import Typography from '@material-ui/core/Typography'; -import { mdiMenuDown, mdiUpload } from '@mdi/js'; +import { mdiMenuDown, mdiTrayArrowUp } from '@mdi/js'; import Icon from '@mdi/react'; import AttachmentsList from 'components/attachments/AttachmentsList'; import { IUploadHandler } from 'components/attachments/FileUploadItem'; @@ -138,7 +138,7 @@ const SurveyAttachments: React.FC = () => { aria-controls="basic-menu" aria-haspopup="true" aria-expanded={open ? 'true' : undefined} - startIcon={} + startIcon={} endIcon={} onClick={handleClick}> Upload diff --git a/app/src/styles.scss b/app/src/styles.scss index c623b0fc3b..48c7758750 100644 --- a/app/src/styles.scss +++ b/app/src/styles.scss @@ -1,9 +1,5 @@ @import 'styles/fonts.scss'; -body { - overflow-y: scroll; -} - fieldset { border: none; padding: 0; diff --git a/app/src/themes/appTheme.ts b/app/src/themes/appTheme.ts index 64d732aa3b..40c36f86ea 100644 --- a/app/src/themes/appTheme.ts +++ b/app/src/themes/appTheme.ts @@ -107,6 +107,11 @@ const appTheme = createMuiTheme({ borderRadius: '3px' } }, + MuiListItemIcon: { + root: { + minWidth: '42px' + } + }, MuiOutlinedInput: { root: { background: '#ffffff' From 807d7272dc10a995a1178116b8e0e7f199a83061 Mon Sep 17 00:00:00 2001 From: jeznorth Date: Tue, 9 Nov 2021 10:49:38 -0800 Subject: [PATCH 2/6] [BHBC-1470] Front-end Updates --- .../components/attachments/AttachmentsList.tsx | 15 +++++++++++---- .../__snapshots__/DropZone.test.tsx.snap | 2 +- .../components/dialog/EditFileWithMetaDialog.tsx | 6 +----- .../dialog/FileUploadWithMetaDialog.tsx | 6 +----- .../components/dialog/ViewFileWithMetaDialog.tsx | 15 +++++---------- .../ProjectLocationForm.test.tsx.snap | 6 +++--- .../features/projects/view/ProjectAttachments.tsx | 2 +- .../__snapshots__/CreateSurveyPage.test.tsx.snap | 2 +- .../__snapshots__/StudyAreaForm.test.tsx.snap | 6 +++--- .../view/__snapshots__/SurveyPage.test.tsx.snap | 4 ++-- .../ProjectStepComponents.test.tsx.snap | 2 +- 11 files changed, 30 insertions(+), 36 deletions(-) diff --git a/app/src/components/attachments/AttachmentsList.tsx b/app/src/components/attachments/AttachmentsList.tsx index 4d18adf385..0cfc3f5360 100644 --- a/app/src/components/attachments/AttachmentsList.tsx +++ b/app/src/components/attachments/AttachmentsList.tsx @@ -13,7 +13,14 @@ import TableContainer from '@material-ui/core/TableContainer'; import TableHead from '@material-ui/core/TableHead'; import TablePagination from '@material-ui/core/TablePagination'; import TableRow from '@material-ui/core/TableRow'; -import { mdiDownload, mdiLockOpenVariantOutline, mdiLockOutline, mdiDotsVertical, mdiInformationOutline, mdiTrashCanOutline } from '@mdi/js'; +import { + mdiDownload, + mdiLockOpenVariantOutline, + mdiLockOutline, + mdiDotsVertical, + mdiInformationOutline, + mdiTrashCanOutline +} from '@mdi/js'; import Icon from '@mdi/react'; import { IErrorDialogProps } from 'components/dialog/ErrorDialog'; import { DATE_FORMAT } from 'constants/dateTimeFormats'; @@ -484,7 +491,7 @@ const AttachmentItemMenuButton: React.FC = (prop data-testid="attachment-action-menu-download"> - + Download File {props.attachment.fileType === AttachmentType.REPORT && ( @@ -496,7 +503,7 @@ const AttachmentItemMenuButton: React.FC = (prop data-testid="attachment-action-menu-details"> - + View Details )} @@ -508,7 +515,7 @@ const AttachmentItemMenuButton: React.FC = (prop data-testid="attachment-action-menu-delete"> - + Delete File diff --git a/app/src/components/attachments/__snapshots__/DropZone.test.tsx.snap b/app/src/components/attachments/__snapshots__/DropZone.test.tsx.snap index aa661f6cb4..c3c8e165e9 100644 --- a/app/src/components/attachments/__snapshots__/DropZone.test.tsx.snap +++ b/app/src/components/attachments/__snapshots__/DropZone.test.tsx.snap @@ -28,7 +28,7 @@ exports[`DropZone matches the snapshot 1`] = ` viewBox="0 0 24 24" > diff --git a/app/src/components/dialog/EditFileWithMetaDialog.tsx b/app/src/components/dialog/EditFileWithMetaDialog.tsx index 877bbc9821..86d27a0e4a 100644 --- a/app/src/components/dialog/EditFileWithMetaDialog.tsx +++ b/app/src/components/dialog/EditFileWithMetaDialog.tsx @@ -125,11 +125,7 @@ const EditFileWithMetaDialog: React.FC = (props) = - {isSaving && } diff --git a/app/src/components/dialog/FileUploadWithMetaDialog.tsx b/app/src/components/dialog/FileUploadWithMetaDialog.tsx index 613d9c84fd..224a7b0d1b 100644 --- a/app/src/components/dialog/FileUploadWithMetaDialog.tsx +++ b/app/src/components/dialog/FileUploadWithMetaDialog.tsx @@ -136,11 +136,7 @@ const FileUploadWithMetaDialog: React.FC = (prop {props.attachmentType === AttachmentType.REPORT && ( - {isFinishing && } diff --git a/app/src/components/dialog/ViewFileWithMetaDialog.tsx b/app/src/components/dialog/ViewFileWithMetaDialog.tsx index 777fbf911f..47ed88b48a 100644 --- a/app/src/components/dialog/ViewFileWithMetaDialog.tsx +++ b/app/src/components/dialog/ViewFileWithMetaDialog.tsx @@ -45,13 +45,10 @@ const ViewFileWithMetaDialog: React.FC = (props) = {reportMetaData?.title} - - Last modified:{' '} - {getFormattedDateRangeString( - DATE_FORMAT.ShortMediumDateFormat, - reportMetaData?.last_modified || '' - )} - + + Last modified:{' '} + {getFormattedDateRangeString(DATE_FORMAT.ShortMediumDateFormat, reportMetaData?.last_modified || '')} + {showEditButton && ( @@ -91,9 +88,7 @@ const ViewFileWithMetaDialog: React.FC = (props) = Authors - {reportMetaData?.authors - ?.map((author) => [author.first_name, author.last_name].join(' ')) - .join(', ')} + {reportMetaData?.authors?.map((author) => [author.first_name, author.last_name].join(' ')).join(', ')}
diff --git a/app/src/features/projects/components/__snapshots__/ProjectLocationForm.test.tsx.snap b/app/src/features/projects/components/__snapshots__/ProjectLocationForm.test.tsx.snap index 58c7631a36..440d3d0368 100644 --- a/app/src/features/projects/components/__snapshots__/ProjectLocationForm.test.tsx.snap +++ b/app/src/features/projects/components/__snapshots__/ProjectLocationForm.test.tsx.snap @@ -92,7 +92,7 @@ exports[`ProjectLocationForm renders correctly with default empty values 1`] = ` viewBox="0 0 24 24" > @@ -541,7 +541,7 @@ exports[`ProjectLocationForm renders correctly with errors on fields 1`] = ` viewBox="0 0 24 24" > @@ -1017,7 +1017,7 @@ exports[`ProjectLocationForm renders correctly with existing location values 1`] viewBox="0 0 24 24" > diff --git a/app/src/features/projects/view/ProjectAttachments.tsx b/app/src/features/projects/view/ProjectAttachments.tsx index 660bafe51d..ea8637e59b 100644 --- a/app/src/features/projects/view/ProjectAttachments.tsx +++ b/app/src/features/projects/view/ProjectAttachments.tsx @@ -138,7 +138,7 @@ const ProjectAttachments: React.FC = () => { aria-controls="basic-menu" aria-haspopup="true" aria-expanded={open ? 'true' : undefined} - startIcon={} + startIcon={} endIcon={} data-testid="click-ellipsis" onClick={handleClick}> diff --git a/app/src/features/surveys/__snapshots__/CreateSurveyPage.test.tsx.snap b/app/src/features/surveys/__snapshots__/CreateSurveyPage.test.tsx.snap index 0f05d72283..530a42ddf0 100644 --- a/app/src/features/surveys/__snapshots__/CreateSurveyPage.test.tsx.snap +++ b/app/src/features/surveys/__snapshots__/CreateSurveyPage.test.tsx.snap @@ -1104,7 +1104,7 @@ exports[`CreateSurveyPage renders correctly when codes and project data are load viewBox="0 0 24 24" > diff --git a/app/src/features/surveys/components/__snapshots__/StudyAreaForm.test.tsx.snap b/app/src/features/surveys/components/__snapshots__/StudyAreaForm.test.tsx.snap index 33da5641cd..1426a09fef 100644 --- a/app/src/features/surveys/components/__snapshots__/StudyAreaForm.test.tsx.snap +++ b/app/src/features/surveys/components/__snapshots__/StudyAreaForm.test.tsx.snap @@ -97,7 +97,7 @@ exports[`Study Area Form renders correctly the empty component correctly 1`] = ` viewBox="0 0 24 24" > @@ -541,7 +541,7 @@ exports[`Study Area Form renders correctly the filled component correctly 1`] = viewBox="0 0 24 24" > @@ -1026,7 +1026,7 @@ exports[`Study Area Form renders correctly when errors exist 1`] = ` viewBox="0 0 24 24" > diff --git a/app/src/features/surveys/view/__snapshots__/SurveyPage.test.tsx.snap b/app/src/features/surveys/view/__snapshots__/SurveyPage.test.tsx.snap index 3cd8f554e7..0a8e237382 100644 --- a/app/src/features/surveys/view/__snapshots__/SurveyPage.test.tsx.snap +++ b/app/src/features/surveys/view/__snapshots__/SurveyPage.test.tsx.snap @@ -196,7 +196,7 @@ exports[`SurveyPage renders correctly with no end date 1`] = ` viewBox="0 0 24 24" > @@ -504,7 +504,7 @@ exports[`SurveyPage renders survey page when survey is loaded 1`] = ` viewBox="0 0 24 24" > diff --git a/app/src/utils/__snapshots__/ProjectStepComponents.test.tsx.snap b/app/src/utils/__snapshots__/ProjectStepComponents.test.tsx.snap index cef9d09bc5..fab1c8bb9b 100644 --- a/app/src/utils/__snapshots__/ProjectStepComponents.test.tsx.snap +++ b/app/src/utils/__snapshots__/ProjectStepComponents.test.tsx.snap @@ -1368,7 +1368,7 @@ exports[`ProjectStepComponents renders the project location 1`] = ` viewBox="0 0 24 24" > From cefb49ed6bbee1f07712402e712f57bdd21253a1 Mon Sep 17 00:00:00 2001 From: jeznorth Date: Tue, 9 Nov 2021 10:57:46 -0800 Subject: [PATCH 3/6] Trigger Build From 63a41f7afb1f5be7d44d98c3f92cd38da7a5d22e Mon Sep 17 00:00:00 2001 From: jeznorth Date: Tue, 9 Nov 2021 11:13:51 -0800 Subject: [PATCH 4/6] WIP --- app/src/styles.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/styles.scss b/app/src/styles.scss index 48c7758750..e4f2e41bfc 100644 --- a/app/src/styles.scss +++ b/app/src/styles.scss @@ -23,6 +23,11 @@ legend.MuiTypography-root { } } +dd { + margin: 0; + font-size: 1rem; +} + .ddInline { dd { position: relative; From 07fb7993f0c8cea343dbb9b59a6b9a4138bb0338 Mon Sep 17 00:00:00 2001 From: jeznorth Date: Tue, 9 Nov 2021 11:17:10 -0800 Subject: [PATCH 5/6] [BHBC-1470] Updating Char Limit on Summary Field --- app/src/components/attachments/EditReportMetaForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/components/attachments/EditReportMetaForm.tsx b/app/src/components/attachments/EditReportMetaForm.tsx index 65b0e8af18..06325ceeb3 100644 --- a/app/src/components/attachments/EditReportMetaForm.tsx +++ b/app/src/components/attachments/EditReportMetaForm.tsx @@ -38,7 +38,7 @@ export const EditReportMetaFormInitialValues: IEditReportMetaForm = { export const EditReportMetaFormYupSchema = yup.object().shape({ title: yup.string().max(300, 'Cannot exceed 300 characters').required('A report title is required'), - description: yup.string().max(300, 'Cannot exceed 50 characters').required('A report summary is required'), + description: yup.string().max(3000, 'Cannot exceed 3000 characters').required('A report summary is required'), year_published: yup .number() .min(1900, 'year must be between 1900 and 2199') From ec0b37414717a003231a2edebfb4b8b66abf1447 Mon Sep 17 00:00:00 2001 From: jeznorth Date: Tue, 9 Nov 2021 11:20:04 -0800 Subject: [PATCH 6/6] [BHBC-1470] Fixing Summary Display --- app/src/components/dialog/ViewFileWithMetaDialog.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/components/dialog/ViewFileWithMetaDialog.tsx b/app/src/components/dialog/ViewFileWithMetaDialog.tsx index 47ed88b48a..660d17e3b7 100644 --- a/app/src/components/dialog/ViewFileWithMetaDialog.tsx +++ b/app/src/components/dialog/ViewFileWithMetaDialog.tsx @@ -67,7 +67,7 @@ const ViewFileWithMetaDialog: React.FC = (props) = - + Summary