-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Override watch #239
Draft
avouspierre
wants to merge
57
commits into
nightscout:dev
Choose a base branch
from
avouspierre:override-Watch
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Override watch #239
+1,588
−651
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The PR includes a large refactoring of the swift part of override/profile functions : - Override is stored in override core data, including history - Override preset is stored in overridepreset core data - Add the display of the override in main graph - add the upload of override as a exercice in Nightscout - Fix nightscout#145 - improve the management of indefinate override / stop of indefinate override - modify the code to respect the Ivan’s patterns of the app : - 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 - add a core data unit tests allowing to add tests for coredata with a in-memory datastore for tests. - test for overrideStorage available 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 nightscout#144 and add watch for overrides.
The PR includes a large refactoring of the swift part of override/profile functions : - Override is stored in override core data, including history - Override preset is stored in overridepreset core data - Add the display of the override in main graph - add the upload of override as a exercice in Nightscout - Fix nightscout#145 - improve the management of indefinate override / stop of indefinate override - modify the code to respect the Ivan’s patterns of the app : - 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 - add a core data unit tests allowing to add tests for coredata with a in-memory datastore for tests. - test for overrideStorage available 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 nightscout#144 and add watch for overrides.
The PR includes a large refactoring of the swift part of override/profile functions : - Override is stored in override core data, including history - Override preset is stored in overridepreset core data - Add the display of the override in main graph - add the upload of override as a exercice in Nightscout - Fix nightscout#145 - improve the management of indefinate override / stop of indefinate override - modify the code to respect the Ivan’s patterns of the app : - 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 - add a core data unit tests allowing to add tests for coredata with a in-memory datastore for tests. - test for overrideStorage available 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 nightscout#144 and add watch for overrides.
fix when preset has no id
use async to update overrideObserver.
Add a (purple) color for override fix the name of the class
Fix a issue when you want to extend a current preset.
Improve override Observer to avoid to have too many call to core date.
Add the capacity to manage override with Apple Watch : - allows to select a override preset (or a temp target) in AW - allows to cancel a current override preset or specific override (idem for temp target) in AW - add a color profil for override profil in AW - Fix some minor code in AW
* Extracted the FPU processing logic into a new helper function `processFPU`, which ensures that each carb equivalent is at least 1.0 grams by adjusting the interval if necessary. * Added logic in new helper function`processFPU` to adjust the interval when the calculated carb equivalent is less than 1.0 grams. * Adjusted spread over time by computing duration again so total carb equivalents remain consistent * Refactored the main `storeCarbs` function to be more concise and easier to understand. * Introduced detailed docstrings to explain the purpose and functionality of the `storeCarbs`, `processFPU`, and `calculateComputedDuration` functions.
…already saved profile overrides - Swipe left to edit or delete - Get list of all settings included in the override when saving a new one or editing an existing one
- presetPopover and editPresetPopover
- More intuitive workflow
…en .onDisappear from the editPresetPopover back to root view behave the same way as .onAppear in root view when coming from home screen, that is: - If ongoing override, populate settings with the ongoing override setting. - If no ongoing override, populate settings with user defaults And when entering edit by selecting edit on any override -> populate the settings in edit mode with that selected overrides settings as starting point for the edit Refactor code based on input from @avouspierre
- Change Profile Editor Slider Numbering Positioning (reuse @dnzxy old iAPS commit )
- Enable editing Name, Target and Duration for preset temp targets - Swipe left to edit or delete - Replaced display of "Low target - High target" in presetView since only low target is used
To make the Issues clearer to read
The PR includes a large refactoring of the swift part of override/profile functions : - Override is stored in override core data, including history - Override preset is stored in overridepreset core data - Add the display of the override in main graph - add the upload of override as a exercice in Nightscout - Fix nightscout#145 - improve the management of indefinate override / stop of indefinate override - modify the code to respect the Ivan’s patterns of the app : - 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 - add a core data unit tests allowing to add tests for coredata with a in-memory datastore for tests. - test for overrideStorage available 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 nightscout#144 and add watch for overrides.
Update override profile view with integration of the new editor function. sort the preset by name in the override storage
<id: preset.id ?? UUID().uuidString,> Breaking bug fix, provide UUID().uuidString when preset.id is null
•Change "exercice" to "exercise" throughout code - needed for NS to process properly as an exercise event •Did not modify FR localization files
- Observer update to reduce the call of core data - manage a id issue between preset and override temp
fix proposed by @dnsallfot
- remove try? with core date save - use Profile instead Profil - manage the store of enabled attribute in regard of current() - other minor code improvements
- update overrideprofile name
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Override on Apple Watch in extension of the PR #238.
Add the capacity to manage override with Apple Watch :