Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
402 stars 195 forks source link

`azd config --help` does not show help for `AZD_CONFIG_DIR` #2302

Closed weikanglim closed 1 year ago

weikanglim commented 1 year ago

azd version 1.0.0 (commit ed2244cb62e7940ec5aceb3b68ea49158272dd7e)

image

Expected: The usage text about configuring AZD_CONFIG_DIR should show up.

Actual: No usage text is present.

Since azd migrated away from using cobra's default display, setting a cobra command's Long text and also configuring HelpOptions means that Long text is never displayed.

This line is likely ineffectual code currently.

Let's fix the help text here. Let's also investigate how to more cohesively avoid these types of issues from popping up.

vhvb1989 commented 1 year ago

@weikanglim , the long is still used by the web-docs. See: https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/reference#synopsis-2

That's basically why I didn't remove the long field.

The mock for azd config removed all the info about the AZD_CONFIG_DIR from the help terminal, but users can still see it when they run azd config --docs

weikanglim commented 1 year ago

@vhvb1989 Is there some work we can do to unify the two codepaths? We need to be crisp about not having something like Long mean: a description only shown in web docs, but unused otherwise.

vhvb1989 commented 1 year ago

@vhvb1989 Is there some work we can do to unify the two codepaths? We need to be crisp about not having something like Long mean: a description only shown in web docs, but unused otherwise.

@Austinauth worked on getting the expected output for help commands I followed the requirement from: https://www.figma.com/proto/iIRRiGPuKIfaSFfMJXcYle/AZD-Design-Patterns?node-id=1301-145366&starting-point-node-id=1301%3A142321

Then, while I was implementing the changes, I asked if we wanted to have the same text from the terminal to be displayed in the web-docs. But the answer was No.

The way I see it, azd --docs is like the see more of each azd --help

Austinauth commented 1 year ago

It's been a while since we took a pass at the --help experience. I can't remember the nuances of the discussion, but I know there was some back and forth on how verbose we wanted the in-terminal help experience to be. We can revisit in the near future if needed.

This is probably something worth talking through as a small group so we're aligned on the approach.

cc: @savannahostrowski

savannahostrowski commented 1 year ago

Agreed - @vhvb1989 is working on #2051 this sprint so let's chat about this

rajeshkamal5050 commented 1 year ago

@v-xuto seems minor. Can you try putting out a PR for this?

v-xuto commented 1 year ago

@rajeshkamal5050 PR is ready, please review.