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

Markdown preview - show tooltip on links #30201

Closed
roblourens opened this issue Jul 6, 2017 · 7 comments · Fixed by #40572
Closed

Markdown preview - show tooltip on links #30201

roblourens opened this issue Jul 6, 2017 · 7 comments · Fixed by #40572
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities markdown Markdown support issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@roblourens
Copy link
Member

Would be great to see a tooltip on links, showing the target. Or popping it up in the status bar or elsewhere, like Chrome.

@vscodebot vscodebot bot added the markdown Markdown support issues label Jul 6, 2017
@roblourens roblourens added the feature-request Request for new features or functionality label Jul 6, 2017
@shreeshbhat
Copy link

@roblourens : Could you please explain the preview functionality bit more with screenshots of Chrome?
I am new to open source community and this project.
I use vscode often and would love to work on this if someone can guide me a little.

@roblourens
Copy link
Member Author

Lower left corner of the Chrome window when I hover the link to your name:

screen shot 2017-07-06 at 11 38 31 am 2

But I think a normal tooltip would be easier.

@shreeshbhat
Copy link

shreeshbhat commented Jul 6, 2017

Ah yes. I understand what you are talking about now. To verify, where the link is leading to.
Seems like a beginner friendly feature. I can pick it up this weekend if anyone can nudge me towards the right direction. :)

@mjbvz mjbvz added the help wanted Issues identified as good community contribution opportunities label Jul 10, 2017
@mjbvz
Copy link
Contributor

mjbvz commented Jul 12, 2017

Sorry for the delayed response.

It seems that tooltips are only shown if the element has a title attribute, but not for links that only have a href. I wasn't able to find if there is an electron setting to enable tooltips for links without titles. I think we may have to implement this ourselves.

To get started, take a look at this PR that added a similar feature to another electron app: brave/browser-laptop#625

Here's where our webview code lives: https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/html/browser/webview.ts I believe you should be able to attach a update-target-url handler to the webview handler.

Please let me know if you have any questions about the code or want to discuss potential designs

@shreeshbhat
Copy link

I m happy to receive help! :)
I was facing issues while trying to build and fiddle around with the source code.
Will definitely look into this PR and the code you pointed out this weekend.
Thanks for taking your time to post this info.
I ll post any questions or designs which I have.

@bpceee
Copy link
Contributor

bpceee commented Dec 20, 2017

Hi @mjbvz , I will create a PR to add title attribute to every <a>.

bpceee added a commit to bpceee/vscode that referenced this issue Dec 20, 2017
bpceee added a commit to bpceee/vscode that referenced this issue Dec 21, 2017
mjbvz pushed a commit that referenced this issue Dec 21, 2017
* Add tooltip on links in markdown preview #30201

* only set title when it not exist #30201
@mjbvz mjbvz added the verification-needed Verification of issue is requested label Dec 21, 2017
@mjbvz mjbvz added this to the December 2017/January 2018 milestone Dec 21, 2017
@mjbvz
Copy link
Contributor

mjbvz commented Dec 21, 2017

For verification: this was implemented as tooltip when you hover over links in a webview

@roblourens roblourens added the verified Verification succeeded label Jan 31, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 4, 2018
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 help wanted Issues identified as good community contribution opportunities markdown Markdown support issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants