Commit Graph

6418 Commits

Author SHA1 Message Date
Damien Elmes
402921dac7 ignore manually scheduled cards in hour graph 2021-02-10 09:36:51 +10:00
Damien Elmes
599d463486 update translations 2021-02-09 19:37:28 +10:00
Damien Elmes
678756c3e9 add escape hatch for new clicking behaviour, in case it causes problems 2021-02-09 19:29:59 +10:00
Damien Elmes
9ce4b21935 add markdown flag for deck description
Needed so we can display consistently, and gradually transition over
2021-02-09 18:47:19 +10:00
Damien Elmes
333bbf3ee4 update translations 2021-02-09 16:38:41 +10:00
Damien Elmes
71ac0fef32 fix wrong section heading in ftl 2021-02-09 16:38:19 +10:00
Damien Elmes
cf5e04b011 tweak sidebar appearance
- draw a border between sidebar and main area
- tweak padding

Testing is a pain, because you need to check day mode on the
three platforms, and night mode as well. If you can do it better, PRs
are welcome :-)
2021-02-09 16:23:44 +10:00
Damien Elmes
678a049d0e add missing license headers 2021-02-09 13:38:04 +10:00
Damien Elmes
24728481cd
Merge pull request #1014 from hgiesel/currentfield
Refactor "currentField" concept for editor, export for add-on developers
2021-02-09 13:34:59 +10:00
Damien Elmes
63b369b8a6 add 'untagged', and make clicking on 'tags' show all tagged cards 2021-02-09 12:50:35 +10:00
Damien Elmes
9048a1ff3c experiment with using right click for AND/OR/NOT
This frees up Ctrl/Shift+left click to behave like in a typical GUI
app. On a Mac users can either two finger click, or Command+click in
conjunction with one of the other modifiers.

