Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Screenshots
Related issues
closes #97