unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.79k stars 270 forks source link

UX Proposal: Remove `push.create` in favor of `push` with a confirmation #3423

Open hojberg opened 2 years ago

hojberg commented 2 years ago

It's very easy to use push when pushing a new path to Share, resulting in an error message suggesting to use push.create instead.

We have this approach to help avoid users making mistakes, typo-ing and accidentally pushing to a location they didn't intend.

I think it'd help with ergonomics and paving the road most threaded by prompting the user with a Y/n question when encountering a new push destination and removing push.create entirely.

Suggested message:

It looks like `hojberg.public.textExtra.v2` doesn't exist in Unison Share.
Do you want to create it and push there now? Y/n

Open to alternative approaches that help mitigate this papercut that most users run into.


Also see prompts ticket: https://github.com/unisonweb/unison/issues/3422

There's a few other tickets related to the push command that might be worth taking into account/consolidating with this effort:

ceedubs commented 2 years ago

I totally agree.

Once we properly support a non-interactive mode (for example when not in a tty), we won't want to prompt in that one. I'm not sure whether the right answer in that scenario is to fail or go ahead and push.