Commit graph

7617 commits

Author SHA1 Message Date
Damien Elmes
79fb17c17f fix accidental schema bump in undo that was forcing full sync 2021-05-19 14:17:49 +10:00
Damien Elmes
390379ed62 disable svelte-check on Windows for now 2021-05-19 11:45:02 +10:00
Damien Elmes
671845d2cb Merge pull request #1172 from hgiesel/deckoptionsdropdown
Deck Options Top Bar
2021-05-19 10:41:20 +10:00
Damien Elmes
884beec929 Merge pull request #1173 from RumovZ/black-workaround
Fix black workaround for format calls
2021-05-19 10:30:12 +10:00
RumovZ
f220165c0f Fix black workaround for format calls 2021-05-18 22:19:09 +02:00
Henrik Giesel
20d117e315 Add back global CSS for input 2021-05-18 19:30:43 +02:00
Henrik Giesel
5eabcdc987 Allow any in deckoptions/index until typing is provided 2021-05-18 19:21:25 +02:00
Henrik Giesel
8779a8a025 Make blur a proper event listener 2021-05-18 19:19:05 +02:00
Henrik Giesel
a602561612 Make SaveButton functional 2021-05-18 18:55:22 +02:00
Henrik Giesel
1582bdb31e Make styling on select button behave correctly 2021-05-18 17:50:18 +02:00
Henrik Giesel
30d246d74b WIP: Use our components in deckoptions sticky bar 2021-05-18 16:32:29 +02:00
Henrik Giesel
777d774545 Use StickyBar in deckoptions 2021-05-18 14:13:11 +02:00
Damien Elmes
f4ddf90399 Merge pull request #1170 from RumovZ/fix-columns
Fix column issues
2021-05-18 09:24:15 +10:00
Damien Elmes
43f1750eac update jsdoc
https://github.com/jsdoc/jsdoc/issues/1908
2021-05-18 09:22:57 +10:00
Damien Elmes
4a18f1841f 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
376ec09d1a add legacy NoteType alias
https://github.com/johnpincock/SpecialFields/issues/28
2021-05-18 09:18:46 +10:00
Damien Elmes
c267a1d0e1 PreviewDialog was missing from top level browser module 2021-05-18 09:10:28 +10:00
RumovZ
0ef8a2e802 Set column sizes and indicator after state change 2021-05-17 20:13:45 +02:00
RumovZ
58a18eb261 Block events when restoring headers
Restoring headers after switching states was triggering
_on_column_toggled(), leading to unexpected results.
2021-05-17 20:07:52 +02:00
RumovZ
6f12d48ad5 Make failed sort column change a no-op
The previous behaviour when a non-sortable column was clicked was to
trigger the sorting routine, which was usually a no-op, but would
reorder rows if the configured sort column was hidden.
2021-05-17 18:33:59 +02:00
Damien Elmes
03794a6720 Merge pull request #1169 from RumovZ/search-syntax
Adjust search syntax for filtered deck presets
2021-05-17 22:44:26 +10:00
RumovZ
4725fc436f Adjust search syntax for filtered deck presets 2021-05-17 12:14:02 +02:00
Damien Elmes
5bd3884a71 support card state mutator in test scheduler
Documentation to come
2021-05-17 16:59:02 +10:00
Damien Elmes
95a7ceff41 shift learning fuzz into answering stage in test scheduler
When shown on the answer buttons, it's too distracting
2021-05-17 13:05:42 +10:00
Damien Elmes
a1ec869766 Merge pull request #1168 from RumovZ/fix-regex-err
Fix regex error formatting
2021-05-17 10:08:55 +10:00
RumovZ
e4df61f9aa Preserve formatting of regex error 2021-05-16 21:07:35 +02:00
RumovZ
6024a8748f Remove SearchErrorKind::Regex as it's never used 2021-05-16 21:07:03 +02:00
Damien Elmes
957202a704 fix review sort order being shown in v2 scheduler options 2021-05-16 21:50:51 +10:00
Damien Elmes
a345ba1347 support markdown in JS tooltips
`marked` adds about 44k to the bundle size unfortunately :-(
2021-05-16 21:43:58 +10:00
Damien Elmes
19071fce7c experiment with learning count on deck list 2021-05-16 20:23:39 +10:00
Damien Elmes
fe5dee2a67 rework various aspects of the test scheduler
- Daily limits are no longer inherited - each deck limits its own
cards, and the selected deck enforces a maximum limit.
- Fetching of review cards now uses a single query, and sorts in advance.
In collections with a large number of overdue cards and decks, this is
faster than iterating over each deck in turn.
- Include interday learning count in review count & review limit, and
allow them to be buried.
- Warn when parent review limit is lower than child deck in deck options.
- Cap the new card limit to the review limit.
- Add option to control whether new card fetching short-circuits.
2021-05-16 20:23:07 +10:00
Damien Elmes
060ef67b26 remove some duplicate code & add deck.or() helper 2021-05-14 22:35:52 +10:00
Damien Elmes
a42648a418 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
127b7e28fc drop binary heap in test scheduler
The original rationale was avoiding a possible O(n) insertion if
the learning card was due outside the cutoff, but the increased code
complexity doesn't seem worth it, given that learning cards will
rarely grow above 1000.

Also added a currently-disabled test that demonstrates the current undo
handling behaviour is yielding incorrect counts; that will be reworked
in the next commit, and this change will make that easier.
2021-05-14 16:19:46 +10:00
Damien Elmes
78b431cbf1 work around Windows issue on latest Black
Thanks Rumo!
552a53495e
2021-05-13 20:15:51 +10:00
Damien Elmes
9f49dca545 re-enable leech notification for test scheduler 2021-05-13 15:51:02 +10:00
Damien Elmes
5f7590c4b4 expose new sorting options in test scheduler options; move things around 2021-05-13 15:23:16 +10:00
Damien Elmes
9ff8727e68 pass sort options into test scheduler
- split new card fetch order and subsequent sort order; use latter
when building queues
- default to spacing siblings when burying is off, with options to
show each sibling in turn, and shuffle the fetched cards
2021-05-13 15:21:20 +10:00
Damien Elmes
2142cdbd24 fix burying in test scheduler
The bury new/review flags are now pulled from each card's home deck,
instead of using a global setting that had not been hooked up. This
unfortunately means we need to fetch the map of all decks up front, as
we need to be able to look up a deck configuration for cards that are
in filtered decks.

Fixes a "card was modified" error caused by cards being buried during
review, when they weren't removed up-front.
2021-05-12 12:00:15 +10:00
Damien Elmes
5a10f007e7 is_stale() doesn't need to be passed deck
Deck changes will trigger a queue rebuild via requires_study_queue_rebuild()
2021-05-12 09:44:10 +10:00
Damien Elmes
7e324a6ec0 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
4d51a13259 roll back bootstrap until 5.0.1 comes out
Modals are currently broken:
https://github.com/twbs/bootstrap/issues/33840
2021-05-11 13:06:03 +10:00
Damien Elmes
6f3225fb2a drop leech hook in test scheduler
The explicit flush was clearing undo history, and the hook will need
re-working to support propagating OpChanges correctly. It will likely
come back as a GUI hook, instead of one in pylib.
2021-05-10 16:18:29 +10:00
Damien Elmes
75589e3eba better leech tag handling for test scheduler 2021-05-10 14:58:04 +10:00
Damien Elmes
eb0a60b539 ensure v2 scheduler before test scheduler enabled 2021-05-10 14:57:30 +10:00
Damien Elmes
d5dfac98ed update translations 2021-05-08 19:16:22 +10:00
Damien Elmes
5e44a34f20 expose step counter and undone op changes in hook 2021-05-08 17:51:36 +10:00
Damien Elmes
57fada3be0 move action names out of undo.ftl into actions.ftl 2021-05-08 17:11:54 +10:00
Damien Elmes
d6eeab3722 remove some unnecessary checkpoints 2021-05-08 17:04:05 +10:00
Damien Elmes
2e312eb13d update find_duplicates to use QueryOp/CollectionOp 2021-05-08 16:58:18 +10:00