Skip to content

Draw the target progress of each bar on overview panel - #630

Open
mksafavi wants to merge 3 commits into
almarklein:mainfrom
mksafavi:target-overview-stats
Open

Draw the target progress of each bar on overview panel#630
mksafavi wants to merge 3 commits into
almarklein:mainfrom
mksafavi:target-overview-stats

Conversation

@mksafavi

@mksafavi mksafavi commented Sep 2, 2026

Copy link
Copy Markdown

This shows the target progress on the overview panel using the same data from Tag detail window.

image

@mksafavi
mksafavi force-pushed the target-overview-stats branch from daf73aa to 054ca6e Compare September 3, 2026 18:50
@mksafavi
mksafavi force-pushed the target-overview-stats branch from 054ca6e to 0a873f8 Compare September 3, 2026 20:33
@mksafavi mksafavi changed the title Draw target percentage and remaining delta on overview panel Draw the target progress of each bar on overview panel Sep 3, 2026
Comment thread timetagger/app/front.py
Comment on lines +3425 to +3429
t1, t2 = self._canvas.range.get_range()
best_target = None
free_days_per_week = window.simplesettings.get("workdays")
free_hours_in_range = dt.get_free_hours_in_range(t1, t2, free_days_per_week)
work_hours_in_range = self._hours_in_range - free_hours_in_range

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it safe/performant to do the dt calls here?

Comment thread timetagger/app/front.py
Comment on lines +3756 to +3760
# Add the time of all bars with matching tags into this period
for b in self._tag_bars_dict.values():
b_tagz = b.tagz.split(" ")
if all([t in b_tagz for t in tagz]):
done_this_period += b.t

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tag detail window uses total_time for showing the target percentages. that includes the selected tag and all the rows (sub tags.)
I think for the toplevel tag on the overview, it makes sense to include the time of the sub tags for that bar.

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.

1 participant