wordpress-mobile / wordpress-mobile/WordPress-Android

Improve Webview refresh behavior while offline

Open
#10,403 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Status] Stale [Type] Enhancement Offline Support Webviews
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.