Closed Sakshisrivastava413 closed 4 years ago
Yes, the things you mentioned also came in my mind.
I also thought not to hardcode the ontology namespaces but in go-term-viz
the namespaces were hardcoded, so I thought we might need only those 3 of them.
For avoiding the re-run of query and saving the state once, I think filtering is better on DB instead of doing it on frontend since it won't much much sense and can give a bad UX.
What do you think?
For avoiding the re-run of query and saving the state once, I think filtering is better on DB instead of doing it on frontend since it won't much much sense and can give a bad UX.
I think this would be true if we were talking about larger amounts of data, but in this case it's at most 100 items and usually much less (although I haven't run this query enough, so I may be wrong). With today's webapps being increasingly focused on the clientside, I do think it makes sense as it's pretty common to basically have a database on the client (pretty much all React+Redux apps do this). In this case, we gain some real advantages as well: flexibility (not hardcoding) and performance (a single request).
I don't understand how it relates to UX though, as it's an implementation detail.
If this ends up working well, I do think we should create an issue for this in go-term-viz
as well.
Yes, you are right then. I assumed that we have large amount of data, say 10,000 items. I understood the changes and will work on the improvements.
Changes:
Removed the ontology filter from the query. Showing the ontology list by filtering the distinct namespaces from the query instead of hardcoding the ontologies. Created a map according to the available ontologies and passed data to the GeneOntologyNetwork
to create cytoscape graph config as per the selected ontology.
I had to rename controls.js
to Controls.js
as otherwise it wouldn't build on Unix-likes, as they're case-sensitive.
Objective: A filter panel to query the data according to the selected ontology term. #8
ontology namespace
as its value(Screenshot for reference)