Skip to content
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

Trusted workspaces and extension installation #117916

Closed
kieferrm opened this issue Mar 1, 2021 · 10 comments
Closed

Trusted workspaces and extension installation #117916

kieferrm opened this issue Mar 1, 2021 · 10 comments
Assignees
Labels
workspace-trust Trusted workspaces
Milestone

Comments

@kieferrm
Copy link
Member

kieferrm commented Mar 1, 2021

When using trusted workspaces as described in #106488.

  1. Install an extension that requires trust on startup
  2. Close the dialog that shows up; i.e. don't make a decision about trust

-> extension is not installed
-> window shows in "unknown" trust state

That the extension is not installed is unexpected. I would have assumed that the extension is installed but is not activated.

@sbatten sbatten added the under-discussion Issue is under discussion for relevance, priority, approach label Mar 1, 2021
@sbatten
Copy link
Member

sbatten commented Mar 1, 2021

I have the same feeling. I tried to install an extension for testing and was not in a repo I "trusted", but was going to switch after I installed the extension. You are pretty much forced into trusting the current workspace to install an extension which isn't really the gate we are going for.

@sbatten sbatten added this to the March 2021 milestone Mar 1, 2021
@lszomoru lszomoru added the workspace-trust Trusted workspaces label Mar 2, 2021
@lszomoru
Copy link
Member

lszomoru commented Mar 2, 2021

Adding @sandy081 since this flow impacts extension acquisition

At the moment, the user gesture that requires workspace trust is the gesture to install an extension. This means that any choice other than trusting the workspace will result in the extension not getting installed. I do see how this can cause confusion as you might be getting the dialog depending on the workspace that is currently opened. I am inclined to updating the flow so that:

  • Extension(s) would successfully get installed independent of workspace trust state
  • If extension requires trust onStart and the workspace is in trusted state:
    • Extension would be enabled
  • If extension requires trust onStart and the workspace is in untrusted state:
    • Extension would not get enabled
    • No notification would be shown
  • If extension requires trust onStart and the workspace is in unknown trust state:
    • Extension would not get enabled
    • A soft workspace trust request (activity bar item badge) would be shown

@sbatten
Copy link
Member

sbatten commented Mar 2, 2021

For the flow where a notification is shown, we may wish to promote this to a dialog as the user is more likely than not expecting the extension they just installed to work immediately

@lszomoru
Copy link
Member

lszomoru commented Mar 2, 2021

Independent whether the extension is installed from the Extensions list or the Extension editor, there will be an immediate visual indicator (shield icon + tooltip/message) that the extension is disabled due to workspace trust requirement. Clicking enable button to enable the extension would show the dialog.

@sbatten
Copy link
Member

sbatten commented Mar 2, 2021

It is possible though that the user already has something requesting trust "softly" so there may not be a new visual indication. Because of that and the fact this this isn't "on load" but rather during the explicit action of installing the extension, it may be a candidate for a more immediate request for trust

@lszomoru
Copy link
Member

lszomoru commented Mar 2, 2021

I think that we can experiment with both soft and modal notifications. The big takeaway from this issue is that the action that requires workspace trust is "enabling" the extension after it has been installed. Independent of the workspace trust state, the extension should get installed. If we are all on-board with that, I will make the necessary changes.

@lszomoru
Copy link
Member

@sandy081, any input on this? Thanks!

@sandy081
Copy link
Member

This flow seems to be new to users, at present we allow installing extensions if they can run otherwise we do not. For eg., we do not allow installing an UI extension in web and we show a dialog immediately. In this case, one difference is that no user action will help in running the extension. In case of trusted workspace, user taking an action (say I trust this workspace) will allow running the extension. I agree that not showing any information that is on user face will confuse them why this extension is not enabled. So, I would either

  • After installing, show a dialog that extension(s) are disabled because.. (remember it can be a pack of extensions or has extension dep that needs trusted)
  • While installing, show a dialog that extension(s) need trusted workspace and provide following options
    • Trust Workspace & Install
    • Install Anyway
    • Cancel

IMO the second flow seems nicer for user because user knows what will happen before rather after the action.

@lszomoru
Copy link
Member

Thanks @sandy081! I do like the second flow as well.

@lszomoru lszomoru removed the under-discussion Issue is under discussion for relevance, priority, approach label Mar 11, 2021
@lszomoru lszomoru modified the milestones: March 2021, April 2021 Mar 23, 2021
@lszomoru
Copy link
Member

lszomoru commented Apr 1, 2021

This has been checked in to main.

@lszomoru lszomoru closed this as completed Apr 1, 2021
@github-actions github-actions bot locked and limited conversation to collaborators May 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
workspace-trust Trusted workspaces
Projects
None yet
Development

No branches or pull requests

4 participants