opensrp / fhircore

FHIR Core / OpenSRP 2 is a Kotlin application for delivering offline-capable, mobile-first healthcare project implementations from local community to national and international scale using FHIR and WHO Smart Guidelines on Android.
https://smartregister.org
Apache License 2.0
54 stars 41 forks source link

Add a Sync Progress component for subsequent sync #3295

Closed Gental-Giant closed 1 month ago

Gental-Giant commented 4 months ago

Problem we are trying to solve Currently, when a user is conducting sync, initial or subsequent, they are hard pressed to know the progress of the sync until it is completed. This does not make for a good user experience; the user may abandon the sync process or sometimes think there is somethign wrong with the application; to them, it seems like there is nothing happening.

User Story As a user, I want to see the sync progress when interacting with the app. I want to decide whether to proceed with sync as I do other things or simply wait for it to complete. I want to be aware whether there are processes happening on the app even when it seems like nothing is happening. This is especially necessary when I have a lot of data on my device that may take some time to complete syncing.

Describe the feature request. We would like to update the UI/UX for manual sync. This would be done by updating the UI to allow users to know when they have unsynced data, and track sync progress and final status.

This ticket is to specifically add tracking and updating the subsequent sync status.

Implementation

image

Acceptance criteria All the items above work as they should.

Area path

  1. Login to the app
  2. Open Navigation bar
  3. If there is no unsyced data, sync button should appear as on image (a)
  4. If there are unsyced data, sync button should appear as on image (b)

Implementation plan (For Engineers) The plan for implementing the solution e.g. via a description or a check list for the various ordered tasks that will need to be completed. i.e. Describe how you intend to solve the problem

dubdabasoduba commented 3 months ago

@Gental-Giant @AnnieMungai @HenryRae Do you mind giving a use case on why we would want to cancel sync?

This is based on the UI Mocks above

HenryRae commented 3 months ago

These are very general, not project based.

  1. One might want to cancel sync if errors are found in a patient record. To prevent incorrect data from being uploaded, they might want to cancel, edit record, and re-initiate sync.
  2. During network issues, one might want to cancel ongoing sync to avoid the long wait and retry next day.
  3. Maybe due to unanticipated data volume, one might want to cancel ongoing sync to plan for sync during off-peak hours.
  4. Very UX based. Misclicking manual sync, we should definitely allow user to cancel...
Gental-Giant commented 3 months ago

To add to @HenryRae second point,

  1. During network issues, one might want to cancel ongoing sync to avoid the long wait and retry the next day.

Sometimes based on network connectivity users switch networks. Instead of waiting for sync to fail then retry might make more sense for users to cancel and retry.

Overall, I think having the option to cancel gives users the sense of being in control.

AnnieMungai commented 3 months ago

@Gental-Giant @AnnieMungai @HenryRae Do you mind giving a use case on why we would want to cancel sync?

This is based on the UI Mocks above

@dubdabasoduba Anticipated use case in the field:

  1. User needs to free up device RAM while performing other tasks on the app - canceling/pausing sync will ensure user is not .lsowed down.
  2. The internet is slow and sync is taking too long - user may choose to cancel/pause sync in this instance and get back to the sync when the internet speed is better.
  3. The user battery may be running low so they need to pause/stop sync to preserve battery life for other key activities.

However, all these scenarios beg the question - why not simply disconnect the device from the internet? Note! in some instances, the users are prevented from conducting any admin tasks on the device including connecting and disconnecting from internet etc. This is an edge case.

AnnieMungai commented 2 months ago

PM comments

EUSM 2.0.0.Rc4