Native-like Navigation of Web apps
hezedu.github.io
hezedu.github.io
See video here: https://jitl.notion.site/Back-gesture-iOS-3c44da9f8d13491d86...
However, it's much, much better when running in a native web app container like Capacitor.
I think it's quite reasonable to want to respond to a back gesture to cancel a modal that asks if you're sure about deleting <some resource>. You could render everything server side to get website-like navigation, but for these things JS is probably one of the better mechanisms to make user interaction more pleasing.
This stuff should absolutely be kept away from news sites, blogs and other web resources because they're awful enough already with their constant popups about signing up for newsletters, accepting notifications and pitiful pleas to use their app. For your average PWA, though, this is definitely a bad thing.
They are not. They are websites running inside a browser. So, they must respect the browser. If they pretend to be standalone and not care about the browser, it's their own fault, and not the browser's.
And yes. The browser cannot distinguish between your shitty "web app" and a regular site.
I’m sure these sites would respect your wishes and not use this for nefarious purposes!
You see, features like this would make the Web worse for 99.99% of users by enabling shitty websites’ abuses, while making it just a tiny bit better for those who insist on the subpar experience of running general purpose applications in their browsers.
So yeah, that’s gonna be a no from me.
[1]: https://developer.mozilla.org/en-US/docs/Web/API/History
Also I think the reason it has to load the tweets again is to not serve stale content. They could have the browser cache it using the same cache control mechanism as a page load if they wanted.
If it was possible to check if the user had used the swipe gesture, then it would be possible to use that to control whether or not to display the custom animation, preventing a double-animation scenario.
Whilst it looks like a solid technical implementation, in its current form at least, makes for a very frustrating user experience.
Edit: Which means to say it's very much salvageable! :)
There are some problems with this version. Wait, wait for next version, It will be released this week.
Certain things are loaded on the client, but for example when viewing a repo it's server rendered.
Whereas on the home page, the app shell is loaded on the server, but the feed is fetched on the client.
But all navigation is not done on the client.
State is constantly out of sync and I hate when popup menus have to first fetch their content and show you a spinner instead.
Now that I think of it, I can't think of any website where client-side navigation is actually an improvement.
It’s all in the feeling. Use design patterns that work on phones. And by god, make it fast.
Once that’s set and at the core of your app, think about flourishes.
You won’t achieve the level of Airbnb’s native app, but a little will take you very far.
https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_A...
https://developer.mozilla.org/en-US/docs/Web/API/Vibration_A...
But as of a few years ago, as I understand the top N most popular, best-selling, highest revenue, etc. apps for both iOS and Android were mostly native apps, build with the primary native tooling/language/etc per-platform. Presumably this is because that last little bit of being native pays off in a highly competitive environment. I wonder if that is still true.
Case in point: years ago the Instagram activity feed was rendered in a webview. The only way I ever found out was because they clearly did a faulty deploy that was missing CSS: it rendered in Times New Roman with blue links, etc. But up until that point I didn’t have a clue and I do this stuff for a living.
On iOS at least there are a ton of WKWebView APIs that aid native integration, you can even do force touch context menus and the like. It’s just that by and large people don’t.
Isn’t the instagram activity feed just a big scrolling page of images and text? It doesn’t exactly have a lot of interactivity or animations and transitions, so maybe not the best example for what can be done with web APIs. Lots of native apps use web views for individual screens that display mostly static content, but that’s not really what’s being discussed.
In any case the vast majority of native apps aren’t much more that scrolling lists themselves! Sometimes I think we overcomplicate our image of what native apps usually are. The OS-provided transitions between views are one of few big differentiators, IMO.
Well, the page sucks. If they can't make such a simple thing right, perhaps wait before making something else?
BTW almost all such pages on the web suck (Twitter comes to mind) and are worse than native versions
I've seen many people remark that they can reliably spot a web-based mobile app, and this response is exactly what goes through my mind. My core rebuttal is that we generally don't get feedback about our guesses - we don't get corrected if we guess wrong about what powers an app. So maybe we'll correctly guess the most obvious cases, but that gives us false confidence about our overall accuracy.