Support for visual diffs of other files (onion skin/swipe)
Description
!14061 (closed) added image commenting. I've only been digging into the various features of GitLab for a brief time as I am trying to throw together a presentation to orient the team here on what GitLab is and why we should all use it (not just me!). So I don't know how long the side-by-side/onion/slide viewing of the two different images has been there. But, to be honest, that is one of the coolest things I've ever seen a version control or comparison tool do. A quick swipe left and right, back and forth, making it SUPER easy to identify differences between images, while still seeing the big picture, pun intended. Then, icing on the cake, commenting with the map pins makes it the perfect tool for calling out graphical diffs and making sure everyone looking at it sees those differences and knows what everyone else is talking about. Thank you for those features, first and foremost!
This would be AWESOME to have in other file types, such as text, PDF, Word, Markdown (preview), etc. We're a small shop, we may end up making or receiving files in various different formats--schematics, specifications for or from customers, and others. Sometimes the differences between two versions received can be hard to tell and cost us a lot of time, headache, and/or embarrassment when a difference we should've been aware of slips through the cracks.
Proposal
Integrating the ability to see the visual differences between other files that aren't currently supported would really hit the spot. Even if, at least at first, the feature merely uses some sort of [insert file type here] to PNG conversion utility internally1, and all you get is the same image side-by-side/onion/slide view. That would be SO much better than what we currently use, which is...open both versions of the file on a computer, make sure they're at the same zoom level, look at one monitor or one side of the monitor, look at the same spot on the other, scroll the left one, scroll the right one the same amount, etc. Costs time, humans aren't perfect. Let's have the tools help us easily compare more files left/right so we can focus on the diffs and make sure everyone's up to speed.
Text diffs are, of course, taken care of by the existing side-by-side/inline views, but I think a full-size side-by-side view with the full context and slider/onion skin stuff would be helpful too (fully functional Markdown-formatted content as well).
Stretch goal or maybe different issue: be able to do this between any two arbitrary commits or file history. Like git diff master~2:schematic.pdf schematic.pdf
In the meantime, I suppose for any files which we want visual comparison, we could just convert to images before uploading to the repo, but some of our schematics or spec sheets have dozens, even hundreds of pages...and then there's all the questions of how do you make sure the settings are the same between two different exports so they line up in the diff, etc.
Links / references
-
ImageMagick convert PDF multipage to image: https://stackoverflow.com/questions/9710118/convert-multipage-pdf-to-png-and-back-linux
↩