kipoi / website

http://kipoi.org
4 stars 3 forks source link

Make the barcharts clickable #56

Open Avsecz opened 6 years ago

krrome commented 6 years ago

I think it would be possible the following way: Enable parsing the search sequence from an URL GET-style request in javascript, e.g.: http://kipoi.org/groups/?s=tensorflow This could be parsed by a javascript function that is triggered by e.g. $( document ).ready() in jquery which then puts that in the search bar and triggers the search.

The barcharts can then generate the URL simply by writing the GET request URL

zupan commented 6 years ago

@krrome you are right. DataTables library allows entering the pre-search string that is used to filter down the result set when initializing table on page load.

Just the JS logic of reading from and updating the URL is needed and then we have a solution allowing to link to arbitrary subset and also automatically generating reflecting URL for any search query.

krrome commented 6 years ago

Perhaps this is useful, but maybe an overkill as we don't need full mapping/parsing of a get-request: https://stackoverflow.com/questions/8486099/how-do-i-parse-a-url-query-parameters-in-javascript

zupan commented 6 years ago

True. There are simpler snippets made exactly for this features that we can adapt: https://github.com/wet-boew/wet-boew/issues/6622#issuecomment-265833271