Damien Elmes
157f602624
fix detection of shift key at startup
...
Our regular helper doesn't appear to work during startup.
2021-05-18 09:21:02 +10:00
Damien Elmes
bd24005e08
PreviewDialog was missing from top level browser module
2021-05-18 09:10:28 +10:00
Damien Elmes
9edac805ad
support card state mutator in test scheduler
...
Documentation to come
2021-05-17 16:59:02 +10:00
Damien Elmes
1a48622d77
experiment with learning count on deck list
2021-05-16 20:23:39 +10:00
Damien Elmes
390a8421aa
fix test scheduler undo + implement look-ahead
...
Instead of using a separate undo queue, the code now defers checking for
newly-due learning cards until the answering stage, and logs the updated
cutoff time as an undoable change, so that any newly-due learning cards
won't appear instead of a new/review card that was just undone.
Queue redo now uses a similar approach to undo, instead of rebuilding the
queues.
2021-05-14 22:16:53 +10:00
Damien Elmes
c41d5ca4bf
work around Windows issue on latest Black
...
Thanks Rumo!
d797900386
2021-05-13 20:15:51 +10:00
Damien Elmes
99081e422b
re-enable leech notification for test scheduler
2021-05-13 15:51:02 +10:00
Damien Elmes
dbbcb3e38c
expose new sorting options in test scheduler options; move things around
2021-05-13 15:23:16 +10:00
Damien Elmes
49a1580566
use new API for test scheduler
...
Avoids duplicate work, and is a step towards allowing the next
states to be modified by third-party code.
Also:
- fixed incorrect underlined count, due to reviews being labeled as
learning cards
- fixed reviewer not refreshing when undoing a test review, by splitting
up backend queue rebuilding from frontend reviewer refresh
- moved answering into a CollectionOp
2021-05-11 13:06:03 +10:00
Damien Elmes
3736e63a57
expose step counter and undone op changes in hook
2021-05-08 17:51:36 +10:00
Damien Elmes
4be5d08559
remove some unnecessary checkpoints
2021-05-08 17:04:05 +10:00
Damien Elmes
1918031399
update find_duplicates to use QueryOp/CollectionOp
2021-05-08 16:58:18 +10:00
Damien Elmes
f2db822c08
move query_op into operations/, and add the ability to show progress
2021-05-08 16:35:43 +10:00
Damien Elmes
b887032244
split browser dialogs into separate files
2021-05-08 15:08:45 +10:00
Damien Elmes
0b8733032d
the find_and_replace alias is not required
...
Was only added recently, so nothing should depend on it yet.
2021-05-08 14:34:57 +10:00
Damien Elmes
78a3536bfc
move "find duplicates" into separate file
...
As far as I'm aware, no add-ons were extending that screen, so I've
dropped the old context object and the export in browser/__init__.py
2021-05-08 14:33:43 +10:00
Damien Elmes
010c3da770
Merge pull request #1159 from hgiesel/newapproach
...
Prefer idiomatic Svelte features over dynamic components
2021-05-08 11:35:31 +10:00
Henrik Giesel
8b0c6ba5df
Check for id when inserting dynamic elements
...
* I'm not sure it behaved, if there were multiple elements
inserted by different add-ons into the same container
2021-05-07 16:50:17 +02:00
Henrik Giesel
6a804f6775
Use json.dumps instead of backticks in editor.py
2021-05-07 14:22:06 +02:00
Damien Elmes
7442eed41a
update docstrings for latest black
2021-05-07 18:12:56 +10:00
Damien Elmes
3d8b7d943c
fix find&replace
2021-05-07 14:02:40 +10:00
Henrik Giesel
de8abebcd1
Fix Preview Button after changing from f-string to normal string
2021-05-07 02:12:37 +02:00
Henrik Giesel
2112b419f9
Fix ButtonDropdown
2021-05-07 02:04:44 +02:00
Henrik Giesel
0f4d4eb5a9
Only initialize extension apis if necessary
2021-05-07 02:04:44 +02:00
Henrik Giesel
c9368ed98f
Add lefttopbtns as AddonButtons
2021-05-07 02:04:44 +02:00
Henrik Giesel
e80f43e8fc
Enable setting of PreviewButton and hiding of cloze button again
2021-05-07 02:04:42 +02:00
Henrik Giesel
6d6c798ca3
Simplify structure of EditorToolbar and ButtonGroup in editor HTML file
2021-05-07 02:03:55 +02:00
Damien Elmes
fc2d3ba07c
remove AnkiDroid timezone confirmation
...
By the time this update reaches stable, AnkiDroid 2.15 should already
be out.
2021-05-06 19:05:15 +10:00
Damien Elmes
2663c891eb
fix dmypy action
2021-05-05 15:54:41 +10:00
Damien Elmes
abab4826bb
support undo for (renamed) unbury_deck() action
2021-04-30 20:03:20 +10:00
Damien Elmes
248373ef30
undoing of notetype templates
2021-04-30 17:30:48 +10:00
Damien Elmes
9a46ad6352
undoing of notetype fields
...
- fix stale cache issue
- update add cards screen in response to op changes
2021-04-30 17:15:59 +10:00
Damien Elmes
b9417fc583
notetype rename+options undo
2021-04-30 16:09:44 +10:00
Damien Elmes
394fe86f8f
notetype removal undoable
2021-04-30 16:01:47 +10:00
Damien Elmes
ea758f0092
update GUI to allow notetype addition undo
...
- backend now updates current notetype as part of addition
- frontend no longer implicitly adds, so we can assign a new name and
add in a single operation
2021-04-30 15:58:08 +10:00
RumovZ
abd02d7891
Add separate no_arg_trigger decorator
2021-04-26 08:46:08 +02:00
Damien Elmes
f77983fc9f
Merge pull request #1154 from RumovZ/fix-skip-dec
...
Fix skip_if_selection_is_empty() for triggers
2021-04-26 09:21:42 +10:00
RumovZ
594fe303da
Remove some unnecessary lambdas
2021-04-25 19:51:57 +02:00
RumovZ
9900f73cee
Fix skip_if_selection_is_empty() for triggers
...
It seems to be enough if one decorator calls pyqtSlot(), but to avoid
problems in the future, let's have all decorators do that.
2021-04-25 19:50:56 +02:00
Henrik Giesel
268adf1d03
Move EditorToolbar API into EditorToolbar.svelte
2021-04-25 19:15:00 +02:00
Henrik Giesel
f5fba15435
Initialize editor toolbar via function, not web component
2021-04-25 18:32:01 +02:00
Damien Elmes
b7b329cf90
Merge pull request #1151 from RumovZ/no-sel-dec
...
Fix some problems with browser actions while selection is empty
2021-04-25 20:48:40 +10:00
Damien Elmes
eb3f3ddd45
enable the new deck options by default
...
- The old options are still available with a shift+click
- Translations still need updating
- See b7747b6a38
for some examples
of extending the screen in an add-on
2021-04-25 19:58:58 +10:00
Damien Elmes
a1ce048ed5
fix error when user cancels out of set due date/reposition
2021-04-25 19:33:25 +10:00
Damien Elmes
b7747b6a38
experimental support for extending add-ons screen with Svelte
2021-04-25 19:33:18 +10:00
Damien Elmes
b485b8cbb9
deckconfig->deckoptions
2021-04-25 19:02:30 +10:00
RumovZ
b1392980f5
Skip some browser methods if selection is empty
...
This was handled inconsistently before:
* Select Notes would throw a search error.
* Set Due Date would throw an exception.
* Dialogs with no effect would open.
* No-ops would be pushed to the undo queue.
2021-04-25 08:47:15 +02:00
RumovZ
458d891d28
Add dec to make methods no-op if no selection
2021-04-25 08:36:22 +02:00
Damien Elmes
e2a4d6041c
basic support for add-ons in new deck config screen
...
- expose the data as a writable store
- currently only supports raw HTML; example to come
- fix changes not marking a deck config as modified
- the data is currently packed into the deckconfig object, but we
may move these to a separate store in the collection config in the
future, like is done with decks/notetypes
2021-04-24 11:08:01 +10:00
Henrik Giesel
452fdf05af
Remove unused import
2021-04-24 01:32:02 +02:00