wordpress-mobile / wordpress-mobile/WordPress-Android
Improve Webview refresh behavior while offline
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 3.2k
- Forks
- 1.4k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 69
Description
Currently, the following scenario is not ideal:
- Open a Webview in the app, wait until it loads.
- Turn airplane mode on.
- Refresh the Webview.
- We get the Webview empty view "Page unavailable while offline".
In this case (but also in the case when the fetch fails, eg. network error), we should show the cached version and tell the user we couldn't refresh the view.
There is also a simpler solution but not perfect: we could prevent tapping the refresh button while offline, but there are other things that could trigger a refresh and this won't work in case of a fetch failure.
Related ticket https://github.com/wordpress-mobile/WordPress-Android/issues/10191
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Webview refresh flow and its offline and fetch-failure handling. Verify the cached view remains visible and that the UI tells the user the refresh failed in both airplane-mode and network-error cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100