Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Closed
wants to merge 8 commits into from
Closed

Conversation

eleanorjboyd
Copy link
Member

@eleanorjboyd eleanorjboyd commented Feb 18, 2025

fixes #136

@eleanorjboyd eleanorjboyd added the feature-request Request for new features or functionality label Feb 18, 2025
@eleanorjboyd eleanorjboyd self-assigned this Feb 18, 2025
export const YES_INSTALL = 'Yes, Install';
export const NO_INSTALL = 'Do Not Install';

export function promptForInstallPermissions(extensionName: string, packages: string): Thenable<string | undefined> {
Copy link
Member Author

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?

Copy link
Member

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

Copy link
Member Author

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

cc @cwebster-99 @luabud

package.json Outdated
@@ -86,6 +86,21 @@
"onExP",
"preview"
]
},
"python-envs.extensionPackageTrust": {
Copy link
Member

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

Copy link
Member Author

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

export const YES_INSTALL = 'Yes, Install';
export const NO_INSTALL = 'Do Not Install';

export function promptForInstallPermissions(extensionName: string, packages: string): Thenable<string | undefined> {
Copy link
Member

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

return new Promise((resolve) => {
window
.showInformationMessage(
'Do you want to install the following package/s from the ' + extensionName + ' extension?',
Copy link
Member

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?

Copy link
Member

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”.

Copy link
Member Author

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?

Copy link
Member

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

Copy link
Member

@cwebster-99 cwebster-99 left a 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.

"alwaysAsk"
],
"default": "alwaysAsk",
"description": "Sets how installs by a given extension will be handled from the environment extension."
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
"description": "Sets how installs by a given extension will be handled from the environment extension."
"description": "Configures package installation permissions for a given extension."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User Approval Flow for Package Installation
4 participants