vscode-pull-request-github
vscode-pull-request-github copied to clipboard
Diff preview for image changes in pull requests
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

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:

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:
- It could be added into VS Code core, where other extensions can take advantage of it.
- It could be added into this extension.
- 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.
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
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
Related: https://github.com/microsoft/vscode/issues/165003
Closing as this is a great candidate for a separate extension.