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

Links in Typescript tooltips don't work #77199

Closed
DanTup opened this issue Jul 11, 2019 · 7 comments
Closed

Links in Typescript tooltips don't work #77199

DanTup opened this issue Jul 11, 2019 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities upstream-issue-linked This is an upstream issue that has been reported upstream

Comments

@DanTup
Copy link
Contributor

DanTup commented Jul 11, 2019

There are blue hyperlinks in the tooltips for the VS Code bindings, but clicking them doesn't seem to do anything. If they're not expected to work, should they not be links?

Screenshot 2019-07-11 at 12 21 31 pm

@mjbvz mjbvz added bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities labels Jul 12, 2019
@mjbvz
Copy link
Collaborator

mjbvz commented Jul 12, 2019

These links are of the form #Some-Symbol-Name and so they definitely will not work. Support is tracked by #8223

Marking as help wanted if someone want to investigate stripping such links from the displayed content

@DiamondYuan
Copy link
Contributor

These links are of the form #Some-Symbol-Name and so they definitely will not work. Support is tracked by #8223

Marking as help wanted if someone want to investigate stripping such links from the displayed content

i can do this job,Do you mean remove link from comment in image?

@mjbvz
Copy link
Collaborator

mjbvz commented Jul 24, 2019

Yes. Just render it as text

@DiamondYuan
Copy link
Contributor

Yes. Just render it as text

Sorry, I didn't find which file I should change.

@frobinsonj
Copy link
Contributor

Commit 2c1c691 from @jrieken means that these links will now output as file:///#fragment.

Could add || href.match(/^file:\/\/\/#/) to the below if statement to filter out these broken links but that's far from ideal. Would like to have a go at this issue but I have a feeling that a better solution would involve removing "file" as the default scheme. Any ideas on how I could tackle this?

if (
!href
|| href.match(/^data:|javascript:/i)
|| (href.match(/^command:/i) && !markdown.isTrusted)
|| href.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)
) {
// drop the link
return text;
} else {

@bradennapier
Copy link

This occurs because there is a special extension that specifically provides document links for any vscode.d.ts files. This is separate from the tooltip renderer which renders the markdown.

It is pretty clear that in general URI fragment should provide a means for navigating to a symbol.

file://path/to/file.ts#Symbol.path should basically be supported out of box.

@mjbvz
Copy link
Collaborator

mjbvz commented Sep 29, 2020

Let's fold this into microsoft/TypeScript#35524

Once JS/TS supports @see tags, then we can swap over to using proper links in the vscode.d.ts file

@mjbvz mjbvz closed this as completed Sep 29, 2020
@mjbvz mjbvz added upstream-issue-linked This is an upstream issue that has been reported upstream and removed GraceHopperOSD labels Sep 29, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities upstream-issue-linked This is an upstream issue that has been reported upstream
Projects
None yet
Development

No branches or pull requests

6 participants