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

Add a when clause to the contributed explorer view such that it is only activated when the workspace has a package.json file #117950

Closed
tristan957 opened this issue Nov 6, 2020 · 7 comments
Assignees
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders tasks Task system issues verified Verification succeeded
Milestone

Comments

@tristan957
Copy link

As you can see below, I don't have a package.json file in my workspace. I am working in a Python project. This extension is still contributing its view however.

image

Would it be possible to have the extension only contribute its view when a package.json is found at the root of the workspace?

This feature is talked about here microsoft/vscode-java-test#793 (comment).

@tristan957
Copy link
Author

I am little confused where that view gets contributed when reading the package.json

@egamma egamma transferred this issue from microsoft/vscode-npm-scripts Mar 2, 2021
@egamma
Copy link
Member

egamma commented Mar 2, 2021

@alexr00 is this a regression from when the when clause was changed so that it is always visible in the Views menu?

@alexr00
Copy link
Member

alexr00 commented Mar 2, 2021

Since the npm view is hidden by default, and because #104591 I removed the package.json check. I can re-introduce the package.json check and have it search all folders instead of just the roots of the workspace folder if we want to fix this.

@alexr00
Copy link
Member

alexr00 commented Mar 4, 2021

After discussing with @egamma we decided to add the package.json check back in and make it more comprehensive.

@alexr00 alexr00 added bug Issue identified by VS Code Team member as probable bug tasks Task system issues labels Mar 4, 2021
@alexr00 alexr00 added this to the March 2021 milestone Mar 4, 2021
@alexr00 alexr00 closed this as completed in 3c238e7 Mar 4, 2021
@rzhao271 rzhao271 added the author-verification-requested Issues potentially verifiable by issue author label Mar 24, 2021
@roblourens
Copy link
Member

Works but this search is very expensive!

@roblourens roblourens added the verified Verification succeeded label Mar 26, 2021
@roblourens
Copy link
Member

I see you added a 1s timeout, thanks! Always be careful with triggering a search on startup

@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders tasks Task system issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants
@egamma @roblourens @rzhao271 @tristan957 @alexr00 and others