anki icon indicating copy to clipboard operation
anki copied to clipboard

Provide an efficient way of progressively revealing cloze deletions

Open dae opened this issue 1 year ago • 12 comments

Originally reported on https://forums.ankiweb.net/t/nested-clozes-doesnt-work-for-more-than-3-nests/52661

We decreased the nested cloze limit from 10 (protobuf library hard limit, and exponentially slower parsing) to 3 in the 24.11 release This has upset users who were already creating more than 3 levels of cloze deletions.

This ticket is to keep track of possible solutions.

  • One would be to remove our extra limit. Some users were not experiencing slowdowns, and it will make them happy for now. But we have the unavoidable upper limit that some users will hit.
  • Another option for some cases would be to provide some sort of "hide all, show one" mode, like image occlusions. At least one user has pointed out that it wouldn't help in their case.
  • Another option would be to provide a different sort of mode that progressively reveals (shows all cloze numbers below the current one).

Thoughts?

dae avatar Dec 14 '24 12:12 dae

Making a different cloze bracket syntax (like curly braces) for cloze cards that belong to each other that hides them all at the same time (progressive reveal).

DerIshmaelite avatar Dec 14 '24 13:12 DerIshmaelite

Hello,

Thank you so much for creating this issue; I would like to mention that as the Alx forum user in the Anki forums thread, I am perfectly happy with a low limit that can be customized in Anki preferences with a flashing warning, especially since the alternatives would require additional coding effort.

Iacob-Alexandru-Andrei avatar Dec 14 '24 13:12 Iacob-Alexandru-Andrei

I agree with the previous comment. "A low limit that can be customized in Anki preferences with a warning" seems to be the best solution here. I had been relying on nested cloze heavily in my decks, so the hard limit on depth in the update created a whole new set of actual problems in order to solve "potential" problems that I never encountered in practice. If there is no way to solve all the problems at once, let users choose which ones they want to avoid!

trambaiolo avatar Dec 15 '24 05:12 trambaiolo

I would strongly agree with what's been said earlier about a lower limit that can be customised. I use nested cloze cards to learn step-by-step processes, which requires the information above to be revealed before the information below. Despite the brilliant features in 24.11, this breaks literally hundreds of cards in my collection, which I hadn't properly appreciated until finding this thread, so I have no choice but to stick with the older version for now. I'd be hugely grateful for a quick resolution!

xanthalius avatar Dec 16 '24 20:12 xanthalius

This has caused more disruption than I expected it to, and I think as a short-term solution we'll need to either increase the default limit and/or make it configurable.

dae avatar Dec 23 '24 12:12 dae

I've since found this brilliant card template, which does pretty much everything I need - might be a more suitable long term solution, depending on how others use nesting clozes. I'd also suggest a pop-up warning when you use too many nests would be useful. At the moment there's no way of knowing there's going to be an issue until you look at the card afterwards.

xanthalius avatar Dec 23 '24 14:12 xanthalius

Thanks a lot for considering this, I strongly support it to be customisable with no upper limit but a warning. In my case I could start using ankimobile to do my reviews again rather than using an anki fork on desktop.

Iacob-Alexandru-Andrei avatar Dec 23 '24 20:12 Iacob-Alexandru-Andrei

Maybe im missing something, but my guess for long nested clozed to cause a slow down is that this is making recursive calls

But there could be a custom linear parser that simply find the {{cx::}} hes looking for in the first pass and strip the rest of {{cx::}} from the text in a second pass, making notes parsing time linear regardless of how many nested clozed there are

Anyway, even tho i support having nested clozed, as an user i think having to deal with endless }}}}}}}}} at the end of a note is not ideal. Its easy to lose track of so many opening/clossing {}

I think it would be better to have normal clozed and being able to chose how you want your clozed cards to be shown. Options similar to clozer overlapper. You can simulate what nested clozed are supposed to do with clozer overlapper kinda of options

voidplayer avatar Jan 12 '25 19:01 voidplayer

I would support either: (a) the reinstatement of the upper bound of 10 on the cloze limit; or (b) creating an option to increase the cloze limit

I am a pretty heavy anki user (800+ reviews/day) , so I would really appreciate being able to update to the latest version with all the new anki features:

Image

I have found clozes to be critical for long-term memorization, and I have found deep clozes very useful for certain types of information. I really appreciate the fantastic work that the dev team has put into Anki over the past two years in regards to FSRS. It makes long-term memorization so much easier because it minimizes review load, and it prevents the exponential review increase from retention misalignment. However, it would be a shame for these improvements to no longer be compatible with a note-type that is so useful (and in my experience critical) for long-term retention.

sfratamico2001 avatar Jan 12 '25 21:01 sfratamico2001

Thank you very much for the increase.

Iacob-Alexandru-Andrei avatar Jan 15 '25 14:01 Iacob-Alexandru-Andrei

How feasible would it be to stop using the protobuf library (because of its hard limit) and instead create a better system that doesn't rely on that library? I need to create cards with nested clozes deeper than 10. If it is technically feasible but tedious to code, I'd be happy to contribute.

mosesrivera100 avatar Nov 15 '25 04:11 mosesrivera100

Protobuf is used for communication with the Rust backend. Replacing it for the sake of nested clozes is not a viable solution.

abdnh avatar Nov 19 '25 19:11 abdnh