Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve diffs for landscape orientation #690

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Christopher-Thiebaut
Copy link

When snapshot testing screenshots in landscape orientation, the diffs are very noisy as the original orientation of the reference image is ignored and it is treated, for the purpose of the visual diff, as a portrait orientation image. (The actual comparison seems to work correctly in a pass/fail sense, however.)

Unfortunately, this makes it very hard to see what actually changed. For example when removing a button in a drawing app I am currently working on, this is the diff I receive in the current version of the repository:
awful_diff

I believe this issue can be resolved by using the orientation from the new image for the visual diff which results in the following much more readable output:
sane_diff

I don't have enough context to know if my solution has drawbacks for the library/community as a whole so I would certainly appreciate review/discussion to see if there is a better solution.

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

Successfully merging this pull request may close these issues.

None yet

1 participant