114 points · by hezedu · 5y ago · 72 comments
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.
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.
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.
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.