JonyEpsilon / gorilla-repl

A rich REPL for Clojure in the notebook style.
http://gorilla-repl.org
MIT License
887 stars 104 forks source link

Better interface for commands #95

Closed JonyEpsilon closed 10 years ago

JonyEpsilon commented 10 years ago

The current interface is that commands are runnable from key combos, and they are listed under the help popover (which is not that usable for some people, see #88). There's some discussion with @zerko on #79 which goes beyond worksheet loading into more general thoughts about the UI, which I am continuing here.

It would be nice to accommodate users who prefer not to use keyboard shortcuts, and make it possible to drive the commands with a mouse. And the command help list needs some improvement. How about this as a proposal that might be better:

We adopt a command dialog, in the spirit of Sublime's Package Control (PC), or LightTable's (LT) command pane. So, some keyboard shortcut - or clicking the icon in the top right of the page (which should probably change from a question mark to a three-bar menu icon, or similar) - will pop out/over a command dialog. This will list the commands, like the current command list, but be scrollable. The commands will also be clickable so mouse users are accommodated.

Adding a text box to select commands, like PC/LT, would be useful as it would allow people to select commands from the keyboard without using the shortcuts, improving the usability for people who don't like the key combos, or their default assignments (although see #81 ).

And, if we did add a text field, then we could use this UI for the worksheet loading list as well, with the list of commands replaced by the list of possible worksheets, and the text-box allowing to select between them, or open a worksheet outside of the project structure (and thus wasn't caught in the scan).

This would be a bit of work, but would give people more options in how they interact with the commands, but still be satisfyingly simple and clean.

zerko commented 10 years ago

I am :+1: on this. Which makes it prerequisite for load dialog, do you want to implement this yourself? If not, i would love to see some mocks on size/position of commands palette.

JonyEpsilon commented 10 years ago

I'm happy to work on it, but won't have time for a week or two - so if you'd like to do it then that would be fine (or, indeed, excellent!) with me.

For mocks, I'd refer to the old saying that imitation is the sincerest form of flattery, and go for something very similar to PC or LT. I think PC's style of popping over the middle of the screen might be more practical for our layout, but the LT sidebar would be nice in that it could be displayed permanently for those who want to use it like a menu.

We can always tweak the styling once we have the functionality about right.

Screenshots of PC and LT:

screen shot 2014-04-09 at 15 59 33

screen shot 2014-04-09 at 16 00 06

mostalive commented 10 years ago

It would be cool if the menu options also work on a tablet or phone. Fire up a REPL on a computer, retire to couch for relaxed playing with clojure and graphs. Main thing, I guess, is to not make things only accessible through hovering over something (although some newer phablets seem to have that).

Anyway, cool to see movement in this direction.

JonyEpsilon commented 10 years ago

This is looking good now, at least for commands. Need to integrate file browsing.

JonyEpsilon commented 10 years ago

File browsing integrated.