Re: [openstreetmap/openstreetmap-website] Put api keys directly in js layer definitions (PR #5352)

2024-12-19 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 1 commit. 2588e2ba4688f6bfacbedb0a07d77b9028dd4bda Put api keys directly in js layer definitions -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5352/files/7571bdfba52a3bce97ed9393e21c480fbc2b2e42..2588e2ba4688f6bfacbedb0a07d77b9028dd4bda Y

[openstreetmap/openstreetmap-website] Simplify calls to user block path helpers (PR #5425)

2024-12-19 Thread Anton Khorev via rails-dev
Similar to #5424, for `*_user_block_path` helpers. You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/5425 -- Commit Summary -- * Simplify calls to user block path helpers -- File Changes -- M app/controllers/user

[openstreetmap/openstreetmap-website] Simplify calls to api_message_path helper (PR #5424)

2024-12-19 Thread Anton Khorev via rails-dev
Mostly changes ``` api_message_path(:id => msg.id) ``` to ``` api_message_path(msg) ``` in tests. You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/5424 -- Commit Summary -- * Simplify calls to api_message_path helper

[openstreetmap/openstreetmap-website] Move user preferences routes to api namespace (PR #5423)

2024-12-19 Thread Anton Khorev via rails-dev
Done to eventually move all api routes to api namespace. Gives `api_` prefix to path helpers. You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/5423 -- Commit Summary -- * Move user preferences routes to api namespace

[openstreetmap/openstreetmap-website] Replace show and index abilities with read ability (PR #5422)

2024-12-19 Thread Anton Khorev via rails-dev
Similar to https://github.com/openstreetmap/openstreetmap-website/pull/5164 and https://github.com/openstreetmap/openstreetmap-website/pull/5185. You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/5422 -- Commit Summary -

Re: [openstreetmap/openstreetmap-website] Bump allowed ECMAScript version to 2022 (ES13) (PR #5421)

2024-12-19 Thread Holger Jeromin via rails-dev
missing 2023 in firefox https://caniuse.com/mdn-javascript_builtins_weakmap_symbol_as_keys Is a quite esotheric feature. But really needed stuff was not added in 2023. So fine with going with 2022. > I'm assuming that there's going to a be a proportion of people using browsers > that don't supp

Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-12-19 Thread pkrasicki via rails-dev
No offense, but letting someone else decide is such a lazy solution. You are the developers, this is your app. So why can't you decide? Do you not have the time/energy or what is the reason? >It is the choice of the cartographers. Why? Why can't the users change the way the map is displayed in

Re: [openstreetmap/openstreetmap-website] Add 'canDownloadImage' layer option (PR #5416)

2024-12-19 Thread Tom Hughes via rails-dev
Merged #5416 into master. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5416#event-15721807960 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-

Re: [openstreetmap/openstreetmap-website] Test share textarea not to leak into note text on hiding resolved notes (PR #5420)

2024-12-19 Thread Tom Hughes via rails-dev
Merged #5420 into master. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5420#event-15721807996 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-

Re: [openstreetmap/openstreetmap-website] Test share textarea not to leak into note text on hiding resolved notes (PR #5420)

2024-12-19 Thread Tom Hughes via rails-dev
Looks good to me, thanks. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5420#issuecomment-2554844503 You are receiving this because you are subscribed to this thread. Message ID: ___

Re: [openstreetmap/openstreetmap-website] Add 'canDownloadImage' layer option (PR #5416)

2024-12-19 Thread Tom Hughes via rails-dev
@tomhughes approved this pull request. That looks much better now, thanks. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5416#pullrequestreview-2515402410 You are receiving this because you are subscribed to this thread. Mess

Re: [openstreetmap/openstreetmap-website] Add 'canDownloadImage' layer option (PR #5416)

2024-12-19 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -411,34 +416,20 @@ L.OSM.share = function (options) { $("#mapnik_image_width").text(mapWidth); $("#mapnik_image_height").text(mapHeight); - const layerId = map.getMapBaseLayerId(); - const layerKeys = new Map([ -

Re: [openstreetmap/openstreetmap-website] Add 'canDownloadImage' layer option (PR #5416)

2024-12-19 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 2 commits. 6c1704b24587537cb7ebd3844db2500052523c6c Add 'canDownloadImage' layer option 2ba85472be499331cc0e9d7e65c124c409819baa Change image download warning message to a list -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5416/files/276

Re: [openstreetmap/openstreetmap-website] Bump allowed ECMAScript version to 2022 (ES13) (PR #5421)

2024-12-19 Thread Tom Hughes via rails-dev
Looks like there is one feature in 2022 that is an issue for Safari 15 and the Chrome 87/92 outliers are also a bit more limited but of the rest is OK I think? -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5421#issuecomment-2554

Re: [openstreetmap/openstreetmap-website] Bump allowed ECMAScript version to 2022 (ES13) (PR #5421)

2024-12-19 Thread Tom Hughes via rails-dev
We certainly have statistics.. Here's some for yesterday for Chrome: |Label|Unique visitors|Visits|Actions| |-|---|--|---| |Chrome 109.0|1348|1638|3661| |Chrome 111.0|240|242|445| |Chrome 116.0|182|203|303| |Chrome 117.0|210|223|268| |Chrome 119.0|134|186|409| |Chrome 120.0

Re: [openstreetmap/openstreetmap-website] Bump allowed ECMAScript version to 2022 (ES13) (PR #5421)

2024-12-19 Thread Andy Allan via rails-dev
Does the OSMF have any stats about what percentage of visitors to the website this would affect? I'm assuming that there's going to a be a proportion of people using browsers that don't support ECMAScript 2022 since that's only a couple of years old. My guess would include older Android device

[openstreetmap/openstreetmap-website] Bump allowed ECMAScript version to 2022 (ES13) (PR #5421)

2024-12-19 Thread Tom Hughes via rails-dev
We've been on 2015 for a long time as we no longer care about IE there's probably no good reason not to bump it. I've had a look at the support matrices and up to 2022 just about everything seems to be supported in all current browsers. Detailed results can be found: * [ECMAScript 2016](https

[openstreetmap/openstreetmap-website] Test share textarea not to leak into note text on hiding resolved notes (PR #5420)

2024-12-19 Thread Anton Khorev via rails-dev
Follows #5419. I figured out why bug on *Hide* was happening. It was happening when hiding resolved notes because there's no textarea for resolved notes. #5419 fixed that bug. Here I'm adding a test that would have failed. You can view, comment on, or merge this pull request online at: https:

Re: [openstreetmap/openstreetmap-website] Add 'canDownloadImage' layer option (PR #5416)

2024-12-19 Thread Tom Hughes via rails-dev
@tomhughes commented on this pull request. > @@ -411,34 +416,20 @@ L.OSM.share = function (options) { $("#mapnik_image_width").text(mapWidth); $("#mapnik_image_height").text(mapHeight); - const layerId = map.getMapBaseLayerId(); - const layerKeys = new Map([ -["

Re: [openstreetmap/openstreetmap-website] Add 'canDownloadImage' layer option (PR #5416)

2024-12-19 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -411,34 +416,20 @@ L.OSM.share = function (options) { $("#mapnik_image_width").text(mapWidth); $("#mapnik_image_height").text(mapHeight); - const layerId = map.getMapBaseLayerId(); - const layerKeys = new Map([ -

Re: [openstreetmap/openstreetmap-website] Center share popup inside the browser window (PR #5418)

2024-12-19 Thread Anton Khorev via rails-dev
Screen size should be reported in css pixels according to MDN docs. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5418#issuecomment-2554246034 You are receiving this because you are subscribed to this thread. Message ID: __

Re: [openstreetmap/openstreetmap-website] Refactor render_social_share_buttons helper (Issue #5415)

2024-12-19 Thread Andy Allan via rails-dev
Fixed by #5417 > We have enough unused code in helpers. Yes, there's lots of other code to fix too, of course. We can work through each thing you mention individually. > I wish i was active at the time issue was raised to do it instead. No worries, there's plenty more work for everyone! --

Re: [openstreetmap/openstreetmap-website] Refactor render_social_share_buttons helper (Issue #5415)

2024-12-19 Thread Andy Allan via rails-dev
Closed #5415 as completed. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5415#event-15715319200 You are receiving this because you are subscribed to this thread. Message ID: ___ rai

Re: [openstreetmap/openstreetmap-website] Refactor social sharing helper (PR #5417)

2024-12-19 Thread Andy Allan via rails-dev
Merged #5417 into master. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5417#event-15715288240 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-

Re: [openstreetmap/openstreetmap-website] Refactor social sharing helper (PR #5417)

2024-12-19 Thread Andy Allan via rails-dev
Thanks for the refactoring! -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5417#issuecomment-2553357017 You are receiving this because you are subscribed to this thread. Message ID: __

Re: [openstreetmap/openstreetmap-website] Add 'canDownloadImage' layer option (PR #5416)

2024-12-19 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request. > @@ -411,34 +416,20 @@ L.OSM.share = function (options) { $("#mapnik_image_width").text(mapWidth); $("#mapnik_image_height").text(mapHeight); - const layerId = map.getMapBaseLayerId(); - const layerKeys = new Map([ -

Re: [openstreetmap/openstreetmap-website] Add 'canDownloadImage' layer option (PR #5416)

2024-12-19 Thread Tom Hughes via rails-dev
@tomhughes requested changes on this pull request. > @@ -411,34 +416,20 @@ L.OSM.share = function (options) { $("#mapnik_image_width").text(mapWidth); $("#mapnik_image_height").text(mapHeight); - const layerId = map.getMapBaseLayerId(); - const layerKeys = new Map([ -

Re: [openstreetmap/openstreetmap-website] Improve note testing and text handling (PR #5419)

2024-12-19 Thread Tom Hughes via rails-dev
Merged #5419 into master. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5419#event-15713880346 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-

Re: [openstreetmap/openstreetmap-website] Center share popup inside the browser window (PR #5418)

2024-12-19 Thread Tom Hughes via rails-dev
Merged #5418 into master. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5418#event-15713880330 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-

Re: [openstreetmap/openstreetmap-website] Improve note testing and text handling (PR #5419)

2024-12-19 Thread Tom Hughes via rails-dev
Looks good to me, thanks. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5419#issuecomment-2553089826 You are receiving this because you are subscribed to this thread. Message ID: ___

Re: [openstreetmap/openstreetmap-website] Center share popup inside the browser window (PR #5418)

2024-12-19 Thread Tom Hughes via rails-dev
Though the screen height and width don't actually affect anything if they're larger than 640x480 so actually I don't understand this code at all. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5418#issuecomment-2553081751 You are

Re: [openstreetmap/openstreetmap-website] Center share popup inside the browser window (PR #5418)

2024-12-19 Thread Tom Hughes via rails-dev
Firefox is reporting the screen size as 1920x1080 which is half the real size of my display so it's only centring in the top left quadrant :-( I assume it's some hidpi scaling thing but I'm struggling to find any mention of it anywhere on the web. -- Reply to this email directly or view it on

Re: [openstreetmap/openstreetmap-website] Center share popup inside the browser window (PR #5418)

2024-12-19 Thread Tom Hughes via rails-dev
It works in Chromium so it must be a Firefox thing. This is definitely better when it works anyway, so thanks. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5418#issuecomment-2553055581 You are receiving this because you are sub

Re: [openstreetmap/openstreetmap-website] Center share popup inside the browser window (PR #5418)

2024-12-19 Thread Tom Hughes via rails-dev
It's definitely not centred for me: ![image](https://github.com/user-attachments/assets/2c88d732-fd7f-4108-800a-9f8ec2d8508b) Most likely either Firefox on linux or my Gnome/Wayland setup is ignoring the position. -- Reply to this email directly or view it on GitHub: https://github.com/openstree