ontodev/gizmos

Switch to search when a node has too many children

Opened this issue · 3 comments

We have a new use case where we 'human protein' has 20,000+ children from Uniprot's reference proteome. Gizmos can generate HTML for 20,000 children, but most browsers will hang when they try to render it. So if a node has more than X (maybe 100?) children, we need another way to view them.

I've been thinking of searching the children with the table in #96, but I'm still a big fuzzy about exactly what we should show the user. Suggestions?

We could just have a link under the parent class that says "browse N children" (or something like that) and directs you to the table. Then when you click on a term, it only shows that term under the parent and then the same "browse N children" link under that.

I'm not sure I understand, but please go ahead and let's see what it looks like.

This hasn't been implemented in gizmos, but nanobot uses custom JS to do this, which overrides the show_children() function:
https://github.com/ontodev/nanobot/blob/f3dd0689c424765a41d523b59298c2e69e9e1535/nanobot/templates/template.html#L295-L316