Commit Graph

8331 Commits

Author SHA1 Message Date
Damien Elmes
e5409a25b5
Merge pull request #1353 from hgiesel/checkforblockinstead
Check for non-existence of block tags instead of exclusive existence of inline tags in editable
2021-09-02 22:39:58 +10:00
Henrik Giesel
4737a99809 Add source for block level elements 2021-09-02 22:31:25 +10:00
Henrik Giesel
1363a40273 Remove special treatment of empty anki-editable 2021-09-02 22:31:25 +10:00
Henrik Giesel
01a283bb99 Check for non-existence of block tags instead of exclusive existence of inline tags in editable 2021-09-02 22:31:25 +10:00
Damien Elmes
cb5cb006a9
Merge pull request #1350 from hgiesel/exportshortcuts
Implement register-package and export some packages
2021-09-02 22:23:12 +10:00
Damien Elmes
d210a21787
Merge pull request #1351 from hgiesel/fontisinline
Add FONT as an inline tag
2021-09-02 22:22:19 +10:00
Damien Elmes
b9d9343f51 don't allow | in generic family 2021-09-02 21:05:17 +10:00
Damien Elmes
1ae45c5445 quote fonts added via the Add Field dialog 2021-09-02 21:05:16 +10:00
Damien Elmes
1cdf0b1e9d tweak linux.md and add forum link 2021-09-02 20:52:55 +10:00
Damien Elmes
1bd14b538d fix inverted decks.have() 2021-09-01 12:00:05 +10:00
Henrik Giesel
cc8ee65eaf Add FONT as an inline tag 2021-08-31 13:59:07 +02:00
Henrik Giesel
6e0f7c3d53 Implement register-package and export some packages
Exported packages are:
* anki/packages
* anki/shortcuts
* anki/bridgecommand
2021-08-30 14:41:40 +02:00
Damien Elmes
ab20f215b1
Merge pull request #1349 from RumovZ/rename-with-parents
Disable 'Rename with Parents' for top-level items
2021-08-30 22:27:44 +10:00
Damien Elmes
37941c7d93
Merge pull request #1348 from RumovZ/fix-profile-flags
Fix flags not updating when changing profile
2021-08-30 22:27:27 +10:00
RumovZ
d044360ff9 Disable 'Rename with Parents' for top-level items 2021-08-30 11:10:14 +02:00
RumovZ
3c53a961a3 Reset flags when loading a profile...
... not only on startup.
2021-08-30 11:07:40 +02:00
Damien Elmes
9a27e44ff8 don't panic when invalid note id provided to change notetype
https://forums.ankiweb.net/t/fatal-error-while-updating-deck/12743/2
2021-08-29 14:00:55 +10:00
Damien Elmes
a4ff1152d3 bump version 2021-08-29 13:42:37 +10:00
Damien Elmes
dc156f3471
Merge pull request #1344 from glutanimate/add-dialog-manager-hooks
Add a hook for subscribing to dialog creation / opening
2021-08-29 11:36:11 +10:00
Damien Elmes
395119bafe
Merge pull request #1345 from hgiesel/windowsfocus
Use different artificial reviewer button highlight for Windows
2021-08-29 11:35:32 +10:00
Damien Elmes
e4f8ba000e more checks for package name
Follows up #1343
2021-08-29 11:23:47 +10:00
Damien Elmes
b9461225ca
Merge pull request #1343 from BlueGreenMagick/disallow-empty-str-package-addon
Fix bug when add-on package string is ""
2021-08-29 10:52:30 +10:00
Henrik Giesel
3b90b27095 Use different artificial reviewer button highlight for Windows 2021-08-28 21:30:07 +02:00
Glutanimate
5eac3b9061 Add a hook for subscribing to dialog creation / opening 2021-08-28 20:37:31 +02:00
bluegreenmagick
20424a7ef7 Fix bug when add-on package string is ""
which deleted the entire add-on folder
2021-08-27 21:49:55 +09:00
Damien Elmes
3077a1f98a update translations 2021-08-25 11:21:21 +10:00
Damien Elmes
ab8e53f66e fix incorrect calendar day labels
https://forums.ankiweb.net/t/day-of-the-week-legend-on-heatmap/9450/7
2021-08-24 12:17:35 +10:00
Damien Elmes
d8a0df2a62
Merge pull request #1337 from Arthur-Milchior/main
Mention .anki can be imported with add-on 175027074
2021-08-24 11:04:33 +10:00
Damien Elmes
1dd3583b43
Merge pull request #1340 from hgiesel/exportinternal
Export Svelte internals
2021-08-24 10:42:17 +10:00
Damien Elmes
12ea482c87 expose require() instead of the svelte global
- Means add-on authors should not need to inject any code in their build
- Should be more flexible - we can export multiple libraries if we wish,
and don't have to worry about require() being clobbered by old add-ons.
2021-08-24 10:22:07 +10:00
Henrik Giesel
fdf8321253 Rename cross-unit to export-internal 2021-08-23 23:45:50 +02:00
Henrik Giesel
c69232921a Update Svelte to 3.42.2 2021-08-23 23:38:16 +02:00
Henrik Giesel
fea4f17107 Export WithShortcut 2021-08-23 21:23:04 +02:00
Henrik Giesel
1495fdf311 Export svelte_internal as library on window object
Closes https://github.com/ankitects/anki/issues/1328.
2021-08-23 21:16:15 +02:00
Damien Elmes
dffa38c479 expose uncapped counts and total in tree node
In the future this information could be revealed on hover, to make it
clearer how limits are being applied.
2021-08-22 15:32:46 +10:00
Damien Elmes
8417cde5c9 update translations 2021-08-22 15:32:46 +10:00
Damien Elmes
1b2d57d956 add note about interday learning cards being fetched preferentially
+ priority->order
2021-08-22 15:32:46 +10:00
Damien Elmes
05124eecf7 adding options to sort by ascending/descending ease 2021-08-22 15:32:46 +10:00
Damien Elmes
62223499c4 fix errors when undoing/redoing after a queue-invalidating operation
There were a few issues going on here:

