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

Successful prompt indicator #44

Closed
href opened this issue Jan 6, 2022 · 7 comments
Closed

Successful prompt indicator #44

href opened this issue Jan 6, 2022 · 7 comments

Comments

@href
Copy link

href commented Jan 6, 2022

Is your feature request related to a problem? Please describe.
When the user inputs data, the default prompt shown begins with a light-green question mark. When the input completes, that question mark remains.

Describe the solution you'd like
I would love for the question mark to become a check mark or so.

Additional context
Thank you for this library. I really like the prompts I’m able to create with it!

Example (using Dialoguer)

@mikaelmello
Copy link
Owner

I really enjoyed this improvement. It should also be customizable.

What do you think about the default behavior, would you expect it to be the checkmark or the current behavior of keeping the question mark?

@href
Copy link
Author

href commented Jan 8, 2022

I personally would prefer the check mark as a default, but then that’s what I want to use anyway. For backwards compatibility I would probably leave it as is.

Another option would be for the check mark to become the default for prompts that use a validator that successfully checked the input.

@mikaelmello
Copy link
Owner

Another option would be for the check mark to become the default for prompts that use a validator that successfully checked the input.

I can see this being a little confusing for users when there are two prompts, one with validators and one without. Validators are kind of transparent to end users unless they submit an invalid input. So if they submit everything right, it might be weird seeing one question with a checkmark and then another question maintaining the '?'.

I personally would prefer the check mark as a default

Me too, but this affects backwards compatibility (as you mentioned) and there's no good ASCII character for checkmarks =/

It's going to be customizable then! Is this PR you'd like to make? I'm starting a new job next week so not sure I'll have the time in a while.

@href
Copy link
Author

href commented Jan 9, 2022

Sounds like a plan. Pretty new at Rust, so I likely need some help during the review process, and I don't have much time either - but I'm happy to give it a shot as soon as I get a chance.

@mikaelmello
Copy link
Owner

Hey, I've got some time to spare so I'll work on it real quick :)

@mikaelmello
Copy link
Owner

Closed via d09a625

@href
Copy link
Author

href commented Jan 19, 2022

I tried it out and it worked just as I wanted. Thank you so much for your work! ❤️

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

2 participants