Skip to content

dev(ranger): add action for extension-request #2967

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

Merged
merged 3 commits into from
Mar 31, 2021
Merged

Conversation

jsjoeio
Copy link
Contributor

@jsjoeio jsjoeio commented Mar 25, 2021

This PR helps automate how we handle extension request issues. It also updates the docs for installing OpenVSX extensions via the command line.

TODOS

  • refactor docs based on feedback

@jsjoeio jsjoeio requested a review from a team as a code owner March 25, 2021 18:10
@jsjoeio jsjoeio force-pushed the jsjoeio/update-ranger branch from 60dbc75 to a551e5a Compare March 25, 2021 18:11
@jsjoeio jsjoeio force-pushed the jsjoeio/update-ranger branch from a551e5a to 804ff32 Compare March 25, 2021 18:30
@jsjoeio jsjoeio self-assigned this Mar 25, 2021
@jsjoeio jsjoeio added this to the v3.9.3 milestone Mar 25, 2021
docs/FAQ.md Outdated
@@ -132,6 +133,21 @@ code-server --install-extension ms-python.python
code-server --install-extension downloaded-ms-python.python.vsix
```

### Installing VSIX Extensions via the Command Line
Copy link
Member

@code-asher code-asher Mar 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this overlaps a little with the previous paragraph that lists how to install extensions on the CLI.

What if we move that into this heading, then create another heading for this content with something like "Installing OpenVSX extensions via the command line" for this content?

We could also mention they can switch early to OpenVSX by setting SERVICE_URL and ITEM_URL (we already have a section generally about the marketplace url so maybe we just link it from here).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually maybe we should put this under "How can I request a missing extension?"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

Yes! Let's do that!

Copy link
Member

@code-asher code-asher Mar 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or just remove the extension request section.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opted to add it under "How can I request a missing extension" - I say we move remove the extension request section once we fully switch to OpenVSX

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should tweak it a little more because we have some overlap in the instructions and we recommend opening an issue which we will just close.

Also, what do you think about recommending using the environment variables to download from Open VSX rather than the curl command? That way they could do:

SERVICE_URL=bla ITEM_URL=bla code-server --install-extension <id>

I'm not completely sure if that's easier or harder to use though. 🤔 If you set the variables once then it's easier in the long term but I think it might be a bit more typing in the short term.

Here's a really rough draft for the general structure that's knocking about in my head:

## Installing an extension 

Extensions can be installed from the marketplace using the extensions sidebar in
code-server or from the command line:

```
code-server --install-extension <extension id>
```

## How can I request a missing extension?

We are currently in the process of transitioning to [Open VSX](https://open-vsx.org/). 
Once https://github.com/eclipse/openvsx/issues/249
is implemented, we can fully make this transition. Therefore, we are no longer
accepting new requests for extension requests.

Instead, we suggest one of the following:
  - [Switch to Open VSX](#how-do-i-configure-the-marketplace-url) now 
  - Download and [install the extension manually](#installing-an-extension-manually)

## Installing an extension manually

If an extension is not available from the marketplace or does not work, you can
grab its VSIX from its GitHub releases or build it yourself.

Once you have downloaded the VSIX to the remote machine you can either:
  - Run the `Extensions: Install from VSIX` command in the Command Palette.
  - Use `code-server --install-extension <path to vsix>`

## How do I configure the marketplace URL?

It is possible to point code-server to another extension marketplace it by
setting the`SERVICE_URL` and `ITEM_URL` environment variables. These correspond
directly to `serviceUrl` and `itemUrl` in VS Code's `product.json`.

e.g. to use [open-vsx.org](https://open-vsx.org):

```bash
export SERVICE_URL=https://open-vsx.org/vscode/gallery
export ITEM_URL=https://open-vsx.org/vscode/item
```

These environment variables will also work with the `--install-extension` flag.

While you can technically use Microsoft's marketplace with these, please do not
do so as it is against their terms of use. See
[above](#differences-compared-to-vs-code) and this discussion regarding the use
of the Microsoft URLs in forks:

https://github.com/microsoft/vscode/issues/31168#issue-244533026

See also [VSCodium's docs](https://github.com/VSCodium/vscodium/blob/master/DOCS.md#extensions--marketplace).

## Where are extensions stored?

Defaults to `~/.local/share/code-server/extensions`.

If the `XDG_DATA_HOME` environment variable is set the data directory will be
`$XDG_DATA_HOME/code-server/extensions`. In general we try to follow the XDG
directory spec.

## How is this different from VS Code Codespaces?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thinking is that the flow from a user might look like:

"How do I install an extension?"
"Oh, it's not available, how do I request it?"
"Ah, they aren't accepting requests, how do I install it then?"
"OK, I can either do it manually or download from Open VSX."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh yeah good point about that. Okay I'll make these changes then re-request a review! Thanks for adding the structure/flow too! That helps a ton!!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Embarrassingly, I didn't know you could do it this way, hence the curl suggestion:

SERVICE_URL=https://open-vsx.org/vscode/gallery ITEM_URL=https://open-vsx.org/vscode/item code-server --install-extension stylelint.vscode-stylelint

@jsjoeio jsjoeio marked this pull request as draft March 26, 2021 23:20
@jsjoeio jsjoeio force-pushed the jsjoeio/update-ranger branch from 804ff32 to 25a6e14 Compare March 29, 2021 18:25
@jsjoeio jsjoeio requested a review from code-asher March 29, 2021 18:25
@jsjoeio jsjoeio marked this pull request as ready for review March 29, 2021 18:25
@jsjoeio jsjoeio force-pushed the jsjoeio/update-ranger branch from 25a6e14 to 9611e79 Compare March 29, 2021 20:10
@jsjoeio jsjoeio marked this pull request as draft March 30, 2021 17:59
@jsjoeio jsjoeio force-pushed the jsjoeio/update-ranger branch from 9611e79 to 629c66a Compare March 30, 2021 23:38
@jsjoeio jsjoeio marked this pull request as ready for review March 30, 2021 23:40
@jsjoeio
Copy link
Contributor Author

jsjoeio commented Mar 30, 2021

bump @code-asher ready for another review

@jsjoeio jsjoeio enabled auto-merge March 30, 2021 23:47
@code-asher code-asher disabled auto-merge March 31, 2021 15:27
@code-asher code-asher merged commit 8ed5b73 into main Mar 31, 2021
@code-asher code-asher deleted the jsjoeio/update-ranger branch March 31, 2021 15:28
@jsjoeio jsjoeio changed the title feat(ranger): add action for extension-request dev(ranger): add action for extension-request Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants