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

[vscode] support viewsWelcome contribution point #7178

Closed
akosyakov opened this issue Feb 19, 2020 · 13 comments
Closed

[vscode] support viewsWelcome contribution point #7178

akosyakov opened this issue Feb 19, 2020 · 13 comments
Labels
enhancement issues that are enhancements to current functionality - nice to haves git issues related to git help wanted issues meant to be picked up, require help vscode issues related to VSCode compatibility

Comments

@akosyakov
Copy link
Member

There is a new contribution point which allow to control welcome view for contributed views: https://github.com/microsoft/vscode/blob/cce81b98b9507b9f4baee1fcf4c9972e88d65a48/src/vs/workbench/contrib/welcome/common/viewsWelcomeExtensionPoint.ts

It's already used by latest version of vscode built-in git extension: microsoft/vscode#61491 (comment)

@akosyakov akosyakov added enhancement issues that are enhancements to current functionality - nice to haves help wanted issues meant to be picked up, require help git issues related to git vscode issues related to VSCode compatibility labels Feb 19, 2020
@alex-gilin
Copy link
Contributor

We've introduced viewsWelcome contributed point in some custom extensions... Can you prioritize this task?

@akosyakov
Copy link
Member Author

akosyakov commented May 6, 2020

@alex-gilin There is no really "you"? There are different adopters contributing to this project. For now i am not sure there anyone has capacity for it. I've added to next dev meeting to raise it, but one should point out some interesting VS Code extensions to justify it for concrete adopter. PRs are also welcomed. Usually one study VS Code implementation for a reference and then port it to Theia trying not break APIs outside of the plugin system.

@akosyakov
Copy link
Member Author

Supporting this would be interesting for better initial git and debug views.

@amiramw
Copy link
Member

amiramw commented Sep 30, 2020

@EstherPerelman will try to work on it

@clovis-dugue
Copy link

clovis-dugue commented Apr 15, 2021

Hi ; has this issue been fixed ? I can see the PR has been merged and the changelog mentions it, however my custom extension's viewsWelcome does not show., using a clone of Theia's master branch's browser example (v1.12)

Maybe opening a new issue for this would be relevant but I would rather note duplicate this one

@EstherPerelman
Copy link
Contributor

@clovis-dugue The issue has been fixed, What is your code for viewsWelcome? Are you sure it has to work?

@clovis-dugue
Copy link

clovis-dugue commented Apr 15, 2021

@EstherPerelman Thanks for the lightning fast answer.

My code (inside the package.json.) is as simple as :

"viewsWelcome": [
  {
    "view": "mission-panel",
    "contents": "[Show mission](command:side-mission-panel.show-mission)\n[End mission](command:side-mission-panel.end-mission)\n[Cancel mission](command:side-mission-panel.cancel-mission)\n"
  }
]

It does work as intended when packaged as a vsix and used inside of VSCode, but not when when used inside Theia, whether it is packaged as a .theia or a .vsix file

EDIT: Perhaps closing the issue would be relevant as to not mislead people encountering similar issues since the PR has been merged

@EstherPerelman
Copy link
Contributor

@clovis-dugue It's very strange, Has to work as explained in How to test PR #8678

@clovis-dugue
Copy link

clovis-dugue commented Apr 15, 2021

@EstherPerelman It does indeed ; the main difference between these two plugins being that mine fails to activate (for testing purposes).
However when failing to activate inside VSCode, it still shows the ViewsWelcome. In Theia, this does not seem to be the case ; which might be an oversight in the API implementation.

@EstherPerelman
Copy link
Contributor

EstherPerelman commented Apr 15, 2021

@EstherPerelman It does indeed ; the main difference between these two plugins being that mine fails to activate (for testing purposes).
However when failing to activate inside VSCode, it still shows the ViewsWelcome. In Theia, this does not seem to be the case ; which might be an oversight in the API implementation.

You should really open a new issue for that case.. Might be that Theia won't support it..

@clovis-dugue
Copy link

clovis-dugue commented Apr 15, 2021

Further investigation shows that a "Hello World" plug-in straight from VSCode's generator will have the same issue ; the example provided in the PR still works. I'm opening a new issue.

Thank you for your help!

@davide-sergi
Copy link

You need to register a TreeDataProvider which return an empty tree. This is not required for vscode environment.
You can keep same package.json.

I solved with following code:


import * as vscode from 'vscode';

export async function activate(context: vscode.ExtensionContext) { 
  vscode.window.registerTreeDataProvider(
	  "my-view-id",
	  new EmptyTreeDataProvider()
  );
}

export function deactivate() {}

export class EmptyTreeDataProvider implements vscode.TreeDataProvider<any> {
	constructor() {}

	getTreeItem(element: any): vscode.TreeItem {
		return {};
	}

	getChildren(element?: any): Thenable<any[]> {
		return new Promise((resolve) => resolve([]));
	}
}



@tsmaeder
Copy link
Contributor

The contribution point has been implemented, but there remains an issue: #9361

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement issues that are enhancements to current functionality - nice to haves git issues related to git help wanted issues meant to be picked up, require help vscode issues related to VSCode compatibility
Projects
None yet
Development

No branches or pull requests

7 participants