Re: [openstreetmap/openstreetmap-website] Don't interpolate type in issue title (PR #5382)

2024-12-08 Thread Tom Hughes via rails-dev
Looks good to me, thanks.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5382#issuecomment-2525582308
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] Let header username expand to screen width in small nav mode (PR #5383)

2024-12-08 Thread Tom Hughes via rails-dev
Looks good to me, thanks.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5383#issuecomment-2525586108
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 logger.debug from relation update action (PR #5384)

2024-12-08 Thread Tom Hughes via rails-dev
Looks good to me, thanks.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5384#issuecomment-2525586297
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] Write browse element icons as (PR #5385)

2024-12-08 Thread Tom Hughes via rails-dev
@tomhughes requested changes on this pull request.

So to summarise on the question of what happens when there are multiple icons 
the old logic is that priority is defined by the order of the rules  in the CSS 
which is mostly alphabetical except that the generic building rule is with the 
way rules which come after the node rules although the node/way split is really 
nonsense.

The new logic handles everything alphabetically, except that now the last rule 
wins rather than the first, and building is now ordered with other things so 
loses to shop but beats amenity.

My principle suggestion is that a key/value rule should always win over a key 
only rule as it's more specific.

If we want total backwards compatibility then the first matching rule should 
win - an way to do that would be to walk `target_tags` in reverse order when 
looking for a match.

I'm not sure that really matters though - if there are multiple key/value 
matches then there's no real right or wrong answer as to which one to choose.

> @@ -1,15 +1,43 @@
 module BrowseHelper
+  def element_icon(type, object)
+icon_data = { :filename => "#{type}.svg" }
+
+unless object.redacted?
+  target_tags = object.tags.find_all { |k, _v| BROWSE_ICONS.key? k.to_sym 
}.sort
+  title = target_tags.map { |k, v| "#{k}=#{v}" }.to_sentence unless 
target_tags.empty?
+
+  target_tags.each do |k, v|
+k = k.to_sym
+v = v.to_sym
+if v != :* && BROWSE_ICONS[k].key?(v)
+  icon_data = BROWSE_ICONS[k][v]
+elsif BROWSE_ICONS[k].key?(:*)

I'd suggest not allowing a wildcard key only match to override a more specific 
key=value match here:

```suggestion
elsif icon_data.nil? && BROWSE_ICONS[k].key?(:*)
```

><%= element_single_current_link "node", wn.node %>
   <% related_ways = wn.node.ways.reject { |w| w.id == wn.way_id } 
%>
+  <% icon_connector = " " %>

Why use a variable for this when it doesn't ever seem to change?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5385#pullrequestreview-2486890217
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] Let header username expand to screen width in small nav mode (PR #5383)

2024-12-08 Thread Tom Hughes via rails-dev
Merged #5383 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5383#event-15572387852
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] Allow specifying extra layer options in layers.yml (PR #5386)

2024-12-08 Thread Tom Hughes via rails-dev
Merged #5386 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5386#event-15572387862
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] Allow specifying extra layer options in layers.yml (PR #5386)

2024-12-08 Thread Tom Hughes via rails-dev
Nice - making it easier for people reusing the software for other sites to 
change the map layers has been a long standing problem.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5386#issuecomment-2525668785
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 logger.debug from relation update action (PR #5384)

2024-12-08 Thread Tom Hughes via rails-dev
Merged #5384 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5384#event-15572387851
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 interpolate type in issue title (PR #5382)

2024-12-08 Thread Tom Hughes via rails-dev
Merged #5382 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5382#event-15572387855
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 fetch() instead of iframe to make remote control requests (PR #5375)

2024-12-08 Thread Tom Hughes via rails-dev
Looks good to me, thanks.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5375#issuecomment-2526151435
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 $.ajax instead of iframe to make remote control requests (PR #3760)

2024-12-08 Thread Tom Hughes via rails-dev
Closed #3760.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3760#event-15573179182
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 fetch() instead of iframe to make remote control requests (PR #5375)

2024-12-08 Thread Tom Hughes via rails-dev
Merged #5375 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5375#event-15573182918
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 $.ajax instead of iframe to make remote control requests (PR #3760)

2024-12-08 Thread Tom Hughes via rails-dev
Superseded by #5375.

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