Skip to content

Only show tree views for activated extensions #28325

Closed

Description

@orta
  • 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.

Activity

  1. sandy081 commented on Jun 9, 2017

    @sandy081
    Member

    Orta Therox (@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?

  2. added
    file-explorer
    info-needed
    on Jun 9, 2017
  3. orta commented on Jun 9, 2017

    @orta
    ContributorAuthor

    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

  4. sandy081 commented on Jun 12, 2017

    @sandy081
    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

  5. added
    *duplicate
    and removed
    info-needed
    on Jun 12, 2017
  6. locked and limited conversation to collaborators on Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*duplicatefile-explorer

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions