Skip to content
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
wants to merge 57 commits into
base: dev
Choose a base branch
from
Draft

Commits on May 26, 2024

  1. Override refactoring and additional functionnalities

    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.
    avouspierre committed May 26, 2024
    Configuration menu
    Copy the full SHA
    1f1e3bf View commit details
    Browse the repository at this point in the history
  2. Override refactoring and additional functionnalities

    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.
    avouspierre committed May 26, 2024
    Configuration menu
    Copy the full SHA
    7ac38f7 View commit details
    Browse the repository at this point in the history
  3. Override refactoring and additional functionnalities

    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.
    avouspierre committed May 26, 2024
    Configuration menu
    Copy the full SHA
    f1dedc1 View commit details
    Browse the repository at this point in the history
  4. fix when preset has no id

    fix when preset has no id
    avouspierre committed May 26, 2024
    Configuration menu
    Copy the full SHA
    4d2511f View commit details
    Browse the repository at this point in the history
  5. fix a concurrency issue about overrideObserver

    use async to update overrideObserver.
    avouspierre committed May 26, 2024
    Configuration menu
    Copy the full SHA
    89af4f0 View commit details
    Browse the repository at this point in the history
  6. Add a color for override

    Add a (purple) color for override
    fix the name of the class
    avouspierre committed May 26, 2024
    Configuration menu
    Copy the full SHA
    b5d5495 View commit details
    Browse the repository at this point in the history
  7. Fix a issue with duplicate ID target

    Fix a issue when you want to extend a current preset.
    avouspierre committed May 26, 2024
    Configuration menu
    Copy the full SHA
    cf7fdc5 View commit details
    Browse the repository at this point in the history
  8. improve Override Observer

    Improve override Observer to avoid to have too many call to core date.
    avouspierre committed May 26, 2024
    Configuration menu
    Copy the full SHA
    0cfb7fc View commit details
    Browse the repository at this point in the history
  9. Override on Apple Watch

    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
    avouspierre committed May 26, 2024
    Configuration menu
    Copy the full SHA
    dd483d9 View commit details
    Browse the repository at this point in the history

