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

Render Inline Images in code comments #41775

Closed
robertlugg opened this issue Jan 17, 2018 · 9 comments
Closed

Render Inline Images in code comments #41775

robertlugg opened this issue Jan 17, 2018 · 9 comments
Labels
api *duplicate Issue identified as a duplicate of another issue(s) editor-rendering Editor rendering issues feature-request Request for new features or functionality
Milestone

Comments

@robertlugg
Copy link

  • VSCode Version: Code 1.19.2 (490ef76, 2018-01-10T15:55:03.538Z)
  • OS Version: Windows_NT x64 6.1.7601
  • Extensions:
Extension Author (truncated) Version
path-intellisense chr 1.4.2
bracket-pair-colorizer Coe 0.10.14
language-julia jul 0.9.1
python ms- 0.9.1
unicode-latex oij 1.1.1
vscode-code-outline pat 0.0.12
progen-mtp rob 0.0.1
tcl ras 0.1.0
vscode-icons rob 7.19.0
partial-diff ryu 0.5.1
code-spell-checker str 1.6.2

(1 theme extensions excluded)


Feature Request

Allow images to be displayed "inline" with source code. Provide meta-data to indicate what to show (using markup, etc).

For several domains an image is worth a thousand words, as they say. I write geometric routines and wish to describe, for instance, coordinate systems.

I would also like to be able to insert other simple illustrations. This is better than ascii art.

I know this is a code editor and not a word processor, so have no problems greatly restricting how images are inserted. Primarily, its just for commenting code better.

As a bonus, I would love the "drag and drop" like this github issue dialog where dropping a file into VSCode will embed whatever markup is needed including potentially copying the image to the same directory as the source code.

References

This Visual Studio extension does exactly what I'm requesting:
https://github.com/lukesdm/image-comments
image 1226

This Visual Studio example is also very similar:
https://editorsamples.codeplex.com/wikipage?title=Image%20Insertion&referringTitle=Home

This request is not the same as
#7689 or
https://marketplace.visualstudio.com/items?itemName=kisstkondoros.vscode-gutter-preview
, but is similar. I don't want a quick "icon", i want a read-able "full-size" image that will help my comment.

@vscodebot vscodebot bot added editor editor-core Editor basic functionality labels Jan 17, 2018
@pyang-1981
Copy link

Great request. That will be very helpful.

@alexdima alexdima added the feature-request Request for new features or functionality label Jan 18, 2018
@alexdima alexdima added this to the Backlog milestone Jan 18, 2018
@alexdima alexdima removed their assignment Jan 18, 2018
@alexdima alexdima removed the editor-core Editor basic functionality label Jan 18, 2018
@ghost
Copy link

ghost commented Jan 18, 2018

I think it's can be also very dangerous (unsecure)...

@m-schuetz
Copy link

I'd also love to have this feature! Developers in visual computing could greatly benefit from graphical representations of algorithms in comments.

If this makes it into vscode, it would be good if the links could be specified relative to the workspace/project folder, since web content may not always be available or it may get removed at some point.

image

@danmarshall
Copy link

danmarshall commented Mar 29, 2018

👍 I've long wanted this feature in an editor. It could also support a data-uri.
Come to think about it, perhaps this could be implemented with markdown inside of a multi-line comment.

@alexdima alexdima changed the title [Feature Request, Editor] - Inline Images in code comments Render Inline Images in code comments Sep 20, 2018
@alexdima alexdima added editor-rendering Editor rendering issues and removed editor labels Sep 20, 2018
@tecosaur
Copy link

I'm here from LaTeX Workshop where the is significant demand for inline previews of both images and math (using MathJax).

Adding my two cents - I'd really like to see it, and I also know of a large community that is particularly interested in this capability.

@jrieken
Copy link
Member

jrieken commented Jan 18, 2019

/duplicate of #3220

@vscodebot vscodebot bot added the *duplicate Issue identified as a duplicate of another issue(s) label Jan 18, 2019
@vscodebot
Copy link

vscodebot bot commented Jan 18, 2019

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Jan 18, 2019
@robertlugg
Copy link
Author

robertlugg commented Jan 18, 2019

(edited):
I see that there are other similar requests referenced (#66493, #66418, #3220). This makes me confident that my request is redundant and it is appropriate to close.

---- original ---

Hi @jrieken, I reviewed most of the #3220 thread.  There are several concepts related to my request.  But viewing that thread, I don't see a consistent alignment with the end goal or with my request.  Or, put another way, if issue #3220 were satisfied, would it _necessarily_ mean that my request would also be satisfied?

What concerns me most is the title of that request.  I don't want a "peek" or something like jupyter that performs an evaluation (although those features are nice too).

I don't see how my request is a duplicate of #3220.  That said, I'll respect your judgement if after reviewing this note you conclude that it is.  Thank you for your thoughts on this.

@jrieken
Copy link
Member

jrieken commented Jan 18, 2019

Yeah, with #3220 (and PR #66418) there will be API that allows you do render images inline with code and/or code comments.

screenshot 2019-01-18 at 10 06 00

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api *duplicate Issue identified as a duplicate of another issue(s) editor-rendering Editor rendering issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

7 participants