Anki Forums

Anki 2.1.45 Alpha

Hi all,

A new alpha release is available. Please see the change notes for more info: Changes in 2.1.45 - Anki Betas

11 Likes

Reading that changelog made me feel like christmas came super early this year :christmas_tree:Thanks for your hard work @dae, @hengiesel, @Rumo and everyone else!

I won’t go into all the add-ons that break with this update (most have to do with a change/removal of NoteType), since you’ll probably publish a porting guide soon.

The following issues occur with all add-ons manually disabled. I will expand the list if I stumble upon other irregularities:

General

  • I can’t start without add-ons by holding Shift on launch. Neither on Linux nor on Windows. Is anyone else experiencing this issue?

Browser issue, probably due to add-on

  • Switching to Note-View, then back to Card-View and then back to Note View crashes Anki for me. I get stuck in the following process:
    image

I think I know where this error stems from. I had used the Advanced Browser add-on and forgot to remove an extra column (Flag) before updating to 2.1.45. It left a remnant column called “Add-on”.

Update: I reinstalled 2.1.44, disabled the extra column of Advanced Browser and reinstalled 2.1.45. The extra column was still there. After removing that “Add-on”-column via the GUI (as suggested by Rumo below), Anki doesn’t crash anymore, but it throws the following exception when switching between the two views:

Caught exception:
Traceback (most recent call last):
  File "aqt\browser\table\table.py", line 362, in _on_sort_column_changed
  File "aqt\browser\table\model.py", line 225, in column_at_section
  File "aqt\browser\table\state.py", line 40, in column_key_at
IndexError: list index out of range
6 Likes

I can confirm this.

This is very likely the cause, but it shouldn’t happen, and in fact, I thought this exact bug had been fixed. I’ll see what I can do.
By the way, you should be able to disable “Add-on” columns from the GUI now.

2 Likes

The new toolbar looks awesome. I’ve noticed, however, that the buttons added by add-ons look quite different from those that are built-in.

immagine

I tried to tweak a little the css and I got this:

immagine

which, IMHO, gives the toolbar a more consistent look.

2 Likes

Just my guess: I believe if the add-on devs use the new toolbar API to add their buttons, they will look just like the default ones. The ugly look (hopefully) only applies to buttons which are added in the legacy-way, which is kept for compatibility reasons.

However, I really like your CSS tweak and even if it’s just for this short transition phase, it would be nice if it were integrated. :clap:

2 Likes

Ah, I see. Thanks for the explanation. :+1:

Thanks for this awesome update!

About the previous comments
on windows 10 the “safe mode” on anki don’t appear to be disabling all the add-ons and is working like a normal mode

About the…


personally i think it is better… (yeah i know i hate this type of guy as well, just enjoy the update without complaining about it)

  1. the place to type be under the configuration rather than on the right example: (could have an option on the preference tab relating to this type of styling → on left, center, right)
    New cards/day (i)
    9999
  2. the writing “right to left” direction feels weirds since the normal for users is “left to right” like what we are doing right now

Don’t take theses ideas with seriousness they are only personal preference

The next alpha will add an alias for NoteType. Feel free to post other add-on errors you get (perhaps in a different thread) - many may be unavoidable due to how much has been changed, but sometimes breakages are unintentional and easy to fix.

@Ab_Bc if those styling changes don’t cause a regression for other add-ons, please feel free to send through a PR

Left-aligning the single-row items makes them feel a bit unbalanced, but maybe we could do that for the learning steps when they take up a whole line? Anyone else want to chime in?

I don’t know exactly how to work with PRs, but since the changes I made are very simple I think I can list them here:

In .linkb I added:

background-color: white; border: 1px solid var(--medium-border);

And in .topbut I added:

position: relative; bottom: 2.7px;

In order to keep this compatible with night mode, we might have to introduce a new CSS variable for the button background color and border color OR use an existing class that already imitates the Svelte buttons.

I suggest the following:

:root[class*=night-mode] {
   ...
   --button-bg: #666;
   --button-border: #666;
}

:root {
   ...
   --button-bg: white;
   --button-border: var(--medium-border);
}

You can find the variable definitions here: anki/_vars.scss at 5449198649c623fa65ae8d184925ef9c6aae5a71 · ankitects/anki · GitHub

Right. And in addition the changes I posted make the buttons have always the same look even when the user hovers on or click on them, so (in light mode) something like

