<p></p>
<blockquote>
<p dir="auto">But actually they are not sorted, so sometimes the order may be different.</p>
</blockquote>
<p dir="auto">Good catch.</p>
<p dir="auto">Would it be a better idea for us to sort the elements instead? I've had a brief look at the website, and it would seam reasonable to sort the elements by id and version. That way the order is stable, and also might be helpful for mappers too (e.g I think if I saw nodes 1, 2, 5, ..., 20 on the first page, I'd be surprised to find node 4 mentioned on page 7).</p>
<p dir="auto">I also think the test could be improved. At the moment the test creates 21 items for each type of element, and then checks that the first 20 are visible. But it doesn't check that the 21st item is <em>not</em> visible, and it doesn't check that there are page links to view the next page. I can see what you are doing with the changes that you propose, but I think that leads to a very complex test, in order to handle a situation (lack of sort order) that I don't think is intentional.</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/4571#issuecomment-1994856482">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLPFAV3TFJGSN2LQIRTYYB4EZAVCNFSM6AAAAABETFILZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJUHA2TMNBYGI">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLOOMJDL7PXRTXLNRXTYYB4EZA5CNFSM6AAAAABETFILZSWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTW44MCE.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/4571/c1994856482</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/4571#issuecomment-1994856482",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4571#issuecomment-1994856482",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>