openphacts / explorer2

Ember JS web application used for browsing the Open PHACTS Discovery Platform
MIT License
2 stars 1 forks source link

Progress bar for asynchronous requests? #23

Open stain opened 9 years ago

stain commented 9 years ago

Raised by Jaroslav Martasek / Lilly:

As a lot of the results is loaded asynchronously it would be nice if some sort of progress bar was present.

ianwdunlop commented 9 years ago

There should be a spinner when things are loading, if it's missing from any of the pages then please let me know. Not sure where the progress info would come from. The explorer asks the api for some results then waits until it gets them

jmartasek commented 9 years ago

E.g. https://explorer.openphacts.org/search?query=cocaine The spinner spins while the rows are loaded. When related counts are loaded (pharmacology, pathways) these just happen in the background without the user knowing.

E.g. 2 - https://explorer.openphacts.org/compounds/pharmacology?uri=http%3A%2F%2Fwww.conceptwiki.org%2Fconcept%2F13b4b707-8df0-4131-84b4-5433659e6ccf the first load does not have a spinner. The subsequent scroll-down loads do.

ianwdunlop commented 9 years ago

One of the reasons there are no spinners for the related counts is because they might be 0. Is this information also useful?

ianwdunlop commented 9 years ago

eg. Here a count of 0 is displayed inside a red badge explorer-zero-count

Or we could show it similar to how the 'object' view does it:

explorer-zero-is-no

danidi commented 9 years ago

I would favour the second possibility. The red counts are getting too much attention for something that's not there (but which is not necessarily an error).

Or maybe you could add a search status in the header (next to Compounds 19, Targets 1). Something like: Searching Compounds... Searching Targets... Fetching pharmacology data for compounds... Fetching pathways for compounds... ... Finished search.

This way the user would know what data is searched, even if no results are found.