Anki 2.1.45 Beta

Good catch, but I don’t think it’s got anything to do with the linked PR.
The feature is that we scroll to the current element after refreshing the sidebar, e.g. because an element has been renamed. The problem here seems to be that we also refresh gratuitously after expanding/collapsing tags. (Expanding is different for tags than for other sidebar items because we store the expansion state.)

There are several ways to solve this, but maybe expanding tags shouldn’t be a CollectionOp at all, @dae? I wouldn’t expect users to want to undo it, or other GUI elements to react to it.

1 Like

Re: Beta 2: The new in-field HTML editor with syntax styling is great! It might be useful to be able to expand it into its own window, though, as the space is quite limited. Of course copying it and pasting it back is also always an option.

Very minor issue (apparent in beta 2, but also in beta 1 and probably even before):

When I hover above the search bar in the browser and scroll down with the mouse wheel once in order to select the last search it always skips the first entry and jumps directly to the second one:

If I scroll up again (also with the mousewheel) the correct first entry is selected.

The new HTML editor is awesome! :+1:
The only problem is that (in the browser) activating it in one note, then clicking on a card that belongs to another note, then deactivating it in this last note will write the content of the selected field from the first note to the second one.

immagine


immagine


immagine


immagine


immagine

4 Likes

Thanks all devs. You, guys, are awesome!

2 Likes

Beta 3 is now available

Edit: … and the change notes are now too :slight_smile:

1 Like

Probably Image Occlusion is broken with beta 3.(if it’s not just me) I hope it gets fixed soon. I was getting an error message when I tried to enter the browser. Later, disabling Image Occlusion fixed it. @glutanimate Maybe you want to take a look sir

This is the IO error I was getting (@dae is this something that can be fixed within Anki?)

Anki 2.1.45 (18843e71) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Mac 10.16
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2021-06-25 11:49:05

Caught exception:
Traceback (most recent call last):
File “aqt/webview.py”, line 41, in cmd
File “aqt/webview.py”, line 139, in _onCmd
File “aqt/webview.py”, line 603, in _onBridgeCmd
File “aqt/toolbar.py”, line 168, in _linkHandler
File “aqt/toolbar.py”, line 186, in _browseLinkHandler
File “aqt/main.py”, line 1117, in onBrowse
File “aqt/init.py”, line 101, in open
File “aqt/browser/browser.py”, line 106, in init
File “aqt/browser/browser.py”, line 385, in setupEditor
File “aqt/editor.py”, line 111, in init
File “aqt/editor.py”, line 134, in setupWeb
KeyError: ‘\n max-width’

A lot easier to debug when someone posts the error :slight_smile: Fix coming in the next beta.

This one took forever to get (had to toggle add-ons off a few at a time till I got the actual error from this addon and not stating some other addon was causing the issue). Is there a reason in recent versions that errors have been less likely to say what add-on is actually causing it? I’m guessing the hooks + just how it is, but figured I’d mention it in case there is something that can be done about it

When the customize editor stylesheet addon is activated and I open the browser, I always get an error like the one @AnKingMed posted + the browser fails to open:

Fehler
Anki 2.1.45 (b693bdbf) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2021-06-25 11:41:16

Caught exception:
Traceback (most recent call last):
File “aqt\webview.py”, line 41, in cmd
File “aqt\webview.py”, line 139, in _onCmd
File “aqt\webview.py”, line 596, in _onBridgeCmd
File “aqt\toolbar.py”, line 168, in _linkHandler
File “aqt\toolbar.py”, line 186, in browseLinkHandler
File “aqt\main.py”, line 1117, in onBrowse
File "aqt_init
.py", line 101, in open
File “decorator.py”, line 232, in fun
File “anki\hooks.py”, line 89, in decorator_wrapper
File “anki\hooks.py”, line 80, in repl
File “aqt\browser\browser.py”, line 106, in init
File “aqt\browser\browser.py”, line 385, in setupEditor
File “decorator.py”, line 232, in fun
File “anki\hooks.py”, line 89, in decorator_wrapper
File “anki\hooks.py”, line 80, in repl
File “aqt\editor.py”, line 111, in init
File “aqt\editor.py”, line 134, in setupWeb
KeyError: ‘\n border’

Also doesn’t say which addon is at fault.

Add-ons related problems

Anki 2.1.45 (18843e71) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2021-06-25 21:49:59

Problem on Browser

