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

Please make HighLine beautiful like Yeoman #100

Open
FooBarWidget opened this issue Dec 11, 2013 · 7 comments
Open

Please make HighLine beautiful like Yeoman #100

FooBarWidget opened this issue Dec 11, 2013 · 7 comments

Comments

@FooBarWidget
Copy link

I discovered Yeoman recently and I'm really impressed by their terminal interface. Yeowman is a scaffold generator similar to "rails generate", but it's general-purpose and written in JavaScript. Their terminal interface:

  • ...use colors.
  • ...support arrow keys.
  • ...rewrite prompts after the user has answered, to make it look more beautiful.
  • ...is not restricted to printing text up to down. For example their menu interface moves the cursor using the arrow keys.

I feel very good when using Yeoman's interface. I had the feeling that it's very user friendly. I want my users to feel good as well when using my software's interface. So it would be really great if you can make HighLine beautiful as Yeoman.

It's really hard to explain Yeoman's interface. I've posted a screenshot here that gives you some idea of how it works, but for the full experience you should really try it out yourself.

screen shot 2013-12-11 at 10 47 58

For example, when asking for permission to track usage, it first displays a regular Y/n prompt:

====: (Y/n)

Then when you answer "Y", the (Y/n) is erased and replaced with a colored Yes string, as the one you see in the screenshot.

When asking which modules to choose, the menu there actually supports the arrow keys! You can press Up and Down, and the menu chooser arrow will go up and down, and the text "Press to select" will disappear. When you press space, the filled bullet will become a hollow bullet.

These kinds of subtle things make the terminal feel modern again.

Yeoman uses the Inquirer library for implementing most of its interface. Inquirer is a bit like HighLine. Under the hood, Inquirer uses cli-color for terminal color formatting and basic cursor moving, and readline for text prompts.

@JEG2
Copy link
Owner

JEG2 commented Dec 11, 2013

I'm not against these ideas. I would support pull requests that made these changes.

@ezekg
Copy link

ezekg commented Dec 6, 2014

Has anybody made any progress on this? If not, anybody want to help me tackle it?

@maxlinc
Copy link

maxlinc commented Jan 14, 2015

I don't have time to try to implement something right now, but if you take a stab I'd be happy to help review and provide feedback.

I'm not sure this'll be useful, but here's some code from when I was playing around trying to do something similar w/ Thor:
https://github.com/maxlinc/pacto/blob/simulator/lib/pacto/cli/selector.rb

@JEG2
Copy link
Owner

JEG2 commented Feb 5, 2015

We are currently planning the next major version of HighLine. We will include a discussion of this issue in the plans we make for that release.

@donaldguy
Copy link

A lot of the Yoeman features are available in inquirer.rb based on the inquirer.js used by Yoeman

@JEG2
Copy link
Owner

JEG2 commented Feb 13, 2015

This is very interesting. inquirer.rb looks like a HighLine competitor. I wasn't aware of it. Thanks for sharing.

@brancz
Copy link

brancz commented Mar 7, 2015

👍 on interactive inputs, (Y/n) for agree and [default] for defaults to be closer to conventions everywhere else for CLIs

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

No branches or pull requests

7 participants