Description
With our current scrolling, when you return to a page that you’ve seen before, the app scrolls either to top or the bookmark in the URL. That means if you bounce between two guides, you lose your place.
For example:
- Go to QuickStart
- Scroll down near bottom
- Go to CLI QuickStart
- Go back to QuickStart
Notice that you’re at the TOP of QuickStart, not down where you were.
That isn’t how browser pages usually work. The browser typically remembers where you were and leaves you there. You can see this behavior by commenting out ALL scrolling within app.component.ts
.
I propose that we implement that behavior.
We could achieve that by caching the last URL to a page as well as the page itself. If you navigate to a page with the same URL as is in cache, no scroll. If the URL has changed, update cache and scroll.
@IgorMinar writes:
The solution should be implemented via location.pushState and I don’t want to go there now. We should definitely not build up a parallel history stack to the one that’s already in the browser
That is worth exploring when we get to it.
On June 7th we agreed to defer this issue until after release.