igit icon indicating copy to clipboard operation
igit copied to clipboard

Render images posted in the PR body and comments

Open smeijer opened this issue 6 years ago • 4 comments

Images in the PR and review comments, are not rendered. Would be nice to see them.

We work a lot with before/after screenshots, to help QA spot the differences faster. This is something I'm missing in igit.dev.

image

smeijer avatar May 09 '19 18:05 smeijer

Hey @smeijer,

Do you mean that you can't paste an image from your clipboard? Or you mean that the image is already there just IGit is not displaying it? The first case will need a lot more efforts to match what GitHub is doing. If you are falling into the second case can you give me the raw markdown of a comment so I can test locally.

P.S. I'm very often still going to GitHub just so I can paste a screenshot but after that IGit is successfully displaying my image.

krasimir avatar May 10 '19 07:05 krasimir

The latter one, the image is already there, but IGit is not displaying it.

Looks like the raw html is being rendered as text, instead of as html?

altered src trough dev tools

image

Inspect result of graphql request

query: "{↵  search(query: "$repro in:name user:$usr", type: REPOSITORY, first: 1)...

result: search.edges[0].node.pullRequests.edges[x].node.body:
↵Before:
↵<img width="320" alt="Screen Shot 2019-05-08 at 18 43 07" src="https://user-images.githubusercontent.com/315126...png">

smeijer avatar May 10 '19 08:05 smeijer

I see in the docs that body should be markdown, and yet... some of my PR's return html there 😕.

Might be a bug in the github api?

smeijer avatar May 10 '19 09:05 smeijer

Hm ... that's interesting. I'll post some HTML locally so I end up with markdown and html in the body of a comment.

krasimir avatar May 10 '19 09:05 krasimir