https://github.com/ankitects/anki/issues/1011
2021-02-09 11:39:47 +10:00
Damien Elmes
68c4b10dcd move update_search into sidebar.py; fix setFilter()
No idea why neither mypy nor pylint are not noticing
"set_filter_then_search" does not exist. Python tooling. :-(
2021-02-09 10:50:39 +10:00
Damien Elmes
09dfbfe2b9 Partially revert "don't select contiguously with shift+click"
I thought this could work, but users (including myself!) are used to
being able to shift+click to select a region, and this behaviour is
surprising. We're also doing potentially expensive searches for each
extra selected item. I think we may need to switch this behaviour to
the right mouse button instead.

This partially reverts commit c91d21e18e.
2021-02-09 10:37:21 +10:00
Henrik Giesel
ee194e951c Rework focusing code to fix two issues:
1. Clicking away from the editor window, and back on it should not focus old field
2. Clicking on a field, which is not fully visible, should scroll it into view
2021-02-09 01:09:16 +01:00
Damien Elmes
2a0bc15a0b move flags above card state; change stage label for consistency 2021-02-09 09:54:46 +10:00
Damien Elmes
180efbc578 recent -> today
'Current deck' has moved, and by removing 'due tomorrow', we can drop
the 'today' suffix on the rest of the items.

The keys of the existing translations have not been changed, so
existing translations will not break, but will need to be manually
updated to make them shorter.
2021-02-09 09:50:59 +10:00
Damien Elmes
13aa6f99e4 fix rename/delete on current deck 2021-02-09 09:38:37 +10:00
Damien Elmes
c91d21e18e don't select contiguously with shift+click; enable multiple selection
https://github.com/ankitects/anki/issues/1011
2021-02-09 09:33:32 +10:00
Henrik Giesel
b56b3fd74a Use mouseup intead of click for updateButtonState 2021-02-08 22:18:06 +01:00
Henrik Giesel
a90931b91e Refactor wrap code 2021-02-08 22:13:49 +01:00
Henrik Giesel
d10383ea9d Give toolbar items a bottom margin to separate the rows when they wrap 2021-02-08 21:26:37 +01:00
Henrik Giesel
61c4ef40de Put wrapping code into its own file 2021-02-08 21:02:46 +01:00
Henrik Giesel
a19bc2d012 updateButtonState on clicking editor field 2021-02-08 20:49:33 +01:00
Henrik Giesel
bc7a1d12cd Export saveNow 2021-02-08 20:28:02 +01:00
Henrik Giesel
934a9bd24b Split up index.ts into several more files
This is to provide minimal closures for the mutable file-local variables:
- changeTimer
- previousActiveElement
- currentNoteId

This makes it clear, that they should not be used, but rather the
functions which wrap them in an API
2021-02-08 19:48:42 +01:00
Henrik Giesel
ef14000afd Avoid making currentField a global 2021-02-08 17:00:27 +01:00
Henrik Giesel
2637a4955b Export current field for editor 2021-02-08 15:44:56 +01:00
Damien Elmes
7972fa6493 remove 'any flag'; make clicking on flags root do the same thing 2021-02-08 22:52:37 +10:00
Damien Elmes
202cf38446 fix wrong item type being used for recent items 2021-02-08 22:50:48 +10:00
Damien Elmes
05074f2cc1 make decks root search collection; move current deck
Also use explicit 'deck:*' search, to make it more obvious what is
happening
2021-02-08 22:48:45 +10:00
Damien Elmes
a8ddb65e1c add ability to force interval reset
- use trailing ! to force a reset
- use - instead of ..
- tweak i18n messages and error handling
2021-02-08 22:33:27 +10:00
Damien Elmes
b9635ce936 nest NoteWithEmptyCards 2021-02-08 19:11:16 +10:00
Damien Elmes
aa82bb172d add small amount of padding to sidebar
https://forums.ankiweb.net/t/anki-2-1-41-beta/7305/3
2021-02-08 19:01:54 +10:00
Damien Elmes
dc10dbcfb2 remove some unused preference strings 2021-02-08 18:49:13 +10:00
Damien Elmes
4ac62f8848 fix media check not updating progress 2021-02-08 16:46:57 +10:00
Damien Elmes
6ac35b30c1 Media check suffered from the same text box slowdown as the importing screen 2021-02-08 16:42:21 +10:00
Damien Elmes
c23b01978d nest progress messages and remove Python wrapper class
The progress messages are only really intended to be consumed by Anki.
If consumption by add-ons was expected, we'd be better off keeping the
wrapper, as the API for oneofs in Python is quite awkward to use.
2021-02-08 16:40:27 +10:00
Damien Elmes
f434cff36f remember last input for 'set due'; add string config; nest config types 2021-02-08 14:10:05 +10:00
Damien Elmes
b56580a8c0 fix rsbackend compat issues 2021-02-08 09:51:51 +10:00
Damien Elmes
6aab9feec1 add (unused) reschedule option back to avoid breaking fastbar 2021-02-08 09:51:40 +10:00
Damien Elmes
704b5e581a Rework reschedule tool
The old rescheduling dialog's two options have been split into two
separate menu items, "Forget", and "Set Due Date"

For cards that are not review cards, "Set Due Date" behaves like the
old reschedule option, changing the cards into a review card, and
and setting both the interval and due date to the provided number of
days.

When "Set Due Date" is applied to a review card, it no longer resets
the card's interval. Instead, it looks at how much the provided number
of days will change the original interval, and adjusts the interval by
that amount, so that cards that are answered earlier receive a smaller
next interval, and cards that are answered after a longer delay receive
a bonus.

For example, imagine a card was answered on day 5, and given an interval
of 10 days, so it has a due date of day 15.

- if on day 10 the due date is changed to day 12 (today+2), the card
is being scheduled 3 days earlier than it was supposed to be, so the
interval will be adjusted to 7 days.
- and if on day 10 the due date is changed to day 20, the interval will
be changed from 10 days to 15 days.

There is no separate option to reset the interval of a review card, but
it can be accomplished by forgetting the card(s), and then setting the
desired due date.

Other notes:

- Added the action to the review screen as well.
- Set the shortcut to Ctrl+Shift+D, and changed the existing Delete
Tags shortcut to Ctrl+Alt+Shift+A.
2021-02-07 21:57:51 +10:00
Damien Elmes
c91a3784f6 update duplicate-string and copy 'set due date' in from AnkiMobile 2021-02-07 13:56:11 +10:00
Damien Elmes
fb6047ca4e bump version
2.1.40 is another bugfix release; a 2.1.41 beta is expected to follow
within a few days
2021-02-07 13:56:11 +10:00
Damien Elmes
95d9399880 update translations 2021-02-06 21:51:44 +10:00
Damien Elmes
b7c72bca4c fix backup not being taken before full download 2021-02-06 19:01:48 +10:00
Damien Elmes
3cd311191a add opus to supported audio list and sort 2021-02-06 15:11:24 +10:00
Damien Elmes
e30b7fc36a handle remote links in ts pages
Required to avoid loading remote links embedded in deck descriptions
in the webview
2021-02-06 15:03:21 +10:00
Damien Elmes
ded626f0b9 render deck description with markdown; strip images
To support images on that screen, we'll first need to adjust the base url
for each platform, or rewrite the local image URLs, as otherwise they
are resolved to _anki/pages/...
2021-02-06 15:02:40 +10:00
Damien Elmes
6ba321f818 sanitize deck description in decks screen on backend
Looks like ammonia only adds about 800k to the release binary
2021-02-06 13:42:38 +10:00
Damien Elmes
e318dafb6c Revert "sanitize deck description HTML with html-sanitize"
This reverts commit f248b71707.
2021-02-06 13:25:40 +10:00