You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
Activity
joyceerhl commentedon Feb 28, 2023
editor/title/contextexplorer/contexteditor/context/sharejoyceerhl commentedon Mar 6, 2023
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:
Desktop git:
github.dev and Codespaces:
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 rangeexplorer/context/share: filepath, no rangeeditor/title/context/share: filepath, no rangeeditor/lineNumber/context: filepath, range (based on target line number)editor/context/share: filepath, range (based on active editor selection)joyceerhl commentedon Mar 8, 2023
Feedback from UX sync today
file/sharelink behavior was unexpected, expected the link to include the active file and range Copy GitHub __ Link actions fromfile/sharemenu copy links with file paths and line ranges vscode-pull-request-github#4598