Draw the target progress of each bar on overview panel - #630
Open
mksafavi wants to merge 3 commits into
Open
Conversation
mksafavi
force-pushed
the
target-overview-stats
branch
from
September 3, 2026 18:50
daf73aa to
054ca6e
Compare
mksafavi
force-pushed
the
target-overview-stats
branch
from
September 3, 2026 20:33
054ca6e to
0a873f8
Compare
mksafavi
commented
Sep 3, 2026
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 |
Author
There was a problem hiding this comment.
Is it safe/performant to do the dt calls here?
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 |
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This shows the target progress on the overview panel using the same data from Tag detail window.