-
Notifications
You must be signed in to change notification settings - Fork 0
Implement a better UI approach to "settings"/"preferences" #120
Comments
Take a close look at https://github.com/bdparrish/cytoscape.js-toolbar. Consider having the graph cover the entire vertical browser height, but having the left side (say, 20% or so) of the screen be taken up by a small HTML toolbar with collapsable stuff. If we could omit jQuery, actually... that'd be kind of nice. But certainly not necessary. Just play around with stuff. Actually tie this in with #68, if possible -- once we get a better toolbar set up, we can use that to supplant messy dialogs for a lot of stuff (it'll make searching, for one thing, a lot easier). |
Definitely a step in the right direction. Next up on the UI front are, I think: -Moving some stuff from "dialogs" to being displayed inline in the control area (searching, selected element info, assembly info (?)) -Adding some more functionality to the control area that we would've previously had to throw into dialogs. (e.g. current component info, FASTA construction stuff, ...) -Using Bootstrap to make the control area look pretty -Using Bootstrap in place of jQuery throughout the application -Removing jQuery as a dependency, replacing it with Bootstrap
Ah, so it seems enforcing a width of, say, 20em (whatever the max width of the content in the controls div is) would afford us the small-screen capabilities we'd need. And then we could just add some sort of "toggle" button (similar to that of the controls thing in this demo) to ensure that the user can switch the controls on or off (we'd need to call |
Done! The controls div can now be toggled, and the |
We might want to consider implementing some buttons (fitting, collapsing, ...) as stand-alone absolutely-positioned buttons with a high z-index, similar to how we've placed the controls toggling button (similar to how the wine and cheese map, another Cytoscape.js demo, does it, and somewhat similar to how Google Maps positions zooming/etc. info in the bottom-right corner of the interface). This would make it easier to interact with the graph while it's at its full width, without compromising display on small screens if we do this right. |
Beginning to implement Bootstrap kind of broke a lot of things at first, so I took a while to go through the code and ensure all functionality remained the same before committing the changes here. (Hence the large size of this commit, sorry.) Major changes: -All UI elements that aren't dialogs or within dialogs have been switched from jQuery UI to Bootstrap. -Switched the #controls and #cy divs to be absolutely positioned using em units, which should scale better to smaller screens and should help us with doing things like... -Added a "controls toggler" that removes the controls div and frees up more space for the Cytoscape.js graph. -Moved fitting buttons to be present on top of the actual Cytoscape.js graph display (using absolute positioning and z-indices in CSS). I'm pretty happy with these buttons now, and I might make some other buttons (collapsing, searching?) present on the display in the future (although it's really nice to be able to display lots of information inline in the controls div now). -Added the glyphicons fonts (those are used in Bootstrap). -Created css/, js/, and fonts/ directories within the viewer/ folder (to more easily distinguish types of files). -Made the controls div blue, because it looks nice. ...Probably going to change that in the future.
Updating this after the fact to comment that the controls div toggling stuff works SO WELL on my phone it's crazy. I'm really, really excited about this. |
The approach of just having a ton of buttons isn't very scalable when adding new features. Ideally we'd have something like a dropdown bar that pops open dialogs, but maybe we could use one or two buttons + a series of dialogs to handle that?
Say we want to allow the user to determine the factors that color nodes (by G/C content, depth, etc). How could this be done intuitively and without taking up a ton of top-bar menu space?
The text was updated successfully, but these errors were encountered: