Fix swipe image diff with transparency#19260
Merged
tidy-dev merged 4 commits intodesktop:developmentfrom Nov 26, 2024
Merged
Conversation
Contributor
Author
|
@tidy-dev I've fixed the failing lint, sorry for that. |
tidy-dev
approved these changes
Nov 26, 2024
Contributor
tidy-dev
left a comment
There was a problem hiding this comment.
💖 This works great! Thank you for the fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #16657
Closes #17735
Description
The swipe image diff now no longer shows the old image underneath the new image if it contains transparency.
It's a small-ish change in CSS and gets rid of the swiper element that used to hold the new image.
Instead, both the previous and current image are now positioned absolutely, one on the left, the other on the right, with a
clip-pathbeing used to cut away the left/right half.The value for the
clip-pathneeds to be floored, else there is a faint line going down the middle due to non-integer pixel values being wonky.Screenshots
Old behavior:
oldImageDiff.webm
New behavior:
newImageDiff.webm
Sorry for the WEBMs, the mp4 source files were too large for Github.
(sadly I can't fix those cause Github isn't open source)
Release notes
Notes: Swipe image diffs now handle images with transparency better.