EBIvariation / trait-curation

A web application for manual curation of trait-to-ontology mappings, including provenance and integration with EBI SPOT stack.
Apache License 2.0
2 stars 2 forks source link

Make a combination of text/status filters on the main page a bookmarkable URL #42

Open tskir opened 4 years ago

tskir commented 4 years ago

Discussion history from https://github.com/EBIvariation/trait-curation/pull/36#issuecomment-644216291:

Another consequence of instant search is that it's not possible to bookmark a combination of specific filters, as there isn't a dedicated URL to use for that. If this can be fixed easily, then please do so as part of this PR. Otherwise, we can create a separate low-priority issue in the backlog for that.

Yes, that is the drawback of using JavaScript to filter. We cannot include the filters in a URL so I think we should add a new issue for that, although I am not quite sure what that would be. Possibly a page with query history?

I think it should be possible to manipulate URL from JavaScript both ways. I.e., when user changes something (enters text or clicks on one of status buttons), a script could both update the table and modify the URL. And for the reverse flow, if the page is loaded with some parameters specified in the URL, the script could take them and apply the filters to the table immediately after the page loads.

This can probably be done with History API. Since I'm not a web developer, this idea can be horribly wrong :)

tskir commented 4 years ago

This is a very tiny detail which is not really relevant to any of the use cases I know for our app. So this should be considered very low priority, if ever implemented at all.

tskir commented 4 years ago

For example of what I mean, see the EVA website: https://www.ebi.ac.uk/eva. Internally it's implemented as a one huge page controlled by JavaScript. When you click on any of the tabs, you will notice that while the action is performed by JavaScript without actually reloading the page, the URL still updates and can be used to return to that state of the page