File “aqt\webview.py”, line 41, in cmd
File “aqt\webview.py”, line 139, in _onCmd
File “aqt\webview.py”, line 596, in _onBridgeCmd
File “aqt\toolbar.py”, line 168, in _linkHandler
File “aqt\toolbar.py”, line 186, in browseLinkHandler
File “aqt\main.py”, line 1117, in onBrowse
File "aqt_init
.py", line 101, in open
File “decorator.py”, line 232, in fun
File “anki\hooks.py”, line 89, in decorator_wrapper
File “anki\hooks.py”, line 80, in repl
File “aqt\browser\browser.py”, line 106, in init
File “C:\Users\NameLessGO\AppData\Roaming\Anki2\addons21\24411424\custom_shortcuts.py”, line 524, in cs_browser_setupEditor
self.editor = Editor(self.mw, self.form.fieldsArea, self)
File “aqt\editor.py”, line 111, in init
File “decorator.py”, line 232, in fun
File “anki\hooks.py”, line 89, in decorator_wrapper
File “anki\hooks.py”, line 80, in repl
File “aqt\editor.py”, line 134, in setupWeb
KeyError: 'globalKeydown(e); ’

the add-on mentioned is https://ankiweb.net/shared/info/24411424

Problem on the “add editor”

File “aqt\webview.py”, line 41, in cmd
File “aqt\webview.py”, line 139, in _onCmd
File “aqt\webview.py”, line 596, in _onBridgeCmd
File “aqt\toolbar.py”, line 168, in _linkHandler
File “aqt\toolbar.py”, line 183, in addLinkHandler
File “aqt\main.py”, line 1114, in onAddCard
File "aqt_init
.py", line 101, in open
File “decorator.py”, line 232, in fun
File “anki\hooks.py”, line 89, in decorator_wrapper
File “anki\hooks.py”, line 80, in repl
File “aqt\addcards.py”, line 48, in init
File “aqt\addcards.py”, line 60, in setupEditor
File “aqt\editor.py”, line 111, in init
File “decorator.py”, line 232, in fun
File “anki\hooks.py”, line 89, in decorator_wrapper
File “anki\hooks.py”, line 80, in repl
File “aqt\editor.py”, line 134, in setupWeb
KeyError: 'globalKeydown(e); ’

Syncing (sometimes)

File “aqt\taskman.py”, line 101, in _on_closures_pending
File “aqt\taskman.py”, line 71, in
File “aqt\taskman.py”, line 90, in wrapped_done
File “aqt\sync.py”, line 114, in on_future_done
File “aqt\main.py”, line 964, in on_collection_sync_finished
File “aqt\main.py”, line 767, in reset
File “aqt\main.py”, line 719, in _synthesize_op_did_execute_from_reset
File “aqt\hooks_gen.py”, line 2588, in call
File “aqt\browser\browser.py”, line 120, in on_operation_did_execute
AttributeError: ‘Browser’ object has no attribute ‘editor’

add-on problem: https://ankiweb.net/shared/info/1781298089

This happens since beta 2 btw. I didn’t have this problem in beta 1.

The errors saying:

File “aqt\editor.py”, line 134, in setupWeb
KeyError: 'xxxxxxx; ’

are already fixed in upstream (which includes IO Enhanced).

3 Likes

In past add-ons I’ve used for the sidebar, you could edit the entire tag as opposed to just the subtag (i.e. it would bring up a dialog with the entire tag::subtag::subtag). I think that would be useful if feasible

Also, I’m currently editing cards that have tag::subtag1::subtag2 and deleting ::subtag2 off the end. There is only one card that has subtag2 and the sidebar keeps the tag there even after deleting it until running clear unused tags. I tried just renaming the subtag in the sidebar to nothing, but that didn’t work (hence my recommendation for the above)

Another slightly annoying quirk. If I have selected a subtag and try to collapse the parent tag, I can’t

The idea was that you’d use drag & drop for modifying the hierarchy and renaming for modifying the node itself. It’s supposed to be more user-friendly, as you don’t have to bother with the special hierarchy syntax, and more ergonomic, as it removes the necessity of a separate dialogue.
For more intricate operations, there’s Find & Replace.

Not sure I understand. Can’t you just use the delete action?

Yep, that’s the same bug as @kleinerpirat’s reported above. It was supposed to be fixed in beta 3.

@Rumo

I was sent a deck with tag “tag::subtag1::subtag2::subtag3” and I wanted to change it to “tag::subtag2”. Is the only option right now Find & Replace? I’m not sure how much others used that feature when it was in BetterTags but I did quite often. I do think the user friendly design now is great, but it would be helpful to modify the entire tag for these instances

I couldn’t use delete because that would delete the entire tag and I wanted the tag to stay on there. If I delete “subtag3” in the above example, everything else goes with it. So I renamed them manually on each card to “tag::subtag2” but as I was renaming, it didn’t delete “tag::subtag1::subtag2::subtag3” which was no longer on any cards. I had to use clear unused tags to do that.

I’m running beta3 right now and still having this issue

1 Like

The fix (PR #1252) is coming with beta 4 :+1:

1 Like

Ah, okay. In that case, you would have to drop subtag3 onto tag, delete subtag1, and rename subtag3 to subtag1. I can see how this got more complicated with the new behaviour, but not sure if it’s worth adding a separate context action.

The fix didn’t make it into beta 3 due to a minor misunderstanding, but is now merged as @kleinerpirat has clarfied. Sorry for being unclear.