<p dir="auto">The goal here is when viewing history to be able to go back to roughly the same place after visiting a changeset page. It works like this:</p>
<ul dir="auto">
<li>when the changeset list is scrolled down and some item leaves the viewport, the current page location gets changed to include a <code class="notranslate">before=:changeset_id</code> parameter, <code class="notranslate">:changeset_id</code> being the id of the changeset that left the viewport</li>
<li>when the changeset list is scrolled up, same thing happens with <code class="notranslate">after=:changeset_id</code></li>
<li>when the history page is visited and its url includes a <code class="notranslate">before</code> parameter, the sidebar is scrolled so the first item is at the top of the viewport</li>
<li>when the history page is visited and its url includes an <code class="notranslate">after</code> parameter, the sidebar is scrolled so the last item is at the bottom of the viewport</li>
</ul>
<p dir="auto">With these changes you can open a history page, scroll and load more if necessary, click on a changeset, then click back and arrive at a view that includes roughly the same changesets.</p>
<p dir="auto"><span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #647.">Fixes</span> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="23996607" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/647" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/647/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/647">#647</a>. Also fixes the main issue from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="117700607" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/1089" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/1089/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/1089">#1089</a> which is the same as <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="23996607" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/647" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/647/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/647">#647</a>.</p>
<p dir="auto">Kind of <span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #933.">fixes</span> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="62665400" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/933" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/933/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/933">#933</a>. Clicking <em>Load more</em> won't rewrite the url, but scrolling will. <em>Load more</em> is actually a link but it doesn't do the expected thing when used as a link, that's to be fixed later.</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/5826'>https://github.com/openstreetmap/openstreetmap-website/pull/5826</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5826/commits/c467653e9b50e522ccd775682e579d76804126d1" class="commit-link">c467653</a> Rewrite history page url when scrolling</li>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5826/commits/794e19db7a23c61768a880332e6fb536e2f09106" class="commit-link">794e19d</a> Scroll to first/last changeset in history list if before/after param is given</li>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5826/commits/07e69d3da2c4114b73f7a9dc8eb740a9320d049b" class="commit-link">07e69d3</a> Rename changeset loader functions</li>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5826/commits/5f06941a24c09da22640518600094ac6c5f36360" class="commit-link">5f06941</a> Remove params from url when viewing place history and map is moved</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5826/files">2 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5826/files#diff-25cab16df4a58e0c8e53d0a0e70d9bbf28ef3beb9e6bf1208234fdeed7515392">app/assets/javascripts/index/history.js</a>
(91)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5826/files#diff-ca76ddfd495be1ab96863518b57d1e0b49d06c99429adb2bbd6001692d12073b">test/system/history_test.rb</a>
(24)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5826.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5826.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5826.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5826.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/5826">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLKBXOICVAIM3YHGQLT2VH5V3AVCNFSM6AAAAABZMDKPQCVHI2DSMVQWIX3LMV43ASLTON2WKOZSHEZTGNBWGA4DQNQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLLDQ4MTOXAN3BV427T2VH5V3A5CNFSM6AAAAABZMDKPQCWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHK5WIPSY.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/5826</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/5826",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5826",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>