Razeeman / Android-SimpleTimeTracker

Simple app that tracks time.
GNU General Public License v3.0
536 stars 68 forks source link

[Feature Request] Improve the tag distribution breakdown with tag groups #189

Open Rinkerbel opened 1 month ago

Rinkerbel commented 1 month ago

I would like to be able to create tag groups that distribute percentages among itself. For example if I add tags for location and specific tasks to an activity record I would want to see what percentage was spent at which location and what percentage of time was spent on a task.

So a tag breakdown like this:

Project 1 - 42% Location 1 - 28% Location 2 - 17% Project 2 - 9% Project 3 - 3%

Will look like this instead:

Locations Location 1 - 62% Location 2 - 38%

Projects Project 1 - 78% Project 2 - 17% Project 3 - 5%

cogk commented 4 weeks ago

Nice idea!

My use case

I'm interested in the visual separation of tags in the tag selection screen too, just a UX kind of thing.

Currently I have a "Work" activity with tags like "~My Customer", because I want the prefix to move these specialized tags to the bottom. The newest update (great as always) brought custom tag-level icons and colors, helping with the visual differentiation (but not the sorting).

Implementation of scoped labels in other software

GitLab has a feature called “scoped labels” where you can write tags as scope::label, something like level::critical or Projects::Simple Time Tracker. There is however a limitation that you cannot combine tags with the same prefix. If I remember correctly, AnkiDroid uses the same kind of syntax for grouping card stacks too.

A first draft of the implementation

A first implementation could remain on the UI layer layer, where having a tag with the special :: delimiter would implicitly create a tag group. I feel, however, that this is kind of a hack (but it is acceptable, assuming no-one is having this delimiter in their tag names already).

One advantage is that it is a really simple implementation, and it immediately works with the spreadsheet export too. In the spreadsheet export, the tags are stored using their labels, which means that project::abc and customer::abc would have the same name in the export, if I'm not mistaken.

Razeeman commented 3 weeks ago

Hello! Thank you for the feedback. Is going to the filters and selecting just the "Location 1" and "Location 2" tags would show needed information? Tag breakdown should than show just location percentages.