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

Support searching the marketplace for compatible renderers #121222

Closed
connor4312 opened this issue Apr 13, 2021 · 5 comments
Closed

Support searching the marketplace for compatible renderers #121222

connor4312 opened this issue Apr 13, 2021 · 5 comments
Assignees
Labels
feature-request Request for new features or functionality marketplace Microsoft VS Code Marketplace issues notebook-output upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream

Comments

@connor4312
Copy link
Member

connor4312 commented Apr 13, 2021

Following #119899, there is a structure in the package.json which looks like:

{
	// ...
	"contributes": {
		"notebookOutputRenderer": [
			{
				"id": "github-issues",
				"displayName": "Github Issues Notebook Renderer",
				"entrypoint": "./dist/renderer.js",
				"mimeTypes": [
					"x-application/github-issues"
				],
				"dependencies": [
					"gh-issue-kernel"
				]
			}
		]
	}
}

VS Code will know the mimeType and available kernelProvides list. We need to be able to issue a query which will return:

  • Extensions that have the mimeType in its list of contributes.notebookOutputRenderer.mimeTypes list,
  • excluding extensions who have a non-empty dependencies list which does not include anything in the kernelProvides list

In pseudo-code:

def search_extensions(mimeType, kernelProvides):
  for extension in extensions:
    if any(matches(c, mimeType, kernelProvides) for c in extension.contributes.notebookOutputRenderer):
      yield extension

def matches(contribution, mimeType, kernelProvides):
  if mimeType not in contribution.mimeTypes:
    return False
  
  if kernelDependency.dependencies is not None and len(kernelDependency.dependencies) > 0:
    if not any(d in kernelProvides for d in kernelDependency.dependencies):
      return False

  return True

We will then be able to show a helpful hint in VS Code if there are no renderers for a mimeType.

@connor4312 connor4312 added feature-request Request for new features or functionality marketplace Microsoft VS Code Marketplace issues notebook labels Apr 13, 2021
@connor4312 connor4312 added this to the On Deck milestone Apr 13, 2021
@connor4312 connor4312 self-assigned this Apr 13, 2021
@connor4312
Copy link
Member Author

Tracked in microsoft/vsmarketplace#60

@connor4312 connor4312 added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Apr 15, 2021
@isidorn isidorn added the upstream-issue-linked This is an upstream issue that has been reported upstream label Aug 19, 2021
@isidorn isidorn self-assigned this Aug 19, 2021
@isidorn
Copy link
Contributor

isidorn commented Aug 19, 2021

@connor4312 also assigning to me, since from September I will work on the marketplace from our side as the PM. Let me know if you would like me to bring this issue up to the marketplace team.

@connor4312
Copy link
Member Author

Yep, please see #123581 as well for the complete list of notebook-related marketplace asks 🙂

@rebornix rebornix removed the notebook label Oct 21, 2021
@isidorn isidorn removed their assignment Oct 31, 2022
@prashantvc
Copy link
Contributor

prashantvc commented Jan 16, 2023

This is fixed in the Marketplace microsoft/vsmarketplace#60
Could you confirm it @connor4312 ? I will keep this open if not

@github-actions github-actions bot locked and limited conversation to collaborators Jan 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality marketplace Microsoft VS Code Marketplace issues notebook-output upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream
Projects
None yet
Development

No branches or pull requests

7 participants
@prashantvc @rebornix @isidorn @connor4312 @tanhakabir @aiday-mar and others