Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Implement a better UI approach to "settings"/"preferences" #120

Closed
fedarko opened this issue Jan 2, 2017 · 8 comments
Closed

Implement a better UI approach to "settings"/"preferences" #120

fedarko opened this issue Jan 2, 2017 · 8 comments
Assignees

Comments

@fedarko
Copy link
Owner

fedarko commented Jan 2, 2017

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?

@fedarko fedarko self-assigned this Jan 2, 2017
@fedarko fedarko changed the title Figure out a better UI approach to "settings"/"preferences" Implement a better UI approach to "settings"/"preferences" Jan 2, 2017
fedarko added a commit that referenced this issue Jan 2, 2017
Yeah, I'm happy with this.

Obviously there remain UI issues to fix (#120) and various
optimizations/simplifications to work on (#80, #115, ...) but this
is a pretty cool feature to add.
@fedarko
Copy link
Owner Author

fedarko commented Jan 7, 2017

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).

@fedarko
Copy link
Owner Author

fedarko commented Jan 7, 2017

Concept diagram of what a control panel could look like, with all the current AsmViz controls included --
control_panel_concept_diagram

fedarko added a commit that referenced this issue Jan 11, 2017
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
@fedarko
Copy link
Owner Author

fedarko commented Jan 16, 2017

also, the controls div needs to be scaled using bootstrap or something so that it works on small-screen devices. screenshot from my phone illustrating why a constant 20% width isn't great on small devices:
screenshot_20170116-044446

(anecdotally, the controls div works fine when I switch to landscape mode for my phone)

@fedarko
Copy link
Owner Author

fedarko commented Jan 18, 2017

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 cy.resize() in the toggle section, I think).

@fedarko
Copy link
Owner Author

fedarko commented Jan 18, 2017

Done! The controls div can now be toggled, and the cy div changes width accordingly. Cool.

@fedarko
Copy link
Owner Author

fedarko commented Jan 19, 2017

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.

fedarko added a commit that referenced this issue Jan 19, 2017
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.
@fedarko
Copy link
Owner Author

fedarko commented Jan 19, 2017

We still have a way to go on improving the UI, but I'd say that this has been supplanted by #137, #138, #139, #140, and will continue to be supplanted by other small issues for things.

@fedarko fedarko closed this as completed Jan 19, 2017
@fedarko
Copy link
Owner Author

fedarko commented Jan 19, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant