openstreetmap-ng icon indicating copy to clipboard operation
openstreetmap-ng copied to clipboard

Tags diff mode

Open Zaczero opened this issue 9 months ago • 6 comments

Optionally display tag diffs on elements. Use color codings.

image

The goal is to:

  • Display color coded tag changes in element history view, enabled by default
  • Show a button on the element page, when clicked, it modifies the tag list to be color-coded without page reload
  • Colors should not be too distracting

Zaczero avatar May 08 '24 06:05 Zaczero

Would something like that work?

Before After
image image

White (no color): tag unchanged Green: new tag in a version Yellow: value of tag modified Red: tag removed

I am not sure whether it makes sense to keep removed tag in next version.

starsep avatar Jun 16 '24 11:06 starsep

The color schema is really good :+1: What if we make the green match the OSM theme green (tip: $green), for consistency and reduce background opacity/make it lighter because it "pops" too much (transparentize/tint-color methods are useful for this).

I am not sure whether it makes sense to keep removed tag in next version.

I think it looks fine but the delete line makes it somewhat difficult to read. Instead maybe slightly reduce text opacity of deleted rows and prefix keys with a dark-gray trash icon? (perhaps https://icons.getbootstrap.com/icons/trash-fill/). It makes sense to always show deleted tags after existing tags.

Edit:

I have added Icons section to Contributing: Frontend

Zaczero avatar Jun 16 '24 12:06 Zaczero

better-osm-org script also has such functionality. The colours look better when they are more saturated. Also the yellow is applied only to the value cell (since the key hasn't changed). Only changed tags are shown (which seems like a minus for me). For nodes it shows the moved distance and for other elements marks the elements if there has been a geometry change.

image image

Dimitar5555 avatar Jun 16 '24 19:06 Dimitar5555

Also the yellow is applied only to the value cell

It's a good idea

For nodes it shows the moved distance and for other elements marks the elements if there has been a geometry change.

I'll note that down but we will create a separate issue and bounty for it, this one should focus on just tags :slightly_smiling_face:!

Zaczero avatar Jun 17 '24 08:06 Zaczero

is it possible to use the same color scheme to highlight changes in geometry/positions? this could be applied to single nodes and their coordinates in the node list of an element

  • yellow for changed in coordinate of already existing node
  • red for removed nodes,
  • green for added nodes
  • blue on white backgroud for unchanged nodes

Aury88 avatar Aug 07 '24 15:08 Aury88

@Aury88 yup #7

Zaczero avatar Aug 07 '24 21:08 Zaczero

The feature has been merged and it looks amazing! Thank you all for your contribution on this issue.

I have decided to reward @starsep and @Dimitar5555 with 3$ bonus bounties - so 26$ payout in total.

@Dimitar5555 Since this is your first bounty, you can keep collecting the funds and let me know whenever you would like to withdraw. It's tracked here.

Peek 2024-10-04 05-55

Zaczero avatar Oct 04 '24 04:10 Zaczero