nightscout / Trio

Trio - an automated insulin delivery system for iOS based on the OpenAPS algorithm with adaptations.
https://docs.diy-trio.org/en/latest/
MIT License
95 stars 485 forks source link

Allows to open CGM setting view when tapping on the homescree #24

Closed avouspierre closed 6 months ago

avouspierre commented 7 months ago

Change the behavior of the tap of the BG on the home screen :

The beahavior is compliance with Pump tap.

CleanShot 2024-03-20 at 06 34 35

Sjoerd-Bo3 commented 7 months ago

Okay, I get that it is uniform behaviour. But I use G7 and I never use the settings screen ever. Only tap bg to go to the dexcom app to start it up or wake it up. I don’t get the use case for the settings. Please enlight me😂

AndreasStokholm commented 7 months ago

I'm with @Sjoerd-Bo3 here. I touch the settings for CGM maybe once every 2 months, but I do use the CGM reading to quickly go to the Dexcom app. I'd like to understand what the use case for going to settings is too 😄

avouspierre commented 7 months ago

Arg ! I found the similar behavior with Pump (and with Loop) could be important and when I use G6 or freestyle, I prefer to go to the CGM settings because it's the only solution to know the age of my transmitter (G6 with anubus) and more useful information with Libre.

I can propose to add a option (toggle) in CGM like " Tap on the CGM open directly the app" ? @AndreasStokholm @Sjoerd-Bo3 ?

For G6, the default app is Dexcom G6 or xDRIP ?

Sjoerd-Bo3 commented 7 months ago

A toggle works for me

AndreasStokholm commented 7 months ago

Toggle works for me too. I know that G6 can use both xDrip and the Dexcom G6 app. Not sure how the config around that works though. @dnzxy can you maybe weigh in?

bjornoleh commented 7 months ago

Arg ! I found the similar behavior with Pump (and with Loop) could be important and when I use G6 or freestyle, I prefer to go to the CGM settings because it's the only solution to know the age of my transmitter (G6 with anubus) and more useful information with Libre.

I can propose to add a option (toggle) in CGM like " Tap on the CGM open directly the app" ? @AndreasStokholm @Sjoerd-Bo3 ?

For G6, the default app is Dexcom G6 or xDRIP ?

For G6, I'd have tapping the BG value open the Dexcom G6 app. And of course, if Xdrip4iOS is selected as CGM, go to that app.

The combo of G6 as CGM selected in OiAPS, G6 app as receiver app and xdrip in "listening mode" does not really involve OiAPS in any way, and can be disregarded? I think that combination would perhaps be used by some to get xdrip alarms or xdrip statistics, but OiAPS would currently not know about this.

bjornoleh commented 7 months ago

On a related note, I have disliked the dual functionality of opening the CGM app and dealing with alarms by short tap on the BG value. For myself (who are not using the built in alarms), I have changed the behaviour to always open the CGM app, and only on long press open the alarms dialogue (which is never really used). I'd suggest a different shortcut for alarms, for those that use this. Perhaps something to consider for the new UI (outside of the scope here). But in general, long presses is not my favourite (it's fine for forced loop, once you know about it).

avouspierre commented 7 months ago

@bjornoleh I can propose in this PR to have the same behavior even if you are low BG with tap --> open CGM and snooze alarm --> long tap.

bjornoleh commented 7 months ago

For the use case of accessing the sensor age within OiAPS, we could do this a different way than by opening CGM settings:

For the sensors that support this, we could display sensor age (SAGE) directly. Possibly by only displaying an icon or similar visible notification towards the end of the sensor life. I think Jon added something similar for pump age, a clock icon of sorts? Then perhaps a user setting for when the notification/icon will appear (after xx days/hours).

In Loop, I think they added a small indicator line whose length is analogous to the sensor life or remaining sensor life. I remember that there were discussions about difficulties in understanding the graphical representation, not sure what they have landed on now.

bjornoleh commented 7 months ago

@bjornoleh I can propose in this PR to have the same behavior even if you are low BG with tap --> open CGM and snooze alarm --> long tap.

Yes, that would work for me (it's what I did), but I never used the alarms, so those that do use them should also weigh in :-)

dnzxy commented 7 months ago

Admittedly haven’t read all comments. From a standardization point of view, I welcome this behavior simply because for NS and xDrip4iOS (other 3rd party apps) this did not work like it does for G6 and G7 stock apps.

I do have to say I find it very weird though that the CGM app opens anyways. It doesn’t really make sense to me and accidentally tapping the glucose value breaks the "app user interaction“ and sends you to another app.

I also really really dislike the double functionality of glucose values paired with the absolutely unnecessary glucose push notifications ("alerts") of the app. When there is no alert happening, tapping the glucose sends you to the app and long pressing it opens the snooze menu. When there is an alert, tapping it opens the snooze menu and long pressing will take you to the CGM app. It’s such a nonsensical UX and super unnecessary to exist in the first place 😂

edit to add: @bjornoleh already mentioned this, I concur!

edit 2 to add: long pressing is also bad UI/UX. user actions that are necessary, such as alert snoozing or other functionality, should always be intuitive and visible to the user. Something like hiding away functionality with a long press is a thing that is not good and anyone involved in HCI would scold you for that type of functionality 😂

AndreasStokholm commented 7 months ago

I think what you're saying makes a lot of sense @dnzxy - I could be convinced to unlearn going to an external app by tapping the glucose value.

flyingpie101 commented 7 months ago

I am with @dnzxy here. I have always found it weird to launch other apps. I always expect the tapping to either bring me to settings for that 'feature' or to bring up a more detailed view of the tappable area.

dnzxy commented 7 months ago

I am with @dnzxy here. I have always found it weird to launch other apps. I always expect the tapping to either bring me to settings for that 'feature' or to bring up a more detailed view of the tappable area.

Shared expectation here. I always expect to be taken to the detail view of Settings > CGM just like it works when you tap the pump related info and it takes you to that section of the settings.

bjornoleh commented 7 months ago

For the case of Xdrip, there’s not much to display in terms of settings, but maybe it could be appropriate to add a button to open the app from here?:

image

It could actually be convenient to easily see that screen, to see that the transmitter BT address is populated (unlike in my screenshot on a non looping phone)

bjornoleh commented 7 months ago

I checked in Loop, and with NS as CGM, the NS site is opened. With G6 the settings screen is opened, which has an “Open App” button, G7 and Libre settings screens doesn’t have such a button (a PR to LoopKit might get that in place if needed).

Loop also lets you set up a CGM by tapping the same are if not already configured

marionbarker commented 7 months ago

I have read all the comments and my preference is for consistency, in other words a tap on CGM value on main screen takes you to the (Loop or APS) settings screen. There should be easy access on the settings screen to take you to the source app as well.

Regarding G7 - there already is a LoopKit G7SensorKit PR. I just updated my comments to request a change to move the Open Dexcom App higher on the screen. This comment contains a graphic of the proposed modification to the PR.

https://github.com/LoopKit/G7SensorKit/pull/21#issuecomment-2009840433

avouspierre commented 7 months ago

What I can implement :

dnzxy commented 7 months ago

What happens for NS? Still opens NS site?

avouspierre commented 7 months ago

for NS, open the website

dnzxy commented 7 months ago

Why not make it consistent and navigate here? image

Maybe add a „GO TO NIGHTSCOUT“ button there.

avouspierre commented 7 months ago

In this case, the behavior will be :

+1 : 👍 or 👎

dnzxy commented 7 months ago

Side note: We should probably delete Scrappy‘s / Marc Fournier‘s data collection link too.

dnzxy commented 7 months ago

@avouspierre since you are working on this, may I suggest another change that goes in the same direction? What do we think about having a real "NO CGM PAIRED" state, where Nightscout isn’t just the general fallback? I always found it an odd UX, that even on a fresh install, it looks as if there is a CGM source in place, i.e. Nightscout, even if the user hasn’t entered the NS credentials.

What do you think?

avouspierre commented 7 months ago

@dnzxy I added a none option. So now in a fresh install, no CGM is associated by default. Just to find a logo for the Home Screen like Loop to say « no CGM »..

dnzxy commented 7 months ago

@dnzxy I added a none option. So now in a fresh install, no CGM is associated by default. Just to find a logo for the Home Screen like Loop to say « no CGM »..

@avouspierre awesome! There is a super fitting SF Symbol sensor.tag.radiowaves.forward.fill that looks like a great abstract type CGM:

image
bjornoleh commented 6 months ago

These changes has already been introduced in alpha by #89 , closing this PR