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

Create an independent package safely wrapping Positron's API #458

Open
jmcphers opened this issue Apr 14, 2023 · 0 comments
Open

Create an independent package safely wrapping Positron's API #458

jmcphers opened this issue Apr 14, 2023 · 0 comments
Labels
area: api Issues related to API category.

Comments

@jmcphers
Copy link
Collaborator

Many VS Code compatible extensions will want to do one thing in VS Code and another in Positron; the quarto extension is a good example. These extensions need a way to safely test to see whether or not they are running in Positron. When running in Positron they will want to take full advantage of the Positron API; when running in VS Code (or other fork), they will omit these enhancements, or perform a graceful degradation.

In addition to supplying an "is Positron?" test, the package should supply methods that perform the most common kinds of graceful degradations. For example, the API that shows a URL in Positron's Preview pane could have a VS Code implementation that shows it in a WebViewPanel instead. Extensions can use the package's URL display method without needing to know which IDE is running.

This package should be published to npm ahead of Positron's public release so that extension authors can use it to help author Positron specific behavior for extensions published to OpenVSX, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api Issues related to API category.
Projects
None yet
Development

No branches or pull requests

3 participants