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

Disabled style #790

Open
arcanis opened this issue Mar 6, 2019 · 4 comments
Open

Disabled style #790

arcanis opened this issue Mar 6, 2019 · 4 comments

Comments

@arcanis
Copy link

arcanis commented Mar 6, 2019

Would you be open to change the "disabled" appearance?

Things I think would improve the UX:

  • Remove the - prefix, so that the options become aligned (as it currently is the disabled options actually stand out more than the active ones)
  • Don't prevent the user from selecting one but refuse accepting it with Enter, and change the cursor to become instead of . Potentially make the line red instead of blue.
  • In my case the reason why an option is disabled is part of the generated label, so I'd also like a way to disable the default (Disabled) suffix - otherwise I have to parse my generated label
? Which range to you want to use in @berry/pnp ❯ devDependencies? (Use arrow keys)
❯ Keep webpack@^4.28.4 (no changes)
  Reuse webpack@^4.28.4 (originally used by @berry/[email protected], @berry/[email protected], [email protected])
  - Use latest (unavailable because enableNetwork is toggled off) (Disabled)

Would become:

? Which range to you want to use in @berry/pnp ❯ devDependencies? (Use arrow keys)
❯ Keep webpack@^4.28.4 (no changes)
  Reuse webpack@^4.28.4 (originally used by @berry/[email protected], @berry/[email protected], [email protected])
  Use latest (unavailable because enableNetwork is toggled off)
? Which range to you want to use in @berry/pnp ❯ devDependencies? (Use arrow keys)
  Keep webpack@^4.28.4 (no changes)
  Reuse webpack@^4.28.4 (originally used by @berry/[email protected], @berry/[email protected], [email protected])
✗ Use latest (unavailable because enableNetwork is toggled off)

I can offer to make the PR if you like those changes.

@SBoudrias
Copy link
Owner

This change looks fine to me. Let's just add an error message "this option is disabled" when pressing enter on a disable line.

@verheyenkoen
Copy link

I'd also like it if you could alter the color for disabled choices (like grayed out).

@LitoMore
Copy link
Collaborator

LitoMore commented Jul 4, 2022

@verheyenkoen You could use FORCE_COLOR=0 to disable colors. See https://github.com/chalk/chalk#supportscolor.

@verheyenkoen
Copy link

verheyenkoen commented Jul 4, 2022

@LitoMore I mean that I'd like it if you could tweak the color somehow for disabled choices (using colors "dim" or "blackBright/gray"), so it's more clear that they are not available. Currently they only have a textual prefix/suffix and default color, and the prefix is confusing as it could be interpreted as hierarchical:

image

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