Skip to content

Commit

Permalink
Merge pull request #1307 from alliance-genome/release/v0.27.0-rc1
Browse files Browse the repository at this point in the history
Release/v0.27.0-rc1
  • Loading branch information
mluypaert authored Oct 27, 2023
2 parents c8375c0 + a0cdc1d commit 0ef5508
Show file tree
Hide file tree
Showing 266 changed files with 11,628 additions and 1,488 deletions.
28 changes: 28 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,34 @@

https://agr-jira.atlassian.net/wiki/spaces/ATEAM/overview

## v0.26.0
* New features
* Improved healthcheck endpoints and added health page (#1228 and #1230)
* Added FMS Data Files page (#1247)
* Enabled display and editing of Name property of alleles on Allele Detail pages (SCRUM-3124)
* Expanded allele nomenclature events pop-up display to include created/updated AuditedObject properties (SCRUM-3220)
* Enabled display and editing of Mutation Type property of alleles on Allele Detail pages (SCRUM-3128)
* Enabled load and display of constructs (SCRUM-199)
* Enabled display and editing of ... of alleles on allele details page:
* Inheritance Modes (SCRUM-3132)
* Secondary IDs (SCRUM-3127)
* Database Status (SCRUM-3131)
* Related Notes (SCRUM-3133)
* Functional Impacts (SCRUM-3129)
* Sumbol (SCRUM-3125)
* GermlineTransmissionStatus (SCRUM-3130)
* Display crossReferences in table on allele detail page (SCRUM-3200)
* Display MOD release version on DataLoads page (SCRUM-3336)
* Fixes and maintenance
* Fixed drop down selection bug on Allele Detail page (SCRUM-3316)
* Increase readibility of experimental conditions in editing interfaces (SCRUM-3027)
* Fixed error on saving row in Experiments table (SCRUM-3290)
* Fix failing WB Molecule loads (SCRUM-3337)
* ConditionRelation and ExperimentalCondition cleanup (SCRUM-3306)
* Display next future (a.k.a current stage) release as default by @markquintontulloch (SCRUM-3268)
* Update to align datamodels with LinkML v1.9.0 (SCRUM-3278)
* Quarkus update for security fixes (SCRUM-3303)

## v0.25.0
* New features
* Display and editing of allele synonyms on allele detail page (SCRUM-3126)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const AutocompleteFormEditor = (
name,
rowProps,
classNames,
inputClassNames,
fieldName,
subField = "curie",
valueDisplay,
Expand Down Expand Up @@ -47,6 +48,7 @@ export const AutocompleteFormEditor = (
onHide={(e) => op.current.hide(e)}
onChange={(e) => onValueChangeHandler(e)}
className={classNames}
inputClassName={inputClassNames}
/>
<EditorTooltip op={op} autocompleteHoverItem={autocompleteHoverItem} dataType={fieldName}/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const functionalImpactSearch = (event, setFiltered, setQuery) => {
const filterName = "functionalImpactFilter";
const otherFilters = {
vocabularyFilter: {
"vocabulary.name": {
queryString: "Allele Functional Impact"
"vocabulary.vocabularyLabel": {
queryString: "allele_functional_impact"
}
}
};
Expand Down
20 changes: 20 additions & 0 deletions src/main/cliapp/src/components/Editors/ObsoleteEditor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { DialogErrorMessageComponent } from "../Error/DialogErrorMessageComponent";
import { useControlledVocabularyService } from "../../service/useControlledVocabularyService";
import { TrueFalseDropdown } from "../TrueFalseDropDownSelector";

export const ObsoleteEditor = ({ props, obsoleteOnChangeHandler, errorMessages, rowIndex }) => {
const booleanTerms = useControlledVocabularyService("generic_boolean_terms");

return (
<>
<TrueFalseDropdown
props={props}
field="obsolete"
options={booleanTerms}
editorChange={obsoleteOnChangeHandler}
showClear={false}
/>
<DialogErrorMessageComponent errorMessages={errorMessages[rowIndex]} errorField={"obsolete"} />
</>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { TrueFalseDropdown } from "../../TrueFalseDropDownSelector";
import { ErrorMessageComponent } from "../../Error/ErrorMessageComponent";
import { useControlledVocabularyService } from "../../../service/useControlledVocabularyService";

export const BooleanTableEditor = ({ rowProps, errorMessagesRef, field}) => {
export const BooleanTableEditor = ({ rowProps, errorMessagesRef, field, showClear=true }) => {

const booleanTerms = useControlledVocabularyService("generic_boolean_terms");

Expand All @@ -24,7 +24,7 @@ export const BooleanTableEditor = ({ rowProps, errorMessagesRef, field}) => {
editorChange={editorChange}
props={rowProps}
field={field}
showClear={true}
showClear={showClear}
/>
<ErrorMessageComponent errorMessages={errorMessagesRef.current[rowProps.rowIndex]} errorField={field} />
</>
Expand Down
4 changes: 2 additions & 2 deletions src/main/cliapp/src/components/Editors/inCollection/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export const inCollectionSearch = (event, setFiltered, setQuery) => {
const filterName = "taxonFilter";
const otherFilters = {
vocabularyFilter: {
"vocabulary.name": {
queryString: "Allele collection vocabulary"
"vocabulary.vocabularyLabel": {
queryString: "allele_collection"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from "react";
import { LiteratureAutocompleteTemplate } from "../../Autocomplete/LiteratureAutocompleteTemplate";
import { FormErrorMessageComponent } from "../../Error/FormErrorMessageComponent";
import { referenceSearch } from "./utils";
import { AutocompleteFormEditor } from "../../Autocomplete/AutocompleteFormEditor";

export const SingleReferenceFormEditor = ({
reference,
onReferenceValueChange,
errorMessages
}) => {
return (
<>
<AutocompleteFormEditor
inputClassNames="w-20rem"
search={referenceSearch}
name="singleReference"
fieldName='singleReference'
initialValue={reference}
onValueChangeHandler={onReferenceValueChange}
valueDisplay={(item, setAutocompleteHoverItem, op, query) =>
<LiteratureAutocompleteTemplate item={item} setAutocompleteHoverItem={setAutocompleteHoverItem} op={op} query={query} />}
/>
<FormErrorMessageComponent errorMessages={errorMessages} errorField={"references"} />
</>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from "react";
import { AutocompleteEditor } from "../../Autocomplete/AutocompleteEditor";
import { LiteratureAutocompleteTemplate } from "../../Autocomplete/LiteratureAutocompleteTemplate";
import { referenceSearch } from "./utils";
import { DialogErrorMessageComponent } from "../../Error/DialogErrorMessageComponent";

export const SingleReferenceTableEditor = ({ props, errorMessages, onChange }) => {
return (
<>
<AutocompleteEditor
search={referenceSearch}
initialValue={props.rowData?.curie}
rowProps={props}
fieldName='references'
valueDisplay={(item, setAutocompleteHoverItem, op, query) =>
<LiteratureAutocompleteTemplate item={item} setAutocompleteHoverItem={setAutocompleteHoverItem} op={op} query={query}/>}
onValueChangeHandler={onChange}
/>
<DialogErrorMessageComponent
errorMessages={errorMessages[props?.rowIndex]}
errorField={"select"}
/>
</>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from "react";
import { AutocompleteEditor } from "../../Autocomplete/AutocompleteEditor";
import { ErrorMessageComponent } from "../../Error/ErrorMessageComponent";
import { sourceGeneralConsequenceSearch } from "./utils";
import { defaultAutocompleteOnChange } from "../../../utils/utils";

export const SourceGeneralConsequenceTableEditor = ({ rowProps, errorMessagesRef}) => {

const onSourceGeneralConsequenceValueChange = (event, setFieldValue, props) => {
defaultAutocompleteOnChange(props, event, "sourceGeneralConsequence", setFieldValue);
};

return (
<>
<AutocompleteEditor
search={sourceGeneralConsequenceSearch}
initialValue={rowProps.rowData.sourceGeneralConsequence?.curie}
rowProps={rowProps}
fieldName='sourceGeneralConsequence'
onValueChangeHandler={onSourceGeneralConsequenceValueChange}
/>
<ErrorMessageComponent
errorMessages={errorMessagesRef.current[rowProps.rowIndex]}
errorField='sourceGeneralConsequence'
/>
</>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { buildAutocompleteFilter, autocompleteSearch } from "../../../utils/utils";
import { SearchService } from "../../../service/SearchService";


export const sourceGeneralConsequenceSearch = (event, setFiltered, setQuery) => {
const searchService = new SearchService();
const autocompleteFields = ["curie", "name", "secondaryIdentifiers", "synonyms.name"];
const endpoint = "soterm";
const filterName = "sourceGeneralConsequenceFilter";
setQuery(event.query);
const filter = buildAutocompleteFilter(event, autocompleteFields);
autocompleteSearch(searchService, endpoint, filterName, filter, setFiltered);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from "react";
import { AutocompleteEditor } from "../../Autocomplete/AutocompleteEditor";
import { ErrorMessageComponent } from "../../Error/ErrorMessageComponent";
import { variantTypeSearch } from "./utils";
import { defaultAutocompleteOnChange } from "../../../utils/utils";

export const VariantTypeTableEditor = ({ rowProps, errorMessagesRef}) => {

const onVariantTypeValueChange = (event, setFieldValue, props) => {
defaultAutocompleteOnChange(props, event, "variantType", setFieldValue);
};

return (
<>
<AutocompleteEditor
search={variantTypeSearch}
initialValue={rowProps.rowData.variantType?.curie}
rowProps={rowProps}
fieldName='variantType'
onValueChangeHandler={onVariantTypeValueChange}
/>
<ErrorMessageComponent
errorMessages={errorMessagesRef.current[rowProps.rowIndex]}
errorField='variantType'
/>
</>
);
};
13 changes: 13 additions & 0 deletions src/main/cliapp/src/components/Editors/variantType/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { buildAutocompleteFilter, autocompleteSearch } from "../../../utils/utils";
import { SearchService } from "../../../service/SearchService";


export const variantTypeSearch = (event, setFiltered, setQuery) => {
const searchService = new SearchService();
const autocompleteFields = ["curie", "name", "secondaryIdentifiers", "synonyms.name"];
const endpoint = "soterm";
const filterName = "sourceGeneralConsequenceFilter";
setQuery(event.query);
const filter = buildAutocompleteFilter(event, autocompleteFields);
autocompleteSearch(searchService, endpoint, filterName, filter, setFiltered);
}
3 changes: 2 additions & 1 deletion src/main/cliapp/src/components/FormTableWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export const FormTableWrapper = ({
tableName,
showTable,
button,
includeField=false,
}) => {
return (
<div className="grid">
Expand All @@ -11,7 +12,7 @@ export const FormTableWrapper = ({
<label>{tableName}</label>
</div>
{showTable && table}
<div className={`${showTable ? "pt-3" : ""} p-field p-col col-4`}>
<div className={`${showTable ? "pt-3" : ""} p-field p-col ${includeField ? "col-12" : "col-4"} col-4`}>
{button}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,34 @@ import { Button } from 'primereact/button';
import { Toast } from 'primereact/toast';
import { ColumnGroup } from 'primereact/columngroup';
import { Row } from 'primereact/row';
import { InputTextAreaEditor } from '../../../components/InputTextAreaEditor';
import { DialogErrorMessageComponent } from '../../../components/Error/DialogErrorMessageComponent';
import { EllipsisTableCell } from '../../../components/EllipsisTableCell';
import { TrueFalseDropdown } from '../../../components/TrueFalseDropDownSelector';
import { useControlledVocabularyService } from '../../../service/useControlledVocabularyService';
import { ValidationService } from '../../../service/ValidationService';
import { ControlledVocabularyDropdown } from '../../../components/ControlledVocabularySelector';
import { autocompleteSearch, buildAutocompleteFilter, multipleAutocompleteOnChange, getRefStrings } from '../../../utils/utils';
import { LiteratureAutocompleteTemplate } from '../../../components/Autocomplete/LiteratureAutocompleteTemplate';
import { ListTableCell } from '../../../components/ListTableCell';
import { AutocompleteMultiEditor } from '../../../components/Autocomplete/AutocompleteMultiEditor';
import { SearchService } from '../../../service/SearchService';
import { InputTextAreaEditor } from './InputTextAreaEditor';
import { DialogErrorMessageComponent } from './Error/DialogErrorMessageComponent';
import { EllipsisTableCell } from './EllipsisTableCell';
import { TrueFalseDropdown } from './TrueFalseDropDownSelector';
import { useControlledVocabularyService } from '../service/useControlledVocabularyService';
import { useVocabularyTermSetService } from '../service/useVocabularyTermSetService';
import { ValidationService } from '../service/ValidationService';
import { ControlledVocabularyDropdown } from './ControlledVocabularySelector';
import { autocompleteSearch, buildAutocompleteFilter, multipleAutocompleteOnChange, getRefStrings } from '../utils/utils';
import { LiteratureAutocompleteTemplate } from './Autocomplete/LiteratureAutocompleteTemplate';
import { ListTableCell } from './ListTableCell';
import { AutocompleteMultiEditor } from './Autocomplete/AutocompleteMultiEditor';
import { SearchService } from '../service/SearchService';

export const RelatedNotesDialog = ({
originalRelatedNotesData,
setOriginalRelatedNotesData,
errorMessagesMainRow,
setErrorMessagesMainRow
setErrorMessagesMainRow,
noteTypeVocabularyTermSet,
showReferences=true
}) => {
const { originalRelatedNotes, isInEdit, dialog, rowIndex, mainRowProps } = originalRelatedNotesData;
const [localRelatedNotes, setLocalRelatedNotes] = useState(null) ;
const [editingRows, setEditingRows] = useState({});
const [errorMessages, setErrorMessages] = useState([]);
const booleanTerms = useControlledVocabularyService('generic_boolean_terms');
const noteTypeTerms = useControlledVocabularyService('allele_note_type');
const noteTypeTerms = useVocabularyTermSetService(noteTypeVocabularyTermSet);
const validationService = new ValidationService();
const searchService = new SearchService();
const tableRef = useRef(null);
Expand Down Expand Up @@ -371,7 +374,9 @@ export const RelatedNotesDialog = ({
<Column header="Actions" colSpan={2} style={{display: isInEdit ? 'visible' : 'none'}}/>
<Column header="Note Type" />
<Column header="Text" />
<Column header="Evidence" />
{showReferences &&
<Column header="Evidence" />
}
<Column header="Internal" />
</Row>
</ColumnGroup>;
Expand All @@ -395,7 +400,9 @@ export const RelatedNotesDialog = ({
headerClassName='surface-0'
className='wrap-word max-w-35rem'
/>
<Column editor={(props) => evidenceEditorTemplate(props, errorMessages)} field="evidence.curie" header="Evidence" headerClassName='surface-0' body={(rowData) => evidenceTemplate(rowData)} className='wrap-word max-w-25rem'/>
{showReferences &&
<Column editor={(props) => evidenceEditorTemplate(props, errorMessages)} field="evidence.curie" header="Evidence" headerClassName='surface-0' body={(rowData) => evidenceTemplate(rowData)} className='wrap-word max-w-25rem'/>
}
<Column editor={internalEditor} field="internal" header="Internal" body={internalTemplate} headerClassName='surface-0'/>
</DataTable>
</Dialog>
Expand Down
25 changes: 4 additions & 21 deletions src/main/cliapp/src/components/Templates/CrossReferenceTemplate.js
Original file line number Diff line number Diff line change
@@ -1,41 +1,24 @@
import { EllipsisTableCell } from '../../components/EllipsisTableCell';
import { differentiateCrossReferences } from '../../containers/allelesPage/utils';

export const CrossReferencesTemplate = ({ rowData }) => {
if (!rowData) return null;

const { crossReferences, curieField } = differentiateCrossReferences(rowData);

const sortedCrossReferences = crossReferences.sort((a, b) => (a[curieField] > b[curieField]) ? 1 : -1);
const sortedCrossReferences = crossReferences?.sort((a, b) => (a[curieField] > b[curieField]) ? 1 : -1);

return (
<div>
<ul type={{ listType: 'none' }}>
{sortedCrossReferences.map((a, index) =>
{sortedCrossReferences?.map((reference, index) =>
<li key={index}>
<EllipsisTableCell>
{a[curieField]}
{reference[curieField]}
</EllipsisTableCell>
</li>
)}
</ul>
</div>
);
};

const differentiateCrossReferences = (reference) => {
let crossReferences;
let curieField;

if (reference.cross_references) {
crossReferences = global.structuredClone(reference.cross_references);
curieField = "curie";
} else if (reference.crossReferences) {
crossReferences = global.structuredClone(reference.crossReferences);
curieField = "referencedCurie";
} else {
return;
}

return {crossReferences, curieField};

};
Loading

0 comments on commit 0ef5508

Please sign in to comment.