-
Notifications
You must be signed in to change notification settings - Fork 7
Trust prompting #193
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
Trust prompting #193
Conversation
src/features/utils.ts
Outdated
export const YES_INSTALL = 'Yes, Install'; | ||
export const NO_INSTALL = 'Do Not Install'; | ||
|
||
export function promptForInstallPermissions(extensionName: string, packages: string): Thenable<string | undefined> { |
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.
@karthiknadig what is the best way to handle all the string literals between the prompts and the decision cases? Is constants the right way?
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.
These should be put in localize.ts
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.
sounds good, I will move them over once we determine what they should say
package.json
Outdated
@@ -86,6 +86,21 @@ | |||
"onExP", | |||
"preview" | |||
] | |||
}, | |||
"python-envs.extensionPackageTrust": { |
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.
This is not really trust, it is more of automatic package management. So this should likely say, allowAutoPackageManagement
/cc @cwebster-99 @luabud
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.
switched it to this for now but very flexible on this name - don't have a strong preference at the moment
src/features/utils.ts
Outdated
export const YES_INSTALL = 'Yes, Install'; | ||
export const NO_INSTALL = 'Do Not Install'; | ||
|
||
export function promptForInstallPermissions(extensionName: string, packages: string): Thenable<string | undefined> { |
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.
These should be put in localize.ts
src/features/utils.ts
Outdated
return new Promise((resolve) => { | ||
window | ||
.showInformationMessage( | ||
'Do you want to install the following package/s from the ' + extensionName + ' extension?', |
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.
Will we be referencing the package names in this message as well?
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.
Yes, but if there are multiple then we may want to say something like pandas, …
or “pandas
and other packages”.
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 added it in the detail: package/s: "${packages}"
, section. Is this what you mean? What is the best way to word it?
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.
Oh I see! I missed that part in the initial review
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.
Left some comments but the options may be too verbose for the UI they are shown in. If that is the case, we can iterate.
Co-authored-by: Courtney Webster <[email protected]>
"alwaysAsk" | ||
], | ||
"default": "alwaysAsk", | ||
"description": "Sets how installs by a given extension will be handled from the environment extension." |
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.
"description": "Sets how installs by a given extension will be handled from the environment extension." | |
"description": "Configures package installation permissions for a given extension." |
fixes #136