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

Only show tree views for activated extensions #28325

Closed
orta opened this issue Jun 9, 2017 · 3 comments
Closed

Only show tree views for activated extensions #28325

orta opened this issue Jun 9, 2017 · 3 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) file-explorer Explorer widget issues

Comments

@orta
Copy link
Contributor

orta commented Jun 9, 2017

  • VSCode Version: 1.13.0 (1.13.0)
  • OS Version: macOS 10.12

Steps to Reproduce:

  1. Create an extension, with a tree view
  2. Open up a folder where the tree view isn't activated
  3. See the indicator for the tree view

Hey all - so cool that we can do some user interface work now! I built an extension straight away

preview

This extension is only really useful for a few of the projects I work on daily, and so I was hoping that because it has a pretty limited set of activation events the section for Storybooks would only show in the cases of the activation. If I can't give it a provider, then there's not much that can be done with the UI.

@sandy081
Copy link
Member

sandy081 commented Jun 9, 2017

@orta I am sorry I am finding difficulty to understand your requirement. Are you asking for conditional visibility of views? For eg., in your case, show the view when your extension is activated?

@sandy081 sandy081 added file-explorer Explorer widget issues info-needed Issue requires more information from poster labels Jun 9, 2017
@orta
Copy link
Contributor Author

orta commented Jun 9, 2017

This is my activation events:

    "activationEvents": [
        "onCommand:extension.showStorybookPreview",
        "workspaceContains:node_modules/@storybook/react-native/package.json"
    ],

So the extension can only run if you manually trigger it, or if a specific file exists.

This repo does not have the file node_modules/@storybook/react-native/package.json:

screen shot 2017-06-09 at 16 30 14

So I don't think the "Storybook" tree view should be showing, as the extension has not been activated

@sandy081
Copy link
Member

Yes, showing the view is nothing to do with the activation of extension because view is registered descriptively in package.json. Activation is needed only to get and show data in the view.

To show the view conditionally, we are introducing a new property called when where you can provide conditions when to display.

Closing this as dup of #27823

@sandy081 sandy081 added *duplicate Issue identified as a duplicate of another issue(s) and removed info-needed Issue requires more information from poster labels Jun 12, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) file-explorer Explorer widget issues
Projects
None yet
Development

No branches or pull requests

2 participants