diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 69d511e2b..b825201ac 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -2,6 +2,25 @@ https://agr-jira.atlassian.net/wiki/spaces/ATEAM/overview +## v0.29.0 +* New features + * Allele detail page: Visually emphasize field names/sections and visually demphasize 'Add' buttons (SCRUM-3343) + * Report Failed Loads table in Data Loads page UI (SCRUM-3440) + * Notify developers via Slack of failed curation system loads (SCRUM-3470) + * Provide "Saving in progress" indicator and inactivate interaction with page on allele detail pages (SCRUM-3536) + * Move "Add" buttons in Allele detail page to right of field names (in-line)(SCRUM-3551) + * Reduce empty space in disease annotations table to create a more compact representation (SCRUM-3564) + * Enable downloading of all exception messages for a given data load (SCRUM-2639) + +* Fixes and maintenance + * Upgrade python version used in agr_db_backups (SCRUM-3094) + * FB constructs failing to load (SCRUM-3613) + * Fix failing Construct Association loads (SCRUM-3620) + * SGD Allele load failing with uninterpretable exception messages (SCRUM-3630) + * Attempting to display FB constructs with secondary IDs in Constructs table (on alpha) throws error (SCRUM-3631) + * RGD Allele load entries failing incorrectly (SCRUM-3633) + * Create Json View to Limit data from Disease Annotations (SCRUM-3588) + ## v0.28.0-rc2 * Updates quarkus to version 3 * Fixes and maintenance diff --git a/src/main/cliapp/src/containers/diseaseAnnotationsPage/NewAnnotationForm.js b/src/main/cliapp/src/containers/diseaseAnnotationsPage/NewAnnotationForm.js index 7a58d1d7b..2493dd0c6 100644 --- a/src/main/cliapp/src/containers/diseaseAnnotationsPage/NewAnnotationForm.js +++ b/src/main/cliapp/src/containers/diseaseAnnotationsPage/NewAnnotationForm.js @@ -3,7 +3,7 @@ import { Dialog } from "primereact/dialog"; import { Button } from "primereact/button"; import { Dropdown } from "primereact/dropdown"; import { Toast } from "primereact/toast"; -// import { MultiSelect } from 'primereact/multiselect'; + import { MultiSelect } from 'primereact/multiselect'; import { useMutation, useQueryClient } from "react-query"; import { FormErrorMessageComponent } from "../../components/Error/FormErrorMessageComponent"; import { classNames } from "primereact/utils"; @@ -31,7 +31,8 @@ import { EvidenceCodesAdditionalFieldData } from "../../components/FieldData/Evi import { WithAdditionalFieldData } from "../../components/FieldData/WithAdditionalFieldData"; import { GeneticModifiersAdditionalFieldData } from "../../components/FieldData/GeneticModifiersAdditionalFieldData"; import ErrorBoundary from "../../components/Error/ErrorBoundary"; -// import { ConfirmButton } from "../../components/ConfirmButton"; +import { ConfirmButton } from "../../components/ConfirmButton"; +import { getModFormFields } from "../../service/TableStateService"; export const NewAnnotationForm = ({ newAnnotationState, @@ -50,7 +51,7 @@ export const NewAnnotationForm = ({ const assertedAlleleRef = useRef(null); const evidenceCodesRef = useRef(null); const experimentsRef = useRef(null); - // const [selectedFields, setSelectedFields] = useState([]); + const { newAnnotation, errorMessages, @@ -73,7 +74,9 @@ export const NewAnnotationForm = ({ const geneticModifierRelationTerms = useControlledVocabularyService('disease_genetic_modifier_relation'); const [uiErrorMessages, setUiErrorMessages] = useState({}); const areUiErrors = useRef(false); - + const optionalFields = ["Asserted Genes", "Asserted Allele", "Negated", "With", "Related Notes", "Experimental Conditions", "Experiments", "Genetic Sex", + "Disease Qualifiers", "SGD Strain Background", "Annotation Type", "Genetic Modifier Relation", "Genetic Modifiers","Internal"]; + const [selectedFields, setSelectedFields] = useState(optionalFields); const mutation = useMutation(newAnnotation => { if (!diseaseAnnotationService) { diseaseAnnotationService = new DiseaseAnnotationService(); @@ -81,7 +84,6 @@ export const NewAnnotationForm = ({ return diseaseAnnotationService.createDiseaseAnnotation(newAnnotation); }); - const hideDialog = () => { newAnnotationDispatch({ type: "RESET" }); newAnnotationDispatch({ type: "SET_IS_ENABLED", value: false }); @@ -94,15 +96,15 @@ export const NewAnnotationForm = ({ event.preventDefault(); newAnnotationDispatch({type: "SUBMIT"}); const isRelatedNotesErrors = await validateTable( - "note", - "relatedNotesErrorMessages", - newAnnotation.relatedNotes, + "note", + "relatedNotesErrorMessages", + newAnnotation.relatedNotes, newAnnotationDispatch ); const isExConErrors = await validateTable( - "condition-relation", - "exConErrorMessages", - newAnnotation.conditionRelations, + "condition-relation", + "exConErrorMessages", + newAnnotation.conditionRelations, newAnnotationDispatch ); @@ -134,7 +136,7 @@ export const NewAnnotationForm = ({ }, onError: (error) => { - let message; + let message; if(error?.response?.data?.errorMessages?.uniqueId){ message = "Page Error: New annotation is a duplicate of an existing annotation"; } else if(error?.response?.data?.errorMessage){ @@ -143,14 +145,13 @@ export const NewAnnotationForm = ({ //toast will still display even if 500 error and no errorMessages message = `${error.response.status} ${error.response.statusText}` } - toast_error.current.show({severity: 'error', summary: 'Page error: ', detail: message }); newAnnotationDispatch( { - type: "UPDATE_ERROR_MESSAGES", - errorType: "errorMessages", + type: "UPDATE_ERROR_MESSAGES", + errorType: "errorMessages", errorMessages: error.response?.data?.errorMessages || {} } ); @@ -174,6 +175,10 @@ export const NewAnnotationForm = ({ handleSubmit(event, false); } + const handleShowAllFields = () => { + setSelectedFields(optionalFields); + } + const onSingleReferenceChange = (event) => { setUiErrorMessages({}); newAnnotationDispatch({ @@ -398,35 +403,39 @@ export const NewAnnotationForm = ({ autocompleteSearch(searchService, endpoint, filterName, filter, setFiltered); } - // const defaultFields = (["Subject", "Asserted Genes", "Asserted Allele", "Disease Relation", "Negated", "Disease", "Reference", "Evidence Code", "With", "Related Notes", - // "Experimental Conditions", "Experiments", "Genetic Sex", "Disease Qualifiers", "SGD Strain Background", "Annotation Type", "Genetic Modifier Relation", - // "Genetic Modifiers", "Internal"]); + const setToModDefault = () => { + const modFormFields = getModFormFields("DiseaseAnnotations"); + setSelectedFields(modFormFields); + } const dialogHeader = ( <> -

Add Annotation

+

Add Disease Annotation

- {/* + setSelectedFields(e.value)} - style={{ width: '20em', textAlign: 'center' }} + className='w-20rem text-center' + maxSelectedLabels={4} /> - */} - {/* -