-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Heatmap is off-by-one #23
Comments
Hi, Thanks for the report! The off-by-one issue is likely to be a side-effect of your new day cut-off time. Do you still have an Anki 2.0 installation handy? If so, it would be very helpful if you could compare the master branch at commit 3fc50bf vs commit cfe03c2. The latter introduced some changes in the day cutoff handling and it would be interesting to see how these affect this issue. Another interesting observation would be to check how the add-on behaves before and after your daily cut-off time. Do the seen / prop:due values change at the cutoff? As for the negative counts, that's just because the master branch is currently in a transitional state where it's not really meant to be used outside of development. However, I still appreciate your taking the time to report this. In the future I might switch to using feature branches or a dev branch instead, so that the master branch remains somewhat functional. FWIW, if you'd just like to have a working version of the add-on on 2.1 you might want to check out this commit instead. |
Hello. I installed Anki 2.0 again to help test this. Both commits seem to work fine actually. Likewise, the master commit works fine now on Anki 2.1. So I believe your secondary observation might have a better effect on this. When I opened the issue it was before my cut-off time, but now with everything fixed it's after my cut-off time. Edit: Now that it's past midnight local time, the drift has happened again. So I decided to take this opportunity to re-test the extension. On Anki 2.0: 3fc50bf - Works Using feature branches is a good idea in general, since you want a branch to be at a state where it's usable as a checkpoint without referring to a specific commit. Tags work fine for this purpose too but branches are better for features. I'm fine with using whatever commit, I just wanted to see if I could help test. I do not actually mind the working state of the add-on overall (afterall, I can just do a checkout to get a more stable version). |
Fixes negative counts for future dates, as reported in #23 Made possible through wa0x6e/cal-heatmap#250
When calculating delta in days, make sure to use 'today' as defined by Anki (taking "day starts at" setting into account). Dates passed on to onClick handler are always set to midnight, so adjust calTodayDate accordingly, and then perform calculation. Should address some instances of the off-by-one errors reported in #23
Fixes another class of off-by-one errors that would occur in timezones with DST switches. (related to #23)
Hey @Rapptz, Thanks again for the detailed bug report. I've just pushed out the first beta release of v0.7.0 which should contain a number of fixes for this and other time-related issues. Would you mind giving it a test run to see if it resolves the off-by-one situation you were seeing? (only if you have time of course!) |
I can't get the build to work at all.
|
Prerequisite checklist
What is the problem/feature you would like to see fixed/implemented?
Heatmap seems to have an off-by-one error in its visual calculations. This happens on any type of heatmap view (specific deck, entire collection).
How can we reproduce the problem?
Expected behavior: To actually show the reviews for that day
Actual behavior: It shows the reviews for the day prior (e.g.
seen:2
instead ofseen:1
andprop:due=1
instead ofprop:due=2
, etc).Reproducible?: Yep.
Examples:
If you hover over today and double-click it:

You'll get a search with
seen:2
instead of the correctseen:1
.The same thing happens with future dates e.g.
This actually says there are -30 cards due (which makes no sense) and opens a search for
prop:due=2
(which is correct) but there are no 30 cards for that day. Instead,prop:due=3
(the next day) does have those 30 cards.Version information
Anki
Version 2.1.2
Qt 5.9.6 PyQt 5.9.2
System
Other
I'm not sure if this is a bug you're already aware of since I am technically running on untested unreleased code, but I figured it'd be worth opening an issue anyway.
I'm also not sure if it matters, but I have my Anki setting to consider a new day 16 hours after midnight.
The text was updated successfully, but these errors were encountered: