[openstreetmap-website] Relation membership should be on top of detail pages (#794)

danstowell notifications at github.com
Sat Sep 27 23:40:22 UTC 2014


It's always helpful to link to an example. Here's a way that's part of a relation (NOT a multipolygon in this case): http://www.openstreetmap.org/way/150897569 and here's a node that's part of a relation: http://www.openstreetmap.org/node/1813224670

I like the argument made in the main suggestion. It resonates with my experience - very often we see a way with dozens of anonymous nodes, and those anonymous nodes are rarely the info we want to get to first.

Note that **nodes** don't contain other objects, so there is no fix needed for the node page.

For **relations**, I can't decide if I agree that parent relations should be shown before children. Maybe...?

I'm not convinced by @mboeringa's added suggestion. I'm not saying it's a bad suggestion, but there's a risk that users would get confused about the tagging if the system shows them info from a _different_ object than the one they chose, in a minority of cases. That kind of inconsistency can be a usability problem that leads to mistakes.

So all in all, it's really the core-of-the-core suggestion that I'd advocate, and that is achieved by the following very simple tweak...

```
diff --git a/app/views/browse/_way.html.erb b/app/views/browse/_way.html.erb
index aff405d..8ac6a30 100644
--- a/app/views/browse/_way.html.erb
+++ b/app/views/browse/_way.html.erb
@@ -10,6 +10,13 @@
   <div class='browse-section browse-way'>
     <%= render :partial => "common_details", :object => way %>
 
+    <% unless way.containing_relation_members.empty? %>
+      <h4><%= t'browse.part_of' %></h4>
+      <ul>
+        <%= render :partial => "containing_relation", :collection => way.containing_relation_members.uniq %>
+      </ul>
+    <% end %>
+
     <% unless way.way_nodes.empty? %>
       <h4><%= t'browse.way.nodes' %></h4>
       <ul>
@@ -24,12 +31,5 @@
         <% end %>
       </ul>
     <% end %>
-
-    <% unless way.containing_relation_members.empty? %>
-      <h4><%= t'browse.part_of' %></h4>
-      <ul>
-        <%= render :partial => "containing_relation", :collection => way.containing_relation_members.uniq %>
-      </ul>
-    <% end %>
   </div>
 <% end %>

```



---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/794#issuecomment-57069428
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20140927/fc536cc2/attachment.html>


More information about the rails-dev mailing list