-
-
Notifications
You must be signed in to change notification settings - Fork 624
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
Make CLI more empathic to the user #1261
Comments
Hi @rishabh3112. Any progress on this yet? I'd like to pick this issue up. |
Hi, I am currently working on polishing the handling of the invalid flag case. |
@rishabh3112 Cool. |
I really like this git features, when user gives some invalid command then it shows the list of possible commands that the user may want to use. ~/Desktop/webpack-cli$ git statu
git: 'statu' is not a git command. See 'git --help'.
The most similar commands are
status
stage
stash It really helps users understanding the CLI in easy way. This could be one of the way to handle invalid commands and flags. |
@rishabh3112 I read the docs above and found that now we have covered major of the things in recent months like -
anything else you want to specify? |
There is definitely an improvement but there are couple of this still left to be addressed:
In nutshell, aim of this issue is to make CLI better at helping user and not just being better doing work for the user (which it (almost) already is). |
We validate configuration, so https://github.com/webpack/schema-utils respect for this, for other internal errors we already have good messages, maybe we can improve it in future, but not I don't see problems
Can you clarify? |
Errors are pretty "informative" in my opinion as well. But if we provide errors with a lot of webpack related jargons to a complete novice, they would never know what would be "next step" for resolving that error. It contributes to increase in learning curve required to use webpack.
Like in This issue is pretty open ended but we should at least reach a baseline where new users are able to get working on a project w/o going through a big learning curve to actually learn how to use it and resolve problems they face in between quickly. |
Can you provide example? I think it is out of scope webpack-cli, because only webpack known what option is mean and how it can be fixed. I think related https://github.com/webpack/webpack/projects/7
It should be in |
Yes, these hints for errors should be provided by the webpack. CLI can just log them. |
Need focus on this after refactoring |
I think we done #1261 (comment), I think ask developers on invalid flags is not good idea, because most of developers use If somebody want to more colors - PR welcome |
Is your feature request related to a problem? Please describe.
Currently CLI gives error or gives whole help in case of invalid interaction with the CLI.
I propose to make the CLI respond to errors and invalid flags with prompts to help user to get their work done instead of forcing user to study errors and correct their command to CLI.
Describe the solution you'd like
I would like user to answer prompts in case of invalid value of a flag or invalid flag altogether to let user complete it's task.
I have started working on this with #1255 which is aimed for invalid flags.
For further work on this issue we need to validate the value of args passed by user before passing their value to the webpack complier so as to avoid errors.
Describe alternatives you've considered
Alternatives are already in place, i.e. printing full help and showing just errors.
Additional context
https://github.com/lirantal/nodejs-cli-apps-best-practices/blob/master/README.md#12-build-empathic-clis
The text was updated successfully, but these errors were encountered: