-
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
Utilize max bolus limit in Bolus module #100
Conversation
In the bolus module, if bolus amount is set over the `Max Bolus` set in `Pump Settings', disable the `Enact bolus` button, change it's text to `Max Bolus exceeded!`, and change alert dialog for external insulin. If bolus amount is set over 3x Max Bolus, disable the external insulin button as well. Cherry-picked from Artificial-Pancreas/iAPS@581e3e2 and Artificial-Pancreas/iAPS@7c7cafe but had to refactor the alert to get it to build Co-Authored-By: Jon B Mårtensson <53905247+jon-b-m@users.noreply.github.com>
Could we display the actual max bolus limit here? E.g something like “Max bolus (10U) exceeded” Also, perhaps use lowercase for “bolus”? I have not looked at the code or built at this time. |
We could, but there are already a bunch of localized strings for The reason |
I think the reason I’d like to see the actual max bolus setting here is that (if I remember correctly, I haven’t built this yet), the blousing is blocked until you enter an amount below that max setting. If you don’t remember what that was, it could take some trial and error to get to the bolusing (if you act wanted to bolus near the limit). Before these changes, the app would just (secretly) round down to the |
Guys, sorry to be the one to point this out: this PR is not about UI redesigning or adding new fancier UI elements or warnings, it’s about bringing a limit into the app that is missing, very much needed for safety, and was added between iAPS 2.3.x and 3.x in dev. Can we please see this through and add all (very good!) ideas around a better UI to the project board? |
@dnzxy Agreed regarding bigger changes like the screenshots above. But my initial suggestion was just to add printing of a variable (max bolus) in the one string. I think that’s not really in the fancy UI department 😊 |
If I‘m not mistaken (please correct me @MikePlante1 or Bjørn), this means having to change all the i18n strings to cater for the string literals of the max bolus variable value. Is that worth it for now if we are probably going to redesign most of this stuff anyways and will very likely be needing new translations in the process, too? If it’s easy and quick to do, let’s please add/change it 🤝. |
It’s very quick to copy paste in the English/english for all strings, meaning the translation for the string will be lost, but that’s a minor thing once we have a translation project up (probably Crowdin). We can also quickly get the languages that we collectively master correctly translated here before release too. |
@bjornoleh I don't really think it's needed, but I could add |
^Obviously the |
I would still like to see the max bolus setting in the string that currently says "Max Bolus exceeded!". But I don't see exactly how to do this myself just yet, and I won't find time to look closer during the next few days. Great if someone else can do this, but if not, I'm happy to accept the PR as is for now. |
Is |
FreeAPS/Sources/Localizations/Main/sv.lproj/Localizable.strings
Outdated
Show resolved
Hide resolved
Yes, I think this would be great! |
also revert duplicate localization (thanks @bjornoleh )
@bjornoleh The max bolus string has now been updated. I confirmed localizations still work with it by selecting Deutsch in a simulator. I also deleted the duplicate localization you pointed out. |
Thanks @MikePlante1! Merging this with two approvals. |
In the bolus module, if bolus amount is set over the Max Bolus set in Pump Settings, disable the Enact bolus button, and change its text to
Max Bolus exceeded! (>X)
whereX
is the value of the Max Bolus setting.Max Bolus is set to 10U for this test:
Cherry-picked from Artificial-Pancreas/iAPS@581e3e2 and Artificial-Pancreas/iAPS@7c7cafe but did not include external insulin parts since that no longer exists here.
This PR replaces #73 which was accidentally closed.