onejgordon / flow-dashboard

[UNMAINTAINED] A goal, task & habit tracker + personal dashboard to focus on what matters
http://flowdash.co
MIT License
1.67k stars 186 forks source link

Add support for 8+ weekly target for habits #64

Closed cashweaver-zz closed 7 years ago

cashweaver-zz commented 7 years ago

Habits currently, visually, support up to one completion per day; seven per week. It is possible to enter a number greater than seven for the weekly target of completions but it's impossible to mark more than one completion per day through the UI. It would be nice to support more than one completion per day. Personally I would like to track meditation twice a day.

A naive solution would be to show ceil(weeklyTarget / 7.0) completion buttons per day, but this would start looking awkward pretty fast. Perhaps a up/down arrow system like (but visually nicer than) to support an arbitrary number of completions per day.

I'd be happy to tackle this one, or at least weigh in with some tests but I'm not sure where to look in the code base. There are also some UX decisions which need to be made by the team if this is to be implemented.

onejgordon commented 7 years ago

Thanks for this idea, @cashweaver.

I think the UX changes for this could be pretty straight-forward, but the data structure change requires a bit of thought. Currently the status of each habit on each day is tracked in the models.py:HabitDay() class, which stores a boolean done value.

One option is to add a new count integer to track the number of completions on a given day. This raises the question of when would such a habit be considered done? After > 0 completions? Or dependent on the task's weekly target? A new daily target?

What do you think would be most intuitive and flexible?

onejgordon commented 7 years ago

Here's a proposed implementation.

Configuration:

screen shot 2017-06-09 at 8 18 18 pm

Incrementing countable habits:

screen shot 2017-06-09 at 8 21 39 pm

For 3 seconds after increment, user can undo the completion:

screen shot 2017-06-09 at 8 21 52 pm

Once the daily target is reached, the habit is marked done for that day.

xverges commented 7 years ago

For 3 seconds after increment, user can undo the completion

I've landed in the issues section after I was mislead by not being aware of this 3 seconds lag, after having set the goal with the idea of "I want to do this one or more times a day, and keep track of how many times". Once I clicked, I got under the impression that it was marked done and that I could not add completions. I am happy I can.

BTW, this app is something that I have wanted to happen for years. I am very happy and grateful. And thanks also to https://github.com/woop/awesome-quantified-self, that is what pointed me here.

onejgordon commented 7 years ago

@xverges, thanks for your comment. The design for this feature is definitely not perfect. I included the 'undo' option as I assumed people would get frustrated at not being able to revert an accidental count, in the same way as they can un-toggle an uncountable habit. I had also considered two icons, an increment and a decrement, but this isn't as clean, or parallel with the standard (simple toggle) habits.

Any suggestions for how the UX or the communication of how this works can be improved to be less confusing and more intuitive?

Also, thanks for pointing out @woop's repo -- that's a great resource, and didn't realize Flow was listed there!