Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pressing enter should insert a newline by default, not submit #56

Open
aseemk opened this issue Mar 12, 2013 · 16 comments
Open

Pressing enter should insert a newline by default, not submit #56

aseemk opened this issue Mar 12, 2013 · 16 comments

Comments

@aseemk
Copy link

aseemk commented Mar 12, 2013

This is similar to neo4j/neo4j#10 -- but humorously, I'm asking the opposite here!

The primary use case for the webadmin (originally, and to me at least) was to quickly inspect a node or relationship by ID. So there, having enter insert a newline by default, and requiring ctrl+enter to submit, was an annoyance.

Here, the primary use case for the console textbox is to enter Cypher queries, and any non-trivial Cypher query is (or should be at least) multi-line -- with the starter example query being a perfect example. So here, having enter submit by default, and requiring shift+enter to insert a newline, is also an annoyance.

But worse, here, it's actually dangerous, as a CREATE or SET or DELETE could happen prematurely. It's not the end of the world with this console, since you can refresh to reset, but if you're actually using the console to try things out, you could be in a state far removed from the initial one.

Please strongly consider switching the defaults here. (And like neo4j/neo4j#10, be liberal in meta keys: shift+enter should work to submit, but so should ctrl+enter and cmd+enter on Mac.) Thanks!

@freeeve
Copy link
Contributor

freeeve commented Mar 12, 2013

-1, I like the current way. Accidentally sending a query is never unrecoverable... perhaps we need a poll for this.

@freeeve
Copy link
Contributor

freeeve commented Mar 12, 2013

I find it amusing that you're asking for the opposite here. Why so fickle? :P

@aseemk
Copy link
Author

aseemk commented Mar 12, 2013

Haha, in case you're not being rhetorical, I explained the difference (to me, at least) in my original post: the webadmin (at least at the time of the change) was primarily for looking up nodes or rels by ID -- without Cypher, as a simple single-line input -- while this console should be optimized for ease of entering and editing multi-line Cypher queries. You don't agree there's a difference in use case?

@freeeve
Copy link
Contributor

freeeve commented Mar 12, 2013

I think switching it now would be a worse user experience than not switching it. (I for one, am sure that I would mess it up far more often after the switch). I usually find myself hitting enter in the webadmin console and adding lines, since it feels backwards to everything else out there. But I use console 100x more. Maybe we should make a configuration variable for this, set in a perm cookie. Same with color preference, so David can have his white background and everyone else can have the dark.

@aseemk
Copy link
Author

aseemk commented Mar 12, 2013

Any change is always going to have a cost, especially for power users. IMHO, I don't think we should be optimizing for that in console.neo4j.org -- especially because beginners and new users are a primary target audience for it.

A pref isn't bad, but just doing "the right thing" is so much better. The change notwithstanding, do you agree that the console should be optimized for multi-line input? If so, we should just do it. Just my two cents though. =)

@freeeve
Copy link
Contributor

freeeve commented Mar 12, 2013

I think the FB-style is "the right thing", because it's more common in practice. I often type my query on one line and send it so it auto formats for me to multiple lines. Only very complex queries get manual carriage returns. It is a bit weird that the web admin is the opposite. Maybe that's reason enough to "converge" to a standard, although my opinion remains that it should be enter to send (on both).

@aseemk
Copy link
Author

aseemk commented Mar 12, 2013

FWIW, the FB-style you're referring to is only the default for comments, but not for posts or messages. Try it out. =)

There's a lot to be said for optimizing for the common scenario in each case, but there's also a lot to be said for UI affordances: single-line textboxes give the affordance that pressing enter will submit, but multi-line textboxes give the affordance that pressing enter will insert a newline.

It's good that the webadmin textbox is multi-line, and similarly, the console.neo4j.org textbox clearly appears multi-line by default.

@freeeve
Copy link
Contributor

freeeve commented Mar 12, 2013

True. Btw, you know you can run your own rabbithole without much effort, right? (even against your own database) The changes you want could be made in ~5 minutes, and you could be happy off in your own world. Maybe a few more people chiming in saying your way is "the right way" would convince me.

@aseemk
Copy link
Author

aseemk commented Mar 12, 2013

I didn't know that -- I didn't even know console.neo4j.org was called "rabbithole" =) -- thanks. But I'm not set up for Java development, and of course I'd rather not maintain and administer my own instance if I can avoid it.

I know you know that, and I don't mean to be making an excuse. I just want to convey my feedback as a regular user, from a simple UX perspective, that's all.

@freeeve
Copy link
Contributor

freeeve commented Mar 12, 2013

Bah, you're not a "regular user", as much as I'm not. For one of the meetup talks I spun up 3 different rabbithole instances on their own port (on my macbook), each backed by a real database folder. The d3 kind of chugs when you have too many nodes, but it's neat to be able to make changes to something permanent with it. I prefer it to the webadmin--but obviously for real datasets, we'd need something that can filter the data to a subgraph or something before displaying. All you need is maven installed and you can build/run it (instructions in the readme in this repo). I do all my java dev (whenever I am forced to) in vim nowadays--you don't need some sort of special setup.

@aseemk
Copy link
Author

aseemk commented Mar 12, 2013

Haha, point taken. I might look into it one day then, thanks. =)

@jexp
Copy link
Member

jexp commented Mar 12, 2013

git clone https://github.com/neo4j-contrib/rabbithole
heroku create app myrabbit
heroku addons:add neo4j
git push heroku master

The neo4j db is only needed if you want to share from that instance :)

But anyway, I agree with both of you. Hitting enter to execute a query is a convenience I don't want to miss. Hitting enter to insert a newline is the same good thing. Could it be more intelligen? Like hitting enter at the end of a line inserts a newline otherwise executes?

And if you want to break an existing line into two parts you would have to use shift-enter?

Does any of you hit the shiny run button with a mouse?

I think adding the prefs cookie would still be a good thing.

Michael

@ghost
Copy link

ghost commented Mar 9, 2016

Couldn't you highlight the damn alternative of the "enter" for newline >:( Should people go through all of your discussion to get what google brought them here to get ?

@ddunn801
Copy link

aseemk is spot on. If enter is going to execute automatically, then you need to make it MUCH more clear how to get it not to do that when entering a multi-line query. Currently, there is no obvious way.

@stanleybishop
Copy link

+1

@r-chandra-1
Copy link

Anyone coming from google who'd like to turn of Enter = submit - do a Shift+Enter, so the console text area enters a multi-line mode.

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

No branches or pull requests

6 participants