ground-android icon indicating copy to clipboard operation
ground-android copied to clipboard

[Survey list] "No surveys available" shown on slow connections

Open gino-m opened this issue 1 year ago • 2 comments

The survey list eventually appears, but this message is misleading. Perhaps we should show a spinner below offline surveys while the connection isn't available?

gino-m avatar Nov 27 '24 17:11 gino-m

@shobhitagarwal1612 Tried using slow internet speed, spinner there for 8 secs, and then the real data came up. Hence, working as required.

Suggested approach:

  1. If the last emitted state by getSurveyList is an empty list, we can add a delay of 5sec or so, and then if any new data then update the UI else empty list UI.
  2. Do we need to have any retry or refresh button?

anandwana001 avatar Jan 16 '25 11:01 anandwana001

If the last emitted state by getSurveyList is an empty list, we can add a delay of 5sec or so, and then if any new data then update the UI else empty list UI.

If we are offline, then we should directly load from getSurveyList. If online, then we should check if offline surveys are available or not. If not, then wait for remote results to be returned before dismissing the spinner. Thoughts?

Do we need to have any retry or refresh button?

No, we don't a refresh button. The data is auto-refreshed as soon as the remote survey list is updated.

shobhitagarwal1612 avatar Jan 16 '25 11:01 shobhitagarwal1612