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 new Summary activity #96

Merged
merged 3 commits into from
Jun 9, 2023
Merged

Add new Summary activity #96

merged 3 commits into from
Jun 9, 2023

Conversation

cubandle
Copy link
Contributor

@cubandle cubandle commented Feb 2, 2023

Notes

Hello, I hope everyone is doing well! This is a new activity that shows a more visual representation of the current progress on the addiction. It is only reachable on ongoing and stopped addictions.

The reason why the title of the activity is set to the name of the addiction is because I think this activity can be extended to include more information than these progress bars in the future (e.g. graphs?). I think the options here are: "[Name] Summary", "Summary", or "[Name]". Let me know which one you prefer.

I had to remove the weeks from the visualization because of the ambiguity: if a month is composed of 31 days, should the days progress bar have a maximum of 7 days until the fifth week where the max is 3? Should the weeks progress bar have a maximum of 4 or 5 weeks depending on the length of the month? it seemed a little weird to me so I decided not to include it all, but let me know what you think about this.

The years progress bar never reaches 100%. Instead, it is calculated by years / (years+2) which seemed like a good number to me.

The first commit in this PR fixes an unrelated bug where the current relapse duration is off by 1 day, see that commit message + content for details.

Questions

  • I am terrible at styling, so I was wondering if you had any ideas for the colors/fonts/sizes? I think the text color/size but I struggled with this a bit without figuring anything out.
  • In the screenshots, you will notice trailing commas in the text. Should I duplicate the current strings but without the commas? Or remove the commas from the existing strings?
  • When the progress bar is updated, it occasionally jumps back to the original percentage for a frame and then updates. Do you know what is causing this or how to fix it? I have trouble reproducing it in the first place but it is most noticeable in the seconds progress bar.
  • Long term: there are now several time related utils with similar functionality in Utils.kt. Do you have any ideas for how to refactor these effectively?

Screenshots

image

image

image

image

Related issues

closes #97

Periods consider days based on a difference in the dates rather than
calculating a change in 24 hours. This causes inconsistencies like
displaying 1 day 23 hours, 59 minutes -> 1 day since the time portion of
the string is calculated by duration rather than period.
@KiARC
Copy link
Owner

KiARC commented Mar 12, 2023

This looks really good! I think we can definitely work on refactoring the Utils, I'll start working on that when I get a chance. As for the styling, it looks fine, but if it's ok I might tweak it a bit. Thank you so much as always for your incredible work ^^

@KiARC KiARC merged commit 71b4c40 into KiARC:master Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Miscalculation by one day
2 participants