add a tag diff to /(node|way|relation)/:id/history#6995
Conversation
|
Just came across #6448. That one has kinda nicer styling but I don't like the "in change set view". Mine seems to be a different approach. An obvious diff that is explicitly in between the two affected records. |
|
As you have apparently now discovered there is already a well developed PR working on this that has had a number of rounds of review so I think it's likely that is the best place to be working on things. |
| <% if old_element %> | ||
| <% diffs = tag_diff(new_element.tags, old_element.tags) %> | ||
| <% if diffs.any? %> | ||
| <details class="mb-3 border-bottom border-secondary-subtle pb-3"> |
There was a problem hiding this comment.
A possible downside of the collapsible design is that the find in page function in some browsers1 won’t be able to find the contents until you manually go through opening each section. I have a hunch that people use this page as a sort of blame view. After all, that’s the main advantage of keeping everything on this one history page instead of relegating the diff to the version page or a separate diff page.
Footnotes
There was a problem hiding this comment.
I am the sort of person who is continually annoyed by not being able to find text in a page for reasons such as this one 😬
Description
I added a tag diff between change sets to highlight the changes of tags.
The diff is not expanded by default. I wanted the diff in between the change sets to avoid confusion with the given state at that time. I wanted the diff to be opt-in.
I used the default bootstrap colors which contrasts many other implementations.
I didn't want any strike through text.
Relates to #738 #1253 #4765
Screenshots
Expanded
Without expansion
How has this been tested?
docker compose exec web bundle exec rails test test/system/element_history_test.rb test/helpers/browse_tags_helper_test.rbWhat should be discussed?
Tag changes from version #1 to #2all that much.oldnewpreviousnextbeforeafterNone of the above seem to be deal breakers for me.
Note: I was AI assisted.