Commit graph

8288 commits

Author SHA1 Message Date
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
827f3e073a 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
7f2c3cf477 bump version 2021-08-19 22:10:45 +10:00
Damien Elmes
6ddbe8fd3e put reviews at bottom of reviews graph
https://forums.ankiweb.net/t/new-reviews-graph-design-is-worse-than-it-was-in-2-1-40/9807
2021-08-19 21:43:00 +10:00
Damien Elmes
fe1cfe171f update translations 2021-08-19 20:26:43 +10:00
Damien Elmes
6410e66857 filtered decks w/ scheduling disabled in v3 now log reviews 2021-08-19 20:25:29 +10:00
Damien Elmes
f44817e080 revert some interday learning changes in v3
Interday learning cards are now counted in the learning count again,
and are no longer subject to the daily review limit.

The thinking behind the original change was that interday learning cards
are scheduled more like reviews, and counting them in the review count
would allow the learning count to focus on intraday learning - the red
number reflecting the fact that they are the most fragile memories. And
counting them together made it practical to apply the review limit
to both at once.

Since the release, there have been a number of users expecting to see
interday learning cards included in the learning count (the latest being
https://forums.ankiweb.net/t/feedback-and-a-feature-adjustment-request-for-2-1-45/12308),
and a good argument can be made for that too - they are, after all, listed
in the learning steps, and do tend to be harder than reviews. Short of
introducing another count to keep track of interday and intraday learning
separately, moving back to the old behaviour seems like the best move.

This also means it is not really practical to apply the review limit to
interday learning cards anymore, as the limit would be split between two
different numbers, and how much each number is capped would depend on
the order cards are introduced. The scheduler could figure this out, but
the deck list code does not know card order, and would need significant
changes to be able to produce numbers that matched the scheduler. And
even if we ignore implementation complexities, I think it would be more
difficult for users to reason about - the influence of the review limit
on new cards is confusing enough as it is.
2021-08-19 16:40:12 +10:00
Damien Elmes
7c49cca8b0 ensure interday learning cards update deck limits
https://forums.ankiweb.net/t/more-cards-today-question-about-v3/12400
2021-08-19 12:50:11 +10:00
Damien Elmes
87afb69c0e fix default deck being shown in deck options deck prompt 2021-08-19 12:33:36 +10:00
Damien Elmes
00a2578807 fix error when db check run on corrupt collection 2021-08-19 12:33:04 +10:00
Damien Elmes
857bb0db7d allow adjusting tag case in rename
https://forums.ankiweb.net/t/2-1-46-renaming-tags-to-tags-not-working/12426
2021-08-19 11:46:01 +10:00
Damien Elmes
bddee7eb99 preferences update needs to be a collection op
- fixes https://forums.ankiweb.net/t/v3-bug-card-modified-without-updating-queue/12418
- fixes undo menu not updating after closing preferences screen
2021-08-19 10:47:55 +10:00
Damien Elmes
ad306d763e add a small .wait() after terminating player process
Avoids python3.8/subprocess.py:942:
ResourceWarning: subprocess 90387 is still running
  _warn("subprocess %s is still running" % self.pid,
2021-08-19 10:33:56 +10:00
Damien Elmes
fb7eabcb80 fix mutateNextCardStates being exported into global namespace
https://forums.ankiweb.net/t/v3-custom-scheduler-not-working/12441
2021-08-19 10:21:04 +10:00
Damien Elmes
bf2c157405 Merge pull request #1333 from kelciour/mpv-property-list-timeout
A possible fix for "mpv timed out, restarting"
2021-08-18 16:39:50 +10:00
Damien Elmes
09ad5ab7c3 Merge pull request #1331 from hikaru-y/fix-fragment-autoplay
Fix <audio>/<video> with 'autoplay' issue
2021-08-18 16:37:14 +10:00
Damien Elmes
22e70b520d shift timebox check to post-answer
- should prevent non-review actions from triggering display
- should prevent next card's audio from playing before diag. dismissed
- the timer hack should no longer be required, as the webview will
have already been loaded

https://forums.ankiweb.net/t/timebox-pop-up-suddenly-appears-when-daily-cutoff-hour-rolls-over-even-when-not-in-the-reviewer/12385
2021-08-18 16:25:23 +10:00
Damien Elmes
176c626ffd ctrl+alt+n for forget
https://forums.ankiweb.net/t/anki-2-1-44-make-cards-new/12247/7
2021-08-18 15:32:45 +10:00
Damien Elmes
70dec17296 add symlink to generated icons.qrc
Otherwise Qt Designer tries to remove the reference.
2021-08-18 15:32:45 +10:00
kelciour
3962de958a A possible fix for "mpv timed out, restarting"
https://forums.ankiweb.net/t/anki-wont-open-mpv-timed-out/7579/6
2021-08-18 00:47:04 +03:00
hikaru-y
53d8a9a492 Silence 'link preload' warning on the first card
Due to e23737f, a harmless warning about 'link preload' will be output
to the console on the first card.
2021-08-18 02:25:51 +09:00
hikaru-y
e23737fb6c Use <template> element instead of Range.createContextualFragment()
https://forums.ankiweb.net/t/audio-in-back-template-is-played-on-front-template-on-desktop-2-1-46/12399

Unlike when using <template> element, if a DocumentFragment is created
using Range.createContextualFragment(), <audio>/<video> elements
with `aotoplay` will play immediately even before they are inserted into
the actual document, which will cause audio or video on the answer side
to be played on the question side.
2021-08-18 00:04:02 +09:00
Damien Elmes
ad1963965e Merge pull request #1330 from Arthur-Milchior/underline_history
Add Card history: keep & instead of replacing them by underline
2021-08-15 19:16:22 +10:00
Damien Elmes
8d417a3095 require protobuf 3.17+
https://forums.ankiweb.net/t/anki-help-linux/12218/4
2021-08-15 16:28:32 +10:00
Damien Elmes
37ed7f9bae fix inverted 'skip question when replaying answer' option
I'd intended to add a new string but overlooked it.

https://forums.ankiweb.net/t/bug-always-include-question-side-when-replaying-audio/12273/2
2021-08-15 16:15:14 +10:00
Damien Elmes
7127dca4bd allow repositioning of new cards while suspended
https://forums.ankiweb.net/t/no-longer-can-reposition-a-suspended-card/12241
2021-08-15 15:06:25 +10:00
Arthur Milchior
c0625e9145 Add Card history: keep & instead of replacing them by underline 2021-08-15 06:32:03 +02:00
Damien Elmes
a697d0b537 check both queues when popping answered card
If multiple answers are applied in succession, a newly-due learning card
may be in front of the next main entry.
2021-08-09 18:29:04 +10:00
Damien Elmes
9254685819 Merge pull request #1325 from abdnh/fix-dupe-quote-escaping
Fix double quotes being escaped twice in dupe search
2021-08-09 16:16:12 +10:00
Damien Elmes
eae17ffbff use alphanumeric keyboard in SpinBoxFloat
https://forums.ankiweb.net/t/error-setting-hard-interval-on-ios/12105/3
2021-08-09 14:15:16 +10:00
abdo
f3ce557d5e Fix double quotes being escaped twice in dupe search
maybe_quote() already escapes double quotes.
2021-08-09 05:05:20 +03:00
Damien Elmes
2bf1dca15c fall back on default deck in v3 queue gather as well
Missed in the previous change.

https://forums.ankiweb.net/t/error-when-trying-to-choose-deck-in-new-anki/11829/11
2021-08-09 11:04:37 +10:00
Damien Elmes
13ffd705f2 fallback on default deck in congrats screen
https://forums.ankiweb.net/t/error-when-trying-to-choose-deck-in-new-anki/11829
2021-08-04 12:57:46 +10:00
Damien Elmes
15c3b2a62a fix deprecation warning in modelchooser.py 2021-08-04 12:05:11 +10:00
Damien Elmes
8fb6ad2f08 fix notetype selection in import screen
Accidental rename in "PEP8 cards.py"
2021-08-04 12:01:28 +10:00
Damien Elmes
cfb9a9ec9f fix undoing last learning card corner case 2021-08-04 10:29:01 +10:00
Damien Elmes
821775f8cf fix redo menu item showing undo text 2021-08-04 10:28:45 +10:00
Damien Elmes
f3324d975c Merge pull request #1321 from hgiesel/stickyshortcuts
Sticky shortcuts
2021-08-03 14:18:00 +10:00
Henrik Giesel
b396ef558c Satisfy eslint 2021-08-03 06:12:04 +02:00
Henrik Giesel
00b990b79e Add tooltip for Toggly sticky icon 2021-08-03 06:02:29 +02:00
Henrik Giesel
485460870c Increase inactive opacity a little for better discoverability 2021-08-03 05:52:57 +02:00
Henrik Giesel
2649dc0ad7 Add toggle sticky shortcuts F9 and Shift+F9 2021-08-03 05:52:07 +02:00
Damien Elmes
9a809af6ab Merge pull request #1320 from hgiesel/colorpickerplus
Remember last text and highlight color again
2021-08-03 09:07:46 +10:00
Henrik Giesel
39566638f3 Remember last text and highlight color again 2021-08-02 23:12:00 +02:00
Damien Elmes
48028aa397 Merge pull request #1319 from abdnh/sidebar-scroll-center
Use PositionAtCenter for sidebar scrolling
2021-08-02 18:35:38 +10:00
Damien Elmes
28535b4f84 Merge pull request #1311 from hikaru-y/flag-mark-icons-in-previewer
Show flag and mark icons in previewer
2021-08-02 18:33:36 +10:00