Commits on May 31, 2024

  1. Limit carb equivalents of FPU conversion to 1.0 grams:

    * 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.
    dnzxy authored and avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    229c701 View commit details
    Browse the repository at this point in the history
  2. Edit profile overrides - Enable edit of all settings and/or name for …

    …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
    dsnallfot authored and avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    be6a284 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5258cb4 View commit details
    Browse the repository at this point in the history
  4. Refactor to avoid duplicated code

    - presetPopover and editPresetPopover
    dsnallfot authored and avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    9341509 View commit details
    Browse the repository at this point in the history
  5. Fix disabled save-buttons

    dsnallfot authored and avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    f710d47 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    74e0821 View commit details
    Browse the repository at this point in the history
  7. Remove unused alertstring

    dsnallfot authored and avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    20aa517 View commit details
    Browse the repository at this point in the history
  8. Draft 2.0 - Move settings inside edit pop-up

    - More intuitive workflow
    dsnallfot authored and avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    ee245ca View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    19934f4 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    5df0eee View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    75c23d0 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    9185612 View commit details
    Browse the repository at this point in the history
  13. remove unused vars

    dsnallfot authored and avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    3ce0ef1 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    c4f14a9 View commit details
    Browse the repository at this point in the history
  15. Improve UX with what settings are populated in root and edit views Wh…

    …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
    dsnallfot authored and avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    79e658d View commit details
    Browse the repository at this point in the history
  16. One more thing

    - Change Profile Editor Slider Numbering Positioning (reuse @dnzxy old iAPS commit )
    dsnallfot authored and avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    475e9de View commit details
    Browse the repository at this point in the history
  17. Edit Temp Targets

    - 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
    dsnallfot authored and avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    e8c841f View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    2829468 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    54eba5d View commit details
    Browse the repository at this point in the history
  20. secondary text color

    dsnallfot authored and avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    eeeae6e View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    d4477b8 View commit details
    Browse the repository at this point in the history
  22. Some fixes (Part 1 of 2):

    - Fix mgdl->mmol rounding when using experimental slider
    - Also rearrange sliders below % text in experimental view (Reusing @dnzxy ols iAPS PR 321)
    - Reset all changed values/sliders to 0 if cancelling in edit view
    . Additional commit regarding experimental slider in edit view  upcoming soon in part 2
    dsnallfot authored and avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    2ebd2d8 View commit details
    Browse the repository at this point in the history
  23. More fixes (Part 2 of 2):

    - Experimental slider now available also in editPresetPopover view
    - All conversion mgdl/mmol tested and seems to work correct
    - You can switch between normal and experimental view freely while contemplating your edit
    - Additional features and UI redesigned excluded from scope
    dsnallfot authored and avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    a95c9b4 View commit details
    Browse the repository at this point in the history
  24. Calculate insulin % based on saved preset target

    - when entering edit mode. This way you can choose "normal" target/duration entries or use the slider to do your edits
    dsnallfot authored and avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    d5b30de View commit details
    Browse the repository at this point in the history
  25. feat(issue templates): Update with different styling

    To make the Issues clearer to read
    Sjoerd-Bo3 authored and avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    99471b4 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    cc8ec73 View commit details
    Browse the repository at this point in the history
  27. Update feature-request.md

    Sjoerd-Bo3 authored and avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    1869b18 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    5628392 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    183dc8e View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    f212b89 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    98e51e5 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    3f8460e View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    9620415 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    654c0e4 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    1009741 View commit details
    Browse the repository at this point in the history
  36. Override refactoring and additional functionnalities

    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.
    avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    a3237e3 View commit details
    Browse the repository at this point in the history
  37. Update override with new overrideprofileview

    Update override profile view with integration of the new editor function.
    sort the preset by name in the override storage
    avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    5f0359b View commit details
    Browse the repository at this point in the history
  38. Fix color profil

    avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    1f9a677 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    5656423 View commit details
    Browse the repository at this point in the history
  40. fix error after merging

    avouspierre committed May 31, 2024
    Configuration menu
    Copy the full SHA
    265b0b3 View commit details
    Browse the repository at this point in the history
  41. Bug fix in Update OverrideStorage.swift

    <id: preset.id ?? UUID().uuidString,>
    Breaking bug fix, provide UUID().uuidString when preset.id is null
    aug0211 authored May 31, 2024
    Configuration menu
    Copy the full SHA
    19f4611 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2024

  1. Exercice --> Exercise

    •Change "exercice" to "exercise" throughout code - needed for NS to process properly as an exercise event
    •Did not modify FR localization files
    aug0211 committed Jun 1, 2024
    Configuration menu
    Copy the full SHA
    50fd941 View commit details
    Browse the repository at this point in the history
  2. Override optimisation

    - Observer update to reduce the call of core data
    - manage a id issue between preset and override temp
    avouspierre committed Jun 1, 2024
    Configuration menu
    Copy the full SHA
    49e19d7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    30c310f View commit details
    Browse the repository at this point in the history
  4. fix padding issue in light mode for override edit

    fix proposed by @dnsallfot
    avouspierre committed Jun 1, 2024
    Configuration menu
    Copy the full SHA
    58bfb82 View commit details
    Browse the repository at this point in the history
  5. Update override with improvements asked by Trio team

    - remove try? with core date save
    - use Profile instead Profil
    - manage the store of enabled attribute in regard of current()
    - other minor code improvements
    avouspierre committed Jun 1, 2024
    Configuration menu
    Copy the full SHA
    aad337d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1651ec6 View commit details
    Browse the repository at this point in the history
  7. update following the update of override

    - update overrideprofile name
    avouspierre committed Jun 1, 2024
    Configuration menu
    Copy the full SHA
    e3eb22e View commit details
    Browse the repository at this point in the history