Add an option to enable IOB in the mainline #452

Merged
merged 25 commits into from Mar 8, 2015

Conversation

Projects
None yet
6 participants
Owner

jasoncalabrese commented Mar 1, 2015

screen shot 2015-03-01 at 11 12 00 am

Like the Care Portal and Raw Data this feature will need to be enabled using the ENABLE env var. For example: ENABLE="careportal rawbg iob"

This will use a treatment profile or default to a DIA of 3 hours. A UI for setting the treatment profile is begin working on with #439

This also make IOB available to the pebble endpoint

Jason Calabrese and others added some commits Sep 25, 2014

@jasoncalabrese Jason Calabrese forgot to git add some profile api files ea1dbcc
@jasoncalabrese Jason Calabrese no POSTs yet 7653ef5
@jasoncalabrese Jason Calabrese more cherry-picking and porting of the profile api/storage from iob-cob
6080f67
@jasoncalabrese jasoncalabrese start getting browserify-express hooked up to expose a shared IOB module 7f550b8
@jasoncalabrese jasoncalabrese Merge branch 'wip/enable-profile' into wip/enable-iob 91365a7
@jasoncalabrese jasoncalabrese use IOB module to display IOB on th chart
ba05243
@jasoncalabrese jasoncalabrese removed debugs
d9f0c4c
@jasoncalabrese jasoncalabrese now using new IOB module for /pebble
a693304
@jasoncalabrese jasoncalabrese clean up
85a19c7
@jasoncalabrese jasoncalabrese only load treatments and profile if iob is enabled 5a13393
@jasoncalabrese jasoncalabrese more clean up
ee9dcae

Coverage Status

Coverage decreased (-11.85%) to 58.97% when pulling ee9dcae on wip/enable-iob into d616b6c on dev.

Coverage Status

Coverage decreased (-11.85%) to 58.97% when pulling ee9dcae on wip/enable-iob into d616b6c on dev.

@jasoncalabrese jasoncalabrese added mocks for treatments and profile so the pebble test doesn't fail
127e4f5

Coverage Status

Coverage decreased (-2.29%) to 68.53% when pulling 127e4f5 on wip/enable-iob into d616b6c on dev.

@jasoncalabrese jasoncalabrese very basic IOB test
0aea8a7

Coverage Status

Coverage increased (+0.99%) to 71.81% when pulling 0aea8a7 on wip/enable-iob into d616b6c on dev.

Owner

jasoncalabrese commented Mar 1, 2015

Need to test this on azure, and make sure the bundle can be written, etc

@dduugg dduugg commented on an outdated diff Mar 1, 2015

@@ -0,0 +1,80 @@
+'use strict';
+
+function calcTotal(treatments, profile, time) {
+
+ console.info("trying to calc");
+
+ var iob = 0
+ , activity = 0;
+
+ if (!treatments) return {};
+
+ if (typeof profile === 'undefined') {
@dduugg

dduugg Mar 1, 2015

Contributor

Just curious, is this any different from if (profile === undefined) { (which is more readable)?

@dduugg dduugg commented on an outdated diff Mar 1, 2015

@@ -43,7 +43,8 @@
"pushover-notifications": "0.2.0",
"sgvdata": "0.0.2",
"socket.io": "^0.9.17",
- "git-rev": "git://github.com/bewest/git-rev.git"
+ "git-rev": "git://github.com/bewest/git-rev.git",
+ "browserify-express": "^0.1.4"
@dduugg

dduugg Mar 1, 2015

Contributor

consider using npm install <dependency> --save or manually slotting this alphabetically — it will simplify future diffs.

jasoncalabrese added some commits Mar 6, 2015

@jasoncalabrese jasoncalabrese new pill display for BG delta and IOB
aa9233b
@jasoncalabrese jasoncalabrese Merge branch 'dev' into wip/enable-iob
508d582
Owner

jasoncalabrese commented Mar 6, 2015

Trying out a new pill based display for the BG delta and IOB, these don't get the strikethrough style in retro mode.

iob-pill-noalarm

iob-pill-withalarm

iob-pill-retro

Contributor

jimsiff commented Mar 6, 2015

I like that… looks really good. One thing I noticed with the delta and IOB below BG and trend… the straight down arrow clips IOB in the older style. Not sure if it happens with your new pill design.

On Mar 6, 2015, at 12:34 AM, Jason Calabrese notifications@github.com wrote:

Trying out a new pill based display for the BG delta and IOB, these don't get the strikethrough style in retro mode.

https://cloud.githubusercontent.com/assets/751143/6522277/fa9a5ea2-c397-11e4-9d00-d10adf582187.png
https://cloud.githubusercontent.com/assets/751143/6522276/fa982466-c397-11e4-8642-3f9a27ca5e52.png
https://cloud.githubusercontent.com/assets/751143/6522275/fa8df8b0-c397-11e4-989d-fe5118c1fa2e.png

Reply to this email directly or view it on GitHub #452 (comment).

Contributor

francescaneri commented Mar 6, 2015

image

Contributor

francescaneri commented Mar 6, 2015

Hi Jason, you can separate them a thread? Thanks Matteo

Contributor

francescaneri commented Mar 6, 2015

image

Contributor

francescaneri commented Mar 6, 2015

....with the oblique arrow are lowered.

Contributor

francescaneri commented Mar 6, 2015

image

Owner

jasoncalabrese commented Mar 6, 2015

This gets even harder when you add COB and BGI. Also want room for uploader battery, noise level, etc. We'd have options to pick what you want to see, but still more pills. And then to keep it responsive from desktop to tablet to iPhone4.

We really need to move to fixed sizes and get rid the % based font sizes. We can have multiple sizes for different device targets.

Owner

jasoncalabrese commented Mar 6, 2015

Think we'll need multiple lines, and on a narrow screen 3

and iob cob bgi

and raw iob cob bgi

Contributor

jimsiff commented Mar 6, 2015

Hey Jason,

I like the look of the pills. It really cleans up the interface.

For my eyes, the grey on black colors and small fonts don't provide a lot of contrast. I have to look harder at the data to read it vs the current green / yellow / red on black.

Would white on black look out of place?

Jim

On Mar 6, 2015, at 10:11 AM, Jason Calabrese notifications@github.com wrote:

Think we'll need multiple lines, and on a narrow screen 3

https://cloud.githubusercontent.com/assets/751143/6530728/4953ac42-c3e8-11e4-989b-a0c03742b5ff.png
https://cloud.githubusercontent.com/assets/751143/6530834/278e2db6-c3e9-11e4-9889-506703936a04.png

Reply to this email directly or view it on GitHub #452 (comment).

Contributor

ELUTE commented Mar 6, 2015

I was thinking the exact same thing Jim

On Mar 6, 2015, at 1:29 PM, Jim Sifferle notifications@github.com wrote:

Hey Jason,

I like the look of the pills. It really cleans up the interface.

For my eyes, the grey on black colors and small fonts don't provide a lot of contrast. I have to look harder at the data to read it vs the current green / yellow / red on black.

Would white on black look out of place?

Jim

On Mar 6, 2015, at 10:11 AM, Jason Calabrese notifications@github.com wrote:

Think we'll need multiple lines, and on a narrow screen 3

https://cloud.githubusercontent.com/assets/751143/6530728/4953ac42-c3e8-11e4-989b-a0c03742b5ff.png
https://cloud.githubusercontent.com/assets/751143/6530834/278e2db6-c3e9-11e4-9889-506703936a04.png

Reply to this email directly or view it on GitHub #452 (comment).


Reply to this email directly or view it on GitHub #452 (comment).

Owner

jasoncalabrese commented Mar 6, 2015

Maybe a brighter grey? So not fully white? Icons might be good too, but then we have to move to fixed font sizes. I want to be able to plug in new types of data really easy.

Contributor

jimsiff commented Mar 6, 2015

How does this look @ELUTE and @jasoncalabrese? I changed the pill background color to #bdbdbd but left the font color the same grey. it gives a little more contrast without looking too out of place. Maybe you have a better idea.

screen shot 2015-03-06 at 11 28 43 am

screen shot 2015-03-06 at 11 29 13 am

Contributor

francescaneri commented Mar 6, 2015

@jimsiff 👍

Owner

jasoncalabrese commented Mar 6, 2015

Looks good. We should probably use the same grey for the value in the pill too. Should we replace the other grey? Clock, time ago, BG (retro and default theme), etc.

Contributor

jimsiff commented Mar 6, 2015

Sounds good. I do think the brighter grey pops more against the black... I'd like to see what it looks like with clock, time ago, BG, etc using that. I hope it doesn't kill the effectiveness of Night mode.

Contributor

jimsiff commented Mar 6, 2015

It does look like the straight down trend bleeds into the pill. It's so hard to juggle everything with % fonts.

screen shot 2015-03-06 at 12 06 59 pm

screen shot 2015-03-06 at 12 11 59 pm

Contributor

francescaneri commented Mar 6, 2015

@jimsiff @jasoncalabrese
raw
...and if so for raw data

jasoncalabrese added some commits Mar 7, 2015

@jasoncalabrese jasoncalabrese new pill colors from @jimsiff
c1a9bdd
@jasoncalabrese jasoncalabrese Merge branch 'dev' into wip/enable-iob 7fb088c
@jasoncalabrese jasoncalabrese stop pills from overlapping time in narrow mode
5159859
Contributor

francescaneri commented Mar 7, 2015

Hi everyone, you can not keep a new display based pill and place as it was put by wip / IOB -COB have a screen cleaner ? what do you say @scottleibrand

Contributor

francescaneri commented Mar 7, 2015

image

jasoncalabrese added some commits Mar 7, 2015

@jasoncalabrese jasoncalabrese improved iob display and rounding
2fc4147
@jasoncalabrese jasoncalabrese fix iob test to expect new updated iob display value
26786e6
Owner

jasoncalabrese commented Mar 7, 2015

@francescaneri, trying to fit the IOB/COB into the title has been a problem. That layout is really fragile, screws up the click location of the toolbar, and runs into the title.

jasoncalabrese added some commits Mar 7, 2015

@jasoncalabrese jasoncalabrese more css hacking for the arrows
6134e11
@jasoncalabrese jasoncalabrese more adjustments of pill tops for different screen sizes
edfcbc0
@jasoncalabrese jasoncalabrese some cleanup suggested by @dduugg and some more IOB tests bf2bac6
@jasoncalabrese jasoncalabrese resort package dependencies
06235ff
@jasoncalabrese jasoncalabrese move all the browserify bundle config to a new module
7bd9446
Owner

jasoncalabrese commented Mar 8, 2015

I'm going to merge this to dev and start getting it integrated with everything else

@jasoncalabrese jasoncalabrese added a commit that referenced this pull request Mar 8, 2015

@jasoncalabrese jasoncalabrese Merge pull request #452 from nightscout/wip/enable-iob
Add an option to enable IOB in the mainline
1e27704

@jasoncalabrese jasoncalabrese merged commit 1e27704 into dev Mar 8, 2015

3 checks passed

continuous-integration/codeship Build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

jasoncalabrese deleted the wip/enable-iob branch Mar 8, 2015

@jasoncalabrese jasoncalabrese modified the milestone: enchilada Mar 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment