Feature collection #19
Reference in New Issue
Block a user
Delete Branch "mwarning/luna-tracker:bottle_time"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Features:
add statistics-
adds mpandroidchart dependency-
bar chart to show amount of bottle milk and event count-
bar chart for sleep amount and event count-
add fancy sleep frequency bar charts-
all charts are available for per day, week, month<empty>, "little", "normal", "plenty")Bugfix:
Miscellaneous:
Gradle:
All changes are backwards compatible.
5be2917839tocbba6b7a90cbba6b7a90to53bab2d22c53bab2d22cto4e9eeff6aa[WIP] add time to ask bottle content dialogto [WIP] Use edit button for all events4e9eeff6aatoaaccef54a5aaccef54a5tob719903a73b719903a73to5ffeff445f[WIP] Use edit button for all eventsto [WIP] Allow editing of all events5ffeff445ftoc52a74c7e3Allow editing of all eventsto events: allow editing of all valuesc52a74c7e3tof8bd760f7af8bd760f7atod8978a9b8cd8978a9b8cto83294401dc83294401dctoa941fc4fcea941fc4fceto4c5ac593554c5ac59355to17e1d2c6ea@penguin86 ready for review :)
17e1d2c6eatof7969541aef7969541aeto4492b36b234492b36b23to563e431c1devents: allow editing of all valuesto Feature collection6b1a82d7d0to99c7e5f94d99c7e5f94dto3ae71c36a7The only thing missing now is a statistics activity. But that is for another time.
3ae71c36a7to88e9cb7deb88e9cb7debtod34aa8e950Looks good now.
d34aa8e950toe756a2a3fce756a2a3fctoed10dca216ed10dca216tofc3b67638dd4df3cfc18to9cce54c05e9cce54c05eto11a4f12fbe11a4f12fbeto19774016e119774016e1tof8f5d68bb6Ok, I think it is done.
@penguin86 feel free to pick all changes you like :)
20d7612b46to479335f1c9479335f1c9toe9b41b4e06e9b41b4e06to3e64da2e2eWIP: the statistics feature does not compile yet. It is being overhault.
3e64da2e2eto341d2c5229341d2c5229to58088aeec758088aeec7to8e4a5b89c08e4a5b89c0to4f0416e1c14f0416e1c1to6f69b581e46f69b581e4toe820c11e68Hello Moritz,
I started reviewing your pull request without noticing it was WIP.
I have some bug reports, but please ignore the ones you are currently working on (I may have tested incomplete features).
Statistics: Crash selecting Statistics -> Bottle per day:
Statistics: empty screen for medicine statistics
On a logbook with a lot of medicine events (I can provide this one to you, if you need it to troubleshoot), I obtain a blank statistic screen: see screenshots:
Events: I'm not sure how the sleep event works: I see I can set a duration with the +5 button, but when I save, it says invalid date. I also tought it may measure between sleep events (i.e. create one sleep event to mark te start of the sleep and another one to mark the end), but in that case it doesn't seem to calculate the duration between the two events in the statistics.
Maybe the interface can be made more clear on how to use it.
As a side note, I'm a little worried the MPAndroidChart library is not currently mantained: the last release is from 2019, I hope it will not break due to one of the destructive changes Google likes to do to Android from release to release...
One last thing: may I suggest to split the features between more self-contained pull requests in the future? I.e. in the current case, the statistics feature could have been on another pull request, so I could have merged the other changes while the statistics feature is being worked on.
No need to change this one, it's just a suggestion for the future ones, if any.
As always, thanks very much for your contribution, Moritz!
Have a nice day.
Hi @penguin86 , thank you for your constructive feedback. This MR is indeed work in progress and I am working on fixing the crashes (correct calender operations are difficult to get right and are the source of the crash you have seen).
Sleep Event: Yeah, it is a bit confusing. If you create a sleep event, then the "-5 / NOW / +5" buttons should not be visible. Those buttons are for setting and adjusting the wake up time after the event has been created and the baby woke up. I will improve it.
MPAndroidChart: it was what I have found every time I was looking for a Android chart library. The maintainance status is of a concern to me as well. The only thing I can do at this point is to make it easy to remove the statistics feature once the library becomes a liability.
Separated commits: I will try to improve it a bit while working on this MR. But it is a pain to do. :P
Medicine Events: That part I haven't had time to polish at all yet. Work in progress.
e820c11e68to0cc9dc53fe0cc9dc53fetoc636e48c7ec636e48c7eto38930fe26938930fe269toa4b5ae7cd0a4b5ae7cd0toa8b9691861a8b9691861tobe5463bf18be5463bf18to43f0519487hi @penguin86, I think this MR is ready.
Here is a commit to remove the statistics completely in case MPAndroidChart becomes a liability due to missing maintainance:
a8305b8fc9@penguin86 should this MR target the develop branch?
43f0519487toff48d1af59ff48d1af59to87442057db87442057dbtoe1dbc2c628e1dbc2c628to905aeadabefc48984c67to71c0bf664471c0bf6644to64fde74e2e64fde74e2etoa1f3c7fdeaa1f3c7fdeato1763a9cfd01763a9cfd0to016dbf330b016dbf330bto143713cd9b143713cd9btoc582fb64b7c582fb64b7to7895325297@penguin86 feel free to test and merge even without statistics (cherry-pick
a8305b8fc9to remove it).I also just reaad in the readme that you want to bump sdk version yourself. No problem, just remove the commit after merging locally.
7895325297to422ecfb970422ecfb970toc58c68b78a10efec4733to80fa8d829480fa8d8294to557a9ab69aIt would be nice to have both short term statistics (like in #23) and long term statistics in the app. Maybe the long term statistics can be accessed via a button in the short term statistics.
9ed9964f69to16e5b39d6f@penguin86 I added a few minor fixes and a height event (on request from another user).
@penguin86 anything I can do to get this merged? Maybe there are too many changes in this MR. In this case we can have a call and go through the code and you can tell me what I need to throw out.
4f8209b793to5663a838e7I have removed statistics. This should make the MR easier to review.
Hello Moritz,
sorry for the very late reply. This PR is huge, so I find difficult to find time to review it toroughly in a single session. I'll try to review some commit a time until I get on par, and I'll skip testing every case that comes to my mind while reviewing every commit. I'll write below the concerns, so maybe you can check and I'll do a single final global check.
I suggest, for the next time, doing one PR for feature, so it is easier to review and I can merge it in less time.
Here's the first observation: in commit 358452a179 MainActivity: do not switch logbook on reload I fear if a new logbook is added (maybe from another device running the same app) and one is already selected, the new one will not be discovered. That was the whole point of having a refresh button (because the selected logbook is already refreshed automatically). Can you check if that's the case?
Thank you! I'll continue to review and write from time to time.
The sleep event with duration in d9feb05988 LunaEvent: rework sleep event is very cool, but also not intuitive. The user doesn't expect to have to click on the same icon of the event to set the end time. I'd change the clickable Zzz icon into something more evocative (maybe a clock icon or something) and add a caption below it "Set end time" or "Set duration".
e04e05f752 MainActivity: generate dynamic menu from last two weeks is definitely cool and makes the app faster to use, but I'd make clear the user need to have two weeks of data to use it, otherwise it's a little confusing. When I activated it on my test app with synthetic data, only the overflow menu icon was displayed.
Adding something like "You need at least two weeks of data for this to work" to the already present explanation text under the switch in settings should be enough!
Hey Moritz,
I reached the last commit, it seems ok to me, so if you wish to make the changes above, I think this can be merged.
Thanks a lot for the new features, they are very cool!
I took note of some changes to make (i.e. atm it's not very clear what can be clicked in the event detail, I'd set the button background on the next/prev texts and maybe a pen icon on the changeable fields), but I'll make them on my own after this PR is merged.
Thank you a lot for you contribution and your patience!
Have a nice day!
@penguin86 thank you for your time. I will take a look next week.
Sorry for not splitting it up more. As it happens, commits build up on each other and that makes them dependent..
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.