nightscout / Trio

MIT License
45 stars 125 forks source link

Make use of Nightscout's provided display of Carbs + Protein + Fat in graph for meal entries #289

Closed aug0211 closed 3 weeks ago

aug0211 commented 3 weeks ago

Is your feature request related to a problem? Please describe.

Nightscout provides functionality to display carbs, protein, fat in it's main graph display. Trio has not implemented this. A very simple PR to address this is possible. This is useful for anyone who references carb/fat/protein entries in Nightscout for diabetes management.

Describe the solution you'd like

A very simple PR to add "fatInput" and "proteinInput" alongside the existing "carbInput". Note that this is partially implemented, with fat and protein set to nil. This solution just finishes that half-baked implementation to bring it home!

Describe alternatives you've considered

Writing custom code, or not doing this at all. Any new code would be unnecessary and would add complexity. Making use of the existing implementation is very straight-forward and follows the same pattern used for carbs. Not doing this would be silly, as it provides value for anyone who enters fat and protein in Trio (great feature with fat/protein conversion functionality!).

Additional context

*

image

Note - Nightscout renders protein before fat. I think most apps/systems in the DIY space tend to show fat before protein (Carbs / Fat / Protein). This rendering is part of Nightscout's implementation, and out of scope of what Trip controls.*

Technical Details

This implements existing code within Trio that simply set fat and protein to = nil. All we will be doing in the PR Needed here is passing along the already existing values for fat and protein, so that Trio sends them to Nightscout alongside Carbs.

User Impact

Any person who uses Trio with fat and protein entries, and who uses Nightscout to review entries will benefit from this.

bjornoleh commented 3 weeks ago

Resolved by #290