Skip to content

Conversation

@fengzhou-msft
Copy link
Member

@fengzhou-msft fengzhou-msft commented Apr 16, 2020

Description

  1. The survey link now can be turned off by setting environment variable AZURE_OUTPUT_SHOW_SURVEY_LINK=no or add the following in ~/.azure/config:
[output]
show_survey_link = no

The environment variable has higher priority.

  1. Added a UX study survey link in az --version and az --help (but not in az some-command --help).
    The output looks like this in az --version :
    image

Testing Guide

az --version
az --help
export AZURE_OUTPUT_SHOW_SURVEY_LINK=no
az --version
az --help
az vm --help

This checklist is used to make sure that common guidelines for a pull request are followed.

show_link = self.cli_ctx.config.getboolean('output', 'show_survey_link', True)
if show_link:
print(SURVEY_PROMPT_COLOR if self.cli_ctx.enable_color else SURVEY_PROMPT)
if not nouns:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only add ux link for az --help without a specific command.

'https://aka.ms/clihats' + Style.RESET_ALL
UX_SURVEY_PROMPT = 'Mobile developer using Azure CLI? Come try our newest feature: https://aka.ms/CLIUXstudy'
UX_SURVEY_PROMPT_COLOR = Fore.YELLOW + Style.BRIGHT + 'Mobile developer using Azure CLI? Come try our newest feature: '\
+ Fore.BLUE + 'https://aka.ms/CLIUXstudy' + Style.RESET_ALL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://aka.ms/CLIUXstudy seems to be a survey, instead of a feature.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

SURVEY_PROMPT_COLOR = Fore.YELLOW + Style.BRIGHT + 'Please let us know how we are doing: ' + Fore.BLUE + \
'https://aka.ms/clihats' + Style.RESET_ALL
UX_SURVEY_PROMPT = 'Mobile developer using Azure CLI? Come try our newest feature: https://aka.ms/CLIUXstudy'
UX_SURVEY_PROMPT_COLOR = Fore.YELLOW + Style.BRIGHT + 'Mobile developer using Azure CLI? Come try our newest feature: '\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
UX_SURVEY_PROMPT_COLOR = Fore.YELLOW + Style.BRIGHT + 'Mobile developer using Azure CLI? Come try our newest feature: '\
UX_SURVEY_PROMPT_COLOR = Fore.YELLOW + Style.BRIGHT + 'Mobile developer using Azure CLI? Come and try our newest feature: '\

@fengzhou-msft fengzhou-msft requested a review from yungezz April 16, 2020 06:04
@yungezz yungezz added this to the S168 milestone Apr 16, 2020
@yungezz
Copy link
Member

yungezz commented Apr 16, 2020

@fengzhou-msft let's confirm the message string with PM

@fengzhou-msft
Copy link
Member Author

@fengzhou-msft Feng Zhou FTE let's confirm the message string with PM

Message updated via PM's suggestion.

'https://aka.ms/clihats' + Style.RESET_ALL
UX_SURVEY_PROMPT = 'And let us know if you\'re interested in trying out our newest features: https://aka.ms/CLIUXstudy'
UX_SURVEY_PROMPT_COLOR = Fore.YELLOW + Style.BRIGHT + \
'And let us know if you\'re interested in trying out our newest features: ' \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lowercase a?

Copy link
Contributor

@arrownj arrownj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious about that the only way to set this setting is to update config file manually ?

@fengzhou-msft
Copy link
Member Author

just curious about that the only way to set this setting is to update config file manually ?

For changing config file, you can only manually edit it. But you can also set an environment variable as described in the PR description.

@fengzhou-msft fengzhou-msft merged commit e1fcc5e into Azure:dev Apr 17, 2020
@fengzhou-msft fengzhou-msft deleted the survey_link_switch branch May 12, 2020 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants