Skip to content
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

Add feeding method history #774

Merged
merged 5 commits into from Mar 14, 2024
Merged

Add feeding method history #774

merged 5 commits into from Mar 14, 2024

Conversation

abog854
Copy link
Contributor

@abog854 abog854 commented Feb 25, 2024

Hi there,

First, thanks a lot for that project, it's very cool !

My partner is breastfeeding and wanted to have stats of how long she fed over the past days, and also which breast she used.
So I added a card similar to the diaper change history, but for feeding methods.

Let me know how it looks.

@coveralls
Copy link

coveralls commented Feb 25, 2024

Coverage Status

coverage: 98.743% (+0.007%) from 98.736%
when pulling e6d4f20 on abog854:master
into 25d3c9f on babybuddy:master.

@billybonks
Copy link
Contributor

Hi, are you able to add screenshots?

@abog854
Copy link
Contributor Author

abog854 commented Feb 29, 2024

Here you go.

This is a standard one for breast feeding:

image

But it works for any method. In case there are a lot for a day, it's only gonna display the top 3 methods in the "progress bar":

image

For us, it mostly serves two purposes:

  • check which breast was most used for feeding, see how balanced it was over the past days.
  • view feeding stats over the past few days: number and time spent feeding.

Maybe we could have this for the feeding type as well, and ideally allow the user to configure which one they want to display in the dashboard, but that's probably out of scope for that PR? I'd be open to giving it a try, if my baby gives me enough time :D

@cdubz
Copy link
Member

cdubz commented Mar 6, 2024

Maybe we could have this for the feeding type as well, and ideally allow the user to configure which one they want to display in the dashboard, but that's probably out of scope for that PR? I'd be open to giving it a try, if my baby gives me enough time :D

#34 is the oldest open issue in this repo (: Definitely out of scope for this PR but I would be more than happy to have a PR adding that feature, hah. I have got a little steam behind it on a couple of occasions but never quite got it over the finish line.

@cdubz cdubz added the enhancement Feature requests or improvements to existing functionality label Mar 6, 2024
Copy link
Member

@cdubz cdubz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway looking at the actual change here --

I think the presentation of this can get confusing in practice. Here's an example with more of the various feeding types Baby Buddy supports:

image

I think you have a good use case here (quick understanding of the per-breast distribution) but I see two big issues here:

  1. For that use case none of the non-breast feeding types really matter.
  2. The colors are not always matched to the type which makes looking at this information quickly hard/confusing.

What do you think about renaming this specifically as "Breast Feedings", filtering for only left/right/both breast feeding methods, and maybe even redistributing "both breast" entries equals between the two groups to always reflect just two types?

Otherwise I think the presentation and code here is good.

@abog854 abog854 mentioned this pull request Mar 9, 2024
@abog854
Copy link
Contributor Author

abog854 commented Mar 9, 2024

I wanted to make something generic, but I do agree it probably makes more sense to have it specialized for breastfeeding (and if not breastfeeding the card could hide, anyway).

So I changed it, let me know what you think:

image

 - don't print days for an empty card.
 - make the width of the bar for each day proportional to that day's total feeding time.
@abog854 abog854 requested a review from cdubz March 9, 2024 23:38
@cdubz cdubz merged commit ab5bb66 into babybuddy:master Mar 14, 2024
13 checks passed
@cdubz
Copy link
Member

cdubz commented Mar 14, 2024

Looks good. Thanks for contributing!

@cdubz cdubz added this to the 2.3.0 milestone Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests or improvements to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants