Problem/Motivation
In a revision diff view, text changes are highlighted with background colour (deletions in pink, additions in green), but image changes are not affected by these styles.
Steps to reproduce
1. edit a node and add or delete an image
2. compare the revision
3. inspect the image
Proposed resolution
tbc - add a border/margin around the image?
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | Screenshot from 2025-06-03 11-19-10.png | 393.25 KB | acbramley |
| #7 | diff-inline.png | 1.21 MB | malcomio |
Issue fork diff-3328297
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
malcomio commentedNot sure about the approach in https://git.drupalcode.org/project/diff/-/merge_requests/25 - adding padding may be intrusive.
Comment #4
malcomio commentedComment #6
heddnCan we post some screenshots of the before/after?
Comment #7
malcomio commentedHere's how it looks:

Comment #8
heddnSeems like a relatively helpful change.
Comment #9
acbramley commentedPipeline is failing.
Comment #10
malcomio commentedThe test failures relate to PHP code sniffer issues in files that aren't being changed - this change is only a CSS change.
Have merged 2.x into this branch and pushed, and the pipeline succeeded.
Comment #11
acbramley commentedThis is looking good, however I don't think we should add the padding to non img diffs. I've added a :has selector to fix that. Here's what it looks like now: