nightscout / Trio

MIT License
46 stars 130 forks source link

Override refactor + override in charts + override in Watch #219

Closed avouspierre closed 1 month ago

avouspierre commented 1 month ago

The PR includes a large refactoring of the swift part of override/profile functions :

  • Use of swiftInject (dependency injection) with the use of protocol class in the code
  • Use of MVP principes, in particular not use of direct coredata in view class
  • Use of a proxy model class between coredata and the app to manage changes of core data
  • Use of the pattern of observe to refresh data/view/uploads

This PR do NOT change the logic with oref and the interface of override informations in oref. This PR do NOT require a update of trio-oref code.

TODO : Changes the shortcuts after merging with PR #144 and add watch for overrides.

The PR replaces the PR #178 with the functionality for Apple Watch.

override display override in NS
Simulator Screenshot - iPhone 15 - 2024-05-07 at 21 43 34 CleanShot 2024-05-07 at 21 44 16
CleanShot 2024-05-19 at 20 47 23 CleanShot 2024-05-19 at 20 50 17
mountrcg commented 1 month ago

@avouspierre could there be a function that for at least a timewise unrestricted override to copy the new basal profile to the pump? Of course that needs another copy to pump call when override is cancelled!

dnzxy commented 1 month ago

This PR seems to be under active development and has elements that collide with #235 and #236 respectively. May I make two proposals:

  1. Let’s put this in Draft mode for now until both the linked PRs are done and we know how the UX will be like before you refactor this.
  2. Split this PR so that all elements that regard the watch app for Trio are in a second PR. This PR is really big and hard to review now.
avouspierre commented 1 month ago

This PR seems to be under active development and has elements that collide with #235 and #236 respectively. May I make two proposals:

  1. Let’s put this in Draft mode for now until both the linked PRs are done and we know how the UX will be like before you refactor this.
  2. Split this PR so that all elements that regard the watch app for Trio are in a second PR. This PR is really big and hard to review now.

OK. I create new PR with different splits.