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 pre-release channels #2

Closed
joelspadin-garmin opened this issue Nov 12, 2019 · 6 comments
Closed

Support pre-release channels #2

joelspadin-garmin opened this issue Nov 12, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@joelspadin-garmin
Copy link
Owner

Extension developers should be able to use NPM dist-tags to create pre-release channels. Add a setting and commands to switch which channel to follow per-extension.

@joelspadin-garmin joelspadin-garmin added the enhancement New feature or request label Nov 12, 2019
montaguek-garmin added a commit to montaguek-garmin/vscode-private-extension-manager that referenced this issue Jan 3, 2020
Allows channels to be specified for each extension in a repository based on the package
ID.  Expects that pre-release versions are pushed with a --tag='channelName' to set
the dist-tag appropriately.  If not specified, the 'latest' channel is used by default.

Could also update the extension info view to indicate which channels are available for
tracking and couple this to a command that allows switching between channels w/o
manually editing settings.

joelspadin-garmin#2
@joelspadin-garmin
Copy link
Owner Author

I think the only remaining task is to add a UI for switching channels. Ideas:

  • Add a new command to switch channels. Add to the extension context menu. This is probably the easiest option.
  • Add a selector to the extension details page.
  • Integrate channel selection into Install Another Version... somehow.

Maybe also tag the current version in each channel in the Install Another Version... list too.

@montaguek-garmin
Copy link
Contributor

To add onto that:

  • I like the idea of some quick visual indication of being pinned to a particular version and possibly when tracking an alternate channel. For pinned versions, I was just thinking using a pin icon instead of the check mark that we currently use. Not sure what (if anything) should be different there to indicate an alternate tracking channel though. Maybe a different colored check mark or a multi-check?
  • For the extension detail page, I was thinking either a new tab simply listing channels or using up some of the empty space in the upper right to show the available channels. Any thoughts/preferences?

image

@joelspadin-garmin
Copy link
Owner Author

Here would work too:
image

What do you think of this?

  • Add a new command that opens a selection list to switch channels for an extension. It should work similarly to Install Another Version....
    • Use the channel name as the item text.
    • List the current version of each channel as the detail text.
    • Append "(Current)" to the currently-selected channel.
  • Add this command to the extension context menu next to Install Another Version... Name it something like Switch Release Channels...?
  • Make the extension details page check if there are any dist-tags aside from "latest". If so, add a new action button that indicates the current channel. When you click the button, just run the command to switch channels.

This way we share most of the UI logic for switching channels between the context menu and details page.

Using a different icon for any package whose channel isn't "latest" should be pretty easy. Maybe use the rocket icon from https://microsoft.github.io/vscode-codicons/dist/codicon.html? That seems to be a somewhat common icon to indicate a pre-release. Once microsoft/vscode#84695 is in a stable release, we can just point to the built-in icon.

Pinning to a specific version doesn't seem like something that would be used very much. We get it for free due to the way we've implemented things, but I don't know that we need to put much effort into supporting it. I personally wouldn't bother with making the icon change for a pinned version or adding any way to pin a version aside from editing settings.json directly. Do you have a use case for this that I'm not considering?

(If you do want the icon to change though, there is a pin icon at https://microsoft.github.io/vscode-codicons/dist/codicon.html, and you could maybe use it whenever the package channel is something that semver can parse?)

@montaguek-garmin
Copy link
Contributor

I like that implementation and that seems pretty straightforward overall.

For pinning, the main thing I was thinking is if someone wanted to stay on a particular version to avoid some new/broken feature in a mainline release. In which case it would be helpful to pin the current version to avoid the constant alert popups about new (broken) updates being available. In this case I could see myself forgetting that I was pinned and just getting stuck on that version indefinitely waiting for a new version to be released.

If it required any additional effort I would say it's probably not worth it, but if we're already going to be switching the icons to indicate the pre-release versions then it seems like it would be trivial to add the pin icons as well.

@joelspadin-garmin
Copy link
Owner Author

You could also just disable update notifications. That way you'd still see that updates are available when you open the sidebar panel.

@joelspadin-garmin
Copy link
Owner Author

Finished the rest of the UI in 952fc77.

I didn't add the pin icon since it was going to be a bit of extra work, but we can do that later if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants