griffithlab / civic-client

Web client for CIViC: Clinical Interpretations of Variants in Cancer
MIT License
50 stars 28 forks source link

Variant form fields now limits results to a gene (if specified), and warns if variant name is unrecognized #1435

Closed jmcmichael closed 4 years ago

jmcmichael commented 4 years ago

Variant fields in add and edit forms now show only the variants for the gene specified in the gene field (if entered). A new popup template displays 'Matching [gene] variants:' if the results are limited to a gene, or 'Matching variants:' if no gene limit is imposed.

Additionally, if a user enters a variant name that was not returned by the typeahead query, a message appears beneath the field: "WARNING: This appears to be a variant unknown to CIViC. Please ensure you wish to create a new variant before submitting."

I made a slight change to the behavior of the typehead: instead of waiting until the user enters at least one character before querying for the suggestion list, it immediately issues a query when the field is activated. I thought this might be useful in the case where a gene is entered. Upon entering the Variant field, the user can immediately see what variants are associated with that gene.

Closes #204; Closes #1313.

Typeahead menu limiting results to a gene:

Screen Shot 2020-07-21 at 08 29 15

Unrecognized variant message:

Screen Shot 2020-07-21 at 08 31 06