Open psmacmur opened 9 years ago
Jorrit contributed the API syntax we'll need in order to implement this:
[http://api.globalbioticinteractions.org/interactionTypes?taxon=Rattus%20rattus]
This should be pretty easy to add to the dropdown in the Explore dock.
HOWEVER It will be more difficult to figure out what to do about the cards. Currently I think the icons are hard-coded in the cards. It would need another api call for each card to the interactionTypes, to figure out which icons should be shown.
Then we'd have to decide, should we just not render the icons or grey them out? It might look strange to have "holes" in the cards, but then again, disabling an option might also be confusing.
Yeah I agree; I don't think we should tackle this in the scope of IVMOOC 2015. There are both UX and performance concerns, as you described.
Ideally, the cards and the "Do" dropdown should only offer interactions for which the current taxon actually has hits. From #28 , If there are hits for a given interaction, it might be nice to show the count of hits right in the link; otherwise, replace it with the best available interaction (front), grey it out (back) or remove it altogether ("Do" dropdown).
This is an idealistic, pie in the sky, requirement, because at the moment I believe its not feasible with the API. It might require some sort of index structure in the underlying database.