Re: [openstreetmap/openstreetmap-website] Add expansion of time info on touch and mouse activation (PR #4361)

2024-10-18 Thread Holger Jeromin via rails-dev
Closed #4361.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4361#event-14727982128
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] Typos in docs (PR #5273)

2024-10-20 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5273#pullrequestreview-2380462466
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 highway=busway instead of emergency=yes when determining feature type in query results (Issue #5258)

2024-11-11 Thread Holger Jeromin via rails-dev

Not all projects work with assignments. Especially to new contributors. This 
can result in [cookie licking](https://www.redhat.com/en/blog/dont-lick-cookie).
Go ahead, get familiar to the code base and work on this if you like. 
If you solve this. Hurray!

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5258#issuecomment-2468095488
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] Better database discovery (PR #5308)

2024-11-07 Thread Holger Jeromin via rails-dev

I get a redirect from 
https://azimutt.app/create?sql=https://raw.githubusercontent.com/openstreetmap/openstreetmap-website/refs/heads/master/db/structure.sql&name=OpenStreetMap
to 
https://azimutt.app/----/----
which is not helpful...

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5308#issuecomment-2461993949
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] Offer links to competing mapping services' websites (Issue #5343)

2024-11-19 Thread Holger Jeromin via rails-dev
How does this help mappers?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5343#issuecomment-2485696176
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-18 Thread Holger Jeromin via rails-dev
The [osm element highlight 
color](https://www.openstreetmap.org/way/24240315#map=18/52.516070/13.379459) 
is quite saturated. This depends on the monitor setting and for sure the color 
of the rendered map.
![image](https://github.com/user-attachments/assets/f76f7e50-dd22-4149-a5ce-f3369bbafb16)
IMO we could adjust the color a bit in dark mode.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5329#issuecomment-2482483685
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] Set dir=auto on usernames in block lists (PR #5365)

2024-12-02 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5365#pullrequestreview-2472234124
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] Set dir=auto on username in header (PR #5364)

2024-12-02 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5364#pullrequestreview-2472233213
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] Truncate usernames in block navigation tabs (PR #5366)

2024-12-02 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5366#pullrequestreview-2472240325
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] Dynamic "more" dropdown with small Bootstrap breakpoint (PR #5370)

2024-12-02 Thread Holger Jeromin via rails-dev
This would result in having the projects name "never" visible for small 
screens... not sure this is good

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5370#issuecomment-2513791593
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] Truncate if necessary and set dir=auto for changeset usernames (PR #5371)

2024-12-02 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5371#pullrequestreview-2474831612
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] Truncate usernames in trace navigation tabs (PR #5376)

2024-12-04 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5376#pullrequestreview-2478052628
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] Move deprecated eslint rules to stylistic plugin (PR #5557)

2025-02-03 Thread Holger Jeromin via rails-dev
@HolgerJeromin pushed 1 commit.

0d6ac49a4880903c709091f0242bab0744b49a36  Move deprecated eslint rules to 
stylistic plugin

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5557/files/ebd82fc2c69f15eb258398dc43cdc45a90ed2a7f..0d6ac49a4880903c709091f0242bab0744b49a36
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] Move deprecated eslint rules to stylistic plugin (PR #5557)

2025-02-03 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> @@ -68,9 +95,6 @@ module.exports = [
   "no-lone-blocks": "error",
   "no-lonely-if": "error",
   "no-loop-func": "error",
-  "no-mixed-operators": "error",
-  "no-multiple-empty-lines": "error",

Good catch!
I readded it again and checked that I did not missed any other.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5557#discussion_r1939633995
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] Move deprecated eslint rules to stylistic plugin (PR #5557)

2025-02-03 Thread Holger Jeromin via rails-dev
@HolgerJeromin pushed 1 commit.

ebd82fc2c69f15eb258398dc43cdc45a90ed2a7f  Move deprecated eslint rules to 
stylistic plugin

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5557/files/267183501e1bc9df671b3452d363389d19ccf5a1..ebd82fc2c69f15eb258398dc43cdc45a90ed2a7f
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 apply extra encodeURIComponent to lat/lon search params (PR #5595)

2025-02-03 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5595#pullrequestreview-2589632118
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] Simplify iD's initialisation (PR #5597)

2025-02-04 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> -
-if (mapParams.object) {
-  params.set("id", mapParams.object.type + "/" + mapParams.object.id);
-  mapParams = OSM.parseHash(location.hash);
-  if (mapParams.center) {
-params.set("map", mapParams.zoom + "/" + mapParams.center.lat + "/" + 
mapParams.center.lng);
-  }
-} else if (id.data("lat") && id.data("lon")) {
-  params.set("map", "16/" + id.data("lat") + "/" + id.data("lon"));
-} else {
-  params.set("map", (mapParams.zoom || 17) + "/" + mapParams.lat + "/" + 
mapParams.lon);
-}
+  if (id.data("configured") === false) {
+alert(I18n.t("site.edit.id_not_configured"));
+return;
+  }

Early return results often in less indention which is IMO good.

And while reading the code you do not need to find the `else` branch.
Having the branch with fewer code lines on top can help without the downsides 
of multiple returns.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5597#discussion_r1940756914
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] Move deprecated eslint rules to stylistic plugin (PR #5557)

2025-02-04 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> @@ -10,6 +10,7 @@
   },
   "devDependencies": {
 "eslint": "^9.0.0",
+"@stylistic/eslint-plugin": "^3.0.0",

I have no idea how my old experiments with that did not worked. But now it does 
without ts dependency. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5557#discussion_r1942391347
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] Move deprecated eslint rules to stylistic plugin (PR #5557)

2025-02-04 Thread Holger Jeromin via rails-dev
@HolgerJeromin pushed 1 commit.

2aefd97281ac74c78a8dec469d45a22cb8288c93  Move deprecated eslint rules to 
stylistic plugin

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5557/files/0d6ac49a4880903c709091f0242bab0744b49a36..2aefd97281ac74c78a8dec469d45a22cb8288c93
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] Remove Qs from eslint globals (PR #5606)

2025-02-05 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5606#pullrequestreview-2594894008
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] Add coordinate precision function (PR #5581)

2025-01-31 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



>  
-if (!o || !d) return;
+if (!points[0] || !points[1]) return;

I find the current PR version the easiest to read.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5581#discussion_r1937014409
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] Repo: editor help to find eslint config file (Issue #5572)

2025-02-05 Thread Holger Jeromin via rails-dev
Can we have a decision here?
Or should I just go with `.vscode/settings.json` because most are using vscode 
derivates and Tom (using another editor) is in favor of this, too?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5572#issuecomment-2636032867
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 deprected eslint rules (PR #5612)

2025-02-05 Thread Holger Jeromin via rails-dev
Replace deprected eslint rules

no-new-object => no-object-constructor
https://eslint.org/docs/latest/rules/no-new-object
no-process-env => will be catched by no-undef

closes #5554

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

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

-- Commit Summary --

  * Replace deprected eslint rules

-- File Changes --

M config/eslint.js (3)

-- Patch Links --

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

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5612
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] Add settings file for vscode derivates with eslint support (PR #5611)

2025-02-05 Thread Holger Jeromin via rails-dev
### Description
Add vscode style settings file which defines the location of eslint config file.

### How has this been tested?
Load folder in editor and break eslint rule => direct visual feedback

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

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

-- Commit Summary --

  * Add settings file for vscode derivates with eslint support

-- File Changes --

A .vscode/settings.json (5)

-- Patch Links --

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

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5611
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 all no-implicit-globals eslint errors (PR #5613)

2025-02-05 Thread Holger Jeromin via rails-dev
### Description
I also changed the eslint rule to an error in a separate commit.

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

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

-- Commit Summary --

  * Fix all no-implicit-globals eslint errors
  * Change eslint no-implicit-globals rule to error

-- File Changes --

M app/assets/javascripts/index/directions/fossgis_osrm.js (382)
M app/assets/javascripts/index/directions/fossgis_valhalla.js (212)
M app/assets/javascripts/index/directions/graphhopper.js (164)
M app/assets/javascripts/social_share_button.js (35)
M config/eslint.js (2)

-- Patch Links --

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

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5613
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] Mark valid usecases for alert and change eslint rule to error (PR #5614)

2025-02-05 Thread Holger Jeromin via rails-dev
@HolgerJeromin pushed 2 commits.

c855d86bf8ca9e1c240e6f0fa803deb3f69e5e6c  Mark valid usecases for alert
eee793f5e6e534442793c88f06caca2ccb5c12d1  change eslint rule no-alert to error

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5614/files/b189286288238fe56156c7d8debbc0bd862c21d9..eee793f5e6e534442793c88f06caca2ccb5c12d1
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] Move html from javascript to views (Issue #5616)

2025-02-06 Thread Holger Jeromin via rails-dev
@Satya900  We do [not work with 
assigns](https://github.com/openstreetmap/openstreetmap-website/blob/master/CONTRIBUTING.md#assigning-issues).
 Just go ahead! :)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5616#issuecomment-2639141558
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] Reevaluate iteration methods (PR #5604)

2025-02-05 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5604#pullrequestreview-2594914388
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] Mark valid usecases for alert and change eslint rule to error (PR #5614)

2025-02-05 Thread Holger Jeromin via rails-dev
Mark valid usecases for alert

I think with marking this valid use cases it is ok to change eslint rule to 
error.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Mark valid usecases for alert
  * change eslint rule no-alert to error

-- File Changes --

M app/assets/javascripts/index.js (1)
M app/assets/javascripts/index/directions-endpoint.js (1)
M config/eslint.js (2)

-- Patch Links --

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

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5614
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 all no-implicit-globals eslint errors (PR #5613)

2025-02-06 Thread Holger Jeromin via rails-dev
@HolgerJeromin pushed 2 commits.

a4e6934d599e92d755ab1ff949ed468eea1a9bf0  Fix all no-implicit-globals eslint 
errors
49b65a09dd83764ee7c0bb2ab5661775cceeefab  Change eslint no-implicit-globals 
rule to error

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5613/files/7b6b9574096e1d83906bafde98a44544512bd203..49b65a09dd83764ee7c0bb2ab5661775cceeefab
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] Drop eslint initialiser (PR #5631)

2025-02-08 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5631#pullrequestreview-2603997470
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 usage of URLSearchParams (PR #5634)

2025-02-08 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> @@ -124,7 +124,7 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, 
> iconUrl, dragCallback, ch
 
   function getReverseGeocode() {
 var latlng = endpoint.latlng.clone();
-var reverseGeocodeUrl = OSM.NOMINATIM_URL + "reverse?lat=" + latlng.lat + 
"&lon=" + latlng.lng + "&format=json";
+var reverseGeocodeUrl = OSM.NOMINATIM_URL + "reverse?" + new 
URLSearchParams({ ...latlng, format: "json" });

```suggestion
const reverseGeocodeUrl = OSM.NOMINATIM_URL + "reverse?" + new 
URLSearchParams({ ...latlng, format: "json" });
```

And others

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5634#pullrequestreview-2604011032
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] Lessen code repetition (PR #5633)

2025-02-08 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> @@ -61,13 +61,9 @@ OSM.Changeset = function (map) {
 });
 
 content.find("textarea").on("input", function (e) {
-  var form = e.target.form;
-
-  if ($(e.target).val() === "") {
-$(form.comment).prop("disabled", true);
-  } else {
-$(form.comment).prop("disabled", false);
-  }
+  const form = e.target.form,
+disabled = $(e.target).val() === "";
+  $(form.comment).prop("disabled", disabled);

```suggestion
  form.comment.disabled = disabled;
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5633#pullrequestreview-2604013043
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] Lessen code repetition (PR #5633)

2025-02-08 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> @@ -61,13 +61,9 @@ OSM.Changeset = function (map) {
 });
 
 content.find("textarea").on("input", function (e) {
-  var form = e.target.form;
-
-  if ($(e.target).val() === "") {
-$(form.comment).prop("disabled", true);
-  } else {
-$(form.comment).prop("disabled", false);
-  }
+  const form = e.target.form,
+disabled = $(e.target).val() === "";
+  $(form.comment).prop("disabled", disabled);

But I would remove jQuery in the long run. But that es probably only me :)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5633#discussion_r1947934981
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] Get directions using fetch (PR #5642)

2025-02-09 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> @@ -99,22 +99,18 @@
   language: I18n.currentLocale()
 }
   })
-};
-return $.ajax({
-  url: OSM.FOSSGIS_VALHALLA_URL,
-  data,
-  dataType: "json",
-  success: function ({ trip }) {
-if (trip.status === 0) {
-  callback(false, _processDirections(trip.legs));
-} else {
-  callback(true);
+});
+return fetch(OSM.FOSSGIS_VALHALLA_URL + "?" + query)
+  .then(response => response.json())
+  .then(({ trip }) => {
+if (trip.status !== 0) {

The callback result can not be used.
```ts
if (trip.status !== 0) {
  return callback(true);
}
return callback(false, _processDirections(trip.legs));
```
or
```ts
if (trip.status !== 0) {
  callback(true);
  return;
}
callback(false, _processDirections(trip.legs));
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5642#pullrequestreview-2604912111
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] Get directions using fetch (PR #5642)

2025-02-09 Thread Holger Jeromin via rails-dev
This pushes json parsing off the js main thread. Hurray

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5642#issuecomment-2647180475
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] Get directions using fetch (PR #5642)

2025-02-10 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5642#pullrequestreview-2604970286
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 usage of URLSearchParams (PR #5634)

2025-02-08 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> @@ -124,7 +124,7 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, 
> iconUrl, dragCallback, ch
 
   function getReverseGeocode() {
 var latlng = endpoint.latlng.clone();
-var reverseGeocodeUrl = OSM.NOMINATIM_URL + "reverse?lat=" + latlng.lat + 
"&lon=" + latlng.lng + "&format=json";
+var reverseGeocodeUrl = OSM.NOMINATIM_URL + "reverse?" + new 
URLSearchParams({ ...latlng, format: "json" });

I would migrate all lines you change.
But whatever. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5634#discussion_r1948018656
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] Set iD map param with array (PR #5632)

2025-02-08 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5632#pullrequestreview-2604130700
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] Refactor direction engines and unify structure (PR #5621)

2025-02-06 Thread Holger Jeromin via rails-dev
This needs rebasing and some adjustment after merge of my #5613

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5621#issuecomment-2640783441
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] Move deprecated eslint rules to stylistic plugin (PR #5557)

2025-02-05 Thread Holger Jeromin via rails-dev
@HolgerJeromin pushed 1 commit.

e838e9528c35de02c88e7089d4294a912997d5fa  Move deprecated eslint rules to 
stylistic plugin

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5557/files/2aefd97281ac74c78a8dec469d45a22cb8288c93..e838e9528c35de02c88e7089d4294a912997d5fa
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 all no-implicit-globals eslint errors (PR #5613)

2025-02-05 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> @@ -1,21 +1,22 @@
-function openShareUrl(url, initialWidth = 640, initialHeight = 480) {
-  const width = Math.max(100, Math.min(screen.width, initialWidth));
-  const height = Math.max(100, Math.min(screen.height, initialHeight));
+(function () {
+  function openShareUrl(url, initialWidth = 640, initialHeight = 480) {

Perhaps we can use the following pattern. But we have to skip `no-lone-blocks` 
rule.

```js
// eslint ignore no-lone-blocks
{
  function FOSSGISOSRMEngine(id, vehicleType) { ... }
  FOSSGISOSRMEngine(...)
}

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5613#discussion_r1943509680
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 all no-implicit-globals eslint errors (PR #5613)

2025-02-05 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> @@ -1,21 +1,22 @@
-function openShareUrl(url, initialWidth = 640, initialHeight = 480) {
-  const width = Math.max(100, Math.min(screen.width, initialWidth));
-  const height = Math.max(100, Math.min(screen.height, initialHeight));
+(function () {
+  function openShareUrl(url, initialWidth = 640, initialHeight = 480) {

oh, you meant the ready call of jQuery. Would be probably another idea. Yes.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5613#discussion_r1943538512
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] Mark valid usecases for alert and change eslint rule to error (PR #5614)

2025-02-05 Thread Holger Jeromin via rails-dev
Oh, yes. Will fix the pr tomorrow

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5614#issuecomment-2637828616
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 all no-implicit-globals eslint errors (PR #5613)

2025-02-05 Thread Holger Jeromin via rails-dev
> You don't need to touch every single line via indenting if you write the 
> globals as
> const DemoEngine = function (...) {   ... };

Then we would have `DemoEngine` poluting the global scope...

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5613#issuecomment-2637714610
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] Create a ChangesetSubscription model (Issue #5540)

2025-02-07 Thread Holger Jeromin via rails-dev
We do [not work with 
assigns](https://github.com/openstreetmap/openstreetmap-website/blob/master/CONTRIBUTING.md#assigning-issues).
 Just go ahead! :)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5540#issuecomment-2642729245
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] Lazy image loading for user provided content (Issue #5601)

2025-02-05 Thread Holger Jeromin via rails-dev
On a [website from me](https://www.gwc-gt.de/Turnierergebnisse.php) I added 
this HTML property to all user added images (inline images in a blog like page).
Invisible images (down a few pages) are not loaded till the user scrolls down. 
The browser is smart enough to fetch them early enough, so even if the image 
size is not known initially the reflow is not visible.

To summarize: I am pretty sure this will have no downside but will be good with 
many scenarios.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5601#issuecomment-2636637631
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] Get directions using fetch (PR #5642)

2025-02-11 Thread Holger Jeromin via rails-dev
> I still don't know what I need to change in the testing stub

I would guess:

```ruby
  def stub_straight_routing(start_instruction: "Start here", 
finish_instruction: "Finish there")
stub_routing <<~CALLBACK
  const distance = points[0].distanceTo(points[1]);
  const time = distance * 30;
  return Promise.resolve({
line: points,
steps: [
  [points[0],  8, "1. #{start_instruction}", distance, points],
  [points[1], 14, "2. #{finish_instruction}", 0, [points[1]]]
],
distance,
time
  });
CALLBACK
  end

  def stub_routing(callback_code)
execute_script <<~SCRIPT
  $(() => {
for (const engine of OSM.Directions.engines) {
  engine.getRoute = (points, signal) => {
  #{callback_code}
  };
}
  });
SCRIPT
  end
end


-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5642#issuecomment-2650757462
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 remaining key ordering issues in eslint configuration (PR #5647)

2025-02-11 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



>globals: {
 ...globals.commonjs
-  }
+  },
+  sourceType: "commonjs"
 }

Yeah, activate for this file in config and disable in most other parts is a bit 
cumbersome:
```
/* eslint-disable sort-keys */
... start of the json config
/* eslint-enable sort-keys */
...rules sorted. yeah
/* eslint-disable sort-keys */
... rest of the config

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5647#discussion_r1950418031
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] eslint: Move file config to eslint section (PR #5653)

2025-02-11 Thread Holger Jeromin via rails-dev
### Description
A file comment combined with a config section is a bit confusing.

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

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

-- Commit Summary --

  * eslint: Move file config to eslint section

-- File Changes --

M config/eslint.js (5)

-- Patch Links --

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

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5653
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] Get directions using fetch (PR #5642)

2025-02-10 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> @@ -212,6 +202,13 @@ OSM.Directions = function (map) {
 map.setSidebarOverlaid(true);
 // TODO: collapse width of sidebar back to previous
   });
+}).catch(function () {
+  map.removeLayer(polyline);
+  if (reportErrors) {
+$("#sidebar_content").html("" + 
I18n.t("javascripts.directions.errors.no_route") + "");
+  }
+}).finally(function () {
+  awaitingRoute = false;

Add `controller = undefined;` here.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5642#pullrequestreview-260714
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] Get directions using fetch (PR #5642)

2025-02-10 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> -routeRequest = chosenEngine.getRoute(points, function (err, route) {
-  routeRequest = null;
-
-  if (err) {
-map.removeLayer(polyline);
-
-if (reportErrors) {
-  $("#sidebar_content").html("" + 
I18n.t("javascripts.directions.errors.no_route") + "");
-}
-
-return;
-  }
-
+controller = new AbortController();
+awaitingRoute = true;
+chosenEngine.getRoute(points, controller.signal).then(function (route) {
   polyline

Add `controller = undefined;` here. Same in `catch`

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5642#pullrequestreview-2607888204
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] Get directions using fetch (PR #5642)

2025-02-10 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> @@ -3,7 +3,8 @@
 //= require_tree ./directions
 
 OSM.Directions = function (map) {
-  var routeRequest = null; // jqXHR object of an ongoing route request or null
+  let awaitingRoute = false; // true if a route request is in progress

Do we really need both? The controller and the boolean?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5642#pullrequestreview-2607890078
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 remaining key ordering issues in eslint configuration (PR #5647)

2025-02-10 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



>globals: {
 ...globals.commonjs
-  }
+  },
+  sourceType: "commonjs"
 }

If you are willing to sort everything (not sure if this is good to read) this 
should be done here:
```
rules: {eslint sort-keys: ["error"]}

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5647#pullrequestreview-2607910945
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] Add OpenMapTiles vector map (PR #4042)

2025-02-11 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> @@ -9,6 +13,35 @@ L.extend(L.LatLngBounds.prototype, {
   }
 });
 
+if (OSM.MAPTILER_KEY) {
+  
maplibregl.setRTLTextPlugin("https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js";,
 true);

I am pretty sure this need to be changed to be served from osm.org or probably 
bundled like the rest...

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4042#pullrequestreview-2607950509
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 remaining key ordering issues in eslint configuration (PR #5647)

2025-02-11 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



>globals: {
 ...globals.commonjs
-  }
+  },
+  sourceType: "commonjs"
 }

Ah, I see. We can [ignore some rules in some 
lines](https://eslint.org/docs/latest/use/configure/rules#disabling-rules) with 
eslint. But not activate a rule within a range.
So yes, current master warns, so resorting properties is probably the best 
thing we can do, if we want to force the rules to be sorted...

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5647#discussion_r1950386505
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] Split engine translations into providers and modes (PR #5652)

2025-02-11 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



>engines:
-fossgis_osrm_bike: "Bicycle (OSRM)"
-fossgis_osrm_car: "Car (OSRM)"
-fossgis_osrm_foot: "Foot (OSRM)"
-graphhopper_bicycle: "Bicycle (GraphHopper)"
-graphhopper_car: "Car (GraphHopper)"
-graphhopper_foot: "Foot (GraphHopper)"
-fossgis_valhalla_bicycle: "Bicycle (Valhalla)"
-fossgis_valhalla_car: "Car (Valhalla)"
-fossgis_valhalla_foot: "Foot (Valhalla)"
+fossgis_osrm: "OSRM"

does these engine names need a translation key?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5652#pullrequestreview-2609151356
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] Replace qs with URLSearchParams (PR #5592)

2025-02-02 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> @@ -45,34 +44,34 @@
  */
 window.updateLinks = function (loc, zoom, layers, object) {
   $(".geolink").each(function (index, link) {
-var href = link.href.split(/[?#]/)[0],
-args = Qs.parse(link.search.substring(1)),
-editlink = $(link).hasClass("editlink");
+let href = link.href.split(/[?#]/)[0];

Not sure if this is a good and correct change:
```suggestion
let href = link.protocol + '//' + link.hostname + link.pathname;
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5592#pullrequestreview-2588542026
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] Replace var in javascript with let/const (PR #5558)

2025-02-02 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5558#pullrequestreview-2588542628
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] Replace qs with URLSearchParams (PR #5592)

2025-02-02 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> @@ -45,34 +44,34 @@
  */
 window.updateLinks = function (loc, zoom, layers, object) {
   $(".geolink").each(function (index, link) {
-var href = link.href.split(/[?#]/)[0],
-args = Qs.parse(link.search.substring(1)),
-editlink = $(link).hasClass("editlink");
+let href = link.href.split(/[?#]/)[0];

I thought the general goal was to replace complex code with modern APIs.
If this is an external library or own code is for me not important. 
Do what you want in this PR.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5592#discussion_r1938504500
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] Move deprecated eslint rules to stylistic plugin (PR #5557)

2025-01-30 Thread Holger Jeromin via rails-dev
I removed the eslint config part of the PR. 
So we can merge this PR and discuss the needed place to reference eslint config 
in the referenced item.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5557#issuecomment-2624265562
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] OAuth2 login flow returns error 500 (Issue #5400)

2024-12-16 Thread Holger Jeromin via rails-dev
> Does anyone know how long this maintenance work will last?

https://community.openstreetmap.org/t/openstreetmap-org-currently-offline-operations-team-are-working-to-restore-15-december-2024/122930

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5400#issuecomment-2545408116
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 preference not respected after OAuth expiry (Issue #5407)

2024-12-16 Thread Holger Jeromin via rails-dev
It is an known issue that not-logged-in users have no settings to change that.
So this is a duplicate to one of the open issues

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5407#issuecomment-2547576757
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] Add user profile heatmap visualization for contributions (PR #5402)

2024-12-16 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> +  [CalendarLabel, {
+position: "left",
+key: "left",
+text: () => weekdays,
+textAlign: "end",
+width: 30,
+padding: [23, 10, 0, 0]
+  }],
+  [Tooltip, {
+text: (date, value) => getTooltipText(date, value, locale)
+  }]
+]);
+  } catch (error) {
+console.error("Error during Cal-Heatmap initialization:", error);
+  }
+});

```suggestion
}, {once: true});
```


-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5402#pullrequestreview-2508046543
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] Add user profile heatmap visualization for contributions (PR #5402)

2024-12-16 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> +  const heatmapElement = document.querySelector("#cal-heatmap");
+
+  if (!heatmapElement) {
+console.warn("Heatmap element not found in the DOM.");
+return;
+  }
+
+
+  const heatmapData = heatmapElement.dataset.heatmap ? 
JSON.parse(heatmapElement.dataset.heatmap) : [];
+
+  try {
+// eslint-disable-line no-undef
+const cal = new CalHeatmap();
+const applicationData = $("head").data();
+const locale = applicationData.locale;
+const theme = getTheme();

We can watch for change of color theme with 
https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/change_event

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5402#pullrequestreview-2508058564
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] Add user profile heatmap visualization for contributions (PR #5402)

2024-12-17 Thread Holger Jeromin via rails-dev
Oh, I forgot about this. 
But the user can now set his "Preferred Website Color Scheme" which should be 
the basis of the theme not the browser setting.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5402#issuecomment-2548889858
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] Add date and url settings for offline message (PR #5403)

2024-12-18 Thread Holger Jeromin via rails-dev
> Maybe we should just remove the references to database maintenance in favour 
> of this solution with a URL to an explanatory notice?

Perhaps this is generic enough:
```
The OpenStreetMap database is currently in read-only mode while essential 
maintenance work is carried out.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5403#issuecomment-2551069076
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] 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([
-["mapnik", "standard"],
-["cyclemap", "cycle_map"],
-["transportmap", "transport_map"]
-  ]);
+  const canDownloadImage = layer && layer.options.canDownloadImage;

```suggestion
  const canDownloadImage = !!(layer && layer.options.canDownloadImage);
```
or
```suggestion
  const canDownloadImage = Boolean(layer && layer.options.canDownloadImage);
```
[Modern 
js](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing)
 would be (available across browsers since September 2020):
```suggestion
  const canDownloadImage = layer?.options.canDownloadImage ?? false;
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5416#discussion_r1891553543
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] 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 support ECMAScript 2022 since that's only a couple of years old.

This feels more critical as it is. The browsers are implementing features years 
before the spec is published.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5421#issuecomment-2555835066
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-11 Thread Holger Jeromin via rails-dev
Jquery uses `JSON.parse` for parsing of `ajax()` result.

In a next step switching to `fetch" would allow using
https://developer.mozilla.org/en-US/docs/Web/API/Response/json
Where the parsing is done without blocking the main thread.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5474#issuecomment-2585612410
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] Add user profile heatmap visualization for contributions (PR #5402)

2025-01-20 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> +gutter: 4
+  },
+  date: {
+start: startDate
+  },
+  range: 13,
+  data: {
+source: heatmapData,
+type: "json",
+x: "date",
+y: "total_changes"
+  },
+  scale: {
+color: {
+  type: "threshold",
+  range: currentTheme === "dark" ? rangeColors : rangeColors.reverse(),

```suggestion
  range: currentTheme === "dark" ? rangeColors : 
Array.from(rangeColors).reverse(),
```
would solve that.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5402#discussion_r1923216435
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 dark mode map tiles in embed (PR #5522)

2025-01-22 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> @@ -15,10 +15,9 @@ window.onload = function () {
   var query = (window.location.search || '?').slice(1),
   args  = {};
 
-  var pairs = query.split('&');
-  for (var i = 0; i < pairs.length; i++) {
-var parts = pairs[i].split('=');
-args[parts[0]] = decodeURIComponent(parts[1] || '');
+  for (var pair of query.split('&')) {
+var [key, val] = pair.split('=');
+args[key] = decodeURIComponent(val || '');
   }

Using a given API 
https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams  would be much 
easier.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5522#discussion_r1925785198
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 dark mode map tiles in embed (PR #5522)

2025-01-22 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> @@ -37,17 +36,17 @@ window.onload = function () {
   map.attributionControl.setPrefix('');
   map.removeControl(map.attributionControl);
 
-  if (args.layer === "cyclosm") {
-new L.OSM.CyclOSM().addTo(map);
-  } else if (args.layer === "cyclemap" || args.layer === "cycle map") {
-new L.OSM.CycleMap(thunderforestOptions).addTo(map);
-  } else if (args.layer === "transportmap") {
-new L.OSM.TransportMap(thunderforestOptions).addTo(map);
-  } else if (args.layer === "hot") {
-new L.OSM.HOT().addTo(map);
-  } else {
-new L.OSM.Mapnik(mapnikOptions).addTo(map);
-  }
+  var isDarkTheme = args.theme === "dark" || args.theme !== "light" && 
window.matchMedia("(prefers-color-scheme: dark)").matches;

Yes. Much easier.
The code formatter [prettier](https://prettier.io/playground/) returns this 
(with some line breaks):
```js
var isDarkTheme = args.theme === "dark" || (args.theme !== "light" && 
window.matchMedia("(prefers-color-scheme: dark)").matches);


-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5522#discussion_r1925790520
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 dark mode map tiles in embed (PR #5522)

2025-01-22 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> @@ -15,10 +15,9 @@ window.onload = function () {
   var query = (window.location.search || '?').slice(1),
   args  = {};
 
-  var pairs = query.split('&');
-  for (var i = 0; i < pairs.length; i++) {
-var parts = pairs[i].split('=');
-args[parts[0]] = decodeURIComponent(parts[1] || '');
+  for (var pair of query.split('&')) {
+var [key, val] = pair.split('=');
+args[key] = decodeURIComponent(val || '');
   }

I skimmed through this very file and did not found more places :-)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5522#discussion_r1925806760
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] Initialize I18n and OSM as soon as application.js loads (PR #5538)

2025-01-23 Thread Holger Jeromin via rails-dev
>  but I guess this OK as head must have loaded in order for the javascript to 
> load.

Yes. 
FYI:
`document.body` is not ready sync (if your `

Re: [openstreetmap/openstreetmap-website] Tile edges more noticeable recently (Issue #5546)

2025-01-24 Thread Holger Jeromin via rails-dev
Duplicate of #5109 and your #3383
Do you have dark mode active? 
If yes, this is more visible because the dark background has a bigger contrast 
than the light background.

The linked issues are still open: 
https://github.com/Leaflet/Leaflet/issues/3575
https://github.com/Leaflet/Leaflet/issues/9399

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5546#issuecomment-2612542160
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] Refactor embed.js.erb (PR #5550)

2025-01-25 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5550#pullrequestreview-2573998167
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] Add linting for .js.erb files (Issue #5523)

2025-01-25 Thread Holger Jeromin via rails-dev
We should discuss if we want to keep the current eslint config.
Most stylistic rules are now removed from eslint because most use a formatter 
like prettier.io

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5523#issuecomment-2613939114
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] Version #1 ยท View History ยท Version #2... (Issue #5525)

2025-01-20 Thread Holger Jeromin via rails-dev
Duplicate of #4946

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5525#issuecomment-2602397513
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] Drop some legacy browser support code (PR #5556)

2025-01-27 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5556#pullrequestreview-2575527413
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] Modernize eslint config (Issue #5554)

2025-01-26 Thread Holger Jeromin via rails-dev
As a first step I migrated the deprecated rules.
After that I want to check which rules are already included in 
`js.configs.recommended`

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5554#issuecomment-2614532166
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] Refactor embed.js.erb (PR #5550)

2025-01-26 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> -new L.OSM.CycleMap(thunderforestOptions).addTo(map);
-  } else if (args.layer === "transportmap") {
-new L.OSM.TransportMap(thunderforestOptions).addTo(map);
-  } else if (args.layer === "hot") {
-new L.OSM.HOT().addTo(map);
-  } else {
-new L.OSM.Mapnik(mapnikOptions).addTo(map);
-  }
+  var baseLayers = {
+cyclosm: ["CyclOSM"],
+cyclemap: ["CycleMap", thunderforestOptions],
+transportmap: ["TransportMap", thunderforestOptions],
+hot: ["HOT"],
+mapnik: ["Mapnik", mapnikOptions]
+  };
+  baseLayers["cycle map"] = baseLayers.cyclemap;

`const` defines only the variable. Ii does not prevent changing the properties 
of the object.
But yes, changing all `var` into `let`/`const` would be good because they work 
with much less surprise.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5550#discussion_r1929773940
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] Modernize eslint config (Issue #5554)

2025-01-26 Thread Holger Jeromin via rails-dev
Sorry, I am not an native speaker. I dod not want to remove the config, but 
change its content.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5554#issuecomment-2614426343
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] Refactor embed.js.erb (PR #5550)

2025-01-27 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> -new L.OSM.CycleMap(thunderforestOptions).addTo(map);
-  } else if (args.layer === "transportmap") {
-new L.OSM.TransportMap(thunderforestOptions).addTo(map);
-  } else if (args.layer === "hot") {
-new L.OSM.HOT().addTo(map);
-  } else {
-new L.OSM.Mapnik(mapnikOptions).addTo(map);
-  }
+  var baseLayers = {
+cyclosm: ["CyclOSM"],
+cyclemap: ["CycleMap", thunderforestOptions],
+transportmap: ["TransportMap", thunderforestOptions],
+hot: ["HOT"],
+mapnik: ["Mapnik", mapnikOptions]
+  };
+  baseLayers["cycle map"] = baseLayers.cyclemap;

which was done in #5558

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5550#discussion_r1930273004
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] Replace var in javascript with let/const (PR #5558)

2025-01-27 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5558#pullrequestreview-2575002097
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] Move deprecated eslint rules to stylistic plugin (PR #5557)

2025-01-26 Thread Holger Jeromin via rails-dev
### Description
I moved all deprecated eslint to the https://eslint.style/ plugin.

To have easy editor support I added a workspace file for visual studio code. 
Right now this only has a link to eslint config file.
I can remove that commit if you do not want editor config files.

### How has this been tested?
Running eslint in editor.

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

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

-- Commit Summary --

  * Add visual studio code workspace for eslint plugin
  * Move deprecated eslint rules to stylistic plugin

-- File Changes --

M config/eslint.js (92)
A config/openstreetmap-website.code-workspace (12)
M package.json (1)

-- Patch Links --

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

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5557
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] Add linting for .js.erb files (Issue #5523)

2025-01-25 Thread Holger Jeromin via rails-dev
> Maybe create a new issue for this topic. 
> https://github.com/prettier/plugin-ruby could be starting point.

I am not sure if this only formats ruby code. 
I am an JS/TS expert so I focus on (native and embedded) js code.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5523#issuecomment-2614114614
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] Add eslint-plugin-erb to provide linting of .js.erb files (PR #5559)

2025-01-27 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



On package.json:

The eslint plugin should be added to devDependency?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5559#pullrequestreview-2576756889
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] Add eslint-plugin-erb to provide linting of .js.erb files (PR #5559)

2025-01-28 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5559#pullrequestreview-2577410086
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] Move deprecated eslint rules to stylistic plugin (PR #5557)

2025-01-28 Thread Holger Jeromin via rails-dev
@HolgerJeromin pushed 1 commit.

4126ef0716ad50e416f174685fe1483180fd3304  Move deprecated eslint rules to 
stylistic plugin

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5557/files/896729fcc2cbfa076d1d688bc42072fb304b11af..4126ef0716ad50e416f174685fe1483180fd3304
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] Move deprecated eslint rules to stylistic plugin (PR #5557)

2025-01-28 Thread Holger Jeromin via rails-dev
> Shouldn't this update yarn.lock as well as package.json?

added. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5557#issuecomment-2618757934
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] Remove IE conditional compilation that limited max features (PR #5565)

2025-01-28 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5565#pullrequestreview-2577989574
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] Repo: editor help to find eslint config file (Issue #5572)

2025-01-29 Thread Holger Jeromin via rails-dev
In #5557 I added a visual studio code workspace file in the `config` folder.
This file can contain settings but also other stuff.

We have different possibilities:

## move `config/eslint.js` to root folder `eslint.config.cjs`
pro: works with every editor (?) without config
con: pollutes root folder

## No editor specific config
con: no eslint (because of the unusual eslint config path)

## settings file in `.vscode/settings.json`
pro: works with vsc without config
con: pollutes root folder with the folder `.vscode`

## workspace file in root folder `openstreetmap-website.code-workspace`
pro: vsc ask it should open workspace instead of folder
con: pollutes root folder with the file

## workspace file in config folder 
`config/openstreetmap-website.code-workspace` (as in PR right now)
pro: root folder is not polluted
con: vsc users needs to find the file and open manually



-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5572
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] Repo: editor help to find eslint config file (Issue #5572)

2025-01-29 Thread Holger Jeromin via rails-dev
I would like to do a poll which editors are used by the main developers.
๐Ÿ˜„: Visual Studio Code
๐Ÿš€: Visual Studio
๐ŸŽ‰: emacs
โค๏ธ: vim
๐Ÿš€: jetbrains
๐Ÿ˜•: other

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5572#issuecomment-2620976393
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] Move deprecated eslint rules to stylistic plugin (PR #5557)

2025-01-30 Thread Holger Jeromin via rails-dev
@HolgerJeromin pushed 1 commit.

267183501e1bc9df671b3452d363389d19ccf5a1  Move deprecated eslint rules to 
stylistic plugin

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5557/files/4126ef0716ad50e416f174685fe1483180fd3304..267183501e1bc9df671b3452d363389d19ccf5a1
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] Modernize eslint config (Issue #5554)

2025-01-25 Thread Holger Jeromin via rails-dev
We could discuss if we want to keep the current [eslint 
config](https://github.com/openstreetmap/openstreetmap-website/blob/master/config/eslint.js).
Most stylistic rules are now removed from eslint because most use a formatter 
like prettier.io

But the style rules are moved to [another repo](https://eslint.style/) so we 
could keep them.

Or we could remove them and move to prettier.
Having both prettier and eslint is perhaps making new contributors unhappy. At 
least when there is CI rejecting PR which is not formatted by prettier.

#5523 has some (off topic) discussions.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5554
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] The map doesn't load (Issue #5555)

2025-01-25 Thread Holger Jeromin via rails-dev
Can you show us the js code with the syntax error?
Should be reachable via click on the syntaxError in the console

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/#issuecomment-2614232212
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] Add user profile heatmap visualization for contributions (PR #5402)

2025-01-14 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> +function getThemeFromColorScheme(colorScheme) {
+  if (colorScheme === "auto") {
+return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" 
: "light";
+  }
+  return colorScheme; // Return "light" or "dark" directly if specified
+}

`getThemeFromColorScheme` returns the correct theme. Yes. 
But it is only called on load (`DOMContentLoaded`) and not when the user 
changes operating system theme.

Missing something like:
`window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", 
xy);`


-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5402#discussion_r1914788494
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] Add user profile heatmap visualization for contributions (PR #5402)

2025-01-14 Thread Holger Jeromin via rails-dev
@hlfan  This deprecates `addListener` (old IE invention) not `addEventListener`

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5402#issuecomment-2589971885
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] Bump allowed ECMAScript version to 2022 (ES13) (PR #5421)

2025-01-01 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5421#pullrequestreview-2526939816
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


  1   2   >