platelet-app / platelet

Dispatch system for emergency volunteer couriers.
https://platelet.app
Apache License 2.0
38 stars 10 forks source link

Improvements to loading and offline support #74

Closed duckbytes closed 2 years ago

duckbytes commented 2 years ago

This pull request removes the dependence on the data store ready event before loading views.

It makes use of the modelSynced event to manage queries, but doesn't prevent queries from being made when the component first mounts.

This means the app can continue to work when opened while offline.

It adds a circular loading animation to the top right to indicate sync progress.

codecov-commenter commented 2 years ago

Codecov Report

Merging #74 (88462ae) into master (a2c950b) will increase coverage by 0.21%. The diff coverage is 44.97%.

@@            Coverage Diff             @@
##           master      #74      +/-   ##
==========================================
+ Coverage   37.46%   37.67%   +0.21%     
==========================================
  Files         240      241       +1     
  Lines        7604     7596       -8     
  Branches     1916     1898      -18     
==========================================
+ Hits         2849     2862      +13     
+ Misses       4271     4264       -7     
+ Partials      484      470      -14     
Impacted Files Coverage Δ
...rc/navigation/Components/LightToggleProfileMenu.js 70.83% <ø> (ø)
src/redux/Reducers.js 63.70% <ø> (ø)
src/redux/awsHubListener/awsHubListenerSagas.js 5.71% <0.00%> (-0.74%) :arrow_down:
src/scenes/AdminControl/DeliverableTypeChips.js 0.00% <0.00%> (ø)
...rc/scenes/AdminControl/RiderResponsibilityChips.js 0.00% <0.00%> (ø)
src/scenes/Dashboard/Dashboard.js 0.00% <ø> (ø)
...scenes/Dashboard/components/DashboardDetailTabs.js 50.00% <ø> (-0.73%) :arrow_down:
src/scenes/LocationDetail/LocationDetail.js 0.00% <0.00%> (ø)
src/scenes/LocationsList.js 0.00% <ø> (ø)
src/scenes/Task/TaskDialogCompact.js 0.00% <0.00%> (ø)
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a2c950b...88462ae. Read the comment docs.