-
Notifications
You must be signed in to change notification settings - Fork 407
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
Add toggle to allow downloads from Nightscout (And improve NS Config UI) #221
Conversation
Treatments: Carbs and Temp Targets - and also announcements
@Sjoerd-Bo3 @aug0211 @MikePlante1 This is just a PR for the download treatments toggle. No refactoring of the "allow remote bolus" toggles that was also discussed in discord. That could be of course be added, but I realized that its probably good to discuss if we want to keep the possibility to allow carbs and temp targets downloads, but block remote commands for bolusing for instance. Then we need to keep the allow remote control-toggle (but maybe rename it somehow) |
@dsnallfot what happens if we enable downloads but disable the other remote treatments toggle? I haven’t fully grokked how these work together yet. |
@aug0211 if the download toggle is off, no treatments or announcements gets fetched. If the download toggle is on, treatments get fetched. But announcements get fetched only if the remote control toggle also is on. To make this better we could disable and hide the "remote control" toggle when download is off? What do you think? |
Converted to draft until decided if I should also hide the remote control toggle/section when download is off. |
- Imroved structure and UX workflow when configuring Nightscout settings - Added Connect, Upload, Fetch views with relevant settings per view - Import settings and backfill glucose buttons kept in rootview since they are more frequently used - Added footers for many sections to explain what the toggles actually do - Loacalizaation needed for new textstrings. Just updated that with small changes in already existing strings
Demo after latest commit 6e187c1 Simulator.Screen.Recording.-.iPhone.13.mini+.-.2024-05-21.at.20.05.36.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me overall. Great work. Maybe add the new isDownloadEnabled
settings to the defaults file as well? Small comment regarding multiline text.
FreeAPS/Sources/Modules/NightscoutConfig/View/NightscoutFetchView.swift
Outdated
Show resolved
Hide resolved
Ok. I thought I had added it everywhere? (Used the existing |
I meant this file https://github.com/dsnallfot/Trio/blob/dev-test-stuff/FreeAPS/Resources/json/defaults/freeaps/freeaps_settings.json but just realized I missed that you had added it already. Please disregard that comment 😅 |
- Break up long strings in several text elements (enables re-use of some already existing translations) - Change button text "Connect" to "Connect to Nightscout" in NightscoutConnectView
FreeAPS/Sources/Modules/NightscoutConfig/View/NightscoutConfigRootView.swift
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved!
I was a bit thrown off by how many localization updates were in here, but they are
- trivial in nature (capitalization)
- consistent/intentional
- related to the NS options focused on across this PR
Let's go! 🚢
Change the "rotation hint" for watch bolus confirmation
Linked to issue #198
Adds a Download toggle (Default setting false) that needs to be flipped on to allow any Nightscout download of Treatments (Carbs, Temp Targets) and Announcements (Remote commands for pump, basal, overrides and bolus).
When the toggle is disabled the functions fetchCarbs, fetchTempTargets and fetchAnnouncements is blocked from running (the same way that the toggle for Upload blocks upload and deletion of Treatments, preferences and settings.
Header renamed from "Allow Uploads" to "Allow up- and downloads"
This PR do not change the current Allow remote control of Trio toggles since there could be room for discussion if disabling bolus commands maybe should have its own toggle (ie that you want to block Remote bolus announcements but still want to allow fetching carbs and temp targets).