<p></p>
<p dir="auto">About starting (not) expanded and vertical space:</p>
<p dir="auto">The first obvious thing that I came up this is to use roughly the same logic other <code class="notranslate"><detail></code> elements are open/closed by default. Way nodes has this line <code class="notranslate"><details <%= "open" if way.way_nodes.count < 10 %>></code> which expands way nodes if there are fewer than 10 of them. So I thought I'd expand node ways if there's only one other way for a node. Collapsing just one way won't save much space.</p>
<p dir="auto">But then I checked some actual ways in osm and looks like their nodes in most of the cases are members of one or two ways. Other cases are relatively rare. If I do what I described in the previous paragraph, I wouldn't have to collapse almost any <code class="notranslate">also part of</code> list. So collapsing 1-way lists doesn't save much vertical space, and collapsing many-way lists also doesn't save much vertical space. What does save it then?</p>
<p dir="auto">I expect most of space wasted in this case:</p>
<ul dir="auto">
<li>there's a long way with many nodes</li>
<li>nodes mostly don't have any tags</li>
<li>parts of the way share nodes with other ways, forming sequences of nodes with the same type (where type is "nothing special", just show the generic node icon), name (actually no name, just show the id) and set of shared ways</li>
</ul>
<p dir="auto">Here's an example that has two such sequences with one more special node in between:</p>
<p dir="auto"><a href="https://github.com/user-attachments/assets/f2b30a2b-52fb-48b6-b1c1-02dd5545924c">image.png (view on web)</a></p>
<p dir="auto">The idea is then to collect every such sequence into one list element, and that's what <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2688959920" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/5355" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/5355/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/5355">#5355</a> does.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5317#issuecomment-2504180177">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLPN36462PKQBTRXDCT2CXRFPAVCNFSM6AAAAABRW4IFHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBUGE4DAMJXG4">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLNWS567BOQUTEVDTGT2CXRFPA5CNFSM6AAAAABRW4IFHSWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUVILA5C.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/5317/c2504180177</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/5317#issuecomment-2504180177",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5317#issuecomment-2504180177",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>