cordova icon indicating copy to clipboard operation
cordova copied to clipboard

Unsuccessful (because not existing) cordova commands

Open janpio opened this issue 6 years ago • 2 comments

I looked a bit at the Cordova Telemetry data about the commands executed: https://datastudio.google.com/reporting/0B-Ja5cNOX_XLTElHdWd4V2NUem8/page/zkJF

Looking at the unsuccessful commands, you quickly notice that quite a few are common misunderstandings (or just mistypes of) what Cordova commands exist:

image (standard current data set, filtered to >100 usages)

When the user uses one of those commands they already get a helpful note to use the help command:

λ cordova install                                                                           
Cordova does not know install; try `cordova help` for a list of all the available commands. 

But I think we could do better.

For all the subcommands that are missing platform or plugin, we could just tell them that e.g. "add is only a valid subcommand of cordova platform or cordova plugin" (or similar, same for remove and rm etc.).

ios and android are only valid parametrs for subcommands of platform like cordova platform add, cordova platform run etc.

Common typos we could just accept and redirect to the correct command: platfrom, plataform, plaform, plateform, paltform, requirement etc.

Mixups between CLIs as well: start should probably be create (and is because Ionic CLI calls their "create new project" command start)


Is there any reason why we should not do this and improve the live of our users?

janpio avatar Feb 17 '19 14:02 janpio

I added a graph to that telemetry page that tracks the total distribution of successful vs unsuccessful commands over time:

image

unsuccessful is pretty stable around 16-20%.

Further look at the commands I mentioned above, the typos and other non-existing, they are 5% of those. So they have a pretty small impact on the total numbers, but still could improve the experience of individual users a lot of course.

janpio avatar Feb 17 '19 14:02 janpio

I also think we could improve this area to help the users.

A possible problem with the auto-correction, that we can't be sure what the user actually wanted to type. I was wondering, what if we did something like git. For the common typos and mistakes we could say:

'plat' is not a valid Cordova command.

Most similar commands are:
'plat'
'plugin'

However, this would not resolve the issues of if the use the sub-comman, before the primary command.

GedasGa avatar Apr 16 '19 08:04 GedasGa