davidhealey / waistline

Libre calorie counter app for Android. Built with Cordova.
560 stars 66 forks source link

[Feature Request]: Subtotals for macro-nutrients in Diary #218

Closed jncosideout closed 2 years ago

jncosideout commented 4 years ago

In addition to counting calories, it is very important to me to track total gr of protein, sugar, fiber, carbs, fat, etc. I have been using FatSecret since 2014 and they display a totals bar at the top and subtotals for each meal, and even for each food in a meal. Your app comes so close to FatSecret as a FOSS alternative that this feature is the only thing it needs, imho.

The columns at the top are carried down the tableview rows to each meal. So the top row with the column labels 'Fiber, Sugar, Sod, Protein, Cals' show my grand totals for that day. Then below on each 'meal table-row' the subtotals for that meal are displayed in the corresponding spots of each column. FatSecret 1-collapsed-meals

When you expand the meal, you see each food showing it's amounts for each nutrient in the same column order. FatSecret makes this optional, calling it the 'detailed view.' FatSecret 2-expanded-meals

It only lets you display 4 columns to the right of Cals, which is always present. But it lets you choose which categories to show in those 4 spots: FatSecret 3-choose-collumns

I'm not sure if you are aware of FatSecret, but it feels like you were inspired by it, and that is why I like your app. I also am happy that you are using the OpenFoodFacts database because I have contributed a little to their iOS app.

I would love to work on a PR with you for this feature. I am primarily an iOS developer but I have never done Android development. I know Java, but I know that desktop Java development is nothing like Android development, so please contact me so we can collaborate on this. On Telegram, I'm Economic_Hitman

davidhealey commented 4 years ago

Yeah I like that. The current dev version already includes tracking these things in the top bar but I think this layout you show is a little better so I'll see what I can use from it.

galaxyrun commented 3 years ago

Are there any updates on this?

davidhealey commented 3 years ago

Are there any updates on this?

Tracking in the top bar is implemented in the dev version, it's not limited to 4 though, you can show as many as you like, you just drag to scroll through all the nutriments. I haven't implemented it on a per meal or food basis, I'll need to think of the best way to do that because the space is more limited there unlike the top bar. It may be the case that you can only show a limited number there.

galaxyrun commented 3 years ago

Are there any updates on this?

Tracking in the top bar is implemented in the dev version, it's not limited to 4 though, you can show as many as you like, you just drag to scroll through all the nutriments. I haven't implemented it on a per meal or food basis, I'll need to think of the best way to do that because the space is more limited there unlike the top bar. It may be the case that you can only show a limited number there.

When will this version be available?

davidhealey commented 3 years ago

When will this version be available?

Sometime this year, hopefully not too long but I still have a few major features to rewrite.

Peek 2021-02-01 23-12

huuhaa commented 3 years ago

Could that top bar have alternative option:

Show horizontal bar for some basic information like calories, protein, carbs, fat & fibre?

At least the ones of those user has set a goal. If using this, showing target value and bar filing with color green (for example) and at the end of row somthing like 1500 / 1800 kcal and If eaten more that target, maybe red color for bar which continues over and scaling chaging.

Benefit of this? User could see important information by quick clanse without needing to swipe so much. Swipe area could be left for macro-nutrients information. Also horizontal bar doesn't take much screen size and since there gonna be option to hide those taken foods at dropdown menu like in animation. So compared current version there will be much more sceeenspace available by default.

Sure if this could be implemented, I would hope that easy quick glanse bars be available also at top of Statics screen, Speaking of that, also option to set default timeframe for Statics would be nice.

davidhealey commented 3 years ago

Show horizontal bar for some basic information like calories, protein, carbs, fat & fibre?

That's how it currently works, and then you swipe to show macros.

So compared current version there will be much more sceeenspace available by default.

Can you provide an image of your idea so I can understand it better?

huuhaa commented 3 years ago

Ok, here is quick mockup. If using only 3 basic like in 1st screen of gif, those "proggress bars could be below information fields.

By current version I meant the one available at F-Droid by now. If trying to add those horizontal lines to same space you used at that gif, it will probably be too thight, even thought there's room for adjustments at this quick mockup. But even this quick and dirty version shows that almost 4 fields could be fitted there.

And When comparing version currently available at F-Droid, I think it would be quite ok if those last dairy markings like Snacks with dropdown "menu" to hide foods by default would be bit lower so user should swipe a bit. That would leave more room for upper part to the chart..

Well I do admit that this would break look of your sideways swiped top part. But.... What if upper part would also have dropdown menu? Showing first only selected basic informations and if clicked dropdown then open full view of micro-nutrients as nice menu instead of sideways scrollable one?

Anyway, here is that quick mockup..

Edit: Also if whole upper part would be menu with dropdown arrow at upper right (like breakfast etc). Then side-swipe gesture could be used to switch the day view, right swipe to yesterday etc.

WL-edit

davidhealey commented 3 years ago

@huuhaa Thanks for the image, now I understand the idea.

I don't like how much vertical space that layout requires. A similar option would be to use little donut charts but I think that would make the interface look a bit busy.

This is how it currently looks (in the development version) it achieves your goal but doesn't have the green bar: image

huuhaa commented 3 years ago

Bar isn't so important after all (maybe change at eaten amount color to red if over target?), development version shows good and look is already similar with micro-nutrients layout. These are just matter of taste after all. I'm personally not fan of small, but wide horizontally scrollable list at vertical screen (no possibility to see big picture at glanse), but I can live with it.

I do have to say though, that I would love to have those 4 (calories, proteins, carbs, fat) to same view, but again, I can live with that dev version and after all if eating good quality food, all you really need to look (if want to check quickly) is that Calories, if that is ok usually others are too. :)

davidhealey commented 3 years ago

@huuhaa

maybe change at eaten amount color to red if over target?

Yes it does this.

I would love to have those 4 (calories, proteins, carbs, fat) to same view

All four are displayed automatically if your phone screen is wide enough (and on tablet I think it shows 5 or 6).

huuhaa commented 3 years ago

All four are displayed automatically if your phone screen is wide enough (and on tablet I think it shows 5 or 6).

That's great news. And like said, I can live with 3 too (I think I have Full HD resolution, not exactly sure cause current phone is more of /e/ OS than specs..). Now just waiting for release and then gonna start translation part. :)

jncosideout commented 2 years ago

@davidhealey I just wanted you and your team to know, because of the improvements you made based on this Issue, I have switched over from Fat Secret, which as I said above, I used as my calorie counter app since 2014. WaistLine has all the features I need, and in many ways has a better ui/ux. The integration with OFF works better than I thought (once I set it to United States) and the USDA integration sealed the deal.

Best of all is WaistLine's data privacy. I religiously count calories so FatSecret was a big part of my life, and it was sucking my data to Google and Facebook for six years!

In 2020 I installed LineageOS4MicroG to de-Google my phone, then I installed a vpn/firewall app called NetGuard to protect me from FatSecret. Using NetGuard, I saw that FatSecret was pinging Google and Facebook constantly, even when I wasn't using the app, nor logged into those services on my phone in any way! I blocked their domains and it never broke the functionality which proves it was just for spying!

So thank you for making an honest product. I no longer need to worry about what I eat being sent to third parties, and I don't need a VPN that uses extra resources (NetGuard is great on battery life, though).