Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isolating TWA local storage #456

Open
tristan-morris opened this issue Nov 30, 2023 · 0 comments
Open

Isolating TWA local storage #456

tristan-morris opened this issue Nov 30, 2023 · 0 comments

Comments

@tristan-morris
Copy link

We have an install base of ~50k users with a TWA backed by Bubblewrap. As background, we've also tweaked Bubblewrap to coerce the engine selection to use Chrome for consistency. For the vast majority of users there are absolutely no problems at all and it's a great UX and DX.

For 0.002% of users Google Play Warriors, there are two main issues which show up:

  1. Users complain about the App being a browser. I assume from the occasional address bar which flashes up on App load, and the prompt about being run in a Chrome context. This is less of an issue but related.
  2. Users reset the App's state by clearing Chrome's history/browsing data. I think this is more of an issue, as users don't expect the App's state to also be cleared.

Describe the solution you'd like
As a possible solution to 1 and 2, but really to prompt some discussion: it would be nice if there was an option to have local storage isolated to the TWA/App context and it would be unchanged by 2 (clearing history). And if local storage was isolated, then there's less need for prompting/warning the user, addressing 1? If a developer opted into isolated storage, it would be nice if there was a prompt/workflow to migrate state from local storage to app context local storage.

Describe alternatives you've considered
Migrating to another framework which embeds the browser engine/context. Big issue here is migrating users, especially around notification subscriptions, login state etc. I also enjoy the DX of tight integration and the UX is great for users who visit the website, have a PWA ready to go and then converting to TWA users, so I'm less keen to drop what works well.

Additional context
Happy to add any further context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant