[openstreetmap/openstreetmap-website] Don't set bbox history param when the entire world is visible (PR #5881)

Anton Khorev notifications at github.com
Thu Apr 3 04:12:59 UTC 2025


The regular `/history` page shows changesets intersecting with the map view. To get them, the current map view bounds are sent as the `bbox` parameter. But the bound can be outside of [-180..180] longitude range, therefore also a `.wrap()` fix is applied. The fix itself is broken, see #5473 which removes it and implements support for longitudes outside of [-180..180].

Still, we don't need to send the `bbox` parameter with huge longitude values when the entire planet is visible.[^1] If there's no `bbox`, no filtering by `bbox` happens and all changesets are visible. This is what this PR does.

This is a partial fix for #3423 when the entire planet is visible. #5473 is still required for map views with the antimeridian that don't include the entire planet. But even without #5473 you'll be able to fully zoom out, click *History* and see all the latest changesets.

![image](https://github.com/user-attachments/assets/fe43fe64-c893-4425-9290-fb8c2a14cce4)

[^1]: Strictly speaking, that never happens because poles are infinitely away, but we can consider them visible if ~[-85..85] latitude range is visible.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Add function to set changeset list bbox param
  * Don't set bbox history param when the entire world is visible

-- File Changes --

    M app/assets/javascripts/index/history.js (16)
    M test/system/history_test.rb (21)

-- Patch Links --

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

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

Message ID: <openstreetmap/openstreetmap-website/pull/5881 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250402/4323bb53/attachment.htm>


More information about the rails-dev mailing list