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

Hyperclick inside datatip #59

Open
1 of 3 tasks
aminya opened this issue Apr 3, 2020 · 3 comments
Open
1 of 3 tasks

Hyperclick inside datatip #59

aminya opened this issue Apr 3, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@aminya
Copy link
Member

aminya commented Apr 3, 2020

It would be nice if:

  • we can click on the types that are shown inside the datatip.
  • have atom-ide-definitions features in the datatip
  • the URLs are clickable. -> fixed
@Belar Belar added the enhancement New feature or request label Apr 5, 2020
@aminya aminya changed the title Clickable links inside datatip Hyperlink inside datatip Jul 22, 2020
@aminya
Copy link
Member Author

aminya commented Jul 22, 2020

@UziTech Can we make the hyperlink working inside the datatips?

@aminya aminya changed the title Hyperlink inside datatip Hyperclick inside datatip Jul 22, 2020
@UziTech
Copy link
Member

UziTech commented Jul 22, 2020

hyperclick only observes TextEditors right now. If there was some way to observe when a datatip is created we could observe them too.

@aminya
Copy link
Member Author

aminya commented Jul 22, 2020

It should possible to observe them. If not we can just make them simple hyperlinks so user can click on!

There are three types of datatip: React, HTML, Snippet. All of them are converted to some HTML in the end for rendering. So we can add Hyperclick capability after the final rendering. We can use renderToStaticMarkup to convert it to text if that is more suitable.

https://github.com/atom-ide-community/atom-ide-datatip/blob/471fe8036b853079530105c63d968ec20eae3d00/lib/datatip-view.js#L148

Instead, we can do this individually for the three types. That might be easier. In that case, we will only need static markup rendering only for the react-dom (which we are already doing it anyway). For HTML and Snippet types, the content is simple.

https://github.com/atom-ide-community/atom-ide-datatip/blob/471fe8036b853079530105c63d968ec20eae3d00/lib/datatip-view.js#L27
https://github.com/atom-ide-community/atom-ide-datatip/blob/471fe8036b853079530105c63d968ec20eae3d00/lib/datatip-view.js#L69
https://github.com/atom-ide-community/atom-ide-datatip/blob/471fe8036b853079530105c63d968ec20eae3d00/lib/datatip-view.js#L103

We might want to fix #60 first though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants