Closed jmcmurry closed 3 years ago
this will require some updates to biolink, since different types will have different tabs, ie a phenotype page should not have a phenotype tab (at least for now). @deepakunni3 your thoughts?
@kshefchek So the API should provide counts even for categories with no association? This ought to be easy to implement.
How is this being rendered on the UI? Does it check for a category in the counts from the API and if count is >1 then renders the div for that category with the counts?
It looks that way glancing at https://github.com/monarch-initiative/monarch-ui/blob/master/src/views/Node.vue#L10
There is a flag for showing empty cards or not, I can test this out but suspect we will end up with too many empty tabs
diving in, this might already be supported by the UI code (although I wonder if this should be API driven as it seems like business logic), I should test this out before punting up to biolink
I removed the if statement here
if (count > 0) {
nonEmptyCards.push(cardType);
}
But it does not look great (and no scrolling), @jmcmurry @deepakunni3 see https://kshefchek.github.io/monarch-ui/ (edit: link is now outdated)
Okay, I'll get the API to send zero counts.
https://kshefchek.github.io/monarch-ui/gene/HGNC:17158
Thats a lot of tabs with zeros. Maybe this is not ideal. Is there a better way of representing this? Perhaps grouping the categories with zeros?
I agree, maybe it's only worth to show 0s for specific tabs? Or have a note on the overview tabs (there are no phenotypes annotated to this gene, but we have x ortholog phenotypes by breakdown). Also not the legacy app did not show 0s https://legacy.monarchinitiative.org/gene/HGNC:17158
Maybe this isn't such a big issue and we can just close this ticket. The whole reason why this ticket was raised was because there was confusion when there was no tab for a particular category, even when the user expected it to be.
Dear @deepakunni3 I think that the issue is actually critical. However, the problem is not whether there is a count of '0' or not.
In my opinion, the problem is that, in the absence of data, the call either hangs (it did the last time I tried, but not today), or no results are shown on the 'results' view, and the user is left to wonder whether this was intentional or there was an error.
See the example initially listed on the ticket,
So, the way I see it, a problem we could focus on addressing here is "what can we do to alert the user that there are no data of [this] kind associated with [this] entity?"
do we expect many users will type '#phenotype' into their URL bar when the phenotype tab is absent?
I would flag this as low priority. That said, I don't think we need ALL of the categories with zero results, but for phenotypes we should zeros that is our bread and butter and what people will expect to see. Also, in the fullness of time, we will want users to be able to suggest new sources of data (or papers or phenopackets etc) for the gaps.
Will this simple fix do the trick? For phenotypes only, I print out the number of associations when there are zero or greater number of associations.
Or, should there be an additional statement as Moni suggested, e.g., "There are no phenotypes associated with this [gene]."?
Maybe this was just recently updated, but this gene has an association https://www.omim.org/entry/615698
I think it is fine to just show "0 phenotype associations", people will understand it.
:bowtie: brilliant!
Eg. for here https://beta.monarchinitiative.org/gene/HGNC:17158#phenotype