Re: [openstreetmap/openstreetmap-website] Move History and Export buttons to secondary nav (PR #5151)

2024-11-14 Thread Roman Deev via rails-dev
> we get feedback on this

Yes, get it :) I won't ask you to return everything back, because the Edit 
button is now more visible for beginners. But the current implementation has a 
problem: when you narrow the screen width, there is too much empty space that 
the History and Export buttons used to occupy. As an active cartographer, I use 
the History button all the time:


https://github.com/user-attachments/assets/3939d0b6-d947-4f4c-af12-29002006b79f





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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode bugs/improvements for the UI (Issue #5329)

2024-11-15 Thread Roman Deev via rails-dev
https://www.openstreetmap.org/traces

You might want to change the text color on a bright green background. For the 
example I changed the color to black and it seems to read better

https://github.com/user-attachments/assets/6ae37ad7-5c54-451a-849d-e88be9f3d871";>



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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode bugs/improvements for the UI (Issue #5329)

2024-11-15 Thread Roman Deev via rails-dev
Map previews don't have a dark background in the layers menu.

https://github.com/user-attachments/assets/983c8e81-fede-4821-98a4-37995d8852b2



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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode bugs/improvements for the UI (Issue #5329)

2024-12-01 Thread Roman Deev via rails-dev
Although iD doesn't have a dark theme, it seems that you can reduce the 
annoyance of blinding when loading it by setting at least some dark or 
transparent background for the iframe.


https://github.com/user-attachments/assets/8132c4d3-b55a-435f-8b7c-47042b43828f



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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


[openstreetmap/openstreetmap-website] Replace the text with the icon in the parent relation list (Issue #5368)

2024-12-02 Thread Roman Deev via rails-dev
### Problem

After #5353 this already works for the ways:

https://github.com/user-attachments/assets/6f4548f9-92e3-496e-8179-97e1988258e8";>

https://www.openstreetmap.org/node/7925741250

But not for relations:

https://github.com/user-attachments/assets/5ee293cd-0eaf-456e-a44a-c67d01a52851";>

https://www.openstreetmap.org/node/3062459558

It will probably be enough to add the `relation` html-class and update the 
string by removing the Relation at the beginning.  


### Description

_No response_

### Screenshots

_No response_

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

Message ID: ___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Suspend the layer event handlers when rendering Map Data (PR #5474)

2025-01-06 Thread Roman Deev via rails-dev
@deevroman pushed 1 commit.

f2b2baf26b0569de3a0e3814f09e8cdaed3d7b13  Use 
baselayerchange/overlaylayerchange instead of layeradd/layerremove for speed up 
Map Data layer render

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5474/files/49834e5c1de3b70978ff836b2a606d318b117872..f2b2baf26b0569de3a0e3814f09e8cdaed3d7b13
You are receiving this because you are subscribed to this thread.

Message ID: 

___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Suspend the layer event handlers when rendering Map Data (PR #5474)

2025-01-06 Thread Roman Deev via rails-dev
@deevroman pushed 1 commit.

920b7afc54401d4ba0b26e7ecddefb3a8dc0eade  Use 
baselayerchange/overlaylayerchange instead of layeradd/layerremove for speed up 
Map Data layer render

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5474/files/f2b2baf26b0569de3a0e3814f09e8cdaed3d7b13..920b7afc54401d4ba0b26e7ecddefb3a8dc0eade
You are receiving this because you are subscribed to this thread.

Message ID: 

___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Suspend the layer event handlers when rendering Map Data (PR #5474)

2025-01-06 Thread Roman Deev via rails-dev
@deevroman pushed 1 commit.

a9579cec394e621082e2a813f07dc93897b62fe9  Use 
baselayerchange/overlaylayerchange instead of layeradd/layerremove for speed up 
Map Data layer render

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5474/files/920b7afc54401d4ba0b26e7ecddefb3a8dc0eade..a9579cec394e621082e2a813f07dc93897b62fe9
You are receiving this because you are subscribed to this thread.

Message ID: 

___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Suspend the layer event handlers when rendering Map Data (PR #5474)

2025-01-06 Thread Roman Deev via rails-dev
I also saw a problem in PR: when you click the Map Data checkbox, the cookie 
with the current location is no longer updated

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


[openstreetmap/openstreetmap-website] Suspend the layer event handlers when rendering Map Data (PR #5474)

2025-01-06 Thread Roman Deev via rails-dev
### Description
This is fix #5466 After merging 
https://github.com/openstreetmap/leaflet-osm/pull/43 flame graph looks like 
this:



https://share.firefox.dev/4a2Wc9Z

Most of the time is spent on two handlers that update information about the 
current location and elements in the right sidebar. 

Unfortunately, replacing `layeradd layerremove` with `baselayerchange 
overlaylayerchange` 
(https://github.com/openstreetmap/openstreetmap-website/issues/5466#issuecomment-2571570472)
 is difficult, since in addition to the Map Data layer, other elements may be 
displayed on the map. For example, the currently selected object on the map. It 
is not clear how to separate changes to Map Data objects and changes to the 
selected element. It is necessary to track changes in the active element, 
otherwise at least the Edit button will break.

Therefore, I implemented a little ugly, but safer in terms of breaking business 
logic. When adding the Map Data layer, I set the pause flag in the slowdown 
handlers. While the Map Data is rendering, the user cannot interact with the 
interface, so it seems safe to pause the event handlers.

Total 15s vs 0.5s when rendering 5000 elements.



https://share.firefox.dev/4h4IK7C


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

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

-- Commit Summary --

  * Suspend the layer event handlers when rendering Map Data

-- File Changes --

M app/assets/javascripts/index.js (6)
M app/assets/javascripts/index/layers/data.js (4)
M app/assets/javascripts/leaflet.layers.js (6)
M app/assets/javascripts/leaflet.share.js (6)

-- Patch Links --

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

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Don't remove-readd standard layer with visible overlays (PR #5573)

2025-01-29 Thread Roman Deev via rails-dev
Yes, it also corrects blinking and works expected:

https://github.com/user-attachments/assets/7f394758-06a4-4f6c-b782-68f31d069e9e

The change in the layer through the URL also works.



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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Fix map blink when active Mapnik + some overlay (PR #5570)

2025-01-29 Thread Roman Deev via rails-dev
Closed #5570.

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Fix map blink when active Mapnik + some overlay (PR #5570)

2025-01-29 Thread Roman Deev via rails-dev
@deevroman commented on this pull request.



> +if (this.getMapBaseLayer() && this.getMapBaseLayer().options.code === 
> "M" && !layers.includes("M")) {
+  layers += "M";
+}

No problems. If PR is no longer relevant, you can close it.

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

2025-01-10 Thread Roman Deev via rails-dev
@deevroman pushed 1 commit.

5b37b549391bc12ca25019960c726aa306417ec3  Use 
baselayerchange/overlaylayerchange instead of layeradd/layerremove for speed up 
Map Data layer render

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5474/files/a32249ec8ba1ebf437028bf15bada8f8d55eab16..5b37b549391bc12ca25019960c726aa306417ec3
You are receiving this because you are subscribed to this thread.

Message ID: 

___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Suspend the layer event handlers when rendering Map Data (PR #5474)

2025-01-10 Thread Roman Deev via rails-dev
@deevroman pushed 1 commit.

a359de90c209df00b40ba5520291b7e295b0b2c8  Use 
baselayerchange/overlaylayerchange instead of layeradd/layerremove for speed up 
Map Data layer render

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5474/files/a9579cec394e621082e2a813f07dc93897b62fe9..a359de90c209df00b40ba5520291b7e295b0b2c8
You are receiving this because you are subscribed to this thread.

Message ID: 

___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

2025-01-10 Thread Roman Deev via rails-dev
Okay, firing events from `addObject` / `removeObject` turned out to be the best 
idea. And I changed this PR to use `baselayerchange`/`overlaylayerchange`

I also replaced layeradd for `map.on("layeradd",...)`, which tracks the layer's 
on/off state with `dataLayer.on("add", ...)`. Using `overlaylayerchange` in 
this case doesn't work, because this event isn't thrown when opening a new page 
with `...&layers=D` Plus `add ' / 'remove' looks cleaner in my opinion.

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

2025-01-10 Thread Roman Deev via rails-dev
@deevroman commented on this pull request.



> @@ -124,7 +124,7 @@ L.OSM.layers = function (options) {
   map.fire("overlaylayerchange", { layer: layer });
 });
 
-map.on("layeradd layerremove", function () {
+map.on("baselayerchange overlaylayerchange", function () {

although, I was in a hurry to replace this handler. This breaks the initial 
filling of checkboxes.

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Fix left/right sidebar resizing on mobile devices (PR #5521)

2025-01-19 Thread Roman Deev via rails-dev
@deevroman pushed 1 commit.

a0d853d418e424481a9b6120ad86b1f650ece769  Fix left/right sidebar resizing on 
mobile devices

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5521/files/e75db2ceae901b24385a676054b8510280200e2a..a0d853d418e424481a9b6120ad86b1f650ece769
You are receiving this because you are subscribed to this thread.

Message ID: 

___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Fix left/right sidebar resizing on mobile devices (PR #5521)

2025-01-19 Thread Roman Deev via rails-dev
@deevroman pushed 1 commit.

898ea3d1bc17468e3cfef0e36b6127e9208e70c0  Fix left/right sidebar resizing on 
mobile devices

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5521/files/6e64adb8c0d02008abcb8351169ed043464cc864..898ea3d1bc17468e3cfef0e36b6127e9208e70c0
You are receiving this because you are subscribed to this thread.

Message ID: 

___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Fix left/right sidebar resizing on mobile devices (PR #5521)

2025-01-19 Thread Roman Deev via rails-dev
@deevroman pushed 1 commit.

6e64adb8c0d02008abcb8351169ed043464cc864  Fix left/right sidebar resizing on 
mobile devices

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5521/files/a0d853d418e424481a9b6120ad86b1f650ece769..6e64adb8c0d02008abcb8351169ed043464cc864
You are receiving this because you are subscribed to this thread.

Message ID: 

___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


[openstreetmap/openstreetmap-website] Fix left/right sidebar resizing on mobile devices (PR #5521)

2025-01-19 Thread Roman Deev via rails-dev
This PR fixes multiple issues about the map resetting its position when opening 
various menus on mobile devices.

https://github.com/openstreetmap/openstreetmap-website/issues/4755
https://github.com/openstreetmap/openstreetmap-website/issues/991
...

1. Get rid of the hardcoded left sidebar width.
2. On mobile devices, use adjust the height, not the width of the map

### How has this been tested?

Before https://github.com/user-attachments/assets/9c283266-b43a-48d2-9f25-ffe73752c837
After https://github.com/user-attachments/assets/9cf73154-c043-430a-a143-f8d47ad0f080 After with RTL https://github.com/user-attachments/assets/ed973523-98d2-46a8-be2b-ca8619e1085f
You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/5521 -- Commit Summary -- * Fix left/right sidebar resizing on mobile devices -- File Changes -- M app/assets/javascripts/leaflet.map.js (25) M app/assets/javascripts/leaflet.sidebar.js (20) -- Patch Links -- https://github.com/openstreetmap/openstreetmap-website/pull/5521.patch https://github.com/openstreetmap/openstreetmap-website/pull/5521.diff -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5521 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mailing list rails-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/rails-dev

Re: [openstreetmap/openstreetmap-website] Fix left/right sidebar resizing on mobile devices (PR #5521)

2025-01-19 Thread Roman Deev via rails-dev
I didn't take into account that sometimes centering is useful and necessary:

https://github.com/user-attachments/assets/2c222546-6754-4605-9591-d42df41e9ffb



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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlayadd/overlayremove instead of layeradd/layerremove (PR #5474)

2025-01-27 Thread Roman Deev via rails-dev
I remade PR. I abandoned `overlaylayerchange` because this event is not in 
Leaflet and it is not suitable in our situation.

In the case of `baselyerchange`, we can expect that our last base layer is 
always removed and a new base layer is added. Therefore, the removal event is 
not necessary to track the layer, `baslaverchange` is enough. But in the case 
of overlays, this is not so, overlays can just be removed from the map, without 
adding a new one.

However, after rejecting `layerremove`, it becomes important to maintain the 
invariant that there can't be multiple base layers on the map. I.e. first 
remove all previous layers and only then add a new one (this is important for 
example for a field with an iframe, sometimes you can see two base layers at 
the same time)

So I use `overlayadd`/`overlayremove` which are in Leaflet 
https://leafletjs.com/reference.html#map-event
I fire these events when the `add`/` remove` is triggered, as well as for 
active objects that should be shown on the map (current node, paths, note, ...)

---

What was tested:

1: Basic layer switching functionality

https://github.com/user-attachments/assets/1d7bce4e-3ab6-4366-874f-6a2bb16afb00

2. Switching layers in the URL

https://github.com/user-attachments/assets/6a201eab-65cd-44a9-804e-1efddcc3e256

3. Update links to the active object in the Edit button

https://github.com/user-attachments/assets/539fd547-09af-4d0f-8299-0b1699581a2b






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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

2025-01-27 Thread Roman Deev via rails-dev
@deevroman pushed 1 commit.

0707400118d51cf3a4160a4010eec7a89c90db79  Use 
baselayerchange/overlaylayerchange instead of layeradd/layerremove for speed up 
Map Data layer render

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5474/files/57bff79cd6ac07a1cff816841c8c2d2dd31778da..0707400118d51cf3a4160a4010eec7a89c90db79
You are receiving this because you are subscribed to this thread.

Message ID: 

___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

2025-01-27 Thread Roman Deev via rails-dev
@deevroman pushed 1 commit.

e3b440dc1059b9ba330335f6491d0ec95713b494  Use 
baselayerchange/overlaylayerchange instead of layeradd/layerremove for speed up 
Map Data layer render

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5474/files/0707400118d51cf3a4160a4010eec7a89c90db79..e3b440dc1059b9ba330335f6491d0ec95713b494
You are receiving this because you are subscribed to this thread.

Message ID: 

___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlayadd/overlayremove instead of layeradd/layerremove (PR #5474)

2025-01-27 Thread Roman Deev via rails-dev
@deevroman pushed 1 commit.

9a43e994a2402156641da95fafe63a0c975c059b  Use 
baselayerchange/overlaylayerchange instead of layeradd/layerremove for speed up 
Map Data layer render

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5474/files/e3b440dc1059b9ba330335f6491d0ec95713b494..9a43e994a2402156641da95fafe63a0c975c059b
You are receiving this because you are subscribed to this thread.

Message ID: 

___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlayadd/overlayremove instead of layeradd/layerremove (PR #5474)

2025-01-27 Thread Roman Deev via rails-dev
@deevroman pushed 1 commit.

dae7a003fee3c9a413c959381a558e4d5636f3bd  Use 
baselayerchange/overlaylayerchange instead of layeradd/layerremove for speed up 
Map Data layer render

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5474/files/9a43e994a2402156641da95fafe63a0c975c059b..dae7a003fee3c9a413c959381a558e4d5636f3bd
You are receiving this because you are subscribed to this thread.

Message ID: 

___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

2025-01-26 Thread Roman Deev via rails-dev
@deevroman pushed 1 commit.

57bff79cd6ac07a1cff816841c8c2d2dd31778da  Use 
baselayerchange/overlaylayerchange instead of layeradd/layerremove for speed up 
Map Data layer render

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5474/files/12fee32c04e44aebca2ea778c48b6bf6270f9816..57bff79cd6ac07a1cff816841c8c2d2dd31778da
You are receiving this because you are subscribed to this thread.

Message ID: 

___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

2025-01-27 Thread Roman Deev via rails-dev
@mmd-osm 
> Besides, there may be some timing issue in the current code, as the behavior 
> is not 100% reproducible for me, even today. Sometimes the map layer changes 
> along with the share link, in other cases, the old layer is still shown.

I think I found a way to reproduce this (If you meant it):

1. Open https://www.openstreetmap.org/#map=19/60.008946/30.217791&layers=Y
2. Change Y -> H
3. Change H -> Y (the layer has not changed)


https://github.com/user-attachments/assets/31a836d2-405e-4c17-9877-c7544d6d879d




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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


[openstreetmap/openstreetmap-website] Close button for loading error alert (PR #5561)

2025-01-27 Thread Roman Deev via rails-dev
#5551 added a window with an error if the user is trying to download too much 
data. But this window cannot be closed, only turn off the Map Data layer. But 
what if you have already turned it off?

https://github.com/user-attachments/assets/0b40a9ed-c3b7-47ee-90fb-67b264880ff9

Now it looks like this (similar to the warning about loading a large amount of 
data):



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

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

-- Commit Summary --

  * Close button for loading error alert

-- File Changes --

M app/assets/javascripts/index/layers/data.js (21)

-- Patch Links --

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

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


[openstreetmap/openstreetmap-website] Increase the limit when a warning about a large number of objects is displayed (PR #5562)

2025-01-27 Thread Roman Deev via rails-dev
After #5474, data rendering is no longer a bottle of performance. Modern 
browsers do a great job with moving the map, which displays many objects 
(moreover, it can also be accelerated)

The only exception is mobile browsers. Therefore, I stopped at 4000 objects.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Increase the limit when a warning about a large number of objects is 
displayed.

-- File Changes --

M app/assets/javascripts/index/layers/data.js (4)

-- Patch Links --

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

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Map Data overlay should not zoom by itself (Issue #3360)

2025-01-28 Thread Roman Deev via rails-dev
It seems that Issue, as well as 
https://github.com/openstreetmap/openstreetmap-website/issues/2800 
https://github.com/openstreetmap/openstreetmap-website/issues/3243, become 
outdated after

https://github.com/openstreetmap/leaflet-osm/pull/43 (freezing before a warning)
https://github.com/openstreetmap/openstreetmap-website/pull/5563 (XML -> JSON)
https://github.com/openstreetmap/openstreetmap-website/pull/5474 (freezing 
after consent to rendering)

The only possible problem is that it will be difficult to move the map. 
However, now the browser is no longer frozen.

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


[openstreetmap/openstreetmap-website] Fix map blink when active Mapnik + some overlay (PR #5570)

2025-01-28 Thread Roman Deev via rails-dev
#5474 added an unpleasant blink when an overlay is enabled, and you try to 
close the sidebar:


https://github.com/user-attachments/assets/4d3063b9-dd39-4553-844b-e2bd99c11241

This is because `var layers = layerParam || "M";` does not add `M` 
when overlay is enabled (`layerParam` is not empty). I added a check that if 
Mapnik is the current layer, then we add its code, so that`.removeLayer () 
' was not called for it.

Checking `this.getMapbaslaver() &&` is important because when opening 
the tab it can return undefined.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * fix map blink when active Mapnik + some overlay

-- File Changes --

M app/assets/javascripts/leaflet.map.js (3)

-- Patch Links --

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

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

2025-01-13 Thread Roman Deev via rails-dev
@deevroman pushed 1 commit.

30403cb9307262871e7fa304430ca4d691e3bfb2  Use 
baselayerchange/overlaylayerchange instead of layeradd/layerremove for speed up 
Map Data layer render

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5474/files/5b37b549391bc12ca25019960c726aa306417ec3..30403cb9307262871e7fa304430ca4d691e3bfb2
You are receiving this because you are subscribed to this thread.

Message ID: 

___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

2025-01-14 Thread Roman Deev via rails-dev
> Otherwise if you edit &layers=X in the location bar, share urls are updated 
> to its previous value.

Do I understand correctly that you are talking about the current behavior of 
the website, and not after PR? At least in Firefox, changing `&layers=X` does 
not change the layers on the map, only if you open in a new tab

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


[openstreetmap/openstreetmap-website] "layeradd layerremove" event handlers dramatically slow down Map data layer rendering (Issue #5466)

2025-01-04 Thread Roman Deev via rails-dev
### URL

_No response_

### How to reproduce the issue?

I was trying to figure out why the Map Data layer is slow when displaying a lot 
of elements. In Firefox Profiler, I saw that a lot of time was spent on 
handlers for adding new objects to the map.

https://github.com/user-attachments/assets/ebef23e6-1286-46af-a411-9b1fecfaa5f2";
 />


https://share.firefox.dev/4a3ZXM9

Specifically:
https://github.com/openstreetmap/openstreetmap-website/blob/95b919c5d1e33688b0841c7d38602372c2e4c4a3/app/assets/javascripts/index.js#L176-L184

I don’t understand why these handlers need to update data about the current 
coordinates, and to prove their uselessness I did the following:

1. Updated the page with Map Data enabled
2. Waited for the data to download
3. Allowed display of a large amount of data

Rendering took a few seconds. 

After that, I did the same thing, but deleted the handlers with 
`map.off("layeradd layerremove")`. After that, the rendering is understated for 
less than a second.

https://github.com/user-attachments/assets/f8232635-7e97-4bd1-87ab-1d46b7b79e70

Further movement of the map is also noticeably faster and allows you to display 
tens of thousands of objects.

Note: `map` variable is not available by default, it is provided by my 
better-osm-org extension. This extension doesn't do anything else, and 
rendering performance doesn't depend on how it works.

You can also analyze the performance profile collected in the video: 
https://share.firefox.dev/4a3ZXM9






### Screenshot(s) or anything else?

_No response_

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

Message ID: ___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] "layeradd layerremove" event handlers dramatically slow down Map data layer rendering (Issue #5466)

2025-01-05 Thread Roman Deev via rails-dev
> parse the response as json()

This is not necessary yet. I have increased the limit of the maximum number of 
nodes for the local openstreetmap-cpimap, and I can say that parsing XML, which 
is 50 MB in decompressed form, only took 2 seconds. However, it took 10 seconds 
to download. 

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] "layeradd layerremove" event handlers dramatically slow down Map data layer rendering (Issue #5466)

2025-01-05 Thread Roman Deev via rails-dev
What if we add a layer type check to the handler for which the handler was 
triggered? Something like:
```js 
map.on("moveend layeradd layerremove", function (e) { 
   if (!L.TileLayer.prototype.isPrototypeOf(e?.layer)){
  return
   }
   updateLinks( 
 map.getCenter().wrap(), 
 map.getZoom(), 
 map.getLayersCode(), 
 map._object); 
  
   Cookies.set("_osm_location", OSM.locationCookie(map), { secure: true, 
expires: expiry, path: "/", samesite: "lax" }); 
 }); 
```

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] "layeradd layerremove" event handlers dramatically slow down Map data layer rendering (Issue #5466)

2025-01-05 Thread Roman Deev via rails-dev
This looks better, but will need to be fixed too.

https://github.com/openstreetmap/openstreetmap-website/blob/95b919c5d1e33688b0841c7d38602372c2e4c4a3/app/assets/javascripts/leaflet.share.js#L272

And also understand how to track changes in the active object, which should be 
updated in the link of the OSM editor open button, which the updateLinks 
function does

https://github.com/openstreetmap/openstreetmap-website/blob/95b919c5d1e33688b0841c7d38602372c2e4c4a3/app/assets/javascripts/application.js#L23-L27

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

2025-01-14 Thread Roman Deev via rails-dev
@deevroman pushed 1 commit.

ad9dcfe1f5fa59b88aaf2af1ce93a4d156ee4d9f  Use 
baselayerchange/overlaylayerchange instead of layeradd/layerremove for speed up 
Map Data layer render

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5474/files/30403cb9307262871e7fa304430ca4d691e3bfb2..ad9dcfe1f5fa59b88aaf2af1ce93a4d156ee4d9f
You are receiving this because you are subscribed to this thread.

Message ID: 

___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

2025-01-14 Thread Roman Deev via rails-dev
Ah, I understand. I only tested changing the letters that represent the overlay 
(D/N/G). Changing the letters that respond to tile layers works now. PR broke 
it. I'll try to fix it

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

2025-01-15 Thread Roman Deev via rails-dev
@deevroman pushed 1 commit.

12fee32c04e44aebca2ea778c48b6bf6270f9816  Use 
baselayerchange/overlaylayerchange instead of layeradd/layerremove for speed up 
Map Data layer render

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5474/files/f10083a9c6263ff5b475e212ba4746e192e7b844..12fee32c04e44aebca2ea778c48b6bf6270f9816
You are receiving this because you are subscribed to this thread.

Message ID: 

___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

2025-01-15 Thread Roman Deev via rails-dev
@deevroman pushed 1 commit.

f10083a9c6263ff5b475e212ba4746e192e7b844  Use 
baselayerchange/overlaylayerchange instead of layeradd/layerremove for speed up 
Map Data layer render

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5474/files/ad9dcfe1f5fa59b88aaf2af1ce93a4d156ee4d9f..f10083a9c6263ff5b475e212ba4746e192e7b844
You are receiving this because you are subscribed to this thread.

Message ID: 

___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

2025-01-15 Thread Roman Deev via rails-dev
@deevroman commented on this pull request.



> @@ -116,6 +116,7 @@ L.OSM.Map = L.Map.extend({
   } else {
 this.removeLayer(this.baseLayers[i]);
   }
+  this.fire("baselayerchange", { layer: this.baseLayers[i] });

Implemented a check that there is already a layer on the map. But the code 
doesn’t look so attractive anymore, so it might be better to add add/remove 
handlers for all base layers.

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

2025-01-16 Thread Roman Deev via rails-dev
@deevroman commented on this pull request.



>  this.addLayer(this.baseLayers[i]);
   } else {
+baselayerChanged = this.hasLayer(this.baseLayers[i]);

So the next handler also violates this expectation?

https://github.com/openstreetmap/openstreetmap-website/blob/b45eb03a6c026ec0f19415100c7bb14c4c53e6cb/app/assets/javascripts/leaflet.layers.js#L62-L71



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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

2025-01-16 Thread Roman Deev via rails-dev
@deevroman commented on this pull request.



>  this.addLayer(this.baseLayers[i]);
   } else {
+baselayerChanged = this.hasLayer(this.baseLayers[i]);

It seems that `"baselayerchange overlaylayerchange"` will work in this place

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

2025-01-15 Thread Roman Deev via rails-dev
Okay, I added the `baselayerchange` firing. So, when changing D/N/G, the update 
does not work now, so firing `overlaylayerchange` is better done in a separate 
PR.

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Fix left/right sidebar resizing on mobile devices (PR #5521)

2025-02-15 Thread Roman Deev via rails-dev
@deevroman pushed 1 commit.

b6cc806f76c46e5a416fd4de7314b531a60c7f16  Fix left/right sidebar resizing on 
mobile devices

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5521/files/898ea3d1bc17468e3cfef0e36b6127e9208e70c0..b6cc806f76c46e5a416fd4de7314b531a60c7f16
You are receiving this because you are subscribed to this thread.

Message ID: 

___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Fix left/right sidebar resizing on mobile devices (PR #5521)

2025-02-15 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#5521)

Okay, it seems that this PR at least does not make it worse.

The only regression I noticed was a noticeable shift of the map with the note 
marker when opening the left and right sidebars at the same time. But I think 
this is a rare use case:


https://github.com/user-attachments/assets/b758e136-bfa6-4689-ba69-bfdd96412094

It is also worth noting that sometimes you can notice a map shift by one pixel 
due to not accurately calculating the map position using`.height() / 2` Maybe 
I'm being too careful because I use a Retina display.



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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Fix left/right sidebar resizing on mobile devices (PR #5521)

2025-02-15 Thread Roman Deev via rails-dev
@deevroman pushed 1 commit.

8e1e1e47134b652bd1a5facba44280f05cc802fa  Fix left/right sidebar resizing on 
mobile devices

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5521/files/b6cc806f76c46e5a416fd4de7314b531a60c7f16..8e1e1e47134b652bd1a5facba44280f05cc802fa
You are receiving this because you are subscribed to this thread.

Message ID: 

___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Omit changeset "💬" from changeset list where there are no comments (Issue #5757)

2025-03-15 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#5757)

Previously, to separate changesets without comments, you used to change the 
brightness of the icon, not fill it. And before, it was the only icon with a 
fill that you could get used to.

> just to you for some reason

For what reason? I can understand this for OSMCha, because it is an external 
service, but this is about the OSM site, which is the source of truth.

---

In general, I must say that even removing 0💬 it doesn't always improve:


Examples







https://github.com/user-attachments/assets/6adaa9aa-8adb-4480-99a9-7bb2799c48df";
 />




https://github.com/user-attachments/assets/f8c84741-c7f9-4139-921a-f688460ff840";
 />






![](https://github.com/user-attachments/assets/0af6c1d0-32ef-4711-a0c2-f69cf4ea96c0)




![](https://github.com/user-attachments/assets/5047200a-c0eb-45da-a6fe-5d74c4526108)







I'm having a hard time finding changesets with comments even without 0💬. And I 
still think it's the number of comments, not the number of edits. ()

> It has been this way for years and nobody (as far as I know) complained.

well, I recently added to my script the selection of changesets with comments, 
using color, precisely in order to quickly find changesets that require 
attention. Just for inspiration:

https://github.com/user-attachments/assets/ccb0ace4-4143-4649-896a-a6be8d27efa1";
 width="40%">

And after adding an icon with the number of edits, the list became too 
cluttered, and I finally removed 0💬, so I decided to rely only on color to find 
interesting changesets:

https://github.com/user-attachments/assets/85468100-aa23-44d8-9bf4-96d21a9554bb";
 />




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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Map Data checkbox: perhaps use toggle slider instead (PR #5009)

2025-03-19 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#5009)

What do you use to test CPU slowdowns? Test rendering >4k features.

Can you give us an example of when the user has time to notice the browser 
hanging, while making the user guess that they are waiting for rendering, and 
not downloading data?

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Map Data checkbox: perhaps use toggle slider instead (PR #5009)

2025-03-19 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#5009)

@nertc no, https://github.com/openstreetmap/openstreetmap-website/pull/5799 
disabled asynchrony not for the Map Data layer, but for the layer that shows 
the active object.

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Map Data checkbox: perhaps use toggle slider instead (PR #5009)

2025-03-20 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#5009)

> For CPU slowdown I use browser built-in functionality.

Ah, chromium, got it. 20x slowdown is unrealistic. With this value, I can't 
move the map normally, even without the data layer. But even with 20x slowdown, 
the layer with 11k features is drawn in 4 seconds when rendered synchronously 
on my PC.

> In such case, there would be 30 seconds freeze of browser if there was 
> synchronous process.

This is not true because synchronous rendering is faster than asynchronous 
rendering. 

In general, I will most likely suggest a PR that disables asynchrony.

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Disabling asynchronous Map data layer rendering (PR #5877)

2025-04-05 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#5877)

> are you saying that the reasons there are somehow incorrect?

Yes, adding asynchrony was a treatment for the symptoms. Hangups were resolved 
in the following PRs:

https://github.com/openstreetmap/leaflet-osm/pull/43 (freezing before a warning 
about 2000+ elements)
https://github.com/openstreetmap/openstreetmap-website/pull/5563 (XML -> JSON)
https://github.com/openstreetmap/openstreetmap-website/pull/5474 (freezing 
after consent to rendering)

After that, work resumed on the 
https://github.com/openstreetmap/openstreetmap-website/pull/5009 and with the 
addition of the loader, asynchrony was enabled.

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Disabling asynchronous Map data layer rendering (PR #5877)

2025-04-05 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#5877)

> This one wasn't: 
> https://github.com/openstreetmap/openstreetmap-website/issues/2800#issuecomment-2621712294

Don't forget that for 4000+ elements, a warning is shown before rendering. Only 
after you click on it will the browser be blocked.

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


[openstreetmap/openstreetmap-website] Disabling asynchronous Map data layer rendering (PR #5877)

2025-04-05 Thread Roman Deev via rails-dev
Full discussion here: 
https://github.com/openstreetmap/openstreetmap-website/pull/5009#issuecomment-2722980833
 But I'll duplicate the comment here.

https://github.com/openstreetmap/openstreetmap-website/pull/5009 brought two 
problems:

1. When moving the map, a white flash occurs and all objects on the map are 
redrawn:

https://github.com/user-attachments/assets/3c87c769-174c-4513-a5be-115eb9517bb8

2. Rendering slowed down. What used to occupy ~400ms now occupies ~1.3s. Hiding 
a data layer was previously performed on ~100ms, now ~1.5s (!)

Both problems arise due to the fact that before that the redrawing of the map 
was performed only once, after the completion of the removal/adding of objects 
to the SVG-element of the map.

--

This PR only removes asynchronous rendering. The loader that shows downloading 
data near the checkbox remains.

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

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

-- Commit Summary --

  * Disabling asynchronous data layer rendering

-- File Changes --

M app/assets/javascripts/leaflet.map.js (2)

-- Patch Links --

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

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Shorten matching wiki urls in linkify (PR #5855)

2025-03-27 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#5855)

Do need to save /wiki? Wiki understands paths without /wiki and makes a 
redirect.

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Make contribution heat map opt in (Issue #5804)

2025-03-15 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#5804)

How about hiding pages `osm.org/user/username` from not registered users by 
default? And after that, you can add a setting of the visibility of the profile 
data. Yes there is more `osm.org/user/username/*`, but at least it will be 
consistent with the API, which does not show profile descriptions without 
authorization.

As I understand it, this should still be done to comply with the privacy 
policy, so why limit yourself to configuring the heat map.

p.s. despite my position on the situation, here I write without sarcasm and 
exaggeration

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


[openstreetmap/openstreetmap-website] Sometimes the map zoom resets after scrolling the map and closing the sidebar (Issue #5919)

2025-04-11 Thread Roman Deev via rails-dev
deevroman created an issue (openstreetmap/openstreetmap-website#5919)

### URL

_No response_

### How to reproduce the issue?

1. Open openstreetmap.org/history
2. Change the zoom of the map by scrolling (it doesn't matter if you zoom in or 
out)
3. Quickly close the sidebar by clicking on the cross
4. The map zoom resets to the global view

https://github.com/user-attachments/assets/9cffdcb9-401f-499f-b409-26d803a4459b

Additionally:
1. The bug can also be repeated on mobile devices
2. I've been dealing with this bug for a long time, but I thought it was a bug 
in my userscript. However, the reason I encounter it more often is because I 
have a hotkey that closes the sidebar. If someone uses Tab to select items on 
the page, they will encounter this bug
3. It doesn't matter if it's Firefox (138.0b5) or Chrome (134)


### Screenshot(s) or anything else?

_No response_

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

Message ID: ___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Sometimes the map zoom resets after scrolling the map and closing the sidebar (Issue #5919)

2025-04-11 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#5919)

Yes, it seems so. I can reliably reproduce this bug if I enable network 
throttling. Surprisingly, it results in zoom reset, rather than zooming in to 
some bbox at the same zoom.

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Sometimes the map zoom resets after scrolling the map and closing the sidebar (Issue #5919)

2025-04-11 Thread Roman Deev via rails-dev
Closed #5919 as completed.

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Change colors of changeset bboxes when they enter/exit the viewport (PR #5924)

2025-04-20 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#5924)

> In principle, omitting changesets covering the entire map viewport sounds 
> like an interesting idea.

In practice, you will encounter a problem: what is the threshold value to take? 
What if a big changeset did change something in your region? For example, I 
have a cyclist in a city of five million people who really likes to make 
changesets after driving around the entire city :)

> This suggestion disconnects entirely from requirements of average 
> contributors. 

Be careful with generalizations if you haven't conducted any survey or 
experiment. 

> And judging from the smiley, I doubt this was meant seriously.

The smile emphasized the suddenness of the idea. And in fact, this can already 
be achieved if you reload the page (or open the changeset and go back), because 
/history remembers the scroll position.

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Change colors of changeset bboxes when they enter/exit the viewport (PR #5924)

2025-04-19 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#5924)

> Use scrollIntoView() to bring the selected list-group-item into view in the 
> sidebar so you can always see what you're hovering over in the map.

This is a tricky function. I use it in my script for osm.org to navigate 
between objects in a changesets, and sometimes it works unpredictably and moves 
the scroll to the wrong place (or rather, sometimes it doesn't move the scroll 
at all). Perhaps this is a problem with the current layout, but in any case, I 
would be careful in expectations of it.

> Sure it might jump around if you move your mouse all over the map but it 
> makes intuitive sense.

What is the point of doing this, then? Imagine, you are scrolling through 
changesets, and finally an interesting cluster of edits appears in the area you 
need, you move the cursor to them and the sidebar starts jumping. Then it turns 
out that you need to load more changesets, and you move the cursor to the 
sidebar again, enjoying its jumping.

Also, this is not the only solution. You can scroll with a delay. You can 
scroll by alt + click by bbox. You can display by hover title with meta 
information. You can show a popup. PR welcome :)

> This should be reverted.

Now, viewing changesets on osm.org is a clean slate, so almost any change 
doesn't make worse.

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Map Data checkbox: perhaps use toggle slider instead (PR #5009)

2025-03-13 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#5009)

This PR brought two problems:

1. When moving the map, a white flash occurs and all objects on the map are 
redrawn:

https://github.com/user-attachments/assets/3c87c769-174c-4513-a5be-115eb9517bb8

2. Rendering slowed down. What used to occupy ~400ms now occupies ~1.3s. Hiding 
a data layer was previously performed on ~100ms, now ~1.5s (!)

Both problems arise due to the fact that before that the redrawing of the map 
was performed only once, after the completion of the removal/adding of objects 
to the SVG-element of the map.

I can agree that the first appearance of the data layer looks beautiful. But 
the work with the map worsened.


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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] After restoring a closed tab, the page's CSS styles are not loaded (Issue #5663)

2025-02-12 Thread Roman Deev via rails-dev
Added the URL. But I think I missed an important step in the text (there is one 
in the video).

1. Open https://openstreetmap.org/history
2. Select any changeset
and then also close the tab, wait and restore the tab.

If you open the changeset by URL, the tab is restored correctly. Probably the 
problem is how osm.org changes the browser history when switching from 
different URLs, in this case from `/history` -> `/changeset/ID`


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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


[openstreetmap/openstreetmap-website] After restoring a closed tab, the page's CSS styles are not loaded (Issue #5663)

2025-02-12 Thread Roman Deev via rails-dev
### URL

_No response_

### How to reproduce the issue?

https://github.com/user-attachments/assets/64f5513a-64e2-4658-aba0-0683c924a091";
 />

1. Open the changeset page for the view openstreetmap.org/changeset/X
2. Close the tab
3. Wait a few seconds
4. Restore the tab
5. Styles are not loaded

https://github.com/user-attachments/assets/f7da2062-92a2-424a-b494-5535a8efc0f4

Firefox 136.0b4. I've also seen reports of a similar issue in Discord and the 
local community's Telegram chat, but I'm not sure if the steps are exactly the 
same.


### Screenshot(s) or anything else?

_No response_

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

Message ID: ___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Disabling asynchronous Map data layer rendering (PR #5877)

2025-04-03 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#5877)

the flicker causes: clearLayers + event loop steps + rebuilding data layer. 
Perhaps you could first add new objects to the map and then delete the old 
ones. However, it would probably still be noticeable due to the transparency of 
the lines.

But in general, I don’t understand why all these complications are there, when 
everything worked fine before the appearance of asynchrony. 

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


[openstreetmap/openstreetmap-website] Incorrect translation choice time_ago for 24-25 hours ago (Issue #5878)

2025-04-02 Thread Roman Deev via rails-dev
deevroman created an issue (openstreetmap/openstreetmap-website#5878)

### URL

_No response_

### How to reproduce the issue?

0. Enable Russian localization
1. Try searching on https://www.openstreetmap.org/history a 25-hour edit

The translation is shown for a string that corresponds to 1 hour ago

### Screenshot(s) or anything else?

https://github.com/user-attachments/assets/8d28ac17-c91c-42bc-a922-f589916541f3";
 />


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

Message ID: ___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Incorrect translation choice time_ago for 24-25 hours ago (Issue #5878)

2025-04-02 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#5878)

Wait, but that doesn't seem to be the problem. For 25 hours, a translation that 
uses days should be applied. In other words, it should be: «1 день назад» (1 
day ago)

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Incorrect translation choice time_ago for 21 hours ago (Issue #5878)

2025-04-04 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#5878)

> около 21 часа назад
> Can you confirm this would work grammatically?

Yes, that's right



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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Send `Last-Modified` Header for Precompiled Assets (Issue #5958)

2025-05-11 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#5958)

You can watch the `live` tag here https://git.openstreetmap.org/rails.git And 
while Last-Modified would be more reliable, it seems easier to open this page.

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] HTTP 500 error on user profile pages (Issue #6023)

2025-05-17 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#6023)

Related to a bug in heatmaps processing

https://github.com/openstreetmap/openstreetmap-website/issues/6021#issuecomment-2888487364

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Profile heatmap doesn't work in Chrome 136 (Issue #6021)

2025-05-17 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#6021)

I saw that the cause had already been found 
https://github.com/openstreetmap/openstreetmap-website/pull/5998#issuecomment-2888280658

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


[openstreetmap/openstreetmap-website] Profile heatmap doesn't work in Chrome 136 (Issue #6021)

2025-05-17 Thread Roman Deev via rails-dev
deevroman created an issue (openstreetmap/openstreetmap-website#6021)

### URL

https://www.openstreetmap.org/user/TrickyFoxy

### How to reproduce the issue?

Open any active user profile

Version 136.0.7103.114 (Official Build) (arm64)
macOS 15

### Screenshot(s) or anything else?

https://github.com/user-attachments/assets/b14fab76-4875-4cf8-a124-306bc5ece28f";
 />

Firefox:

https://github.com/user-attachments/assets/f8d0e48c-aed1-4640-8606-cb4c214d7e56";
 />

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

Message ID: ___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Setting for adding social media links conflicts with EasyList – Social Widgets (Issue #6041)

2025-05-25 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#6041)

IMHO, the fix (which consists in renaming the element id) is more reliable to 
do on the OSM side

The `###social_links` rule is also used in other filter lists 
https://github.com/search?q=%23%23%23social_links&ref=opensearch&type=code&query-builder-test=%23%23%23social_links



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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Setting for adding social media links conflicts with EasyList – Social Widgets (Issue #6041)

2025-05-25 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#6041)

Meanwhile, there is a second victim 
https://c.osm.org/t/add-social-link-isnt-working/130446/4



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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


[openstreetmap/openstreetmap-website] Setting for adding social media links conflicts with EasyList – Social Widgets (Issue #6041)

2025-05-22 Thread Roman Deev via rails-dev
deevroman created an issue (openstreetmap/openstreetmap-website#6041)

I use uBlock Origin with the EasyList – Social Widgets add-on filter, which 
makes the settings item invisible:

https://github.com/user-attachments/assets/f8603551-263c-4855-b8aa-8cf5fb2afd8a";
 />

The filter contains a rule `#social_links`, which stops this setting from 
working.

https://github.com/easylist/easylist/blob/286795cead0cc44cabb6f95608529827ed73774e/fanboy-addon/fanboy_social_general_hide.txt#L1799

On the one hand, this filter is disabled by default, so it's my problem and the 
authors of the filter. On the other hand, it may not be obvious that an ad 
blocker can break something on the OSM site, so I'm creating this issue. Maybe 
this is worth fixing if anyone else encounters this problem.

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

Message ID: ___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


[openstreetmap/openstreetmap-website] Social media icons are not visible in the dark theme of the site (Issue #6043)

2025-05-22 Thread Roman Deev via rails-dev
deevroman created an issue (openstreetmap/openstreetmap-website#6043)

### URL

https://www.openstreetmap.org/user/TrickyFoxy

### How to reproduce the issue?

https://github.com/user-attachments/assets/89275aad-c906-47ef-8d9f-17958c86f00c";
 />

### Screenshot(s) or anything else?

_No response_

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

Message ID: ___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] HTTP 500/502 when calling `/changeset/create` with percent and unicode symbols in body (Issue #6096)

2025-06-13 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#6096)

> What about if you actually specify a content type with the correct encoding 
> information?

Are you talking about the `Content-Type: application/x-www-form-urlencoded` 
header?

Initially, I found this problem while making this request in the browser. After 
that, I exported it as a cURL request and removed the extra headers and data 
until the error changed to 401. So I don't think I need to look for the problem 
in the shell that I use.

After exporting, the request looked like this:



```
  curl 'https://www.openstreetmap.org/api/0.6/changeset/create' \
  -X PUT \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:140.0) 
Gecko/20100101 Firefox/140.0' \
  -H 'Accept: */*' \
  -H 'Accept-Language: ru,en-US;q=0.7,en;q=0.3' \
  -H 'Accept-Encoding: gzip, deflate, br, zstd' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Authorization: Bearer [REDACTED]' \
  -H 'Origin: null' \
  -H 'Connection: keep-alive' \
  -H 'Cookie: [REDACTED] \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'TE: trailers' \
  --data-raw $''
```





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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


[openstreetmap/openstreetmap-website] HTTP 500/502 when calling `/changeset/create` with percent and unicode symbols in body (Issue #6096)

2025-06-13 Thread Roman Deev via rails-dev
deevroman created an issue (openstreetmap/openstreetmap-website#6096)

### URL

_No response_

### How to reproduce the issue?

I suspect the error is in incorrect % escaping, however I don't expect HTTP 5xx 
code

```bash
curl 'https://master.apis.dev.openstreetmap.org/api/0.6/changeset/create' \
  -v \
  -X PUT \
  --data-raw $''
```

Response:
```
 HTTP/2 502
< date: Fri, 13 Jun 2025 18:10:34 GMT
< cache-control: no-cache, no-store, must-revalidate
< strict-transport-security: max-age=31536000; includeSubDomains; preload
< content-length: 54
< status: 502 Bad Gateway
< x-robots-tag: noindex, nofollow
< content-type: text/html; charset=UTF-8
< server: Apache/2.4.62 (Debian)
<
* Connection #0 to host master.apis.dev.openstreetmap.org left intact
```

If you remove the \u symbols:

```bash
curl 'https://master.apis.dev.openstreetmap.org/api/0.6/changeset/create' \
  -v \
  -X PUT \
  --data-raw $''
```

Response:

```
< HTTP/2 500
< vary: Origin
< strict-transport-security: max-age=31536000; includeSubDomains; preload
< x-request-id: d691e6dc-12f0-49af-8740-3ea0a85f7b06
< x-runtime: 0.010115
< date: Fri, 13 Jun 2025 18:11:30 GMT
< x-powered-by: Phusion Passenger(R) 6.0.27
< status: 500 Internal Server Error
< x-robots-tag: noindex, nofollow
< content-type: text/plain; charset=utf-8
< server: Apache/2.4.62 (Debian)
<
500 Internal Server Error
* Connection #0 to host master.apis.dev.openstreetmap.org left intact
```

### Screenshot(s) or anything else?

_No response_

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

Message ID: ___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] HTTP 500/502 when calling `/changeset/create` with percent and unicode symbols in body (Issue #6096)

2025-06-13 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#6096)

Yes, after adding `-H 'Content-Type: application/xml; charset=utf-8'`, the 502 
error disappears 

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Increase changeset query max limit (Issue #4109)

2025-07-10 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#4109)

Well, I know. But you now have a way to make a win-win solution.

p.s. I do not plan to discuss the ethical side and the impact on the 
infrastructure of my solution here (spoiler: no impact).

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Increase changeset query max limit (Issue #4109)

2025-07-09 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#4109)

+1 There is actually a dirty way to parallelize getting all the user 
changesets. You can find out the first user changeset and aggressively 
parallelizing over time intervals using `from=` `to=`.

p.s. and it's quite annoying to use timestamps because you need extra logic to 
not miss changesets created at the same second.

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


[openstreetmap/openstreetmap-website] Language selection dialog does not close when pressing Escape (Issue #6152)

2025-06-30 Thread Roman Deev via rails-dev
deevroman created an issue (openstreetmap/openstreetmap-website#6152)

### URL

https://openstreetmap.org

### How to reproduce the issue?

1. Click on the language selection button
2. Press Escape

Pressing triggers the animation, but does not close the window.

Firefox 141.0b3, Chrome 137.0.7151.120

### Screenshot(s) or anything else?

https://github.com/user-attachments/assets/7c7a4055-2a85-4401-8b53-b709ae22230d

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

Message ID: ___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Enhanced changeset statistics (PR #6170)

2025-07-23 Thread Roman Deev via rails-dev
deevroman left a comment (openstreetmap/openstreetmap-website#6170)

> Actually the stats are displayed only if the new counts match the old 
> num_changes;

And in what cases do these counts not match? For example, why are there no 
statistics for 169196100? 
https://openstreetmap.org/user/TrickyFoxy/history?after=169150701

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

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


[openstreetmap/openstreetmap-website] More precise marker position (PR #6249)

2025-07-25 Thread Roman Deev via rails-dev
### Description

The marker is currently described as follows:
https://github.com/openstreetmap/openstreetmap-website/blob/9c8467e7ed9d38260077eaf64bb270b2acf18679/app/assets/javascripts/leaflet.map.js#L369-L373

Instead of 12 in `iconAnchor` it should be 12.5 because the marker is 
symmetrical. This is, of course, a small thing, but on Retina displays it can 
be noticed if, for example, the marker is set at the end point of the way.

The following screenshots can be reproduced using the following snippet for the 
browser console:

```javascript
L.marker(([42, 42]), ({ draggable: false, icon: OSM.getMarker({ color: 
"var(--marker-blue)" }) })).addTo(map);
L.circleMarker(L.latLng(42, 42), { weight: 2.5, radius: 3, fillOpacity: 0, 
color: "red" }).addTo(map);
```

Before After
You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/6249 -- Commit Summary -- * more precise marker position -- File Changes -- M app/assets/javascripts/embed.js.erb (2) M app/assets/javascripts/leaflet.map.js (2) -- Patch Links -- https://github.com/openstreetmap/openstreetmap-website/pull/6249.patch https://github.com/openstreetmap/openstreetmap-website/pull/6249.diff -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6249 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mailing list rails-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/rails-dev