.linkb:hover { background-color: #ebebeb; }

should be added.

1 Like

Thanks a lot for such an awesome update, the new features are terrific!

Unfortunately, Closet for Anki, / Asset Manager / Anki Persistence, all three esential to me, seems to be not working properly with the update:

An add-on you installed failed to load. If problems persist, please go to the Tools>Add-ons menu, and disable or delete the add-on.

When loading ‘⁨Closet For Anki⁩’:
⁨Traceback (most recent call last):
File “aqt\addons.py”, line 217, in loadAddons
File “C:\Users\sergi\AppData\Roaming\Anki2\addons21\272311064_init_.py”, line 1, in
from .src import init
File “C:\Users\x\AppData\Roaming\Anki2\addons21\272311064\src_init_.py”, line 3, in
from .hook import setup_script, install_script
File “C:\Users\sergi\AppData\Roaming\Anki2\addons21\272311064\src\hook.py”, line 25, in
if am := find_addon_by_name(“Asset Manager”):
File “C:\Users\x\AppData\Roaming\Anki2\addons21\272311064\src\utils.py”, line 19, in find_addon_by_name
return import_module(name)
File “importlib_init_.py”, line 127, in import_module
File “C:\Users\x\AppData\Roaming\Anki2\addons21\656021484_init_.py”, line 10, in
from .src import setup
File “C:\Users\sergi\AppData\Roaming\Anki2\addons21\656021484\src_init_.py”, line 1, in
from .webview import init_webview
File “C:\Users\x\AppData\Roaming\Anki2\addons21\656021484\src\webview_init_.py”, line 7, in
from …config import maybe_get_setting_from_card
File “C:\Users\x\AppData\Roaming\Anki2\addons21\656021484\src\config.py”, line 7, in
from anki.models import NoteType
ImportError: cannot import name ‘NoteType’ from ‘anki.models’ (C:\Program Files\Anki\anki\models.pyc)

On the other hand, on a purely aesthetic note, the font size used in the new deck option window, maybe look too large compared to other elements of the GUI, specially for those of using the user interface size option with a value larger than 100.

1 Like

I think most of those will be fixed with this change:

Completely agree, all elements seem a bit too big. Also, having all options on one page is a bit overwhelming. Maybe tabs (like in previous versions) would help here. I would prefer not having to scroll to get to the desired option.

2 Likes

It looks much better in Damien’s screenshot, so I assume the following issues are Windows-specific:

  1. There are no window margins.
  2. I don’t think the font of the labels is too small per se, it’s the same size as in other web views, but it looks rather unbalanced because the counters, the button labels and the section headings are huge. Even the tooltips use a larger font size.

@NameLessGO, I think it looks odd because the window is extremely wide in your screenshot.

Another minor point: The counters seem to use the system language rather than the Anki setting. I.e., I see decimal commas even though my Anki is set to English.

1 Like

On my Linux system, the options container seems to have a max-width but almost no margin when you minimize the window’s width:


The single-page layout could make it easier to share deck options via screenshots, but only if the options fit onto the vertical screen-space. As you can see on my screenshot, even with a maximized window at 1920x1080, only half of the content is visible.

2 Likes

I’m getting an error message when clicking in the new “Toggle Showing Card / Notes” icon on the browser:

Debug info:

Anki 2.1.45 (10bfb95f) 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-05-17 13:47:56

Caught exception:

Traceback (most recent call last):

File “aqt\browser\table\table.py”, line 362, in _on_sort_column_changed

File “aqt\browser\table\model.py”, line 225, in column_at_section

File “aqt\browser\table\state.py”, line 40, in column_key_at

IndexError: list index out of range

I also got this problem after a few uses of the new alpha version:

I’ve never had this problem before. Just restarting the computer solved it

Most likely the same bug as reported by @kleinerpirat. I’m positive that it’s fixed on the main branch.

2 Likes

As a reference, this is how I hacked my buttons for night mode:

image

.linkb {
    ...
    background-color: #666;
    border-style: none;
    margin-left: 1px;
    padding-bottom: 2.7px;
}

.topbut {
    ...
    filter: invert(1);
}

1 Like

Just wanted to add my thoughts in at the moment. Loving all the new updates and I’m excited to try the new scheduler once I can get things working

It broke ~15 add-ons for me. I’ll get an updated list on here once I have time to figure out exactly which ones

Personally I don’t love the look of the new settings. I think the settings are already not super user friendly but the new look is worse. Having things organized by tabs was much simpler. There’s too much space between text and input box with the new look. I’d strongly favor reverting to the old look unless there’s an overwhelming majority that prefer the new one.

2 Likes

Vertical, mobile friendly design, which makes little sense in the widescreen era… Factoring this, im not loving the new design

This is the reason this add-on (browser side-by-side) and similars should be default in desktop anki

The new design does look more modern and neat. And i have no idea how would you use horizontal space to make it look as good as the new proposal🤷‍♂️