Skip to content

Feature request: Offline queued method count and sync progress count #8

@wildhart

Description

@wildhart

Thanks for making isSyncing() available, and reactive/trackable!

I would like to diplay to my offline user:

  • When offline: how many methods are in the sync queue.
  • While syncing: how many methods have been synced / percentage sync progress.

I propose a new reactive/trackable method offlineStatus() which returns:

{
    queueLength: number,
    isSyncing: boolean, // this is a copy of the isSycing() method, just so we don't need to use both?
    syncCount: number,
    initialSyncCount: number,  
}

The purpose of the initialSyncCount number is so we can diplay the sync status as Syncing... 3 of 21, or Syncing... 10%. As the sync proceeds the queueLength would decrease, but the initialSyncCount would stay the same - just to make it easier to diplay the progress without having to remember the initial queue length. Looking at your code I think this would be easy to provide.

I'm happy to work on a PR if you want? If so, feel free to suggest alternative method name & response format, since this will be your API to maintain!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions