[openstreetmap/openstreetmap-website] Rename map layer javascript files (PR #4929)
Anton Khorev
notifications at github.com
Fri Jun 28 00:26:09 UTC 2024
We have a bunch of things named "browse". On the client side we have the `OSM.Browse` controller for single element pages: https://github.com/openstreetmap/openstreetmap-website/blob/ecd091c976cc8f2a3cf96fe08dc3211aad689ae2/app/assets/javascripts/index.js#L327
But there's also [browse.js](https://github.com/openstreetmap/openstreetmap-website/blob/ecd091c976cc8f2a3cf96fe08dc3211aad689ae2/app/assets/javascripts/index/browse.js). It initializes the data layer:

This is confusing because most of controllers, for example `OSM.Directions`, are in their own javascript files. You'd expect to find `OSM.Browse` in `browse.js` but no, `browse.js` is something completely different.
This pull request renames everything "browse" about `browse.js` and moves the file into the `layers` directory. And it also moves notes layer there.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/4929
-- Commit Summary --
* Rename map layer javascript files
-- File Changes --
M app/assets/javascripts/index.js (8)
R app/assets/javascripts/index/layers/data.js (8)
R app/assets/javascripts/index/layers/notes.js (2)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/4929.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4929.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4929
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4929 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240627/c3d8a055/attachment.htm>
More information about the rails-dev
mailing list