Commit graph

8333 commits

Author SHA1 Message Date
Ren Tatsumoto
b6f899dbd1 update CONTRIBUTORS 2021-09-05 13:52:54 +03:00
Ren Tatsumoto
ef24288639 Add a hook for modifiying pasted MIME data 2021-09-05 13:52:54 +03:00
Damien Elmes
30395e3e9d 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
0667706d60 Add source for block level elements 2021-09-02 22:31:25 +10:00
Henrik Giesel
f7954af1be Remove special treatment of empty anki-editable 2021-09-02 22:31:25 +10:00
Henrik Giesel
47252983c5 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
f5bbeba218 Merge pull request #1350 from hgiesel/exportshortcuts
Implement register-package and export some packages
2021-09-02 22:23:12 +10:00
Damien Elmes
575ddb6cc6 Merge pull request #1351 from hgiesel/fontisinline
Add FONT as an inline tag
2021-09-02 22:22:19 +10:00
Damien Elmes
3fc1ead668 don't allow | in generic family 2021-09-02 21:05:17 +10:00
Damien Elmes
acda398a2e quote fonts added via the Add Field dialog 2021-09-02 21:05:16 +10:00
Damien Elmes
e40004b450 tweak linux.md and add forum link 2021-09-02 20:52:55 +10:00
Damien Elmes
941d65eb18 fix inverted decks.have() 2021-09-01 12:00:05 +10:00
Henrik Giesel
bafbdb3835 Add FONT as an inline tag 2021-08-31 13:59:07 +02:00
Henrik Giesel
76ca1356ac 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
5e862c216a 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
2bbe674a1c 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
f1fcd8830d Disable 'Rename with Parents' for top-level items 2021-08-30 11:10:14 +02:00
RumovZ
e482322f0d Reset flags when loading a profile...
... not only on startup.
2021-08-30 11:07:40 +02:00
Damien Elmes
65c9853d38 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
1f5a49fe42 bump version 2021-08-29 13:42:37 +10:00
Damien Elmes
8d4b38533a 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
f3b6041e79 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
c0392192c5 more checks for package name
Follows up #1343
2021-08-29 11:23:47 +10:00
Damien Elmes
7726176240 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
ff68eb2268 Use different artificial reviewer button highlight for Windows 2021-08-28 21:30:07 +02:00
Glutanimate
09fb9afb18 Add a hook for subscribing to dialog creation / opening 2021-08-28 20:37:31 +02:00
bluegreenmagick
e8cb921747 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
ff7419b153 update translations 2021-08-25 11:21:21 +10:00
Damien Elmes
481a87367c 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
7f03ecb202 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
aaa6ecb7e6 Merge pull request #1340 from hgiesel/exportinternal
Export Svelte internals
2021-08-24 10:42:17 +10:00
Damien Elmes
875fd62264 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
119d2e0eb4 Rename cross-unit to export-internal 2021-08-23 23:45:50 +02:00
Henrik Giesel
8f8914f3c7 Update Svelte to 3.42.2 2021-08-23 23:38:16 +02:00
Henrik Giesel
0585a5da3e Export WithShortcut 2021-08-23 21:23:04 +02:00
Henrik Giesel
5c987896cf 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
c6762ee8ab 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
e3dba889cf update translations 2021-08-22 15:32:46 +10:00
Damien Elmes
21c2fe7b2d add note about interday learning cards being fetched preferentially
+ priority->order
2021-08-22 15:32:46 +10:00
Damien Elmes
0aae073056 adding options to sort by ascending/descending ease 2021-08-22 15:32:46 +10:00
Damien Elmes
56e807c45d 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
d8cbb8149a 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
e37a0844ae fix new clippy warning 2021-08-22 15:32:46 +10:00
Arthur Milchior
b1da25d112 Mention .anki can be imported with add-on 175027074 2021-08-21 15:25:04 +02:00
Damien Elmes
3ec3b4242f Merge pull request #1335 from hikaru-y/fix-editor-fontfamily
Quote font family names
2021-08-20 14:39:29 +10:00
Damien Elmes
104a24bc1d 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
c8cf606736 avoid spurious warning in addcards startup 2021-08-20 11:37:23 +10:00
Damien Elmes
96651a4123 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
e2f89fc24c show v3 scheduler in error info 2021-08-20 10:47:41 +10:00
hikaru-y
0331da21e6 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