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

Style guide - Inputs #128

Open
jeffandersen opened this issue Dec 6, 2016 · 9 comments
Open

Style guide - Inputs #128

jeffandersen opened this issue Dec 6, 2016 · 9 comments

Comments

@jeffandersen
Copy link
Contributor

Placeholder for discussion about these facets of the style guide.

Talking points

  • Select lists
    • With and without "new item" input
  • Text input
  • Password inputs
  • Confirmation (Y/N/abort)
  • Args, command option and flag usage
@jeffandersen
Copy link
Contributor Author

jeffandersen commented Dec 8, 2016

Currently

Select

$ torus link -f
✔ Select organization: jeffandersen
? Select project:
+  Create a new project
   awesome
 ☞ www

Confirmation

$ torus unset ok
You are about to unset "/jeffandersen/awesome/dev-jeffandersen/default/*/*/ok". This cannot be undone.
? Do you wish to continue? [y/n]

@jeffandersen
Copy link
Contributor Author

I find our pointer character doesn't render the best across all fonts. We should think about replacements for that.

Colorizing the "Create new [object]" entry would provide better separation of outcome.

@ntassone
Copy link
Contributor

@jeffandersen and @jbowes and I discussed the pointer offline and @jbowes followed through! #150

@ntassone
Copy link
Contributor

The new object prompt needs to feel more separate imo. The plus doesn't quite get it there. Maybe a place to colorize? Or having the prompt start on create new would show that it can be selected and it is not a label.

@ntassone
Copy link
Contributor

I actually like the way we handle inputs now. It feels very intuitive, dim label with ? to indicate its an input, changing to a on completion, an if its input is incorrect.

Password inputs are great right now as well with ●●●● masking.

@ntassone
Copy link
Contributor

@jeffandersen what do you mean by:

Args, command option and flag usage

@jeffandersen
Copy link
Contributor Author

jeffandersen commented Dec 12, 2016

@ntassone args being torus cmd subcmd [arg] (ie. torus orgs create myorg), command options being torus cmd --command-option [value] and flags being torus cmd --flag (no value).

@ntassone
Copy link
Contributor

ntassone commented Dec 12, 2016

@jeffandersen Ah, gotcha, I put my thoughts for those on the main issue: #124 (comment)

@jbowes
Copy link
Member

jbowes commented Dec 12, 2016

args being torus cmd subcmd [arg] (ie. torus orgs create myorg), command options being torus cmd --command-option [value] and flags being torus cmd --flag (no value).

argument (or positional argument) is pretty standard for the bare thing on the command line, but the things with one or two -s in front (or heck, even a /!) are called all kinds of things: switches, options, flags, arguments. Sometimes the fact that it takes in its own argument or not changes the name. it's confusing.

I'd like to stick to 3 things:

  • commands/subcommands
  • arguments: the subject of the command.
  • options: stuff with -- that might be:
    • strictly optional (--verbose)
    • sourceable from other locations (env vars, config file)
    • not expressible with vanilla arguments (complex options with deps. avoid these)

regardless of if it has its own argument, we should just call it an option.

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

4 participants