<p dir="auto">This PR introduces async loading of relation members, which is the main reason for large relations to take quite some time to load and display.</p>
<p dir="auto">Current process:</p>
<ol dir="auto">
<li>Navigate to relation -> Rails renders tags, member list, returns final result to browser. Until then, a blank screen is shown.</li>
<li>Browser fetches full relation details, renders map</li>
</ol>
<p dir="auto">New process:</p>
<ol dir="auto">
<li>Navigate to relation -> render tags only. This step is expected to return results much quicker to the browser</li>
<li>Browser requests relation member list in separate query. Turbo updates DOM once finished.</li>
<li>Concurrent to step 2, browser requests full relation detail and starts rendering the map.</li>
</ol>
<p dir="auto">For large member lists, we're hiding the list by default anyway, so that the user doesn't notice the DOM update. If relation member loading takes longer, a spinner is shown when expanding the member list.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/6326'>https://github.com/openstreetmap/openstreetmap-website/pull/6326</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/6326/commits/370551de5bcf0fab1db0f1091f44a3c2784891b4" class="commit-link">370551d</a> Lazy loading relation members</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6326/files">8 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6326/files#diff-debf59904131dc89a88ab44cbb1d6deaaa5a7d70c0507f674080df62f7c8e41f">app/abilities/ability.rb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6326/files#diff-2565415ff0cf26425751f20170047f8adeebcc125bdb9922d13cbdf7e85e8e8a">app/controllers/old_relations_controller.rb</a>
(2)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6326/files#diff-c88d47628c3f803432e802850534b1e940f3d379fc3fae3e23cf79eb4fb06001">app/controllers/relation_members_controller.rb</a>
(11)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6326/files#diff-2102212486229c119d63d3581b6bca5bef3ade59f8d302ffcec1559011e4b4cd">app/controllers/relations_controller.rb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6326/files#diff-d18a4729497eb1db32f2d20773ca0b4706f94a2e50fd7721a123e6da97fecc44">app/views/browse/_relation.html.erb</a>
(21)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6326/files#diff-89d41f1bbbff299784f589ab340c5efc6a849639349343ee382f43ccced2d22b">app/views/browse/_relation_member.html.erb</a>
(2)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6326/files#diff-a0f9df6a3d4eeb2a6aff72d1972d2a58a8329f6a1bfea119c67a5927ab60229c">app/views/browse/_relation_member_frame.html.erb</a>
(5)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/6326/files#diff-959bc9abc46a55332bb64d5155a79323afa75a50ec1a2137ddd22d926f62c6c5">config/routes.rb</a>
(4)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/6326.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/6326.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/6326.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/6326.diff</a></li>
</ul>
<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/6326">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLO3I4MMKCPNZIS2KA33NYYSLAVCNFSM6AAAAACEAHLNVOVHI2DSMVQWIX3LMV43ASLTON2WKOZTGMZDMMJTGAYDKNQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<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/6326</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/6326",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/6326",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>