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

Make sure to return from original link handler to preserve Python → JS bridge #130

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

glutanimate
Copy link
Contributor

Hi ospalh,

I've been trying to resolve common add-on conflicts recently, and one of the key issues I've found were problems with the implementation of link handler patches. The crux is that in Anki 2.1, the link handler no longer only acts as a one-way street between JS and Python, but can also pass return values from Python to JS via an optional pycmd callback (cf. ankitects/anki#228 and ankitects/anki@56e1643).

Unfortunately this is not as obvious in Anki's source code as it probably should be (something I plan to file a PR for), and expectedly many add-ons do not return from their custom link handlers. As a result they interfere with other add-ons that do depend on this Python → JS bridge (e.g. Pop-up Dictionary).

So what I'm trying to do at the moment is to go through the add-ons in question and either file PRs to fix the problem, or notify the authors about the situation. Since I likely won't be able to catch all cases, I'd very much appreciate it if you could check and see if you can find any other add-ons that have the same problem.

Thanks a lot in advance!

Preserves Python → JS communication that other add-ons might depend on
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.

1 participant