glutanimate / review-heatmap

Anki add-on to help you keep track of your review activity
https://ankiweb.net/shared/info/1771074083
Other
1.2k stars 88 forks source link

Add support for new congratulations screen #152

Open glutanimate opened 2 years ago

glutanimate commented 2 years ago

Since the introduction of the new "congratulations" / "deck finished" screen, users are no longer able to access per-deck stats for the day once they've completed that deck. We should look into adding support for this view.

For an example see: https://github.com/glutanimate/review-heatmap/issues/137#issuecomment-999867669

Implementation notes:

sameersismail commented 1 year ago

I took a stab at this today. The diff is here (tested with the latest Anki, ad74a014). I ran into a few issues, culminating in that clumsy commit. I may be using the wrong hook (or using it incorrectly), but appending the resultant HTML from render_for_view didn’t work; the <script> tags weren’t being loaded, so I had to load them separately: First, load the library dependencies. Add heatmap.js in a setImmediate-style so that d3 was loaded already (else there’s an uncaught exception). Then wait for the CongratsPage.svelte content to be rendered (is there a hook for this?) and append the heatmap_html, the initialisation <script> won’t run, so pull it out and eval it.

image
ratman-codes commented 1 year ago

Any update on this? Seems weird we can't see on deck screens still when complete.

mnmnks commented 10 months ago

Can the fix @sameersismail suggested be implemented @glutanimate? I would love an update addressing this. Thank you.