- If some operation had invalidated the queues, they were subsequently
recreated with a call to .get_queues() in the undo handling code. This
could happen after the changes to the card had already been reverted,
leading to a queue state that didn't match our expectations.
- More generally, it's not safe to assume our mutations will apply
cleanly after the queue has been rebuilt. The next card will vary
depending on the number of remaining cards when interspersing cards of
different types, and a queue-invalidating operation will have changed
the learning cutoff.

So rather than rebuilding the queues on demand, we now check that they
already exist, and were created at the time we expect. If not, we
invalidate them and skip applying the mutations, and a subsequent
refresh of the UI should rebuild the queues correctly.

As part of this change, the cutoff snapshot has been moved into the
normal answer update object.

One possible downside here is that adding a note during review may cause
a newly due learning card to appear when undoing a different review.
If this proves to be a problem, we could potentially note down the
learning cutoff and apply it when queues are rebuilt later.
2021-08-22 15:32:46 +10:00
Damien Elmes
b9402b5c47 support limiting interday learning cards by review limit again
Context: https://forums.ankiweb.net/t/more-cards-today-question-about-v3/12400/10

Previously, interday learning cards and reviews were gathered at the
same time in v3, with the review limit being applied to both of them. The
order cards were gathered in would change the ratio of gathered learning
cards and reviews, but as they were displayed together in a single count,
a changing ratio was not apparent, and no special handling was required
by the deck tree code.

Showing interday learning cards in the learning count, while still
applying a review limit to them, makes things more complicated, as
a changing ratio will result in different counts. The deck tree code
is not able to know which order cards will appear in, so without changes,
we would have had a situation where the deck list may show different counts
to those seen when clicking on a deck.

One way to solve this would have been to introduce a separate limit for
interday learning cards. But this would have meant users needed to
juggle two different limits, instead of having a single one that controls
total number of (non-intraday) cards shown.

Instead, the scheduler now fetches interday cards prior to reviews -
the rationale for that order is that learning cards tend to be more
fragile/urgent than reviews. The option to show learning cards
before/after/mixed with reviews still exists, but it applies only after
cards have been capped to the daily limit.

To ensure the deck tree code matches the counts the scheduler gives,
it too applies limits to interday learning cards first, and reviews
afterwards.
2021-08-22 15:32:46 +10:00
Damien Elmes
6977b6ab6f fix new clippy warning 2021-08-22 15:32:46 +10:00
Arthur Milchior
cc35a646a6 Mention .anki can be imported with add-on 175027074 2021-08-21 15:25:04 +02:00
Damien Elmes
ce4dcab9e4
Merge pull request #1335 from hikaru-y/fix-editor-fontfamily
Quote font family names
2021-08-20 14:39:29 +10:00
Damien Elmes
131c8b72f8 add options to v3 to preserve new card gather order
Allows cards to be presented in deck order when gather priority is set
to 'deck'.
2021-08-20 12:03:32 +10:00
Damien Elmes
94a0355389 avoid spurious warning in addcards startup 2021-08-20 11:37:23 +10:00
Damien Elmes
886ce15f27 mark old editing code as deprecated
https://forums.ankiweb.net/t/emacs-style-shortcuts-with-ctrl-t-in-the-editor-in-45/12280/6
2021-08-20 11:37:11 +10:00
Damien Elmes
f6ae0b73be show v3 scheduler in error info 2021-08-20 10:47:41 +10:00
hikaru-y
20085c9bc4 Quote font family names, except for generic families
Fixes https://forums.ankiweb.net/t/font-script-is-not-changing-in-the-anki-windows/12465
2021-08-20 04:31:11 +09:00
Damien Elmes
53fe7e574e handle ampersand entities in image filenames
In the old HTML editor, filenames were % escaped before feeding them to
beautifulsoup, causing bare ampersands to be left alone. The new HTML
editor reads content from the DOM, where a bare ampersand has been
transformed into an &, and that gets saved back into the field,
so the media check now needs to deal with it for images as well.

https://forums.ankiweb.net/t/causing-problems-with-image-names/12171
2021-08-19 23:43:40 +10:00
Damien Elmes
739ec2798d bump version 2021-08-19 22:10:45 +10:00