[openstreetmap/openstreetmap-website] Add a basic when-last-changed feature to the history pages (PR #3535)

JesseWeinstein notifications at github.com
Sun Apr 24 23:49:37 UTC 2022


This adds a 3rd column to the display of the current tags on the browse history pages, which displays the version each tag was last changed in, and (on hover) displays the (approx) date and display name of the user who made the changeset. It also links to the changeset.

This is adapted from https://github.com/raspbeguy/osm-blame (although that has more features); with the UX suggested by @westnordost.

I am not particularly adept at Ruby, so this likely has various infelicities or obvious ways to improve it. I'd be delighted with any comments or suggestions.


You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/3535

-- Commit Summary --

  * First partial effort at adding blame info to history page
  * Weird db/structure.sql automatic change
  * Working (for nodes) implementation!
  * Alter UX to shorten it, per suggestion by westnordost
  * Got it working for ways and relations, and avoided some duplication!
  * Rubocop fixes
  * erblint fixes
  * Add test

-- File Changes --

    M app/assets/stylesheets/common.scss (9)
    M app/helpers/browse_helper.rb (17)
    M app/views/browse/_common_details.html.erb (2)
    M app/views/browse/_node.html.erb (5)
    M app/views/browse/_relation.html.erb (5)
    M app/views/browse/_tag.html.erb (13)
    M app/views/browse/_tag_details.html.erb (2)
    M app/views/browse/_way.html.erb (5)
    M app/views/browse/history.html.erb (2)
    M config/locales/en.yml (1)
    M db/structure.sql (2)
    M test/helpers/browse_helper_test.rb (23)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/3535.patch
https://github.com/openstreetmap/openstreetmap-website/pull/3535.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3535
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/3535 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220424/0bb5158b/attachment.htm>


More information about the rails-dev mailing list