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

Enhancements to link sharing in VS Code #175676

Closed
12 of 15 tasks
joyceerhl opened this issue Feb 28, 2023 · 3 comments
Closed
12 of 15 tasks

Enhancements to link sharing in VS Code #175676

joyceerhl opened this issue Feb 28, 2023 · 3 comments
Assignees
Labels
feature-request Request for new features or functionality on-testplan
Milestone

Comments

@joyceerhl
Copy link
Contributor

joyceerhl commented Feb 28, 2023

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
@joyceerhl joyceerhl self-assigned this Feb 28, 2023
@joyceerhl joyceerhl added this to the March 2023 milestone Feb 28, 2023
@joyceerhl
Copy link
Contributor Author

-- Current Proposed
editor/title/context image image
explorer/context image image
editor/context/share image image

@joyceerhl
Copy link
Contributor Author

joyceerhl commented Mar 6, 2023

@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)

@joyceerhl
Copy link
Contributor Author

joyceerhl commented Mar 8, 2023

Feedback from UX sync today

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality on-testplan
Projects
None yet
Development

No branches or pull requests

1 participant