Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Codidact Meta!

Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Comments on Highlighting for tag diffs

Post

Highlighting for tag diffs

+5
−0

In the diff for tags (as seen in a suggested edit, or in the edit history), the tags before editing are shown on the left, and the tags after editing are shown on the right. However, unlike the text diffs for the title and body, the diff for the tags shows no indication of which tags were removed, and which were added.

When there is a simple change, such as adding a single tag, this is still clear: Tag diff showing the tag "bug" on the left and two tags "bug" and "test" on the right

However, when the total number of tags does not change due to adding and removing the same number of tags, and the added and removed tags are similar (which seems likely to be common), it is not immediately obvious which parts of the diff have changed, or how many tags have been replaced:

Tag diff showing 5 tags on both sides that look similar. Left shows "bug", "test", "tag", "post", "comment". Right shows "bug", "tag", "post", "comment", "text".

Spot the differences.

Tag diffs would be easier to read if they had similar highlighting to the title and body diffs.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

Maybe a dark red frame around removed tags, and a dark green frame around added tags? (2 comments)
Maybe a dark red frame around removed tags, and a dark green frame around added tags?
celtschk‭ wrote about 2 months ago

Maybe a dark red frame around removed tags, and a dark green frame around added tags?

trichoplax‭ wrote about 2 months ago

Sounds good for consistency with the title and body diffs. It might need to be slightly larger than those to avoid being obscured by the styling of the tag boxes, as some of those already have a red background and red border.

Also, red and green might be an accessibility problem, but that's a separate question, for the whole diff not just the tag section. Consistency will still be an improvement. For now I suspect red and green will not cause a problem because all of the removals are in the left panel and all of the additions are in the right panel, so the colour is not needed to differentiate between additions and removals. If in future we introduce the option of inline diffs where there is just one panel with all the removals and additions in one place, then we'd need to think about whether we need another way of distinguishing them. The strikeout we currently have for removals helps, but isn't ideal for a removed hyphen or a removed 4.