[Tag] Allow customizing tag message#223
Conversation
| """ | ||
|
|
||
| def _default_get_message(self): | ||
| return "This {} is experimental and not covered by customer support. " \ |
There was a problem hiding this comment.
I removed "not covered by customer support", as for Knack there is no customer support at all!
knack/experimental.py
Outdated
|
|
||
| _EXPERIMENTAL_TAG = '[Experimental]' | ||
| _experimental_kwarg = 'experimental_info' | ||
| EXPERIMENTAL_MESSAGE = "{} is experimental and under development." |
There was a problem hiding this comment.
should we let customer know that experimental commands may be changed/removed in a future release?
There was a problem hiding this comment.
Hi Zunli!
Let me chime in a bit...
We actually looped in our researcher and UX writers to rephrase the messaging. Their suggestion is that "under development" is a more succinct expression
Also @jiasli -- a super minor grammar call out (which I just realized)
Can we add an "is" to the sentence? --->
"{} is experimental and is under development."
Seems to be more grammatically accurate
I hope I'm not too late with the comment...
There was a problem hiding this comment.
This message won't be seen in Azure CLI in any way. It will be overridden, like in Azure/azure-cli#15730.
I hope I'm not too late with the comment...
Not too late at all, given @evelyn-ys is concerned about using a module variable.
"{} is experimental and is under development."
To me, the sentence structure is {} is [(experimental) and (under development)], but I am open to this. + @dbradish-microsoft to comment.
knack/arguments.py
Outdated
| def _get_experimental_arg_message(self): | ||
| return "{} '{}' is experimental and not covered by customer support. " \ | ||
| "Please use with discretion.".format(self.object_type.capitalize(), self.target) | ||
| from .experimental import EXPERIMENTAL_MESSAGE |
There was a problem hiding this comment.
How could developers customize the message in your current design? It seems that you define the message variable with hard-coded message. If I am a developer who want to change the message, I have to re-write the message in knack. Is it by design?
There was a problem hiding this comment.
A developer can customize the message like Azure/azure-cli#15730. I will add a comment to the variable as well.
chenlomis
left a comment
There was a problem hiding this comment.
LGTM!
Zunli and Yishi may elaborate/comment better on the actual code changes
1a78232 to
e31d83a
Compare
|
|
||
| # Override these values to customize the status message. | ||
| # The message should contain a placeholder indicating the subject (like 'This command group', 'Commend group xxx'). | ||
| # (A dict is used to avoid the "from A import B" pitfall that creates a copy of the imported B.) |
There was a problem hiding this comment.
More info, see https://stackoverflow.com/a/3536638/2199657
A singleton dict
status_tag_messagesis used to hold configurableStatusTagmessages. Developers can override the content ofstatus_tag_messagesto customize the help and warning messages.