himynameisdave / git-labelmaker

:flags: Manage your GitHub labels from the command line!
MIT License
574 stars 33 forks source link

Provide a way for the user to escape from their current selection #82

Open CloudNiner opened 7 years ago

CloudNiner commented 7 years ago

If I select the wrong option in the CLI, or change my mind and want to return to the previous menu, it appears the only current recourse is to CTRL+C and restart the program. This requires re-entering a token or the saved token password and navigating back through the menus.

For example, if I follow the prompts to the "Which label would you like to remove?" option, I must select at least one, and there is no way back to the previous prompt. The keys 'esc' and 'q' (two intuitive options) don't appear to have any effect. Thus, if I don't actually want to remove a label, I'm stuck in at this prompt.

screen shot 2017-07-17 at 15 12 47

(Great tool by the way, super useful!)

himynameisdave commented 7 years ago

Yeah you're totally right though, that is an annoying UX. I think the behaviour should be as follows:

Thanks for the suggestion. I am not sure when I will be able to get around to implementing this (so if you're feeling adventurous or really need this implemented, feel free to open a PR) but it has been noted and is something I would like to get into an upcoming release.

CloudNiner commented 7 years ago

I'm not sure overloading ctrl+c is a clean way to offer the "go back one menu" functionality, the keys "esc", "backspace", "q" or "b" might feel more natural. With that said, I'm not super familiar with really any of these nodejs CLI programs, so if ctrl+c for that is a standard convention then that makes more sense.

Either way, no hurry on an implementation, it's just something I noted as I used the tool for the first time. This feels like the type of thing that might be difficult to get right such that the workflow feels natural!

Jameskmonger commented 7 years ago

CTRL+C normally exits the program. I don't think we should override standard behaviour.