3 ms·
I am building native webapps using PWAs at the moment. They are not there yet. He touches on navigation, but misses talking about the Android hardware back but
by SCdF 10y ago
I am building native webapps using PWAs at the moment. They are not there yet.
He touches on navigation, but misses talking about the Android hardware back button, which in PWAs hooks up to the same mechanism as it does in the browser: it goes back. This quickly stops making sense when you're making an application, as you want that button to go "up" rather than back. Imagine you are viewing a list of contacts and you: tap on a contact, tap edit to get the editable version, make some edits, tap save to get the change read-only version. In an Android app, you'd expect hitting back at this point would take you to the contact list. Here, it will take you back to edit mode for that contact.
There is also little to no support for apps that want to use large or arbitrary amounts of storage (imagine spotify with offline support as a PWA), or a framework to allow users to deal with that. With a native application I can store as much data as I want, and the user can see what data I'm using in the app list, and clear my data to remove it, or simply uninstall my app. With a PWA you're limited to some confusing arbitrary amount that is unpredictable to the application, the user cannot see this amount anywhere, let along aloneside normal apps where it should be, nor can they reasonably clear the data.
We are currently solving both problems, ironically, by wrapping our app in a native android app: solving the former by overriding where the hardware back button navigates to, and the solving the latter by (no joke) shipping a patched version of chromium with the obtuse quotas patched out.
- mrighele 10y ago> This quickly stops making sense when you're making an application, as you want that button to go "up" rather than back. Did you try to use the history API [1] for this ? Not straightforward but with either replaceState or the onpopstate event maybe you could achieve with JS what you are looking for. [1] https://developer.mozilla.org/en-US/docs/Web/API/History_API https://developer.mozilla.org/en-US/docs/Web/API/History_API
- ericelliott 10y agoThis is the correct solution to this problem in web apps.
- on_and_off 10y agoNavigation is usually the first way I discover than an app is web based and disappoints me. For example Steam is just the worst app that I use often. Pages take ages to load, and navigation is simply broken. scrolling through a page, clicking on an element then hitting back makes often (they have started solving this in some pages) me lose my scroll in the previous page. Other times, the back action is just absent. As a result, window shopping is just awful in a shopping app. I ended up using the webpage for buying games, just ridiculous.
- unclebucknasty 10y ago>you want the button to go "up" rather than back...you'd expect hitting back at this point would take you to the contact list. Can this be handled by your app's design? For instance, could you have the toggle between edit and save take place on the same page (i.e. on the same URL) like a SPA, while the list is a different URL?