-
Notifications
You must be signed in to change notification settings - Fork 227
UX: azd init confirmation declined message #5187
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should show anything "Successful" about cancelling the prompt. The user declined the message and therefore the initialization failed.
We should come up with a better error message but IMO should stay as a red ERROR message.
People might think that there was an error while trying to decline the overriding. Maybe we need a more neutral output for a no-op message. The green color and SUCCESS message implies AZD did something successfully. The red color and error means AZD encounter an error while trying to do something (either requested by the user or part of a process). What we need here is a way to communicate: "Ok, nothing happened. Nothing's changed". Some other program would just not-output anything else and terminate w/o any specific output. There would be just a verbose log in stderr like "user cancel operation. Program exit without changes. No revert or rollover required". The message would only be visible with |
This makes sense to me as well, I think I'd prefer a neutral message (and neutral colour) without the "SUCCESS:"/"ERROR:" prefix, or not print anything at all |
Maybe we display in our warning (yellow) color and then just return an appropriate exit code. Based on my quick research a common exit code for use cancellation is |
Just my $0.02: Taking inspiration from what everyone has already said and being slightly inspired from other tooling, I wonder if using our ![]() It might achieve the result of softening the UX impact of the cancellation error, but retain the behavior of representing the user-cancellation request as a non-success state. @SophCarp for final thoughts here; there's a lot of good commentary on the PR comments above. |
If we are collecting telemetry after errors (AZD returning non-zero exit code), could this be misleading to see as an error in the reports? After all, AZD is just doing what is been asked... So, I think we have 2 things to consider:
|
Did some quick mockups of everyone's suggestions as best I understood them 1: Error, with longer description (@wbreza) 2: Error with suggestion @weikanglim 3:Success @SophCarp and @kristenwomack 4: Warning @wbreza 5: Warning with Exit Code @wbreza 6: Neutral text @vhvb1989 and @JeffreyCA Personally, I think neutral is best. I wasn't sure if this is how the exit code is formatted, but I do like having an exit code, so that's my second-place item. I think errors make a user think they made a mistake (and it's incorrect to give an error when azd is following the users instructions). |
I prefer either error or warning text followed by a next steps description. It is not required to print anything about the exit code to the user - that is purely for the calling application. If the command were called inside a script the script would then be able to react to the non-zero exit code vs assume it completed successfully. |
This is the solution I'd like to move forward with because I think it clearly let's a person know that the project was not initialized (still need to take an action, like (Here's where we had discussion on this before #4836 where there is less conversation than I remembered.) |
fix #4836
