[openstreetmap/openstreetmap-website] Delete button in Home location section of user profiles (PR #4149)

Anton Khorev notifications at github.com
Thu Aug 10 02:55:43 UTC 2023


![home](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/89bb7604-cb3b-4510-bc41-9dd7b93906c7)

- also undo delete button
- also show button to center map on currently entered coordinates
- also `has_home?` method in user models instead of doing home_lat && home_lon

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

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

-- Commit Summary --

  * Add home location condition to user model
  * Add user home location change listeners and buttons
  * Add show home location button listener
  * Add delete home location button listener
  * Add undelete home location button listener
  * Set default home location zoom when centering the map
  * Disable show home location button if close enough to map center
  * Disable home marker tab focus and cursor change
  * Exchange focus between home location delete/undelete buttons
  * Don't construct invalid LatLng objects in home location
  * Highlight non-numeric home location coordinates

-- File Changes --

    M app/assets/javascripts/user.js (115)
    M app/controllers/diary_entries_controller.rb (2)
    M app/helpers/application_helper.rb (2)
    M app/models/user.rb (8)
    M app/views/api/users/_user.json.jbuilder (2)
    M app/views/api/users/_user.xml.builder (2)
    M app/views/dashboards/_contact.html.erb (2)
    M app/views/dashboards/show.html.erb (2)
    M app/views/layouts/map.html.erb (2)
    M app/views/profiles/edit.html.erb (9)
    M config/locales/en.yml (3)

-- Patch Links --

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

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

Message ID: <openstreetmap/openstreetmap-website/pull/4149 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230809/3d5a75a9/attachment.htm>


More information about the rails-dev mailing list