[openstreetmap/openstreetmap-website] Overlapping texts (Changesets by nearby users) (Issue #3883)

Andy Allan notifications at github.com
Thu Jan 12 09:52:31 UTC 2023


I came across something similar yesterday while doing some refactoring, so I think I've figured this out although I haven't had time to fix it.

The /history/nearby call is handled by [ChangesetsController](https://github.com/openstreetmap/openstreetmap-website/blob/226e2d654af2ddb843d39d80a25c2501ff016de3/app/controllers/changesets_controller.rb). It [initially loads the page](https://github.com/openstreetmap/openstreetmap-website/blob/226e2d654af2ddb843d39d80a25c2501ff016de3/app/controllers/changesets_controller.rb#L41-L43) with the spinner, and then [via javascript calls the same page again](https://github.com/openstreetmap/openstreetmap-website/blob/226e2d654af2ddb843d39d80a25c2501ff016de3/app/assets/javascripts/index/history.js#L58-L77) but with the list=1 parameter. This call actually does the query to the database, which times out. (This happens to me too, the timeout [is a known issue](https://github.com/openstreetmap/openstreetmap-website/issues/2396)).

However, the problem here is that the second call is expected to [render with no layout](https://github.com/openstreetmap/openstreetmap-website/blob/226e2d654af2ddb843d39d80a25c2501ff016de3/app/controllers/changesets_controller.rb#L65), i.e. just return the list. But the call is wrapped in [`web_timeout`](https://github.com/openstreetmap/openstreetmap-website/blob/226e2d654af2ddb843d39d80a25c2501ff016de3/app/controllers/changesets_controller.rb#L65) which doesn't know about this intention, and so it returns an entire page that is crammed into the sidebar, top menu and everything.

I'll have a think about the best approach to fix this. There are other pages that behave differently, e.g. ones that use [map_layout](https://github.com/openstreetmap/openstreetmap-website/blob/226e2d654af2ddb843d39d80a25c2501ff016de3/app/controllers/application_controller.rb#L249-L266), where the choice of layout is handled differently (and potentially better, when that layout choice is also inherited by the error handling) and it would be good to align on a single approach.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/3883#issuecomment-1380073000
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/3883/1380073000 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230112/a1e211e1/attachment.htm>


More information about the rails-dev mailing list