-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Have Click to Follow Link tooltip label contain the URL #50029
Comments
Yes this probably doesn't apply to the terminal currently but eventually the terminal may support HTML |
Out link handling strategy needs to be revisited and shared across all those sections optimally. You are correct about the debug/linkDetector it converts textual URLs to clickable URLs and with the current structure might not need changing. |
I am not convinced this is something useful. i.e. I am personally never confused on what ctrl + click will open. Have you run into the situation where you don't know what ctrl + click will open? What was the case? (i.e. it sounds like a bug, and I'd like to avoid us adding more to the UI if it is not needed) |
@alexandrudima How do you know what |
Maybe it would also make sense to not show this in a tool tip but rather in the status bar like browsers do. |
If I install an extension and the extension adds random links via
My point is: we are not a generic webpage browser. We are a code editor. There should not be non-obvious links on source code. i.e. All links in my code should make sense. If there are non-sensical links in my source code, then there is a bug with the extension which creates them. |
I see your point, initially I didn't consider this to be a big change, but I see how there is a risk of a death by a thousand cuts scenario if the bar at accepting UI changes is too low. Back to your original question, this isn't needed for anything, so I'll close this feature request for now. |
I'd like to suggest an improvement where Click to Follow Link tooltip label would also show the URL the link leads to. There is basic linkification in VS Code for textual URLs which themselves show you the target, but we also have
DocumentLinkProvider
s which can underline arbitrary ranges. I think it would be useful to show the URL these lead to.These are the files that I think need to be updated to make this possible:
src/vs/editor/contrib/links/links.ts:29
Also line 41. I am not sure how the dynamic URL would be appended to the string. The only use of
HOVER_MESSAGE_GENERAL_META
seems to be at line 57 and AFAICT there is no context from which the URL could be pulled.src/vs/workbench/parts/debug/browser/linkDetector.ts:37
This file may also need to be updated, but I think this only handles converting textual URLs to clickable URLs, not contributed link ranges provided by
DocumentLinkProvider
s from extensions, which is my main interest.src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts:186
This is for the context of the integrated terminal (AFAICT). I don't think
DocumentLinkProvider
s contribute to the Terminal, so this should be just planfile
/http
/https
links being converted to clickable ones. It's actually probably not too useful to show the URL in the tooltip here as you can see it, maybe only if it normalized and expandedfile
URLs so the user doesn't have to infer the path.I'd like to PR this if this is deemed a worthwhile inclusion, but I'd like to get some pointers on how I could get the actual URL for the ranges highlighted by
DocumentLinkProvider
s. Also would like to hear others opinion on whether to do just there ranges or all URLs, even linkified plain text links where it seems a little redundant because you can already see (some form) of the URL.The text was updated successfully, but these errors were encountered: