vscode-pull-request-github icon indicating copy to clipboard operation
vscode-pull-request-github copied to clipboard

Diff preview for image changes in pull requests

Open Artur- opened this issue 4 years ago • 3 comments

Not sure if this is a feature request for VS Code or this extension.

GitHub shows an image diff when a PR contains an updated image, e.g. https://github.com/Artur-/screenshot-public/pull/1/files?short_path=4ee84a8#diff-4ee84a82b5e4c9e6651b13fd27dcf615e427ec584929f2cef7167aa99151a77a

Screenshot 2021-08-19 at 9 03 56

It would be nice to see this in VS Code also.

GitHub offers 3 options to compare images: 2-up/Swipe/Onion Skin. Personally I almost only use Swipe to find smaller differences in automated screenshots and none of the others except for the default (2-up) when the changes are really obvious.

Even nicer than the 3 GitHub options would be a diff view using e.g. pixelmatch: Screenshot 2021-08-19 at 9 03 52

Artur- avatar Aug 19 '21 06:08 Artur-

That is a cool GitHub feature that I didn't know existed. There are a couple options for how such a feature could be added to this extension:

  1. It could be added into VS Code core, where other extensions can take advantage of it.
  2. It could be added into this extension.
  3. It could be it's own extension.

I would prefer option 3. This is a feature that has value as a standalone extension, and then other extension would be able to use it's functionality through either API or commands that the new image diff extension provides. I haven't written any image diffing code before, but presumably it will also be a significant amount of code, which, if added to GitHub Pull Requests would increase the size of it even though I would guess that image diffing is not something most users use (as is evidenced by the bugs you've found in our image diff support).

If an image diffing extension is made then we could show a notification recommending it when a user opens a "simple image diff" (basically what we currently support).

I'm going to mark this as "help wanted" so that members of the community can see that an image diffing extension is something we'd be interested in integrating with.

alexr00 avatar Aug 19 '21 09:08 alexr00

For reference, this is what I have been using as a bookmarklet to make diffs in the GitHub UI: https://gist.github.com/Artur-/3fbe5259aac22b1117df9aec8737c170

Artur- avatar Aug 19 '21 10:08 Artur-

Not the VS Code extension but useful for me to review images in Chrome: https://chrome.google.com/webstore/detail/github-pr-images-comparer/fdbkbdjkkjlceenjnkdopiiibkhlknlm?hl=en-GB

bentleyvk avatar Apr 15 '22 11:04 bentleyvk

Related: https://github.com/microsoft/vscode/issues/165003

bersbersbers avatar Oct 30 '22 09:10 bersbersbers

Closing as this is a great candidate for a separate extension.

alexr00 avatar Dec 15 '23 15:12 alexr00