Skip to content

Enhancements to link sharing in VS Code #175676

Closed

Description

@joyceerhl

Integration with vscode.dev

  • Add Checkout in vscode.dev command action to GHPRI view PR context menu
  • Add Open on vscode.dev to desktop git branch picker

Share menu

  • Add support for consolidated Share menu (vscode#172425):
    • Editor tab context menu editor/title/context/share
    • Explorer file context menu explorer/context/share
    • SCM resource context menu scm/resourceState/context/share
    • Adopt support in
      • GitHub Pull Requests
      • GitHub Repositories
      • builtin GitHub extension
  • Integrate Live Share into Share menu as Share > Start Collaboration Session
  • Add Copy __ link to a new editor gutter context menu contribution point (ensure no conflict with gutter breakpoints)

Link behavior

  • Copy GitHub Permalink should always generate github.com permalinks links on desktop, vscode.dev, and github.dev
  • Copy vscode.dev link should generate vscode.dev links and be present only on desktop and vscode.dev
  • Copy github.dev link to generate github.dev links and be present only on github.dev

Activity

  1. joyceerhl commented on Feb 28, 2023

    @joyceerhl
    ContributorAuthor
    -- Current Proposed
    editor/title/context image image
    explorer/context image image
    editor/context/share image image
  2. joyceerhl commented on Mar 6, 2023

    @joyceerhl
    ContributorAuthor

    Alex Ross (@alexr00) as part of this work I have a few proposed changes to GHPRI that I'd like your feedback on.

    Today there are vscode.dev links coming from the builtin GitHub extension, the GitHub Repositories extension, and the GHPRI extension. IMO the way this should work is:

    vscode.dev and desktop RemoteHub:

    • Copy vscode.dev link (contributed by Remote Repositories extension)
    • Copy GitHub Permalink
    • Copy GitHub HEAD Link
    • Copy GitHub Permalink as Markdown

    Desktop git:

    • Copy vscode.dev link (contributed by builtin GitHub extension)
    • Copy GitHub Permalink
    • Copy GitHub HEAD Link
    • Copy GitHub Permalink as Markdown

    github.dev and Codespaces:

    • Copy github.dev link (contributed by GHPRI extension)
    • Copy GitHub Permalink
    • Copy GitHub HEAD Link
    • Copy GitHub Permalink as Markdown

    In all of these cases, the Copy GitHub __ links should IMO always produce github.com links rather than contextualizing them as we currently do today. This is because github.com links render with a nice preview in GitHub issue and PR comments which is useful for providing context when discussing code, so I usually want an action to copy these. On the other hand, I want vscode.dev links in addition to github.com links, e.g. to deeplink to a notebook cell. And it would not make sense to offer vscode.dev links on github.dev or Codespaces since they are served from the github.dev origin (this is actually a flaw in the link generation logic today).

    I also propose the following link generation behavior when contributed to the various menus we have in VS Code:

    • file/share: no file path or range
    • explorer/context/share: filepath, no range
    • editor/title/context/share: filepath, no range
    • editor/lineNumber/context: filepath, range (based on target line number)
      • when invoked for a notebook, vscode.dev link will include notebook cell range; we can't support this for notebooks on github.dev or github.com so we will omit the notebook cell range
      • if invoked from the context menu for a line number, we will favor the line number unless there is an active text selection which includes the line number (to support the case where the user wants to link to a range)
    • editor/context/share: filepath, range (based on active editor selection)
  3. joyceerhl commented on Mar 8, 2023

    @joyceerhl
    ContributorAuthor

    Feedback from UX sync today

  4. added
    feature-request
    on Mar 9, 2023
  5. locked and limited conversation to collaborators on Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requeston-testplan

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions