Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

showing "real" diffs? #57

Open
Pomax opened this issue Dec 5, 2018 · 2 comments
Open

showing "real" diffs? #57

Pomax opened this issue Dec 5, 2018 · 2 comments

Comments

@Pomax
Copy link

Pomax commented Dec 5, 2018

Pixel diffing is nice, but is there a way to tell this library that I care about "what is different" and not "highlighting the entire document just because there's extra vertical whitespace relatively high up in the image"?

For example, if I have two screenshots of a webpage, one with body { padding-top: 20px; } and one with body { padding-top: 20em; } then the only difference is going to be the extra whitespace. Everything else is identical, so having the entire image flagged as "diff" would be wrong (think of it as a github diff: a change that adds the letter a to the start of a README.md does not change the entire document. All it does is add an a, the rest of the document is still the same as before).

Is there a way to tell blink-diff to find diffs but with maximum shift detection?

@josieoharrow
Copy link

Hello, I am not sure if this would work for what you're trying to do, but have you looked at the h-shift capacity? For a simple ignore horizontal diffs (over your entire image, I believe) it works pretty well.

@Pomax
Copy link
Author

Pomax commented Dec 6, 2018

I looked at more permissible h-shift and v-shift values, but that didn't really work. I'm trying to find libraries that do visual diffing in the same way we all understand text diffing should work (e.g. if you move something around, or add some text at the start, that move or add is the diff, not "almost the entire document has changed" =) so I was hoping blink-diff could do that. If it can't, no worries, it just means the search goes on.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants