SPAs never let you open anything in a new tab (even though they could if they bothered to implement it).
There's really nothing special about SPAs that prevent opening new tabs with middle click. All they need to do is use a href element instead of, e.g., a span with a click handler. For some inexplicable reason, gmail has opted for the latter even though most click targets update the url and navigate the user somewhere.
It's like everyone using these bloated JS front ends has forgotten that. Google, Reddit, Wells Fargo, Gusto, Twitter. They are actively breaking the built in browser features.
It's nowhere near as simple as that. Many SPAs don't even have URLs for referring to the items they display, so they'd also need to invent a complete URL for everything they might display and then also handle people visiting that URL. And if you change URLs in an SPA, you then need to interact with the browser history API, which, historically, has had a large number of disastrously bad bugs.
Things don't exist by default and every feature takes effort.
For gmail it is that simple. They've already solved providing unique URLs for all the internal app paths I bothered checking.
For SPAs in general, it's true that there is some extra work in gluing URLs and app state together, but there's no lack of libraries that make that process easy and painless.
Of course for GMail that would result in taking 30s to load the email. If it wanted to have reasonable performance for opening the message in a new tab they would need to do some magic to transfer just the state required.
Comments
There's really nothing special about SPAs that prevent opening new tabs with middle click. All they need to do is use a href element instead of, e.g., a span with a click handler. For some inexplicable reason, gmail has opted for the latter even though most click targets update the url and navigate the user somewhere.
It just seems lazy to me.
It's like everyone using these bloated JS front ends has forgotten that. Google, Reddit, Wells Fargo, Gusto, Twitter. They are actively breaking the built in browser features.
It's nowhere near as simple as that. Many SPAs don't even have URLs for referring to the items they display, so they'd also need to invent a complete URL for everything they might display and then also handle people visiting that URL. And if you change URLs in an SPA, you then need to interact with the browser history API, which, historically, has had a large number of disastrously bad bugs.
Things don't exist by default and every feature takes effort.
For gmail it is that simple. They've already solved providing unique URLs for all the internal app paths I bothered checking.
For SPAs in general, it's true that there is some extra work in gluing URLs and app state together, but there's no lack of libraries that make that process easy and painless.
a lot of SPAs do this already to make page refreshes not kill state though, but still don't bother with links
Of course for GMail that would result in taking 30s to load the email. If it wanted to have reasonable performance for opening the message in a new tab they would need to do some magic to transfer just the state required.