Skip to content

Welcome page experience for extensions #83451

Closed

Description

@xorye

Hi, it would be great if there was an "onExtensionInstalled" activation event that would trigger when a VS Code extension is first installed.

Our use case for this activation event, is that we would like to display a welcome page for our VS Code extension when the user first installs the extension.

Activity

  1. rjstone commented on Nov 11, 2019

    @rjstone

    Same here and exactly the same use case. Using "*" for this would be absolutely horrible. Best I can think of right now is to use onView with an extension's view if it has one.

    (Good work on vscode BTW!)

  2. changed the title [-]Activate extension on install [/-] [+]Welcome page experience for extensions[/+] on Nov 11, 2019
  3. sandy081 commented on Nov 11, 2019

    @sandy081
    Member

    I do not think such an activation event will help because we do not always activate an extension immediately after installing. Unfortunately there is no way for extension to hook into for showing welcome page.

    Kai Maetzel (@kieferrm) FYI

  4. added
    extensions
    feature-request
    on Nov 11, 2019
  5. rjstone commented on Nov 11, 2019

    @rjstone

    I agree that for my case the real issue is "welcome experience". There's another issue that also falls into this category but is more about convenience of the extension developer. We're currently just using a markdown preview for our "welcome" document, but this has some drawbacks that could be addressed by adding some features to the markdown preview:

    • A way to set the title on the tab to something custom rather than "Preview welcome.md"
    • A way to set the security policy on the view so that command: URIs can work (for jumping to the settings panel, etc.)

    Again I know I can just use a webview for this but I don't really need the full capabilities of a webview and it would be kind of nice if the markdown preview could be used like a webview. (Maybe there's a way to obtain a reference to the webview used by the markdown preview but if so I don't know what it is.)

    Anyway, just something else to think about.

  6. sandy081 commented on Nov 14, 2019

    @sandy081
    Member

    Robert Stone (@rjstone) Can you please file a separate issue for markdown preview issues?

  7. rjstone commented on Nov 15, 2019

    @rjstone

    Will do

  8. 20 remaining items

  9. sandy081 commented on Nov 16, 2020

    @sandy081
    Member

    @misolori I remember you are working on mock ups for extensions welcome experience, hence assigning to you. Feel free to close this as duplicate if there is another issue. Thanks.

  10. added
    feature-request
    on Feb 4, 2021
  11. added
    extensions-development
    and removed
    ux
    on Feb 4, 2021
  12. sandy081 commented on Feb 4, 2021

    @sandy081
    Member

    From Alexandru Dima (@alexdima):

    IMHO, I think extensions have been using a pattern where they show a welcome screen on activate by checking for a memento and then saving the memento once the Welcome screen is shown. This worked well, but worked well only on a single machine.

    I like the idea to introduce explicit API like e.g. ctx.canShowWelcome. Given the deep connection with settings sync and command line installation (e.g. extension installed due to devcontainer.json), I think you would be a natural fit to own this API. You would know better than me, perhaps this could be implemented straight-forward with global state syncing.

    A special API that is provided by vscode has the benefit that we could explicitly set ctx.canShowWelcome to false when we really don't want to show welcome screens, like e.g. when using vscode as a git commit message editor, or reviewing a PR in codespaces, etc.


    Additionally, it would be very nice (but largely out of scope for my specific ask here), would be provide the activation event (e.g. the reason) the activate method is getting called. For example, if you are getting activated because of a command, you might change your startup behavior.

    This has been requested before in #44711 . See #44711 (comment) for more background on why it might not be desireable to define a closed set of activation reasons, since those reasons might grow over time. (2a, 2b were added later)

  13. sandy081 commented on Feb 4, 2021

    @sandy081
    Member

    I like the idea of providing some context for extensions while activating them. Instead of talking about welcome experience in the context, I would provide last activated version of that extension as the context for eg: ctx.getLastActivatedVersion. Based on that extension can control their welcome notifications. While following up with extensions with welcome pages or notifications, I have seen most of the extensions are using previous version to control welcome/update experience.

    canShowWelcome might not be complete without having an API to show welcome also it will not cover updates experience that some extensions need.

    CC Eric Amodio (@eamodio)

  14. miguelsolorio commented on Oct 15, 2021

    @miguelsolorio
    Contributor

    We now have the getting started API that extensions can use and activate on install via the onWalkthrough:walkthroughID event. See the Python extension as an example:

    CleanShot 2021-10-15 at 13 57 44@2x

  15. locked and limited conversation to collaborators on Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

apiextensionsextensions-developmentfeature-request

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions