ankitects / anki

Anki's shared backend and web components, and the Qt frontend
https://apps.ankiweb.net
Other
18.74k stars 2.13k forks source link

Remove legacy importer option from GUI #3493

Open dae opened 1 week ago

dae commented 1 week ago

The error message “Unable to read file. It probably requires a newer version of Anki to import” but I do have the latest version and I have tried uninstalling and reinstalling the app, as well as restarting my computer.

Users sometimes accidentally enable this, and then get stuck. This option was only provided so that the 'special fields' add-on can continue to work without changes. But because it's causing problems, I think we should instead require the add-on to dynamically switch Anki to the old codepath, so that when the add-on is not installed, the new importer is always used.

@ankingmed is the add-on still in regular use, or is it considered deprecated now that AnkiHub exists?

Originally reported on https://forums.ankiweb.net/t/downloaded-anki-deck-wont-open-but-i-have-the-latest-version/50526

AnKingMed commented 1 week ago

It is still used, though dramatically less than it used to be. We did add a warning to the addon and can certainly update things if needs be.

I think we should instead require the add-on to dynamically switch Anki to the old codepath, so that when the add-on is not installed, the new importer is always used

This is reasonable. We could update the addon to force the user to ask on import if they want to do the normal import or special fields import? Or do you have any other ideas? I've seen this a few times as well and I think we should improve the user friendliness and reduce confusion

abdnh commented 1 week ago

I think we should instead require the add-on to dynamically switch Anki to the old codepath, so that when the add-on is not installed, the new importer is always used.

It used to work like this but we changed it to make it prompt the user to enable the legacy importer: https://github.com/johnpincock/SpecialFields/pull/38

dae commented 1 week ago

Asking the user each time they import would solve the problem of the option being forgotten about, at the expense of potentially irritating users who import regularly. If you wanted to get a bit fancier, one option would be to automatically fall back on the standard importer if importing fails with the add-on. Or at least showing a message to the user, giving them a hint to disable the add-on. No strong feelings on best approach here.

AnKingMed commented 1 week ago

It sounds like a reasonable idea to me. I think toggling the special fields addon off until its needed makes the most sense. @abdnh could you add a popup that asks the user if they want to import with the special fields addon or not?