Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

151: Make (locale) compatible with Anki 2.1.22 and up #155

Open
wants to merge 113 commits into
base: main
Choose a base branch
from

Conversation

Noxgrim
Copy link
Contributor

@Noxgrim Noxgrim commented Jun 7, 2020

Description

The patch introduced in #125 does not work with current Versions of Anki (2.1.26).
I tried to fix this according to this comment from @glutanimate.
I introduced the fix proposed by @5hir0kur0 in their comment and added backward compatibility by checking whether the needed function exists.

I also ran black on the changed file.

Checklist:

  • I've read and understood the contribution guidelines
  • I've tested my changes against at least one of the following Anki builds:
    • Latest standard Anki 2.1 binary build (2.1.26)
      (Additionally 2.1.{15,16,22,24})
    • Latest alternative Anki 2.1 binary build
  • I've tested my changes on at least one of the following platforms:
    • Linux, version:
    • Windows, version:
    • macOS, version:
  • My changes potentially affect non-desktop platforms, of which I've tested:
    • AnkiMobile, version:
    • AnkiDroid, version:
    • AnkiWeb

glutanimate and others added 30 commits December 9, 2017 06:12
Fix encoding error in pathname2url on python3
This is necessary for changes to image files to become visible in
the EditCurrent and Browser editor instances.

Fixes glutanimate#62
Allows us to experiment with different svg-edit versions
This implements a new method which grants us the limited possibility
of performing in-place changes to the card template without discarding
any potential changes that the user might have performed.
Up to this point the add-on config/templates would only be set up
upon user interaction (e.g. creating new I/O notes or changing options).
This commit will allows us to update the note type before a user has
the chance to interact with potentially outdated notes/cards.

(of importance for instance with the switch to Anki 2.1, where
updates to the card templates are needed for the cards to render
correctly in the Reviewer)
Fixes glutanimate#45. Most likely also fixes glutanimate#15.

Even with a liberal fadein timer set, the image flashing problem
would still persist on slower systems and/or systems that have
performance issues with the new web engine (macOS?).
Postponing image visibility until after the mask is loaded
seems like the only surefire way to prevent instances of the answers
flashing before the actual answer reveal.

We still use a small aFade timer to make transitions between question
and answer where the images have not been cached smoother.

Because this change comes with a lot of increased complexity to the
basic method of operation of the add-on, and because it has the potential
to completely disrupt card reviewing, it will require extensive
testing across all platforms (especially the mobile clients and
AnkiWeb).
Now that we only have two modes left, it makes sense to explore more
intuitive labels that are still close enough to the previous ones
to not confuse existing users. (thanks to tmbb for the suggestion!)
Might be worthwhile to look into using Anki's own dialog manager
for I/O editor instances at some point.
davidculley and others added 27 commits April 28, 2020 19:16
…-crash

Fix issue glutanimate#95 (crash in in-group editing mode)
Change how clipboard images are saved.
DONE:

+ profile_did_open
+ editor_did_init_buttons
+ editor_will_show_context_menu (fixes glutanimate#151)

TODO:

+ Editor.setNote
+ Reviewer._showAnswer
+ reviewStateShortcuts
+ browser.setupMenus
+ unloadProfile
Add-on currently not in working state
* Keep downwards compatibility until 2.1.15
* Idea for fix from @5hir0kur0
* Run `black` on `src/image_occlusion_enhanced/lang.py`
@Noxgrim Noxgrim changed the title 151: Make compatible with Anki 2.1.22 and up 151: Make (locale) compatible with Anki 2.1.22 and up Jun 7, 2020
@glutanimate glutanimate changed the base branch from develop to main April 9, 2022 05:18
@Noxgrim Noxgrim force-pushed the 151-locale-compatible-with-current-anki branch from 018a1a3 to 6d96f70 Compare August 16, 2023 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants