4 ms·
Ugh, its an annoying problem that I understand from both sides. Opening a new page has a surprisingly large amount of user friction vs opening a sidesheet or mo
by Gigachad 4y ago
Ugh, its an annoying problem that I understand from both sides. Opening a new page has a surprisingly large amount of user friction vs opening a sidesheet or modal. Most of it is just a deficiency in how browsers work. If I'm scrolling down a listing page, I don't want to open a new page because returning will often leave me not where I was before. So I make a judgement call on if a link is _really_ worth clicking. While pages which allow expandable previews or modals, I am much more likely to click since its less of a disruption.
- 8ytecoder 4y agoReturning/navigating back absolutely takes you back exactly where you were. It’s broken because the whole page is now being rendered in js and that forces a re-render. SPA misuse has ruined web to the extent we’ve forgotten what it was like to have proper navigation before all the history hijacking and complete rerendering jazz.
- jameshart 4y agoOn the other hand, after opening a bunch of tool windows and documents to copy-paste between in photoshop or blender or whatever, users don’t expect a ‘back button’ to take them back to the previous window layout state. They might expect a back button to navigate among which window is in the foreground, or between view/zoom positions. Consider the possibility that some web applications might actually benefit from acting more like that.
- 8ytecoder 4y agoWhy I said SPA misuse and not use of SPA.
- yakshaving_jgt 4y ago> If I'm scrolling down a listing page, I don't want to open a new page because returning will often leave me not where I was before. Have you actually tried doing that on this very website you are now reading? Click on my profile. Then click back. Where are you? When I tested this just now, I was returned to exactly the point in the page where I left it.
- iggldiggl 4y agoIt works reliably for pages that don't do any client-side-rendering – in that case the browser reliably knows when it has finished loading and layouting all the content and can then restore the scroll position. Things become more iffy with client-side rendering, because the browser has no clear signal to decide when page-loading has progressed far enough that it can try to restore the previous scroll position.
- yakshaving_jgt 4y agoRight. So do less client-side rendering. The internet does way too much client-side rendering, for no reason whatsoever.
- Gigachad 4y agoThat's not going to happen. It's much easier to open a model or sidesheet than use server side rendering. I imagine in future generations of frameworks and browsers, we will be able to do SPAs without the issues we currently see.
- yakshaving_jgt 4y agoI really don’t think it is. You then need to account for: - all the extra styling complexity - the history API - memory management (sometimes) Etc.