Damien Elmes
37ebeaa119
fix set due date not remembering default in browse screen
2021-03-12 15:47:11 +10:00
Damien Elmes
18a8d458bb
Revert "Merge pull request #1066 from RumovZ/editor-save-dec"
...
This reverts commit 994081be34 , reversing
changes made to 091ea67690 .
@RumoVZ this broke a bunch of operations like 'select notes' and
'set due date'. When the triggered signal is connected to a function,
PyQt looks at the function signature to decide what arguments to pass
it. The wrapper was using *args, so PyQt passes in an extra argument,
which the underlying function didn't expect.
I tried settting __signature__ on the wrapper, but PyQT seems to
ignore it, so we may either need to check all of the existing calls
and add the ignored extra arguments, or create a separate wrapper for
such cases.
2021-03-12 15:44:19 +10:00
Damien Elmes
7f8d675e25
'set due date' now undoable
2021-03-12 14:50:31 +10:00
Damien Elmes
ab564315d8
split out common scheduler code into base.py, use scheduler/ dir
...
Also move the legacy aliases into a separate file
2021-03-12 14:07:52 +10:00
RumovZ
fc787f1e9b
Add decorator to save editor in sidebar
2021-03-11 22:25:18 +01:00
RumovZ
0def65a684
Add decorator to save editor in browser
2021-03-11 22:24:24 +01:00
RumovZ
b093d62f5a
Merge branch 'master' into sidebar-tools
2021-03-11 12:08:32 +01:00
Damien Elmes
abf4ef9eac
deck drag&drop undo
2021-03-11 20:02:16 +10:00
RumovZ
35902ef9fc
Remove prompt when deleting from deckbrowser
2021-03-11 10:28:23 +01:00
RumovZ
a4e6f9791f
Run background tasks with progress
2021-03-11 10:04:58 +01:00
RumovZ
193e7cc2aa
Remove deck remove prompt but show card count
2021-03-11 09:52:11 +01:00
RumovZ
45fab1c043
Remove prompt when deleting saved searches
2021-03-11 09:20:41 +01:00
RumovZ
80444db6b0
Show count of affected notes after tag renaming
2021-03-11 09:17:22 +01:00
RumovZ
a5464de688
Show tooltip instead of prompt for removing tags
2021-03-11 09:14:50 +01:00
bluegreenmagick
270dac70f0
Clicking the expander icon should not trigger click event
...
Expander icon does not change currentIndex
2021-03-11 09:04:24 +09:00
RumovZ
53e98ce77f
Fix repainting in case of tag renaming exception
2021-03-10 21:50:46 +01:00
RumovZ
2ef4a10ccb
Store name prefix of sidebar items
2021-03-10 16:38:29 +01:00
Damien Elmes
c2280cb776
undo support for deck adding/removing
...
Work in progress - still to do:
- renames appear as 'Update Deck' - easiest way to solve it would
be to have a separate backend method for renames
- drag&drop of decks not yet undoable
- since the undo status is updated after the backend method ends,
the older checkpoint() calls need to be replaced with an
update_undo_status() at the end of the call - if we just remove the
checkpoint, then the menu doesn't get updated
2021-03-10 23:50:11 +10:00
RumovZ
92aadcabcb
Update about screen
2021-03-10 11:34:28 +01:00
RumovZ
c018c31985
Merge branch 'master' into sidebar-tools
2021-03-10 10:34:36 +01:00
RumovZ
e477b00c8d
Disable renaming models and templates ...
...
... but add context action CLayout for templates.
2021-03-10 10:14:06 +01:00
Damien Elmes
99f825c138
expand backend Preferences and make undoable
...
- moved 'default to current deck when adding' into prefs
- move some profile options into the collection config, so they're
undoable and will sync. There is (currently) no automatic migration
from the old profile settings, meaning users will need to set the
options again if they've customized them.
- tidy up preferences.py
- drop the deleteMedia option that was not exposed in the UI
2021-03-10 18:51:03 +10:00
Damien Elmes
37b34d5da9
inline scheduling settings into preferences
2021-03-10 14:11:59 +10:00
Damien Elmes
ade12fe2fb
Simplify note adding and the deck/notetype choosers
...
The existing code was really difficult to reason about:
- The default notetype depended on the selected deck, and vice versa,
and this logic was buried in the deck and notetype choosing screens,
and models.py.
- Changes to the notetype were not passed back directly, but were fired
via a hook, which changed any screen in the app that had a notetype
selector.
It also wasn't great for performance, as the most recent deck and tags
were embedded in the notetype, which can be expensive to save and sync
for large notetypes.
To address these points:
- The current deck for a notetype, and notetype for a deck, are now
stored in separate config variables, instead of directly in the deck
or notetype. These are cheap to read and write, and we'll be able to
sync them individually in the future once config syncing is updated in
the future. I seem to recall some users not wanting the tag saving
behaviour, so I've dropped that for now, but if people end up missing
it, it would be simple to add as an extra auxiliary config variable.
- The logic for getting the starting deck and notetype has been moved
into the backend. It should be the same as the older Python code, with
one exception: when "change deck depending on notetype" is enabled in
the preferences, it will start with the current notetype ("curModel"),
instead of first trying to get a deck-specific notetype.
- ModelChooser has been duplicated into notetypechooser.py, and it
has been updated to solely be concerned with keeping track of a selected
notetype - it no longer alters global state.
2021-03-10 11:53:27 +10:00
Damien Elmes
aff8df067d
make flag changes in the reviewer undoable
...
This splits update_card() into separate undoable/non-undoable ops
like the change to notes in b4396b94abdeba3347d30025c5c0240d991006c9
It means that actions get a blanket 'Update Card' description - in the
future we'll probably want to either add specific actions to the backend,
or allow an enum or string to be passed in to describe the op.
Other changes:
- card.flush() can no longer be used to add new cards. Card creation
is only supposed to be done in response to changes in a note's fields,
and this functionality was only exposed because the card generation
hadn't been migrated to the backend at that point. As far as I'm aware,
only Arthur's "copy notes" add-on used this functionality, and that should
be an easy fix - when the new note is added, the associated cards will
be generated, and they can then be retrieved with note.cards()
- tidy ups/PEP8
2021-03-10 11:53:27 +10:00
Damien Elmes
15dc6766f2
coalesce note updates; avoid unnecessary saving due to mtime changes
2021-03-10 11:53:27 +10:00
Damien Elmes
7a58268617
make mark toggling undoable
...
- note.flush() behaves like before, as otherwise actions or add-ons
that perform bulk flushing would end up creating an undo entry for
each note
- added col.update_note() to opt in to the new behaviour
- tidy up the names of some related routines
2021-03-10 11:53:27 +10:00
Damien Elmes
a2a534551f
undo support for bulk tag add/remove
2021-03-10 11:47:53 +10:00
Damien Elmes
1b6cc07e63
note deletion undo; refactoring
...
- transact() now automatically clears card queues unless an op
opts-out (and currently only AnswerCard does). This means there's no
risk of forgetting to clear the queues in an operation, or when undoing/
redoing
- CollectionOp->UndoableOp
- clear queues when redoing "answer card", instead of clearing redo
when clearing queues
2021-03-10 11:47:53 +10:00
Damien Elmes
4d7c7e5b36
remove unnecessary setMod() calls
2021-03-10 11:47:53 +10:00
Damien Elmes
b1350727fc
commit immediately when there's no active checkpoint
...
Reviews and operations on the backend that support undoing can now be
committed immediately, so they will not be lost in the event of a crash.
This required tweaks to a few places:
- don't set collection mtime on save() unless changes were made in
Python, as otherwise we end up accidentally clearing the backend undo
queue
- autosave() is now run on every reset()
- garbage collection now runs in a timer, instead of relying on
autosave() to be run periodically
2021-03-10 11:47:53 +10:00
Damien Elmes
3049612835
undo support for note adding
2021-03-10 11:47:53 +10:00
Damien Elmes
cb9b65188a
undo unbury/unsuspend
2021-03-10 11:47:53 +10:00
Damien Elmes
b05d7659ed
implement bury/suspend undo
2021-03-10 11:47:53 +10:00
Damien Elmes
160c90b840
rework undo
...
- use dataclasses for the review/checkpoint undo cases, instead of the
nasty ad-hoc list structure
- expose backend review undo to Python, and hook it into GUI
- redo is not currently exposed on the GUI, and the backend can only
cope with reviews done by the new scheduler at the moment
- the initial undo prototype code was bumping mtime/usn on undo, but
that was not ideal, as it was breaking the queue handling which expected
the mtime to match. The original rationale for bumping mtime/usn was
to avoid problems with syncing, but various operations like removing
a revlog can't be synced anyway - so we just need to ensure we clear the
undo queue prior to syncing
2021-03-10 11:47:53 +10:00
Damien Elmes
3aaec61216
Merge pull request #1046 from hgiesel/sticky
...
Sticky icons in the editor window
2021-03-10 11:43:51 +10:00
Damien Elmes
91892aa816
Merge pull request #1050 from BlueGreenMagick/choose-addon-to-update
...
Choose addon to update
2021-03-10 11:41:50 +10:00
RumovZ
d857e05e30
Ensure mouse is at current index before searching
...
Thus, no search will be triggered when clicking an expansion indicator
as this doesn't update the current element. However, if the indicator
belongs to the current item, a search will be triggered anyway.
2021-03-09 20:36:15 +01:00
RumovZ
fb87f1e2df
Disable expand on double click in search mode
2021-03-09 20:18:12 +01:00
bluegreenmagick
2600d89850
don't show routine update when not update_enabled
2021-03-09 22:27:28 +09:00
bluegreenmagick
7ccfb61154
add context menu to open ankiweb page
2021-03-09 22:19:03 +09:00
bluegreenmagick
328ecb9ec3
add bool_to_check and checked method
2021-03-09 22:19:03 +09:00
bluegreenmagick
aa58d3922e
fix check issues in ChooseAddonsToUpdateList
2021-03-09 22:19:03 +09:00
bluegreenmagick
fa95d36bf9
save chooseaddonupdate check state
2021-03-09 22:19:03 +09:00
Henrik Giesel
94355978a2
Refactor bridgeCommand and silence false "uncaught msg" log
2021-03-09 13:43:11 +01:00
Henrik Giesel
3a8fad5dc5
Make sure topleft buttons are rounded too, prefer Bootstrap's rounded class
2021-03-09 13:43:11 +01:00
Henrik Giesel
d8e8153aae
Change signature of editor onBridgeCmd to Any instead of None
2021-03-09 13:43:11 +01:00
Henrik Giesel
59c69bd8dd
Replace pin icon with lock icon
...
Credit goes out to @kleinerpirat
2021-03-09 13:43:11 +01:00
Henrik Giesel
b580e192f4
Remove Change Tracker again
2021-03-09 13:43:11 +01:00
Henrik Giesel
3f96290214
Connect icons to sticky fields values
2021-03-09 13:37:56 +01:00
Henrik Giesel
6b444782e9
Remove explicit popperjs again, because it's included in bootstrap.bundle
2021-03-09 13:37:56 +01:00
Henrik Giesel
5aaf76bc19
Include the bootstrap icons in the editor view
2021-03-09 13:37:56 +01:00
Henrik Giesel
adfe645966
Fix positioning of buttons
2021-03-09 13:37:56 +01:00
Henrik Giesel
dbcf0ffee1
Include bootstrap in editor
2021-03-09 13:37:56 +01:00
Henrik Giesel
b7c24a9f98
Add bootstrap, bootstrap-icons, and popperjs
2021-03-09 13:37:56 +01:00
RumovZ
7edb51a2af
Add shortcuts for sidebar tools
2021-03-09 11:19:44 +01:00
RumovZ
d202befe3f
Improve toolbar styling for macOS
2021-03-09 08:50:01 +01:00
RumovZ
589fea1046
Remove edit mode
2021-03-08 11:55:15 +01:00
RumovZ
f303f24c47
Enable drag for all sidebar items ...
...
... and set valid drop targets dynamically based on the current
selection.
2021-03-08 11:35:39 +01:00
RumovZ
8b3539b009
Ask before removing tags from collection
2021-03-07 11:40:11 +01:00
RumovZ
a4d030e7b4
Simplify multi deletion confirmation strings
2021-03-07 11:05:43 +01:00
RumovZ
f30510371b
Only show edit actions with conform selection
2021-03-07 11:05:28 +01:00
RumovZ
7e622d05de
Fix repainting in case of tree building exception
2021-03-07 09:47:17 +01:00
RumovZ
2d5baac35d
Remove context action dict
...
Now that almost all actions can be triggered from outside the context
menu and are available for more than one item type, it's easier to check
for available actions dynamically.
2021-03-05 12:22:49 +01:00
RumovZ
c8b5689e47
Fix children check in context tree actions
2021-03-05 10:27:44 +01:00
Benjamin K
61fd5688c0
Clean up imports
2021-03-04 19:55:35 +01:00
Benjamin K
48da1bda1d
The old delimiter is now kept, when cancel button is clicked
2021-03-04 19:39:43 +01:00
RumovZ
837c305ece
Enable deleting via delete key
2021-03-04 18:31:35 +01:00
RumovZ
ca7e3a4ddd
Enable Enter/Return search in all modes ...
...
... but don't trigger search if the key closes the editor.
Also get rid of the on_click of the saved searches root which has
already been removed on main.
2021-03-04 17:40:12 +01:00
RumovZ
873a1897d1
Ask for confirmation when overwriting saved search
2021-03-04 17:22:03 +01:00
RumovZ
3b1af18b4f
Adjust sidebar tool icons to smaller size
2021-03-04 17:20:10 +01:00
RumovZ
ee00c341c3
Make renamed item current (don't just select)
2021-03-03 23:00:37 +01:00
RumovZ
a09c09e1c1
Remove renaming dialogues from sidebar ...
...
... in favour of in-line editing. This is simpler and more ergonomic for
the user (and the programmer) but doesn't allow for editing parents
through text input (in the case of tags and decks).
2021-03-03 21:57:39 +01:00
RumovZ
dc4f9edc29
Enable renaming templates from the sidebar
2021-03-03 18:09:53 +01:00
RumovZ
4a4b02a0ea
Enable renaming notetypes
2021-03-03 15:18:50 +01:00
RumovZ
3fbb8e83f0
Enable group expanding/collapsing
...
Also, only show expand/collapse actions if they will have an effect.
2021-03-03 11:44:42 +01:00
RumovZ
4c061b398b
Make SidebarItem._is_extended a property
2021-03-03 11:43:31 +01:00
RumovZ
0eddf1100a
Escape backslashes in re.sub()'s repl
2021-03-03 09:20:02 +01:00
RumovZ
9f10d465c6
Add DECK_CURRENT as a SidebarItemType
...
Thus, disable renaming, deleting etc. for the current deck item.
As a consequence, editable is no longer needed as a field of SidebarItem
as it can be derived from its type.
2021-03-03 09:15:36 +01:00
bluegreenmagick
35364b3b94
add dialog to choose addons to update
2021-03-03 10:34:43 +09:00
RumovZ
526532ab44
Select and scroll to renamed/added sidebar item
2021-03-02 23:13:34 +01:00
RumovZ
8b9b9d2b1e
Enable removal of multiple tags from the sidebar
2021-03-02 11:05:16 +01:00
RumovZ
572bf12d9d
Make clickable dyndeck labels fixed in size
2021-03-01 11:26:52 +01:00
RumovZ
16817c81e4
Enable deleting multiple saved searches
2021-03-01 09:41:41 +01:00
RumovZ
97cca52be0
Fix repainting when renaming tag via dialogue
2021-03-01 08:45:33 +01:00
RumovZ
5fb370dfa9
Enable extended selection in edit mode
2021-03-01 08:45:03 +01:00
Damien Elmes
45e1aacaf1
monospace font in html editor
...
https://forums.ankiweb.net/t/change-default-font-of-html-edit-mode-to-a-monospaced-font/7833
2021-03-01 10:16:12 +10:00
Damien Elmes
24ba4e3a29
catch attempts to nest under a filtered deck; don't show traceback
2021-03-01 09:58:12 +10:00
Damien Elmes
5045517f8a
Merge pull request #1040 from RumovZ/deck-name-err
...
Catch deck rename errors and localise warnings
2021-03-01 09:40:55 +10:00
RumovZ
c1a0977519
Fix Qt types
2021-02-28 22:36:31 +01:00
RumovZ
22d1146b02
Always return False from rename_node
...
setData expects a result but due to the asynchrony of the editor it
might not be known, yet.
2021-02-28 22:36:21 +01:00
RumovZ
5523a72253
Enable in-place editing of sidebar tags
2021-02-28 21:50:21 +01:00
RumovZ
670bb4531b
Enable in-place editing of saved searches
2021-02-28 21:13:26 +01:00
RumovZ
6b9e2fa485
Enable in-place editing of sidebar deck items
2021-02-28 21:03:19 +01:00
RumovZ
47d96a32e6
Add support for multi deck deletion in python
2021-02-26 19:52:34 +01:00
RumovZ
b7b7cd4b20
Place sidebar tools right of search bar
2021-02-26 13:04:30 +01:00
RumovZ
c4a2a212ec
Catch DeckIsFilteredError directly on frontend
2021-02-26 11:32:40 +01:00
Damien Elmes
0377783a59
remove left-click on saved searches
...
Multiple users have thought it was a bug rather than an intentional
feature, and it breaks double-clicking:
https://forums.ankiweb.net/t/anki-2-1-41-beta/7305/51
2021-02-26 18:48:32 +10:00
Damien Elmes
5e946fad08
fix browser appearance defaults
...
https://forums.ankiweb.net/t/small-bug-in-the-browser-appearance-window/7806
2021-02-26 18:46:09 +10:00
Damien Elmes
2ffaf9499d
Merge pull request #1039 from RumovZ/dyndeck-hint
...
Clickable hint in dyndeck dialogue for unmovable cards
2021-02-26 18:02:51 +10:00
RumovZ
b127fb0fb3
Add group search context action
2021-02-25 21:24:11 +01:00
RumovZ
afb6b88128
Handle search on event level
...
Instead of assigning each sidebar item a lambda, add a field for search
representation and handle searching in event handler.
2021-02-25 19:57:12 +01:00
RumovZ
25a9d08833
Make search first (default) mode
2021-02-25 19:28:29 +01:00
RumovZ
b2964d65bb
Add edit mode in sidebar
2021-02-25 13:12:51 +01:00
RumovZ
fc4a2c05dd
Save last sidebar tool
2021-02-25 12:20:54 +01:00
RumovZ
79c2856201
Add select and search modes to sidebar
2021-02-25 11:06:59 +01:00
RumovZ
a41b639d27
Add toolbar to sidebar
2021-02-25 11:05:04 +01:00
RumovZ
5a2bed7d8e
Add icons for sidebar tools
2021-02-25 11:02:17 +01:00
bluegreenmagick
5ef9401686
StudyDeck without add button
2021-02-25 07:34:01 +09:00
RumovZ
b8f828a465
Fix #1024 – catch deck rename errors
2021-02-24 13:59:38 +01:00
RumovZ
5e7b594c71
Localise RenameDeckError
2021-02-24 13:57:44 +01:00
RumovZ
1686a065f8
Fix type hints in dyndeckconf
2021-02-24 11:24:27 +01:00
RumovZ
6ae03c3aa9
Refactor dyndeckconf/on_hint_button
2021-02-24 11:14:33 +01:00
RumovZ
6eca669cb0
Give dyndeck hint unique styling
2021-02-23 23:34:05 +01:00
RumovZ
c0dfce3908
Add clickable hint to dyndeckconf
2021-02-23 23:14:11 +01:00
RumovZ
bb58060c91
Add direct col reference to dyndeckconf
2021-02-23 22:31:04 +01:00
Henrik Giesel
e2bda7273e
Fix scrollbar issue in anki-editable component in two ways
...
- using :host-context(.nightMode) allows for applying the nightmode
scroll bar inside the component
- apply max-width: 100% to all element within editable, not just images
2021-02-23 15:52:20 +01:00
Damien Elmes
abd9d42869
Merge pull request #1034 from abdnh/clayout-cloze-shortcuts
...
Shortcuts to preview clozes in card layout screen
2021-02-22 10:07:16 +10:00
abdo
f137c21d02
Shortcuts to preview clozes in card layout screen
...
Assign Alt+{number} to select cloze cards.
2021-02-21 14:46:53 +03:00
Damien Elmes
c2c5174bd2
tweak update message
...
- Since we need to show this to new users until AnkiDroid is updated,
use a wording that doesn't seem so out of place to new users.
- Avoid mentioning syncing, since the user may not sync, and the
modSchema() call will allow the user to confirm anyway.
- Let the user know they can change their mind about AnkiDroid by
visiting the preferences.
2021-02-21 19:47:26 +10:00
Damien Elmes
125c2b232a
rework v2 scheduler upgrade; drop downgrade
...
- Rework V2 upgrade so that it no longer resets cards in learning,
or empties filtered decks.
- V1 users will receive a message at the top of the deck list
encouraging them to upgrade, and they can upgrade directly from that
screen.
- The setting in the preferences screen has been removed, so users
will need to use an older Anki version if they wish to switch back to
V1.
- Prevent V2 exports with scheduling from being importable into a V1
collection - the code was previously allowing this when it shouldn't
have been.
- New collections still default to v1 at the moment.
Also add helper to get map of decks and deck configs, as there were
a few places in the codebase where that was required.
2021-02-21 15:50:41 +10:00
bluegreenmagick
8c5ffa5c19
change _on_click_current to _on_click_index
...
fix bug where clicking on a blank space below sidebar item
would still trigger currentIndex item's click event
2021-02-20 22:58:02 +09:00
Damien Elmes
be823c39f0
tweak getFile() arguments in editor to be more readable
2021-02-19 10:18:40 +10:00
Damien Elmes
17396dc89b
disable card shifting in reposition by default
...
https://forums.ankiweb.net/t/uncheck-shift-position-of-existing-cards-by-default/7550
2021-02-19 10:09:01 +10:00
Damien Elmes
0b2ee8dcff
use add-on id if name is blank
...
https://forums.ankiweb.net/t/support-for-rtl-layout-in-ankiweb-add-on-page/7522
2021-02-16 11:12:05 +10:00
Henrik Giesel
c2410ded9c
Remove unused imports
2021-02-12 02:16:05 +01:00
Henrik Giesel
72253e129f
Allow for passing in custom note type and template
2021-02-12 02:12:03 +01:00
Henrik Giesel
6e22b8b145
Allow for passing in custom note types for rendering ephemeral cards
2021-02-12 01:53:03 +01:00
Damien Elmes
0907b77fef
Revert "Use new note.ephemeral_card method in clayout"
...
This partially reverts commit 4ca24f1d84 .
2021-02-12 10:05:46 +10:00
Damien Elmes
28a9ba473d
tweak search wording and tidy up API
...
- SearchTerm -> SearchNode
- Operator -> Joiner; share between messages
- build_search_string() supports specifying AND/OR as a convenience
- group_searches() makes it easier to negate
2021-02-11 19:57:19 +10:00
Damien Elmes
6e28b096f8
more search bikeshedding
...
While implementing the overdue search, I realised it would be nice to
be able to construct a search string with OR and NOT searches without
having to construct each part individually with build_search_string().
Changes:
- Extends SearchTerm to support a text search, which will be parsed
by the backend. This allows us to do things like wrap text in a group
or NOT node.
- Because SearchTerm->Node conversion can now fail with a parsing error,
it's switched over to TryFrom
- Switch concatenate_searches and replace_search_term to use SearchTerms,
so that they too don't require separate string building steps.
- Remove the unused normalize_search()
- Remove negate_search, as this is now an operation on a Node, and
users can wrap their search in SearchTerm(negated=...)
- Remove the match_any and negate args from build_search_string
Having done all this work, I've just realised that perhaps the original
JSON idea was more feasible than I first thought - if we wrote it out
to a string and re-parsed it, we would be able to leverage the existing
checks that occur at parsing stage.
2021-02-11 17:11:17 +10:00
Damien Elmes
5ad2cd56d1
switch some existing code to use SearchTerm(negated=...)
2021-02-11 10:55:02 +10:00
Damien Elmes
fe503ba009
split due into 'due today' and 'overdue'
2021-02-11 10:49:36 +10:00
Damien Elmes
e871ec68b5
Revert "experiment with using right click for AND/OR/NOT"
...
This reverts commit cbf0cdd30e and
manually comments out the setSelectionMode() call.
Switching back to the old behaviour until issues can be worked through.
https://forums.ankiweb.net/t/anki-2-1-41-beta/7305/24
2021-02-11 10:14:26 +10:00
Damien Elmes
9146c79f9e
Revert "add escape hatch for new clicking behaviour, in case it causes problems"
...
This reverts commit e618756998 .
2021-02-11 10:10:45 +10:00
Damien Elmes
42a44875ab
convert qt strings to f-strings with flynt
...
Also revealed an incorrect type def in editor.py that mypy wasn't
noticing before :-(
2021-02-11 10:09:06 +10:00
Damien Elmes
bf7528d90a
minor code cleanups with pyupgrade
...
- pyupgrade --py38-plus --keep-runtime-typing --keep-percent-format
- third-party mpv and winpaths excluded
2021-02-11 09:43:40 +10:00
Damien Elmes
e64e807782
catch TTS runtime error
2021-02-10 16:30:51 +10:00
Damien Elmes
e618756998
add escape hatch for new clicking behaviour, in case it causes problems
2021-02-09 19:29:59 +10:00
Damien Elmes
895e274faf
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
83e2538f8e
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
8a585b47ae
add 'untagged', and make clicking on 'tags' show all tagged cards
2021-02-09 12:50:35 +10:00
Damien Elmes
cbf0cdd30e
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
eb42d8d07b
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
ba99d42a0a
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 679f57cfde .
2021-02-09 10:37:21 +10:00
Damien Elmes
fbc5bb6d70
move flags above card state; change stage label for consistency
2021-02-09 09:54:46 +10:00
Damien Elmes
b44cfcda82
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
55dbd54e0e
fix rename/delete on current deck
2021-02-09 09:38:37 +10:00
Damien Elmes
679f57cfde
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
Damien Elmes
7e6d2cf354
remove 'any flag'; make clicking on flags root do the same thing
2021-02-08 22:52:37 +10:00
Damien Elmes
cc49457675
fix wrong item type being used for recent items
2021-02-08 22:50:48 +10:00
Damien Elmes
7dbd6ffc57
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
8012639237
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
637ac4c6dd
nest NoteWithEmptyCards
2021-02-08 19:11:16 +10:00
Damien Elmes
6121ee364d
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
bd9b921bcb
fix media check not updating progress
2021-02-08 16:46:57 +10:00
Damien Elmes
ac5845569e
Media check suffered from the same text box slowdown as the importing screen
2021-02-08 16:42:21 +10:00
Damien Elmes
b96db893ec
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
b09667a737
remember last input for 'set due'; add string config; nest config types
2021-02-08 14:10:05 +10:00
Damien Elmes
e12872b4b3
fix rsbackend compat issues
2021-02-08 09:51:51 +10:00
Damien Elmes
5527d9b4d1
add (unused) reschedule option back to avoid breaking fastbar
2021-02-08 09:51:40 +10:00
Damien Elmes
5e4ff2ff82
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
759e646f5d
fix backup not being taken before full download
2021-02-06 19:01:48 +10:00
Damien Elmes
23ed8578a5
add opus to supported audio list and sort
2021-02-06 15:11:24 +10:00
Damien Elmes
2f2a327e60
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
3d4f8cac67
fix filter saving failing when savedFilters is not set
2021-02-05 22:38:44 +10:00
Damien Elmes
a8e8620182
use 'contains' instead of 'prefix' search in tag completer
2021-02-05 21:14:35 +10:00
Damien Elmes
40a4b29214
use top level defs for protobuf enum cases
...
While mypy can understand nested references like ConfigBool.Key.COLLAPSE_RECENT,
PyCharm doesn't understand the metaclass syntax, and shows the definitions
as invalid.
2021-02-05 19:26:13 +10:00
Damien Elmes
b44cc23b66
use constants for other color references
...
str_color/qcolor() doesn't appear to have been used by any add-ons
except one of mine, so changing the signature should be safe
2021-02-05 18:58:22 +10:00
Damien Elmes
b6e873b17b
move remaining Filter button items into sidebar
...
- Closes #976
- Added helper to apply arbitrary colour to an icon.
- Fix #979 - low res icons in night mode.
- The icons and colours are not perfect - please feel free to send
through a PR if you can improve them.
- Convert colors dictionary into module consts, so we can
use code completion.
- Added "Edited Today" and "Due Tomorrow"
- Rename camelCase attribute to snake_case and tweak the wording
of some enum constants. We've already broken compatibility with the
major sidebar add-ons, so we may as well make these changes while we
can.
- Removed Filter button. Currently there is no exposed way to toggle
the Sidebar off - wonder if we still need it?
2021-02-05 18:58:22 +10:00
Damien Elmes
34b0fd5a77
replace sidebar filter shortcut with existing Filter button shortcut
2021-02-05 14:32:56 +10:00
Damien Elmes
9589ce2d79
exclude Mac dylib from '...'
2021-02-04 20:41:08 +10:00
Damien Elmes
5d4e50c39e
fix Qt translations in macOS packaged build
2021-02-04 20:28:25 +10:00
Damien Elmes
51ac1ea935
turn top bar dark when night mode enabled on macOS
2021-02-04 19:19:56 +10:00
Damien Elmes
2f9dea13ac
fix broken card styling fix :-)
2021-02-03 22:32:55 +10:00
Damien Elmes
efb2ce77ed
fix broken card styling
2021-02-03 22:22:12 +10:00
Damien Elmes
708f60ee1b
update to latest mypy_protobuf
...
The handling of enum types has improved - we no longer need to import
separate types at typechecking time.
2021-02-03 13:31:52 +10:00
Damien Elmes
69f5dcb47d
Merge pull request #972 from hgiesel/ephemeral
...
Move ephemeral card functionality from clayout to Note class
2021-02-03 13:10:00 +10:00
Damien Elmes
e6d9dd6a82
Merge pull request #973 from hgiesel/mathjaxerror
...
Render error if MathJax raises error
2021-02-03 13:09:12 +10:00
Henrik Giesel
b6cfccda67
Move copy_page to ts/copy.bzl and rename to copy_files_into_group
2021-02-02 18:20:11 +01:00
Henrik Giesel
6af6d7dbb6
Render error if MathJax raises error
2021-02-02 18:11:16 +01:00
Henrik Giesel
7b38b1ff51
Remove unused imports
2021-02-02 17:13:35 +01:00
Henrik Giesel
4ca24f1d84
Use new note.ephemeral_card method in clayout
2021-02-02 16:47:25 +01:00
Damien Elmes
6c60a27c8b
add remaining types and disable missing types on (almost) all aqt
2021-02-03 00:00:29 +10:00
Damien Elmes
9702532fc4
more typing updates
2021-02-02 23:31:55 +10:00
Damien Elmes
8abae9aa49
Merge pull request #971 from abdnh/sidebar-checkpoints
...
Add checkpoints for sidebar drag & drop routines
2021-02-02 22:28:53 +10:00
Damien Elmes
de2c7f3e38
Merge pull request #970 from RumovZ/cleanup-967
...
Cleanup 967
2021-02-02 22:03:43 +10:00
abdo
09729057e2
Add checkpoints for sidebar drag & drop routines
...
Also save note and reset browser model
2021-02-02 14:58:44 +03:00
Damien Elmes
06fda14999
fix: Qt translations not working
...
Will need to manually confirm this is working in the bundled builds
2021-02-02 21:12:28 +10:00
RumovZ
28a954e77f
Remove standard button translations
2021-02-02 11:57:35 +01:00
Damien Elmes
aad0d9b7b6
auto-expand items while dragging
2021-02-02 20:14:14 +10:00
Damien Elmes
957e781484
add tag drag & drop support
2021-02-02 20:14:04 +10:00
Damien Elmes
9ef0a1e070
Merge pull request #968 from abdnh/sidebar-expand-matches
...
Expand sidebar match trees one level
2021-02-02 19:03:04 +10:00
Damien Elmes
c5704e6102
collapsed->expanded in other tag uses for consistency
2021-02-02 18:52:57 +10:00
Damien Elmes
99d6247333
collapsed->expanded in TagTreeNode
2021-02-02 18:52:57 +10:00
RumovZ
af7aa4c21d
Add docstring to browser.__ini__
2021-02-02 09:48:55 +01:00
RumovZ
03ed76020f
Disallow untyped defs for dyndeckconf
2021-02-02 09:40:05 +01:00
RumovZ
45739cbc64
Remove actionCreateFilteredDeck2 and use modifier
2021-02-02 09:29:09 +01:00
Damien Elmes
ee2e68fa6b
remove sidebar margins
2021-02-02 16:35:42 +10:00
Damien Elmes
5c25a71634
fix: slowdowns after import; hard to read popup
...
QTextEdit() will pin the CPU at 100% for seconds to minutes when
fed a large string to display - work around it by switching to
QPlainTextEdit().
Also strip HTML before showing the user - easier to read, and less
text to display. And turn off word wrap, as it makes it easier to skim,
and further reduces the work the widget needs to do.
https://forums.ankiweb.net/t/big-issue-where-anki-gets-slow-when-you-import-this-deck/7050
2021-02-02 15:49:47 +10:00
abdo
14927c2465
Hide sidebar items when there is no match
2021-02-02 05:41:45 +03:00
abdo
1b72e142a7
Add more sidebar section roots
2021-02-02 04:51:45 +03:00
Damien Elmes
a1a70b1809
fix sync warning caused by mistake in typing work
2021-02-02 10:43:49 +10:00
Damien Elmes
b2c9030a58
ditch QSortFilterProxyModel in favour of our own code
...
Simpler and approximately twice as fast in a large collection:
old approach
search for a: 371ms
search for an: 260ms
new approach:
search for a: 171ms
search for an: 149ms
Still todo: add enum defs for the other root categories, update
the _section_root() calls, and update is_expanded() to use the new
extra types
2021-02-02 10:40:50 +10:00
RumovZ
8d8a2e49fd
Add remaining type hints to dyndeckconf etc.
2021-02-01 23:46:56 +01:00
RumovZ
b21d1dcbc0
Merge branch 'master' into dyn-deckconf
2021-02-01 23:33:41 +01:00
RumovZ
7b39fb6484
Rename standard buttons to have transaltions
2021-02-01 23:20:57 +01:00
RumovZ
99ffc08dbf
Make browser links unfocusable
...
Since Enter would trigger Accept anyway, there is no point in them
having focus.
2021-02-01 21:17:15 +01:00
RumovZ
3e30bd4610
Enable renaming from dyndeck dialogue
2021-02-01 21:02:22 +01:00
RumovZ
320b82aae6
Add cross links for second dyndeck filter
2021-02-01 19:10:05 +01:00
RumovZ
fbc5de4596
Style browser-from-filtered-deck button
...
Use theme color and add hover effect.
2021-02-01 18:01:57 +01:00
abdo
5c24e57734
Expand sidebar match trees one level
...
See 03eab6b646
2021-02-01 19:12:43 +03:00
Damien Elmes
748aeb9df1
add a bunch of return types
2021-02-01 23:53:23 +10:00
RumovZ
b76632eb62
Add button in dynDeckConf to search in browser
2021-02-01 13:55:03 +01:00
Damien Elmes
83892eac51
add types to various other files
...
Mainly automated with MonkeyType
2021-02-01 22:08:56 +10:00
RumovZ
ef413b90c6
Rename "Filtered Deck from Current Filter"
2021-02-01 12:09:37 +01:00
Damien Elmes
8be63cb902
add some types to main.py
2021-02-01 20:59:18 +10:00
RumovZ
27609a784f
Change filtered-deck shortcut in browser to Ctrl+G
2021-02-01 11:59:16 +01:00
RumovZ
d57d0f977b
Make browser accept optional args and add reopen
...
That way, the caller doesn't have to hold a reference to the browser and
explicitly call it again, if it wants to search for something specific.
Also, if the browser was closed and opened for a single-card-search, it
now won't perform a redundant current-deck-search first.
2021-02-01 11:54:28 +01:00
Damien Elmes
8dc5ea8bb6
add types to utils.py
...
The function signatures for things like getFile() are awful, but
sadly are used by a bunch of add-ons.
2021-02-01 20:23:48 +10:00
RumovZ
aa6cf51527
Fix pylints and type annotations in dyndeckconf
...
Also fix int representation of learning steps.
2021-02-01 09:56:10 +01:00
RumovZ
2a82e43c0b
Make DialogManager accept kwargs
...
When opening a dialogue accepting multiple optional arguments, relying
on position is error-prone and requires passing Nones to fill unused
parameter slots.
2021-02-01 08:50:19 +01:00
Damien Elmes
dc261c5abf
add helper script to run mypy daemon
2021-02-01 17:29:03 +10:00
Damien Elmes
34935bf478
add types to editor.py
2021-02-01 17:28:35 +10:00
Damien Elmes
b3f9d12606
Merge pull request #962 from hgiesel/editordirs
...
Make editor a rollup package within data/web/js
2021-02-01 13:40:54 +10:00
Damien Elmes
fe0d6b3a10
add missing types to sidebar.py
2021-02-01 09:51:46 +10:00
Damien Elmes
2070847868
add missing types to browser.py
2021-02-01 09:39:55 +10:00
RumovZ
90e1a75dd6
Add current-filter-to-filtered-deck action
2021-01-31 23:16:49 +01:00
RumovZ
23d1481d34
Make dyndeckconf a registered dialogue
2021-01-31 22:37:08 +01:00
Henrik Giesel
9f3403d704
Move editor css to editor directory
2021-01-31 19:03:40 +01:00
RumovZ
53513f371f
Rework dynndeckconf
...
- Handle deck building inside class. New deck is built unless caller
passes filtered deck.
- If no deck is passed and current deck is filtered, copy settings.
- Remove exec_().
2021-01-31 18:20:47 +01:00
Henrik Giesel
978258067b
Move editor to /ts/editor
2021-01-31 14:15:03 +01:00
Henrik Giesel
e667191899
Fix type issues
2021-01-31 13:34:39 +01:00
Henrik Giesel
aba2506394
Make editor a rollup package
2021-01-31 13:34:37 +01:00
RumovZ
632ad14801
Remove protobuf filters whole_col and current_deck
2021-01-31 11:12:49 +01:00
Damien Elmes
56a75c07dc
add public wrappers for remaining backend functions
2021-01-31 18:56:16 +10:00
Damien Elmes
ebfc9d1915
move rsbridge into _backend
2021-01-31 18:55:45 +10:00
Damien Elmes
a6be0f493b
start work on more clearly defining backend/protobuf boundaries
...
- anki._backend stores the protobuf files and rsbackend.py code
- pylib modules import protobuf messages directly from the
_pb2 files, and explicitly export any will be returned or consumed
by public pylib functions, so that calling code can import from pylib
- the "rsbackend" no longer imports and re-exports protobuf messages
- pylib can just consume them directly.
- move errors to errors.py
Still todo:
- rsbridge
- finishing the work on rsbackend, and check what we need to add
back to the original file location to avoid breaking add-ons
2021-01-31 18:55:45 +10:00
RumovZ
4cb9bf7326
Add missing sidebar onClicks
2021-01-31 08:56:34 +01:00
Damien Elmes
9a697fd843
Merge branch 'more-backend-search' into main
2021-01-31 14:21:51 +10:00
Damien Elmes
86713be79c
disable multiple selection for now
2021-01-31 14:02:38 +10:00
Damien Elmes
3708d28d0c
disable dragging of unsupported items
2021-01-31 13:46:31 +10:00
Damien Elmes
1e573003e9
support dragging multiple decks at once
2021-01-31 13:46:31 +10:00
Damien Elmes
3a06fd2808
add missing check for on_done==None in with_progress()
2021-01-31 13:46:31 +10:00
Damien Elmes
0f8b0df491
support drag&drop of decks in sidebar
2021-01-31 13:46:31 +10:00
Damien Elmes
5710e4bbd0
move drag/drop deck logic to backend
2021-01-31 13:46:31 +10:00
RumovZ
d3d18d34c5
Remove search button and reword search bar hint
2021-01-30 19:23:40 +01:00
RumovZ
2539747115
Manually namespace enum variants in SearchTerm
...
In protobuf "...enum values use C++ scoping rules, meaning that
enum values are siblings of their type, not children of it.
Therefore, [an enum variant] must be unique within [a message],
not just within [the enum.]"
So we must prefix enum variants with their enum's name, but can
also call them directly from the message namespace.
The protobuf crate is smart, though, and strips the prefixes.
(Simultaneously change some SearchTerm variant names.)
2021-01-30 17:56:29 +01:00
RumovZ
cdabb0ecbe
Replace leftover _named_filter with _filter_func
2021-01-30 17:39:21 +01:00
Henrik Giesel
a94bcbcc74
Fix focus on first field upon opening editor
2021-01-30 14:20:14 +01:00
RumovZ
353355fb15
Build list in focusCid and specify exception
...
model.cards may be a protobuf sequence but focusCid needs list's index
method, so convert to list, but only if needed.
2021-01-30 13:15:46 +01:00
RumovZ
540338cea3
Import SearchTerm from collection in aqt
2021-01-30 12:51:24 +01:00
RumovZ
a20ee1c844
Fix type annotations in browser search
2021-01-30 11:24:33 +01:00
RumovZ
9a1ff40b65
Update docstrings for browser search
2021-01-30 11:05:48 +01:00
RumovZ
fd07ef212a
Auto search and check input before model search
...
- Search for current deck automatically on browser setup.
- Hide current deck and current card searches.
- Check user search input before passing it on to the model, so invalid
searches don't change TableView.
2021-01-30 10:53:42 +01:00
Damien Elmes
747075e9a7
Merge pull request #957 from hgiesel/fieldsshadow
...
Implement editor as Web Component
2021-01-30 15:13:58 +10:00
Damien Elmes
190922666b
move Rating up a level
...
More ergonomic, and will allow reuse if we expose prop:rated in
the future.
2021-01-30 11:54:39 +10:00
Damien Elmes
2f1bbd44d2
simplify nid/nids searches, and ditch helper function
...
- IdList could be re-used for a cids: search in the future if required.
- Embedding the message means it's easy to access from Python as
an attribute of SearchTerm.
2021-01-30 11:37:00 +10:00
Damien Elmes
f6f537e89f
simplify Dupe message and ditch helper function
...
Calling code doesn't need to know about the existence of such helpers;
it can just rely on code completion to discover the required arguments.
2021-01-30 11:10:26 +10:00
Damien Elmes
cf1e2a2c0d
export SearchTerm from collection.py, and avoid exporting embedded items
2021-01-30 11:01:11 +10:00
Damien Elmes
b34d128560
rename FilterToSearchIn in backend to match frontend
2021-01-30 10:54:21 +10:00
Damien Elmes
dbe852431f
use a separate enum for the is:* searches
2021-01-30 10:49:00 +10:00
Damien Elmes
e3f2b77c5b
combine forgot_in_days and studied_today into a more general 'rated'
2021-01-30 10:26:23 +10:00
Damien Elmes
873bf7f505
Merge pull request #958 from hgiesel/zindexedtopbar
...
Make sticky topbar have a positive z-index
2021-01-30 09:14:50 +10:00
RumovZ
cad57423c5
Update search history only after successful search
...
Ergo, don't save invalid searches, but also save searches normalised so
equivalent searches get saved only once.
2021-01-29 23:05:51 +01:00
RumovZ
df22e51d02
Rework search initialisation
...
- Remove _searchPrompt.
- Add placeholder prompt.
- Move search for current card from browser to caller. (Thus, support
current card search even with opened browser.)
2021-01-29 21:07:42 +01:00
Henrik Giesel
44351bc997
Rename editingContainer -> editingArea; editingArea -> editable
...
* Custom elements are now namespaces with `anki-`
* The element names are inspired by summernote, which have the same
naming scheme of "editingArea > editable"
2021-01-29 20:32:21 +01:00
Henrik Giesel
c44c1513a3
Reorder methods / properties
2021-01-29 20:13:02 +01:00
Henrik Giesel
da79acf685
Remove unnecessarily observed attribute
2021-01-29 20:11:00 +01:00
Henrik Giesel
9771b5394c
Add semicolon in js message
2021-01-29 19:48:17 +01:00
Henrik Giesel
e7a49d5c48
Make forEditorField more cheaper to execute by avoiding casting to Array
2021-01-29 19:38:55 +01:00
RumovZ
c7365abc9e
Refactor search_string() and FilterToSearchIn
...
See #955 .
2021-01-29 18:27:33 +01:00
Henrik Giesel
00a4d0357d
Remove explicit ids, as they are not necessary anymore
2021-01-29 18:07:31 +01:00
Henrik Giesel
1617565f2d
No need to set initial values for editing area base CSS
2021-01-29 17:51:26 +01:00
Henrik Giesel
36ce422119
Remove checking for class names for instance checks
2021-01-29 17:41:27 +01:00
Henrik Giesel
a33fa9c0cf
Put HTML initialization into web component constructor
...
* disconnectedCallback should remove event listeners and free other resources
* attributes belong to connectedCallback
2021-01-29 15:50:34 +01:00
Henrik Giesel
514d6b68b6
Move setting of index to connectedCallback
2021-01-29 14:54:59 +01:00
Henrik Giesel
1f5793e9e7
Remove user styling in editor again for now
2021-01-29 14:54:59 +01:00
Henrik Giesel
ef404c73ce
Fix focus change on tab
2021-01-29 14:54:59 +01:00
Henrik Giesel
646415fd09
Move styling attributes from editor to editing-area that are for editing area
2021-01-29 14:54:58 +01:00
Henrik Giesel
fc24ebfb9e
Make button highlight white in nightMode
2021-01-29 14:54:58 +01:00
Henrik Giesel
f3aaa40238
Make the text color part of the base style in editor
2021-01-29 14:54:58 +01:00
Henrik Giesel
49c3723647
Allow stylesheet of note type take effect on editor fields
2021-01-29 14:54:58 +01:00
Henrik Giesel
3d2c4b9969
Use currentField.getSelection instead of window.getSelection
2021-01-29 14:54:58 +01:00
Henrik Giesel
28276a9acf
Use new focusEditingArea and blurEditingArea to delegate to editing area
2021-01-29 14:54:58 +01:00
Henrik Giesel
b423c372d5
Fix dupes, but also make sticky, and centered to draw more attention
2021-01-29 14:54:58 +01:00
Henrik Giesel
8381d9f842
Update setFonts and setBackgrounds
2021-01-29 14:54:58 +01:00
Henrik Giesel
7170a2b853
Fix inListItem for shadow roots
2021-01-29 14:54:58 +01:00
Henrik Giesel
0c2b560718
Rename fieldContainsInlineContent to containsInlineContent to reflect new usage
2021-01-29 14:54:58 +01:00
Henrik Giesel
cbb5224f48
Isolate styling of editing-area into new scss file
2021-01-29 14:54:58 +01:00
Henrik Giesel
fd704381a0
Create a rough draft of the editor web component
2021-01-29 14:54:58 +01:00
Damien Elmes
ef178cd7e1
remove debug statement
2021-01-29 23:21:57 +10:00
Henrik Giesel
e9d8e73239
Make sticky topbar have a positive z-index
2021-01-29 14:21:32 +01:00
Damien Elmes
0a119c3bad
move saved search code into sidebar.py, and remove from Filter button
2021-01-29 23:05:30 +10:00
Damien Elmes
03eab6b646
add expand/collapse children options
2021-01-29 22:54:00 +10:00
Damien Elmes
cfc6620591
place each sidebar section under its own collapsible parent node
...
- Allows for group operations like "clear unused tags"
- Allows users to hide groups they're not interested in
2021-01-29 22:11:05 +10:00
Damien Elmes
34c53aafb4
add getter/setter for boolean config values
2021-01-29 21:03:19 +10:00
RumovZ
9cf02efd20
Use proper docstrings
2021-01-29 09:40:21 +01:00
RumovZ
12c97442c9
Rename filters added_in etc. to added_in_days
2021-01-29 09:38:13 +01:00
Damien Elmes
45ec14184a
show actual error when graphData fails
...
The original reason for the catch-all message was users with bad
data such as decimal intervals, but those get automatically coerced
these days. The common case should now be invalid search strings, which
we can show verbatim.
2021-01-29 14:39:05 +10:00
Damien Elmes
e70b887e8c
Revert "Make sidebar search matching work with full_name instead of name"
...
This reverts commit b0a599c6bc .
Using the full name caused issues with highlighting:
https://github.com/ankitects/anki/pull/951#issuecomment-769516003
Let's revert this for now and see if demand presents itself.
2021-01-29 13:18:28 +10:00
Damien Elmes
a0a82c1f56
vary sidebar highlight with theme
2021-01-29 13:15:38 +10:00
Damien Elmes
e385507636
Merge pull request #951 from abdnh/sidebar-search
...
Add search bar to the sidebar
2021-01-29 11:32:26 +10:00
abdo
47b5e8d345
Handle sidebar refreshing while searching
2021-01-29 04:20:15 +03:00
Damien Elmes
c0e0cabd73
drop potentially slow regex usage in cloze check
...
Closes #956 , thanks to Henrik.
2021-01-29 11:15:33 +10:00
abdo
68ea4eda96
Wait for some time before performing sidebar search
2021-01-29 03:45:16 +03:00
abdo
b0a599c6bc
Make sidebar search matching work with full_name instead of name
2021-01-29 02:36:13 +03:00
RumovZ
e629e32c12
Add browser_search helper in mw
2021-01-28 20:51:32 +01:00
RumovZ
0950c8f7c6
Fix search calls in addcards
2021-01-28 20:01:20 +01:00
RumovZ
df1d059128
Use backend filter for findDupes and handle excep.
2021-01-28 19:49:16 +01:00
RumovZ
3723bc5a98
Use backend nid filter in addcards and mediacheck
2021-01-28 18:59:20 +01:00
RumovZ
cd9a3734c3
Use backend nid filter in browser
2021-01-28 16:21:56 +01:00
RumovZ
8d786213d3
Prevent search prompt from being saved as a filter
...
Normalisation would render it useless.
2021-01-28 13:31:08 +01:00
RumovZ
7941c03ec0
Use backend filter for search prompt
2021-01-28 13:26:52 +01:00
RumovZ
8d669724b1
Replace remaining literal searches in aqt
2021-01-28 11:19:07 +01:00
RumovZ
011e7413ff
Use col instead of backend in aqt for search strs
2021-01-28 11:17:24 +01:00
Damien Elmes
55627e7eae
fix crashes when activating context menu/items while searching
2021-01-28 19:12:07 +10:00
Damien Elmes
d82b6bc778
basic match highlighting
2021-01-28 18:58:51 +10:00
Damien Elmes
9212e6af5e
basic tree-based filtering with a sort proxy
...
Some things left to do:
- instead of searching on each keystroke, have the keystroke start
a timer and wait 600-1000ms before performing the search
- handle the case .refresh() is called while searching
It would also be nice to have some visual distinction between matching
rows and their non-matching parents.
2021-01-28 18:51:18 +10:00
Damien Elmes
193e2d47a6
fix sidebar model.parent() returning invalid values
...
Triggered a crash when using a model proxy.
2021-01-28 17:48:33 +10:00
Damien Elmes
07b0eebdb3
Merge pull request #952 from hgiesel/fieldsflex
...
Deal with inline content vs block content and <br> in editor.ts
2021-01-28 15:49:31 +10:00
Damien Elmes
4b0d25aa23
add type check to textFormat arg
2021-01-27 14:22:17 +10:00
Henrik Giesel
04a7b88595
Rename fieldIsInInlineMode to fieldContainsInlineContent
2021-01-27 02:35:14 +01:00
Henrik Giesel
aa61f24547
Remove unused helper functions
2021-01-27 00:55:00 +01:00
Henrik Giesel
8572c1e1d7
Recreate border-spacing with margins for #fields
2021-01-27 00:50:26 +01:00
Henrik Giesel
bd270ba52c
Change nodeIsInline logic to be more typesafe
2021-01-26 23:49:48 +01:00
Henrik Giesel
876efba70c
Change logic to detect inline elements, as the display style property may not be set after setting innerHTML
2021-01-26 23:42:04 +01:00
abdo
924d501bf3
Add search bar to the sidebar
...
https://github.com/ankitects/help-wanted/issues/6
2021-01-27 01:41:57 +03:00
Henrik Giesel
898cdb94e4
Make #fields display correctly
2021-01-26 23:17:50 +01:00
Henrik Giesel
a76d1772df
Make fields div instead of table + implement fieldIsInInlineMode logic
2021-01-26 23:00:55 +01:00
Henrik Giesel
6464a2bb83
Strip trailing newline if inline elements logic
2021-01-26 21:26:04 +01:00
Damien Elmes
a83cb6402e
tooltip() instead of print() when no tts tag matches
...
Can help with debugging user error like an incorrectly-typed language
code. Don't ask me how I know. :-)
2021-01-26 20:37:24 +10:00
Damien Elmes
8b8c826cd8
Merge pull request #944 from Arthur-Milchior/help
...
NF: HelpPage in an enum
2021-01-26 11:33:39 +10:00
Damien Elmes
6285729c49
Merge pull request #897 from hgiesel/statssearch
...
Triggering searches from the stats screen.
2021-01-26 11:31:36 +10:00
Arthur Milchior
cb2df4fc1a
NF: HelpPage in an enum
...
Hopefully, this can help with updating on next manual update and maybe even linking to manual translation
2021-01-26 02:16:37 +01:00
Damien Elmes
b9a663a738
Merge pull request #945 from RumovZ/dyndeck-search
...
Normalize dyndeck search and handle exception
2021-01-26 09:24:56 +10:00
Damien Elmes
d7994ad056
load sidebar in background
...
Allows the UI to repaint during processing, but will still block
DB operations until the call completes.
2021-01-26 09:02:08 +10:00
RumovZ
9986113eed
Normalize dyndeck search and handle exception
2021-01-25 23:21:32 +01:00
RumovZ
0bd214b4ee
Move show_invalid_search_error to utils
2021-01-25 23:19:19 +01:00
Henrik Giesel
6b0a26e46b
Move dispatch logic from Histogram to individual graphs
2021-01-25 16:34:44 +01:00
Henrik Giesel
a86c41c19b
Satisfy formatter
2021-01-25 13:46:44 +01:00
Henrik Giesel
a390fb08e2
Add browserSearch bridge command
2021-01-25 13:44:19 +01:00
Damien Elmes
08f6ec649c
fix finished screen not showing when learning cards due later
2021-01-25 21:12:57 +10:00
Arthur Milchior
76c02c9f82
Correct browse help link
2021-01-23 14:48:29 +01:00
Damien Elmes
a6a4c0032d
Merge pull request #934 from hgiesel/graphprefs
...
Add GraphsPreferences API to graphs for setting persistent preferences
2021-01-23 21:24:41 +10:00
Damien Elmes
387be76c00
minor wording tweak: GraphsPreferences -> GraphPreferences
2021-01-23 20:47:45 +10:00
Damien Elmes
959496f20e
Merge pull request #938 from hgiesel/editorflex
...
Small refactor of topbar buttons
2021-01-23 20:09:42 +10:00
Damien Elmes
ec7000575e
move sidebar code from browser.py to sidebar.py and tidy up
...
https://github.com/ankitects/help-wanted/issues/6
Some notes:
- use our own routine to toggle the sidebar, which avoids a useless
refresh on browser close, and allows us to limit the delayed loading
to initial browser load.
- add-ons that limited themselves to the browser_will_build_tree hook
should theoretically continue working; ones that were monkey patching
will likely break. A few appear to be broken at the moment anyway,
so it's probably a good time to be making this change.
2021-01-23 19:59:12 +10:00
Damien Elmes
bceaa21fa6
drop tags/decks/etc from Filter button
...
https://github.com/ankitects/help-wanted/issues/6
These are a relic from when the sidebar defaulted to off, and I don't
think enough people are using them to bother keeping them around.
Once the the card state and saved filter functionality moves into the
sidebar and top menus, we may be able to remove the Filter button
completely.
2021-01-23 18:21:44 +10:00
Henrik Giesel
25eee0e704
Change the function name in genbackend.py
2021-01-22 20:05:28 +01:00
Henrik Giesel
a5f59515e2
Rename GraphsPreferencesOut to simply GraphsPreferences
2021-01-22 19:39:03 +01:00
abdo
fb70929b81
Render card templates as trees in the sidebar
...
Reusing the note type icon and not caring about saving collapse state
for now.
2021-01-22 17:49:20 +03:00
Henrik Giesel
fe75480fea
Successfully send post request to rust
2021-01-22 14:37:24 +01:00
Henrik Giesel
846dd396a6
Add non-functioning logic for settings graphs preferences
2021-01-22 13:14:35 +01:00
Henrik Giesel
1516f5c37e
Add GraphsPreferences endpoint to backend
2021-01-22 13:13:48 +01:00
Henrik Giesel
1a02613274
Avoid highlighting of toprightbuttons to shift the topbar
2021-01-22 12:53:45 +01:00
Henrik Giesel
f462f54e55
Space items by using margins instead of spaces
...
* also changed name of topbutton container back to topbutsOuter as it is clearer
* starting with Chromium 83, `row-gap` would be better suited for this
2021-01-22 12:17:10 +01:00
Henrik Giesel
e1979ef9a0
Switch from floating windows and clearfix to flex and justify-content: space-between
2021-01-22 11:37:11 +01:00
Damien Elmes
b045107baa
Merge pull request #935 from abdnh/sidebar-nt
...
Add manage note types menu item to the sidebar
2021-01-22 14:21:28 +10:00
abdo
2eec50341d
Move the logic for selecting a note type to models.py
2021-01-22 05:56:39 +03:00
Henrik Giesel
431b2fde63
Adjust the positioning of the editor toolarea via CSS
2021-01-21 21:36:33 +01:00
Henrik Giesel
8467b052f9
Remove image click event handler, as it never takes place
...
* className of fields will be "field clearfix", never just "field"
2021-01-21 20:50:17 +01:00
Henrik Giesel
3c3c78ee71
Remove javascript resizing code from editor.ts
2021-01-21 19:59:16 +01:00
abdo
14eeaa1ec9
Add manage note types menu item to the sidebar
2021-01-21 20:27:20 +03:00
Damien Elmes
85135d46fc
Merge pull request #930 from hgiesel/editorts
...
Refactor editor.ts
2021-01-21 10:44:11 +10:00
Henrik Giesel
ba7252b664
Explicitly execute code deactivating button focus from editor.py
2021-01-20 17:06:08 +01:00
abdo
5a5b87e733
Add filter remove/rename actions to the sidebar
2021-01-20 03:26:53 +03:00
Henrik Giesel
55cf7a27ba
Remove jQuery from most top functions, and avoid waiting for jquery load
2021-01-19 03:52:46 +01:00
Henrik Giesel
fc0402db81
Remove some unnecessary jQuery, replace some toggles with classList.toggle
2021-01-19 03:06:44 +01:00
Henrik Giesel
077a22adcc
Remove code which supposedly fixing focus, but which is not functional
2021-01-19 02:54:15 +01:00
Henrik Giesel
9803a4ab00
Switch to iterables for elem.style and elem.attributes
2021-01-19 02:48:41 +01:00
Henrik Giesel
0534f217ae
Satisfy formatter
2021-01-19 01:08:15 +01:00
Henrik Giesel
c8c10c07b2
Prefer template string and addEventListener over string concatenation and .on<event>
2021-01-18 17:42:29 +01:00
Henrik Giesel
2efc2030f6
Use more strict TypeScript in editor.ts
2021-01-18 17:18:35 +01:00
Henrik Giesel
2ec2bc91da
Switch to KeyboardEvent.code rather than KeyboardEvent.which, which is deprecated
2021-01-18 15:19:57 +01:00
Damien Elmes
d92ba2c246
Merge pull request #900 from abdnh/tagtree
...
Hierarchical tags
2021-01-18 16:36:22 +10:00
abdo
c4725cc908
Fix wrong tag collapse state being used
2021-01-18 06:50:29 +03:00
Damien Elmes
8e50cfc404
skip the schema warning on template rename
...
https://forums.ankiweb.net/t/unnecessary-full-upload-notification/6611
2021-01-18 12:03:07 +10:00
abdo
a96c410c52
Remove unused set_filter()
2021-01-16 18:51:31 +03:00
Damien Elmes
96bd39f13e
search error tweaks
...
- use markdown instead of HTML, to make editing and translating easier
- use a shared prefix
- a few very minor wording tweaks
- we don't need to translate undocumented command errors
- share a string for positive number of days
- share a string for invalid property and state arguments, and avoid
listing them out
Related discussion: https://github.com/ankitects/anki/pull/922
2021-01-16 15:59:19 +10:00
Damien Elmes
c6f38733ed
Merge pull request #925 from hgiesel/preferbr
...
Prefer <br> over <div></div> in Editor
2021-01-16 13:03:28 +10:00
Damien Elmes
db045fb1b9
restore shortcuts that got lost in Fluent conversion
...
They were missed as they were not marked 'notr'.
https://forums.ankiweb.net/t/home-and-end-keys-no-longer-work-in-browse-window/6524
2021-01-16 10:03:29 +10:00
Henrik Giesel
131d71682b
Deal with div insertion on deleting list item
2021-01-15 18:46:37 +01:00
Henrik Giesel
b5e26f7e51
Consider list edge case for line breaks
...
* Enter makes a new bullet point
* Shift+Enter makes a line break in current bullet point
2021-01-15 18:46:37 +01:00
Henrik Giesel
93b429a21b
Prefer <br> over <div></div>
2021-01-15 18:46:37 +01:00
abdo
112aa44c90
Merge branch 'master' of https://github.com/ankitects/anki into tagtree
2021-01-15 01:12:01 +03:00
RumovZ
895b3a0b6f
Use backend to set dupe filter
2021-01-14 10:42:37 +10:00
Damien Elmes
6cc58451b1
add local sync server frontend
2021-01-13 11:42:00 +10:00
abdo
c423e8d7bb
Merge branch 'master' of https://github.com/ankitects/anki into tagtree
2021-01-12 23:31:58 +03:00
abdo
e3c873fb32
Keep tags in human form and update the tags table structure
...
See https://github.com/ankitects/anki/pull/900#issuecomment-758284016
- Leave tag names alone and add the collapsed and config columns to the tags table.
- Update The DB check code to preserve the collapse state of used tags.
- Add a simple test for clearing tags and their children
2021-01-12 23:12:35 +03:00
Damien Elmes
0accefcd94
drop basicCheck()
...
It can considerably slow down syncing on large collections
2021-01-12 18:47:08 +10:00
Damien Elmes
3f9b7ea6e2
Merge pull request #914 from hgiesel/previewineditor
...
Preview Button in Editor instead of Browser
2021-01-11 19:12:06 +10:00
Damien Elmes
07e0df5176
Merge pull request #915 from RumovZ/fix-template-filter
...
Fix _template_filter and update want_release_gil()
2021-01-11 16:20:50 +10:00
Kyle Mills
386f42070c
typo
2021-01-10 07:18:08 -08:00
Henrik Giesel
cd09db2abe
Make keys parameter requiring func parameter in _addButton explicit
2021-01-10 13:42:23 +01:00
RumovZ
9ad005aec5
Don't add 1 when calling _template_filter()
...
See #913 .
2021-01-10 11:30:14 +01:00
Henrik Giesel
956beae044
Close previewer if there is no card to render
2021-01-10 02:01:24 +01:00
Henrik Giesel
961de57ed9
Fix formatting, use shortcut on preview before displaying
2021-01-10 01:50:00 +01:00
Henrik Giesel
90e4cb5bae
Allow closing the Preview Dialog with Ctrl+Shift+P
2021-01-10 01:34:59 +01:00
Henrik Giesel
3e1cf6c986
Prevent error when browser is closed with previewer open
2021-01-10 01:21:52 +01:00
Henrik Giesel
1940c90f62
Activate toggle on hotkey invocation
2021-01-10 01:10:23 +01:00
Damien Elmes
ffec5ab461
add type to _named_filter()
...
The ...Value types generated by mypy-protobuf are only available
at typechecking time, and pylint chokes on them despite the use
of annotations from __future__ - so we either need to quote them,
or use # pylint: disable=no-member
2021-01-10 09:11:48 +10:00
Henrik Giesel
5aa6281521
Add shortcut to new preview button
2021-01-10 00:00:19 +01:00
Henrik Giesel
d58f9a6fea
Improve styling of new preview button on light and nightMode
2021-01-09 23:55:39 +01:00
Henrik Giesel
2fa91e6480
Remove preview button from browser.py top bar
2021-01-09 23:25:56 +01:00
Henrik Giesel
f3f1849148
Make button show its toggle state
2021-01-09 23:16:01 +01:00
Henrik Giesel
1e3e7ccfcd
Put Preview button into editor inside browser
2021-01-09 22:34:53 +01:00
RumovZ
0bf7ad0951
Merge branch 'master' into backend-filters
...
Adapt new formatting.
2021-01-09 19:03:43 +01:00
RumovZ
02837ebbef
Use explicit wrapper functions to get filters
2021-01-09 16:48:47 +01:00
abdo
a17d309ed3
Move tag collapse method to the backend
2021-01-09 17:10:16 +03:00
abdo
a18227acc4
Do not check for missing tag parents at registration time
2021-01-09 17:10:16 +03:00
abdo
a30a2638ce
Hierarchical tags
2021-01-09 17:10:13 +03:00
RumovZ
370c689c83
Prettify frontend filter code
2021-01-09 12:34:46 +01:00
RumovZ
0cb75f5601
Use backend filters instead of literal searches
2021-01-09 10:51:15 +01:00
abdo
4418e896bd
Exclude aqt/hooks_gen.py from formatting
2021-01-09 03:01:48 +03:00
wallgrenen
3a1ef7b651
remove unused variables and commented-out code
2021-01-08 20:53:27 +01:00
RumovZ
0ebaf98c96
Compare and save filters normalised
...
When checking whether the current search is a saved filter, compare the
searches normalised to allow the detection of equivalent expressions.
Invalid searches are accepted unaltered to allow the deletion of invalid
saved filters.
As for saving new filters, do so normalised, respectively, reject
invalid searches.
2021-01-07 22:11:21 +01:00
RumovZ
5a559cab16
Format
2021-01-07 18:20:14 +01:00
RumovZ
ad361e7a77
Provide ConcatSeparator through rsbackend.py
2021-01-07 17:48:30 +01:00
Damien Elmes
dda65cac9a
ignore missing pyaudio
2021-01-07 16:25:55 +10:00
Damien Elmes
2b5ef0b9a8
fix qt/ pylints
2021-01-07 16:21:50 +10:00
Damien Elmes
685e841771
cap pylint CPUs in qt/
...
After 4 cores, improvements are tiny, and soon start going backwards,
presumably due to the overhead of importing PyQt into each worker.
2021-01-07 16:19:52 +10:00
Damien Elmes
6872744689
fix pylint in qt
...
pylint fails to read Qt modules when invoked as a subprocess with
-j 0, and it looks like I committed this in the middle of debugging
the issue. Work around it by invoking pylint directly. It's still
awfully slow, taking 30 seconds on a 10 core machine.
2021-01-07 15:47:25 +10:00
Damien Elmes
5a1fb1da98
fix another broken setWindowFlags
2021-01-07 14:46:55 +10:00
Damien Elmes
8075d46011
convert setWindowFlags call into helper, and fix invalid variables
...
"type: ignore" was masking the invalid references to self in places
like showText()
2021-01-07 14:24:49 +10:00
Damien Elmes
73eec46bda
Merge pull request #860 from RumovZ/norm-search
...
Normalise search
2021-01-07 10:51:36 +10:00
Damien Elmes
6fa649e8bf
only adjust search on left button click
...
Closes #898
2021-01-07 10:08:23 +10:00
wallgrenen
49781ea29a
replace broken link
2021-01-07 09:56:25 +10:00
Damien Elmes
07e7815ec4
Merge pull request #899 from BlueGreenMagick/remove-context-help-btn
...
remove context help button
2021-01-07 09:52:12 +10:00
RumovZ
ac4d254793
Merge branch 'master' of https://github.com/ankitects/anki into norm-search
2021-01-06 20:57:24 +01:00
RumovZ
85cb9c318c
Format
2021-01-06 20:35:11 +01:00
RumovZ
163f92729d
Add exception handling for filter modifications
2021-01-06 20:25:13 +01:00
RumovZ
0b1eec9cd8
Add tests for writer.rs
...
Also minor adjustments to concatenate_searches.
2021-01-06 19:39:34 +01:00
RumovZ
f061ccfb02
Implement search replacing via Ctrl+Shift combo
...
Also switch to using the new backend functions for concatenating and
negating searches.
2021-01-06 18:32:29 +01:00
wallgrenen
1c5f0ad44f
replace broken link
2021-01-06 17:03:39 +01:00
BlueGreenMagick
9a29d1b97a
remove context help button
2021-01-06 22:15:48 +09:00
RumovZ
8c0d666431
Adjust frontend to normalized search syntax
2021-01-06 14:05:28 +01:00
Damien Elmes
f4d4776f22
Merge pull request #891 from BlueGreenMagick/sidebar-delete-deck
...
Sidebar delete deck
2021-01-06 18:56:15 +10:00
Damien Elmes
923b4d65e9
fix unhandled sync error
...
Thanks to Abdo:
https://forums.ankiweb.net/t/sync-anki-on-desktop-error/6299/2
2021-01-06 18:51:28 +10:00
BlueGreenMagick
fee293b0d8
format ask_delete_deck method more readable
2021-01-05 21:33:59 +09:00
BlueGreenMagick
f7ee41976e
delete deck in background
2021-01-05 21:33:59 +09:00
BlueGreenMagick
65037387d6
add BrowserDeleteDeck to ResetReason
2021-01-05 21:33:48 +09:00
BlueGreenMagick
8c3773262f
add delete_deck to sidebar context menu
2021-01-05 20:09:55 +09:00
BlueGreenMagick
59fba57e07
seperate ask_delete_deck and _delete method
2021-01-05 20:09:47 +09:00
Damien Elmes
53b215e4c6
Merge pull request #890 from hgiesel/addonclose
...
Add closeWithCallback method to Addons dialog
2021-01-04 21:16:01 +10:00
Henrik Giesel
bd0b58ef1c
Add silentlyClose method to Addons dialog
2021-01-04 11:52:00 +01:00
Damien Elmes
67455365c0
Merge pull request #888 from hgiesel/studiedtoday
...
Wrap studied_today in deckbrowser in div and span
2021-01-04 14:27:35 +10:00
Damien Elmes
3123e6df7f
do tag rename and tag clearing in background; move logic to tags.py
...
Because the logic is in rename_tag() now, it means we create a
checkpoint even if the tag is orphaned. This is because currently
checkpointing is a GUI responsibility. In the future we need to introduce
multi-level undo, and should move responsibility for managing it
to the backend.
2021-01-04 14:14:39 +10:00
Damien Elmes
dabde048e1
types don't need quoting, as annotations is imported from future
2021-01-04 13:46:00 +10:00
Damien Elmes
175013b299
Merge pull request #887 from BlueGreenMagick/deck-rename-checkpoint
...
don't set checkpoint when deck rename is cancelled
2021-01-04 13:44:28 +10:00
Henrik Giesel
17119dcb1c
Wrap studied_today in div and span in deckbrowser
2021-01-03 14:54:44 +01:00
BlueGreenMagick
57c60367ab
escape tags when finding notes
2021-01-03 17:34:44 +09:00
BlueGreenMagick
e5405dd496
add rename_tag to browser sidebar contextmenu
2021-01-03 16:36:54 +09:00
BlueGreenMagick
56d89d7c9a
don't set checkpoint when deck rename is cancelled
2021-01-03 16:30:14 +09:00
Damien Elmes
67bae1ec93
refreshing should happen outside of except clause
2021-01-03 10:09:42 +10:00
Damien Elmes
0b3ff5c88c
Merge pull request #885 from Arthur-Milchior/hook_default_search
...
NF: Add a hook to change the default search from reviewer
2021-01-03 10:09:08 +10:00
Damien Elmes
0287099253
Merge pull request #884 from BlueGreenMagick/refresh-deckchooser
...
refresh deck browser after renaming deck in browser sidebar
2021-01-03 10:08:45 +10:00
Arthur Milchior
5c7dbdf72b
NF: Add a hook to change the default search from reviewer
...
The goal here is to simplify my add-on which show a single card or the whole deck when the browser open
2021-01-02 19:49:11 +01:00
BlueGreenMagick
a7889fdcfa
refresh deck browser on renaming deck
2021-01-02 23:21:41 +09:00
BlueGreenMagick
e9223bfd36
no need to call show()
2021-01-02 23:07:57 +09:00
Damien Elmes
a27e94e54d
merge separate vendor rules into single rule
...
Rather than creating a separate rule for each package, we can just
create a generic one and reuse it. Also switch to keyword arguments
in the resulting macros, as it's easier to read.
2021-01-02 11:14:00 +10:00
Henrik Giesel
e51685d4e6
Fix input type for _drawFlag
2021-01-01 14:14:50 +01:00
Henrik Giesel
b7923ee20e
Remove browsersel
2020-12-31 16:48:04 +01:00
Henrik Giesel
e0d34d526a
Replace browsersel with css-browser-selector in aqt files and add redirect
2020-12-31 16:47:20 +01:00
Henrik Giesel
6087bb9a0f
Add css-browser-selector to BAZEL build file in data/web/js/vendor
2020-12-31 16:41:31 +01:00
Henrik Giesel
137e4b3d15
Remove hardcoded protobufjs
2020-12-31 16:17:46 +01:00
Henrik Giesel
e30ed8c2fa
Add build recipe to aqt/data/web/js
2020-12-31 16:15:25 +01:00
Damien Elmes
9953305241
Merge pull request #878 from hgiesel/updateQueue
...
Replace `_updatingQA` with promise-based `_updatingQueue`
2020-12-31 12:42:58 +10:00
Damien Elmes
201b886f10
Merge pull request #877 from hgiesel/jquery-ui
...
Update Jquery UI and include in Bazel deps
2020-12-31 12:07:53 +10:00
Henrik Giesel
a1d948d5a2
Replace () => void | Promise<void> with Callback typedef
2020-12-30 16:04:59 +01:00
Henrik Giesel
bbb1a9ed94
Add types to reviewer.ts
2020-12-30 15:06:22 +01:00
Henrik Giesel
8aef0be0f6
Replace _updatingQa synchronization with promise-based _updatingQueue
2020-12-30 14:45:27 +01:00
Henrik Giesel
03da021706
Put loads first in BUILD.bazel
2020-12-30 12:16:59 +01:00
Henrik Giesel
b9c4d2d1ad
Remove jquery-ui from vendor folder
2020-12-30 12:12:49 +01:00
Henrik Giesel
da996302a5
Add redirect for jquery-ui
2020-12-30 12:08:12 +01:00
Henrik Giesel
7f85ac63f5
Change include name for jquery ui in deckbrowser
2020-12-30 12:07:02 +01:00
Henrik Giesel
dda55b16f1
Add jquery-ui to vendor/BUILD.bazel
2020-12-30 12:06:06 +01:00
Damien Elmes
cb646cb71e
remove old symlink before installing a new version
...
https://forums.ankiweb.net/t/ubuntu-command-anki-not-found/6083/4
2020-12-30 20:56:28 +10:00
Damien Elmes
c3ff88ab88
fix media attachment
...
insertHtmlRemovingInitialBR() was removed in a previous PR
2020-12-30 19:30:23 +10:00
Damien Elmes
9b92d3ce1f
Revert "Merge pull request #873 from hgiesel/otherjsdeps"
...
This reverts commit ad7491a9ae , reversing
changes made to 5a79515f2a .
- Standard graphs render incorrectly on latest version - the wrong number
of days are shown, and the grid lines look wrong. Any version after 0.8.3
seems to suffer from this problem.
- Pie graphs and stack graphs don't render - they are provided in separate
files, and plot.js in previous Anki versions has them included in the one
file. To maintain compatibility with add-ons, we'd need to create a single
file as before, instead of importing multiple files.
If the above issues are fixed I'd be happy to merge this in again, but
as the old graphs are on the way out, it's probably not worth the effort.
2020-12-30 14:13:52 +10:00
Damien Elmes
c11e9c45d7
Merge pull request #875 from stayingpeachy/help-link
...
Update help link
2020-12-30 13:52:50 +10:00
Damien Elmes
fcffad3535
Merge pull request #874 from hgiesel/jqueryreview
...
Update _updateQa
2020-12-30 13:51:54 +10:00
Meredith
adc54c71e3
update help link
...
old help link was outdated
2020-12-29 11:09:28 -05:00
Henrik Giesel
633d20f9fd
Satisfy prettier
2020-12-29 14:45:20 +01:00
Henrik Giesel
05425c666f
Hook functions may also return void
2020-12-29 14:01:09 +01:00
Henrik Giesel
9b844a469a
Replace ts-ignore with declare var
2020-12-29 13:43:47 +01:00
Henrik Giesel
a1d389a5b8
Fix typing of reviewer hooks
2020-12-29 13:42:30 +01:00
Henrik Giesel
244219ab27
Use async/await syntax in _updateQa
2020-12-29 13:34:39 +01:00
Henrik Giesel
7ecdb2859e
Remove plot.js
2020-12-29 12:16:50 +01:00
Henrik Giesel
644ae453d7
Redirect references to old plotting library version
2020-12-29 12:15:46 +01:00
Henrik Giesel
a9f533a852
Use new version of plotting library in stats.py
2020-12-29 12:13:25 +01:00
Henrik Giesel
fe7d1aef2b
Copy flot file to vendor directory
2020-12-29 12:11:28 +01:00
RumovZ
6ad500db55
Make function names more explicit and add docs
2020-12-29 11:18:49 +01:00
Damien Elmes
b68c513cac
Merge pull request #856 from hgiesel/jquery
...
Update jQuery from 1.12.4 to 3.5.1, include in Bazel build process
2020-12-29 10:00:33 +10:00
Damien Elmes
41222e0ba6
fix legacy js remapping
...
Thanks to Henrik for catching it.
2020-12-29 09:57:34 +10:00
Henrik Giesel
c5fd2d2a55
Fix formatting
2020-12-28 14:56:41 +01:00
Henrik Giesel
d9256c2c2e
Add mapping in redirectWebExport for new jquery file
2020-12-28 14:52:44 +01:00
Henrik Giesel
b9dfab79dd
Avoid building jquery to its own directory
2020-12-28 14:18:07 +01:00
Henrik Giesel
0b5ee75861
Rename references from vendor/jquery.js to vendor/jquery/jquery.min.js
2020-12-28 13:16:12 +01:00
Henrik Giesel
b6fba45ad5
Remove jquery from Anki repo and replace with Bazel BUILD
2020-12-28 13:16:12 +01:00
Damien Elmes
05a0c3c40e
Merge pull request #869 from Arthur-Milchior/trip_new_field_name
...
New field name checks are more specific
2020-12-28 16:53:32 +10:00
Damien Elmes
184d5ab368
Merge pull request #858 from hgiesel/editorwhitespace
...
Remove placeholder `<br>`s in empty fields in editor
2020-12-28 16:50:23 +10:00
Arthur Milchior
ebd4938507
Reject field name with : { or }
...
More than {{ is acceptable to start a tag, which means that `{{{Foo}}` won't be interpreted as "the content of `Foo`"
and should be rejected. For the sake of clarity and parsing, I suspect that those symbol should be rejected elsewhere
too.
Similary `{{Foo}}}` won't be interpreted as "Show the content of field `Foo}`" even if this field exists, so it's better
to reject `}`. It's clearly necessary to reject "}}" inside the field name, rejecting "}" seems easier to explain and
avoid future unexpected problem if the templates change.
The ":" are used to separate filters, and rejecting it in field name would ensure that there is no ambiguity.
2020-12-28 07:33:26 +01:00
Arthur Milchior
b2e0d0b968
Rejects field names starting with #, ^ and /
2020-12-28 06:23:49 +01:00
Arthur Milchior
ae489b1278
New field are stripped
...
Otherwise, you can rename "Back" to " Front" and then get unexpected result
2020-12-28 06:18:42 +01:00
Damien Elmes
7bda223999
Merge pull request #865 from hgiesel/configaction
...
Open AddonsDialog via dialog manager
2020-12-28 10:36:02 +10:00
Damien Elmes
680ded95f6
Merge pull request #862 from hgiesel/reviewerbottombuttons
...
Hide stats buttons in reviewer bottom bar, if window width is too small
2020-12-28 10:33:14 +10:00
Henrik Giesel
b7556281d0
Open AddonsDialog via dialog manager
2020-12-26 18:07:37 +01:00
Henrik Giesel
3db9dec76b
Hide "Edit" and "More" buttons in reviewer bottom bar, if window width is too small
2020-12-26 15:50:32 +01:00
Damien Elmes
e7f82d926a
winrt 1.0.20239.1 isn't available for python 3.9
2020-12-23 20:31:13 +10:00
RumovZ
f61cc9112d
Norm search
2020-12-22 11:08:47 +01:00
Damien Elmes
d183ce85bf
further decrease default q/a fade time
2020-12-22 13:02:07 +10:00
Damien Elmes
08b0c3aa5a
add video driver enum; allow setting angle+software on mac in prefs
2020-12-22 13:01:06 +10:00
Damien Elmes
25160daa90
tag the wheels as manual so test ... doesn't build them
2020-12-21 19:28:47 +10:00
Damien Elmes
584f23cfe0
Merge pull request #859 from hgiesel/tabindex2
...
Consider removing special handling of Shift+Tab in Editor on macOS
2020-12-21 18:38:35 +10:00
Damien Elmes
147be1258d
work around --text-fg ending up in fields
...
https://forums.ankiweb.net/t/strange-behaviour-in-the-html-editor/5796/4
2020-12-21 17:56:20 +10:00
Damien Elmes
e2ba0c3b1c
.prettierrc needs to be in web/, as it's needed for sass as well
2020-12-21 17:05:31 +10:00
Henrik Giesel
8f3bf6ad3c
Focus special handling of Shift+Tab on macOS
2020-12-21 08:00:47 +01:00
Damien Elmes
177764e065
add a small delay before terminating recording
...
https://forums.ankiweb.net/t/anki-crashes-periodically-after-clicking-record-audio-button/5824/12
2020-12-21 16:37:28 +10:00
Damien Elmes
9d71906d9f
remove voice recording fixme
2020-12-21 16:13:32 +10:00
Damien Elmes
7f89750fde
check formatting of .js files in aqt/data
...
mathjax.js did not match //ts:format output
2020-12-21 16:10:59 +10:00
Damien Elmes
5dcae09c5a
link .prettierrc into qt/aqt/data/web/js
...
So automatic formatting in VS Code matches CI format
2020-12-21 16:09:06 +10:00
Damien Elmes
3ecd321dc3
ask users to report if PyAudio works better for them
2020-12-21 16:04:41 +10:00
Damien Elmes
5171633515
drop QtRecorder driver; rename existing
2020-12-21 15:02:22 +10:00
Damien Elmes
683ff0c02d
fail gracefully in winrt voice list fails to load
...
If no voices are installed, get_all_voices() throws a "file not found"
error.
2020-12-21 14:29:14 +10:00
Damien Elmes
3abf1cf959
Merge pull request #857 from hgiesel/editorspan
...
Wrap field name in editor in a span
2020-12-21 12:16:22 +10:00
Henrik Giesel
a21636a1d7
Remove special treatment of empty fields in editor ts
2020-12-21 03:13:31 +01:00
Ryan Aird
7fc6dfae9c
Make RT import statement conditional, fix formatting, ignore WinRT for type checking
2020-12-20 19:43:09 -06:00
Henrik Giesel
c6a082f120
Wrap field name in editor in span
2020-12-20 23:40:51 +01:00
Ryan Aird
78c4947298
Lower default rank for non-RT voices and restrict to Windows 10 October 2018 or greater
2020-12-19 20:10:23 -06:00
Ryan Aird
e7e028fdbb
WinRT TTS API support
2020-12-19 19:29:34 -06:00
Damien Elmes
4111f9cea5
add winrt for TTS work
...
https://github.com/ankitects/anki/pull/855
Also update psutil version
2020-12-20 10:54:57 +10:00
Damien Elmes
407b7f7410
tweak naming and move method into col.decks
2020-12-20 10:26:16 +10:00
Damien Elmes
5e6f8f8345
Merge pull request #854 from k12ish/master
...
Add method `card_count_from_did()`
2020-12-20 10:17:25 +10:00
k12ish
5da867c88a
Added type hints, renamed kwarg
2020-12-19 18:12:58 +00:00
k12ish
9dc01bace1
Added method
2020-12-19 17:59:07 +00:00
abdo
5f698b2b01
Strip isolation characters from app link
...
Reported in https://forums.ankiweb.net/t/bug-link-in-about-window/5894
2020-12-18 23:53:44 +03:00
Damien Elmes
c18927b7ff
pin pyaudio and qtmultimedia
2020-12-18 19:57:19 +10:00
Damien Elmes
583e0ceca8
expose recording driver in preferences (at least for now)
2020-12-18 19:49:17 +10:00
Damien Elmes
a969046852
write .wav in background
2020-12-18 19:24:53 +10:00
Damien Elmes
e77211c636
leave iodevice alone after calling .stop()
...
Docs say it should not be accessed, and it fails on Linux.
2020-12-18 19:14:24 +10:00
Damien Elmes
9778ac8d80
experiment with lower-level QAudioInput
...
Allows us to discard the start of the recording like PyAudio, instead
of just muting it.
2020-12-18 18:59:10 +10:00
Damien Elmes
1aba818ccd
add back pyaudio as an optional alternative
2020-12-18 16:52:00 +10:00
Damien Elmes
faf992643a
exhaustiveness checks on literals are now possible with the move to py38
2020-12-18 16:50:55 +10:00
Damien Elmes
9038015f4f
formatting fix
2020-12-18 10:27:32 +10:00
Damien Elmes
b13f6d4931
document ANKI_PROFILE_CODE and add bazel command to run snakeviz
2020-12-17 12:03:24 +10:00
Damien Elmes
555e638e7e
explicitly set sample rate and channels
...
Windows sounds awful by default on a machine here.
2020-12-16 20:18:13 +10:00
Damien Elmes
eb5100d3c7
formatting & mypy fix
2020-12-16 19:51:46 +10:00
Damien Elmes
640e381081
update recording time more frequently; remove print statement
2020-12-16 19:45:08 +10:00
Damien Elmes
9f3659a1d3
use QtMultimedia for recording instead of PyAudio
...
The unmute-on-first-duration-change approach is to try to prevent
clicks/pops that can happen at the start of recordings. If it doesn't
solve the problem, we may need to drop down to the lower-level
QAudioInput().
Closes https://github.com/ankitects/help-wanted/issues/23
May fix https://forums.ankiweb.net/t/anki-crashes-periodically-after-clicking-record-audio-button/5824 ,
which I suspect was caused by processEvents()
2020-12-16 19:33:25 +10:00
Damien Elmes
9d1362d69e
fix deprecation error on startup on Windows
2020-12-16 15:56:10 +10:00
Damien Elmes
6f5f0787d2
Merge pull request #850 from cecini/warn
...
fix float to int conversion DeprecationWarning
2020-12-16 15:40:35 +10:00
Damien Elmes
42f583f8a1
fix some warnings on startup
2020-12-16 15:38:24 +10:00
Damien Elmes
f37fcf950d
ignore pickle.dumps() warning
2020-12-16 15:38:11 +10:00
Damien Elmes
5f424d1283
bump pickle proto to v4; change column type to blob
2020-12-16 15:38:07 +10:00
Damien Elmes
3778d343b1
don't catch DeprecationWarnings in the GUI
2020-12-16 14:25:11 +10:00
Damien Elmes
d75ef92a01
Merge pull request #851 from hgiesel/cardtypeprobs
...
Remove unicode isolation from card type names
2020-12-16 13:37:44 +10:00
Henrik Giesel
eb1ddefa42
Remove unicode isolation from card type names
2020-12-16 03:09:33 +01:00
Damien Elmes
5c93898e32
symlink generated .py/.pyi into tree to fix Python code completion
2020-12-16 11:36:42 +10:00
cecini
8be949e0d5
fix float to int conversion DeprecationWarning
2020-12-15 13:10:12 +00:00
Damien Elmes
5ab1b06ddb
avoid distributing BUILD.bazel in js/vendor
2020-12-12 10:35:01 +10:00
Damien Elmes
f7b87bb716
minor doc updates
2020-12-11 22:37:12 +10:00
Damien Elmes
7a95d7e189
remove unwanted leading '/' in wheel records
2020-12-10 23:02:18 +10:00
Damien Elmes
51635ff7e4
simplify wheel building
2020-12-10 20:27:21 +10:00
Damien Elmes
256146703a
set the minimum ease to 131% for now
...
https://forums.ankiweb.net/t/force-sync-triggers-2-1-34-ease-fixup-behaviour/5632/
2020-12-10 15:46:22 +10:00
Henrik Giesel
6fb80a78bf
Switch back to fadeTo rather than fadeIn/fadeOut
2020-12-09 14:19:45 +01:00
Damien Elmes
5f9d4c1a65
tweak README in qt/linux
2020-12-07 11:54:54 +10:00
Damien Elmes
d799ffbe63
add explicit entry point to start Anki; update docs
2020-12-07 11:22:31 +10:00
L.M.Sherlock
6faad081ac
Update about.py
2020-12-05 14:11:47 +08:00
Henrik Giesel
599cfb37a1
Fix fields_did_rename_field
2020-12-01 02:28:10 +01:00
Damien Elmes
e845424bc9
update sync status after profile open sync
...
https://forums.ankiweb.net/t/why-is-my-sync-button-blue/2078/15
2020-12-01 10:20:55 +10:00
Damien Elmes
19e6c9cb50
export mathjax.js
2020-11-30 15:15:37 +10:00
Damien Elmes
bf4a2998c7
update sync color at end of sync
...
https://forums.ankiweb.net/t/why-is-my-sync-button-blue/2078/13
2020-11-30 10:14:43 +10:00
Damien Elmes
892d349181
update about
...
https://forums.ankiweb.net/t/may-i-trouble-you-to-add-my-name-on-the-about-page/5433/2
2020-11-29 12:00:16 +10:00
abdo
a313ec2fe7
Fix UnboundLocalError in profiler code
2020-11-25 04:54:41 +03:00
Damien Elmes
6a1cf40dcd
Merge branch 'master' into init-lang
2020-11-22 16:10:49 +10:00
Damien Elmes
68311500b3
update remaining python format strings to Fluent
2020-11-22 14:57:53 +10:00
abdo
d06a9137b6
Set up default language before loading profile
...
We can make more strings translatable this way.
2020-11-21 05:29:23 +03:00
Damien Elmes
0dee358839
remove make dependency in packaged Linux build
2020-11-20 19:33:40 +10:00
Damien Elmes
4043bd90bb
Merge pull request #823 from RumovZ/rework-search-parser
...
Rework search parser
2020-11-20 16:22:12 +10:00
Damien Elmes
89491b8c12
Merge pull request #833 from abdnh/setdeflang-fix
...
Initialize translation system to default language on first run
2020-11-20 16:11:13 +10:00
abdo
97cead2bda
Initialize translation system to default language on first run
...
The setlang screen was trying to use the translation system before
we initialize it.
2020-11-20 06:18:51 +03:00
abdo
702c5712e4
Fix description of exporters
...
Description broke yet again with the full migration to Fluent
2020-11-19 23:52:46 +03:00
abdo
caade20ad4
Strip isolation characters from more strings
2020-11-18 18:03:04 +03:00
Damien Elmes
679a4573aa
quieten MathJax
2020-11-18 21:34:44 +10:00
RumovZ
f05e70a03e
Merge branch 'master' into rework-search-parser
...
Conflicts:
rslib/src/search/sqlwriter.rs
2020-11-18 09:04:04 +01:00
Damien Elmes
2f1d5cd38b
move ftl into top level ftl/ folder; make it source of truth for aqt
...
This avoids the need to modify the external repo before new strings
can be used in aqt.
2020-11-18 16:20:58 +10:00
Damien Elmes
072b626535
formatting fix
2020-11-18 13:48:23 +10:00
Damien Elmes
d1a23fd65a
fix browser updateTitle()
2020-11-18 13:40:21 +10:00
Damien Elmes
ebd1236ab0
strip out unused gettext refs
2020-11-18 13:22:51 +10:00
Damien Elmes
7e655614b2
fix remaining _() references; remove unused imports
2020-11-18 12:43:46 +10:00
Damien Elmes
b02badb224
update multi-line _() references
2020-11-18 11:32:22 +10:00
Damien Elmes
b9544ad210
more ngettext references
2020-11-18 10:52:13 +10:00
Damien Elmes
686b640e11
update some qt ngettext references
2020-11-18 09:22:27 +10:00
Damien Elmes
bd0919b7f1
update pylib ngettext references
2020-11-18 09:12:25 +10:00
Damien Elmes
dac8daf113
begin plural string migration
2020-11-17 23:29:08 +10:00
Damien Elmes
2feddb3d70
update temporary val="%s" references to standard ftl
2020-11-17 22:00:44 +10:00
Damien Elmes
8b11c2c451
update translations
...
add qt ftl strings from external repo
2020-11-17 20:11:06 +10:00
Damien Elmes
bdd642a7a8
update designer references
2020-11-17 19:55:18 +10:00
Damien Elmes
1781e83252
merge pylib references
2020-11-17 19:23:06 +10:00
Damien Elmes
767933e2f5
fix the preview shortcut references
2020-11-17 17:51:57 +10:00
Damien Elmes
066b1498ae
merge bulk of qt/ - designer files still to do
2020-11-17 17:42:43 +10:00
Damien Elmes
d2e97d8332
add script to rewrite py files
2020-11-17 17:39:48 +10:00
Damien Elmes
39fe93be1f
output strings into ftl files
2020-11-17 15:12:05 +10:00
Damien Elmes
83cbe0d412
map gettext strings to keys/modules for ftl conversion
2020-11-17 14:11:09 +10:00
Damien Elmes
f4d424788e
Merge pull request #825 from hgiesel/mathjax3plus2
...
Switch from jQuery pre 3.0.0 pseudo promises to ES6 promises for ts hooks
2020-11-16 11:44:21 +10:00
Damien Elmes
e92848e0c2
Merge pull request #826 from abdnh/write-dupes-fix
...
Make dupe search operate on non-stripped text
2020-11-16 11:43:33 +10:00
abdo
35bfd20240
Make dupe search operate on non-stripped text
...
See https://github.com/ankitects/anki/pull/822/
2020-11-16 04:01:04 +03:00
Henrik Giesel
0d94016193
Switch from jQuery pre 3.0.0 pseudo promises to ES6 promises
2020-11-16 01:09:59 +01:00
Henrik Giesel
35b82bcd72
Satisfy formatter
2020-11-15 21:40:59 +01:00
Henrik Giesel
f498ae88dc
Improve ts hooks to allow for asynchronous actions
...
* reviewer ts hooks may now return a promise, which are then waited upon with Promise.all
* this does not break old ts hooks, as Promise.all allows for non-Promises in its array
2020-11-15 21:16:06 +01:00
Henrik Giesel
d18653cf16
Include default MathJax packages
...
* by default load all the default tex-chtml packages, which additionally include:
* require: using \require{package-name} to load a package
* autoload: using a command from a different package automatically loads it
* configmacros: allows for definition of predefined macros
2020-11-15 20:56:50 +01:00
Henrik Giesel
cc2ba7d07f
Load require package in Mathjax
2020-11-15 13:58:51 +01:00
Damien Elmes
7f040cad0d
Merge branch 'mathjax3'
2020-11-15 20:24:50 +10:00
Damien Elmes
896a1e44b1
add rule to copy mathjax from node_modules
2020-11-15 20:22:28 +10:00
Damien Elmes
da58bbaaa3
ignore incorrect clock in dev mode
2020-11-15 18:29:16 +10:00
RumovZ
8fc5d4c897
Update frontend search escapes to new parsing
2020-11-14 20:37:40 +01:00
Henrik Giesel
06bd0376b1
Remove @types/mathjax as it is for MathJax 2
2020-11-14 14:14:25 +01:00
Henrik Giesel
3ec4b0da3a
Add moving MathJax3 into mathjax directory to build process
2020-11-14 14:14:25 +01:00
Henrik Giesel
6a29e0cd4d
Rip out MathJax 2 and setup MathJax 3 environment
2020-11-14 14:14:25 +01:00
Henrik Giesel
839e6652dd
Update MathJax2 config to MathJax3 config
...
Used: https://mathjax.github.io/MathJax-demos-web/convert-configuration/convert-configuration.html
2020-11-14 14:14:25 +01:00
Damien Elmes
a4af59fc4d
format_fix -> format; rename svelte-check for consistency
2020-11-12 20:19:32 +10:00
Damien Elmes
ba5dc96a6b
fix some unwanted leading space in i18n keys
2020-11-12 08:55:26 +10:00
Damien Elmes
0cb2b3f0c1
update qt/ to 3.8 as well
2020-11-11 21:37:36 +10:00
Damien Elmes
48d07b7541
sort merged po files
2020-11-11 21:18:41 +10:00
Damien Elmes
c62e6e61c2
update i18n scripts
...
- export updated .po files for consumption
- add a script to pull and push translations
2020-11-11 21:08:06 +10:00
Damien Elmes
5ab4cbfd63
prep for i18n updates
...
Update scripts will be split into separate repo
2020-11-11 16:18:28 +10:00
Damien Elmes
5f8df09271
add Makefile and README from packaged Linux version
2020-11-11 13:57:38 +10:00
Damien Elmes
fb21e89653
add pyqtwebengine to wheel deps and bump minimum required pyqt
2020-11-11 10:33:49 +10:00
Damien Elmes
ec74cf6730
handle packaged pylib buildinfo.txt; drop aqt buildinfo
2020-11-11 10:33:49 +10:00
Damien Elmes
8147c9996a
Merge pull request #793 from nwwt/object-audio-tags-support
...
Audio & object tag support
2020-11-11 10:33:31 +10:00
Andreas Reis
776c46e23b
Allow <audio> to play without user interaction in accordance to autoplay setting
...
Since 2018, Chromium by default requires at least one user interaction with a page in order for sound to play. That's not what an Anki user expects.
So this commit undoes this by setting the policy accordingly if the deck's settings have autoplay set, so that files in <audio> tags (if they further have the autoplay attribute set / are jscripted accordingly) are treated the same as ones in [sound:…] elements. OFC, it's obviously not a good idea to mix both on one card.
(AnkiDroid's WebView has already been unconditionally ignoring the requirement since forever.)
2020-11-10 14:53:45 +01:00
Andreas Reis
81d6d21ae3
cleanup / renames
...
・ soundRegexps → sound_regexps
・ htmlRegexps → html_media_regexps
・ HTML_TAGS → HTML_MEDIA_TAGS
・ escapeImages → escape_media_filenames + alias
・ strip_html_preserving_image_filenames → strip_html_preserving_media_filenames
2020-11-10 14:53:04 +01:00
ianki
28ad68d490
Add hooks for filtering media.
2020-11-09 02:12:23 -08:00
Damien Elmes
27e14dc59e
Merge pull request #814 from k12ish/master
...
Improve compatibility with graphics pad/touchscreen
2020-11-09 19:42:41 +10:00
Damien Elmes
b3db379655
Merge pull request #813 from RumovZ/fix-search-combos
...
Fix clicking filters with keyboard modifiers
2020-11-09 19:42:13 +10:00
k12ish
1ca0eb04bb
Improve compatibility with graphics pad/touchscreen
...
When using anki with a graphics pad, text is often selected on accident. This snippet of CSS will fix that issue
2020-11-08 18:14:37 +00:00
RumovZ
7f9aa879b5
Fix clicking filters with keyboard modifiers
2020-11-08 11:05:11 +01:00
Damien Elmes
8cc6f338f5
fix missing QAudioDeviceInfo on macOS
2020-11-06 12:01:37 +10:00
Damien Elmes
5e3a4d2c88
Merge pull request #808 from sobjornstad/reposition-highlight
...
Start with default value in reposition spinbox selected
2020-11-06 11:09:15 +10:00
Damien Elmes
f128f0f79a
fix aqt version requirement; use py3 instead of cp38 tag
2020-11-05 20:25:08 +10:00
Damien Elmes
338836ebb9
cleanups
2020-11-05 11:21:13 +10:00
Damien Elmes
d6e13ee28e
fix tests on Linux
2020-11-04 21:39:41 +10:00
Damien Elmes
e4ba941cf1
move aqt_data into source folder; implement wheel building
2020-11-04 12:14:03 +10:00
Soren Bjornstad
e8b40ec7d5
start with default value in reposition text box highlighted
...
This saves a keystroke if you want to replace the default value. It's
hard to imagine a situation in which you would want to *prepend*
characters to the default value, as is the current behavior. If you want
to accept the default value, you can still hit enter or tab immediately.
2020-11-02 19:07:53 -06:00
Damien Elmes
9999ec8124
fix pywintypes issue when running tests on Windows
2020-11-02 21:36:01 +10:00
Damien Elmes
7c27c4b9a0
move backend.proto into rslib/
2020-11-02 16:28:31 +10:00
Damien Elmes
a7f403f0b0
rspy -> pylib/rsbridge
2020-11-02 15:21:12 +10:00
Damien Elmes
99b20cbaa6
update CI
2020-11-01 16:33:40 +10:00
Damien Elmes
f9171eb3d3
remove old makefiles
2020-11-01 14:41:01 +10:00
Damien Elmes
e40be43843
always return str in aqt_data_folder()
2020-11-01 14:38:13 +10:00
Damien Elmes
ce3b08ac58
initial Bazel conversion
...
Running and testing should be working on the three platforms, but
there's still a fair bit that needs to be done:
- Wheel building + testing in a venv still needs to be implemented.
- Python requirements still need to be compiled with piptool and pinned;
need to compile on all platforms then merge
- Cargo deps in cargo/ and rslib/ need to be cleaned up, and ideally
unified into one place
- Currently using rustls to work around openssl compilation issues
on Linux, but this will break corporate proxies with custom SSL
authorities; need to conditionally use openssl or use
https://github.com/seanmonstar/reqwest/pull/1058
- Makefiles and docs still need cleaning up
- It may make sense to reparent ts/* to the top level, as we don't
nest the other modules under a specific language.
- rspy and pylib must always be updated in lock-step, so merging
rspy into pylib as a private module would simplify things.
- Merging desktop-ftl and mobile-ftl into the core ftl would make
managing and updating translations easier.
- Obsolete scripts need removing.
- And probably more.
2020-11-01 14:26:58 +10:00
Damien Elmes
4d861e4c95
Merge pull request #803 from RumovZ/fix-completer-focus
...
Work around Qt's focus bug (fix help-wanted#22)
2020-10-29 21:44:13 +10:00
Damien Elmes
fc46426951
Merge pull request #804 from hgiesel/mime
...
Set MIME type for javascript files
2020-10-29 20:54:03 +10:00
Henrik Giesel
3a4036d59d
Set MIME type for javascript files
2020-10-26 23:32:38 +01:00
RumovZ
00a5a6ff33
Work around Qt's focus bug (fix help-wanted#22)
...
Manually hide the editor's completer popup before accepting a short cut which changes the focus widget. Thus, work around the bug in PyQt 5.15 where a QLineEdit with open QCompleter popup won't get notified about focus changes handled by the Main Window, leading to inconsistent focus.
2020-10-24 10:47:25 +02:00
abdo
96eadecdec
Use replace instead of strip
...
https://github.com/ankitects/anki/pull/801
2020-10-22 15:21:30 +03:00
abdo
69da22a2b9
Strip double quotes from names
...
Strip double quotes from all kinds of names
https://github.com/ankitects/anki/pull/798
2020-10-21 21:48:49 +03:00
Damien Elmes
00a71b6499
Merge pull request #799 from hgiesel/cal
...
Introduce Browser.search_for and Browser.update_search
2020-10-21 21:31:21 +10:00
Damien Elmes
dff4849241
Merge pull request #798 from abdnh/escape-quotes-in-search
...
Escape double quotes in search
2020-10-21 21:28:51 +10:00
Damien Elmes
d32fd008c0
Merge pull request #797 from abdnh/importing-fix
...
Fix notes being imported to the wrong deck in some cases
2020-10-21 21:22:33 +10:00
Damien Elmes
75716d13ff
Merge pull request #795 from abdnh/reviewer-cleanup
...
Set card to None in reviewer cleanup
2020-10-21 21:19:43 +10:00
Damien Elmes
1d330138cb
Merge pull request #794 from abdnh/tagedit-enter-fix
...
Don't apply suggestion when no suggestion list is shown in tagedit
2020-10-21 21:19:05 +10:00
Damien Elmes
17de596fc1
Merge pull request #791 from abdnh/sidebar-context-menu
...
help-wanted#6: continue work on new browser sidebar (based on #590 )
2020-10-21 21:13:32 +10:00
Henrik Giesel
ee34a3458c
Turn update_search into its own method
2020-10-19 21:07:29 +02:00
Henrik Giesel
bd9fca786d
Add search prompt for setupSearch
2020-10-19 20:57:19 +02:00
Henrik Giesel
634a6f04d1
Add uses of search_for
2020-10-19 20:51:36 +02:00
Henrik Giesel
ae26e2fc70
Add search_for method
2020-10-19 20:37:17 +02:00
abdo
0c7726f87e
Escape double quotes in search
2020-10-19 01:06:41 +03:00
abdo
8f76fd5a39
Remove unused code
2020-10-15 16:14:14 +03:00
abdo
6e4d5453ac
Save importing model in any case
...
https://forums.ankiweb.net/t/bug-notes-are-imported-to-the-wrong-deck-in-certain-cases/4318
2020-10-15 15:14:55 +03:00
abdo
d0aa8625b4
Set card to None in reviewer cleanup
2020-10-14 12:56:47 +03:00
abdo
51e5eba3fe
Don't apply suggestion when no suggestion list is shown
2020-10-14 05:00:24 +03:00
Damien Elmes
74981145cf
formatting fix
...
formatting fix
2020-10-14 10:35:57 +10:00
Damien Elmes
2c36fde269
Update __init__.py
2020-10-14 09:45:34 +10:00
Andreas Reis
4e35b1780d
Add command-line argument to skip addons
...
Shift doesn't work for me occasionally, for whatever reason. So just add an -s to skip it that way.
(Also, update my github nick)
2020-10-14 01:31:07 +02:00
abdo
5463b13128
Fix typing warning
2020-10-12 11:01:15 +03:00
abdo
e0bbf38850
Do sidebar switch check in browser init
...
https://github.com/ankitects/help-wanted/issues/6#issuecomment-706880794
2020-10-12 10:28:21 +03:00
abdo
3d3e68ed7a
Merge branch 'sidebar-context-menu' of https://github.com/abdnh/anki into sidebar-context-menu
2020-10-12 10:15:23 +03:00
Damien Elmes
874366fce7
formatting fix
2020-10-12 12:37:51 +10:00
Damien Elmes
362ebef832
Merge pull request #790 from hgiesel/fields
...
Add fields_did_rename_field and fields_did_remove_field hooks
2020-10-12 12:36:39 +10:00
Damien Elmes
b182c07a99
Merge pull request #789 from abdnh/editor-decode-urls
...
Decode pasted URLs for nicer display
2020-10-12 12:33:52 +10:00
Damien Elmes
089e48adac
Merge branch 'master' into opus-audio
2020-10-12 12:32:43 +10:00
Damien Elmes
accffbd29a
formatting fixes
2020-10-12 12:17:02 +10:00
Damien Elmes
597b81ebeb
Merge pull request #782 from johan456789/patch-1
...
fix outdated help site
2020-10-12 12:15:46 +10:00
Henrik Giesel
0f09258e68
Add fields_did_rename_field and fields_did_remove_field hooks
2020-10-11 19:16:30 +02:00
abdo
9140c3597f
Decode pasted URLs
2020-10-11 16:46:46 +03:00
Piotr Kubowicz
1add0e6c6b
Add .opus as an audio extension
...
Wikimedia Commons has pronunciation recordings with .opus extension.
Anki is able to play such files, but until now adding them required
changing the extension to .ogg or some other supported one.
Also sort the audio extensions list.
2020-10-10 16:28:40 +02:00
Damien Elmes
909367efc1
fixes for latest mypy
2020-10-10 19:02:59 +10:00
abdo
401485834b
Move new sidebar code to a separate file
...
- Move the new sidebar code and SidebarTreeView implementation to a
new file. Old sidebar can be accessed with the shift key. The "new" sidebar
doesn't add much for now.
- Make rename_deck work with subdecks
- Fix an issue when trying to open context menu over areas not populated
with sidebar items
2020-10-10 04:42:49 +03:00
abdo
69f9543fda
Merge commit 'refs/pull/590/head' of https://github.com/ankitects/anki into sidebar2
2020-10-10 04:11:54 +03:00
johan456789
0ebe5d14eb
fix help url paths
2020-10-10 00:38:07 +08:00
johan456789
a5b452780e
remove never used link
2020-10-10 00:07:34 +08:00
abdo
1b3b1e3329
Escape ampersands in note type names too
2020-10-07 15:26:32 +03:00
abdo
2e48b437eb
Fix 'Filter' menu item in deck filters not working
2020-10-07 14:32:21 +03:00
abdo
2ebf8d5f0e
Escape ampersands in filter menu
...
Fixes ankitects/help-wanted#20
2020-10-07 13:44:33 +03:00
Damien Elmes
53ceab9bd3
Merge pull request #778 from hgiesel/refocus
...
Always focus main web instead of bottom web in reviewer
2020-10-07 16:22:49 +10:00
Damien Elmes
515de117f4
add Gustavo Costa
...
A reminder that anyone who's contributed is welcome to send
a PR adding themselves!
2020-10-06 14:36:11 +10:00
Damien Elmes
8b0be88df5
fix invisible scrollbar in nightmode
...
vars.scss no longer contains the Qt theme definitions, so the
easiest solution was to duplicate the colour in this case
2020-10-06 14:35:21 +10:00
Henrik Giesel
5517e69f7e
Have a "default" highlight, but naturally follow focus if focus is in container
2020-10-05 22:54:23 +02:00
Henrik Giesel
e7fe9b470f
Give the focus on .focus element a red tint
2020-10-05 22:39:16 +02:00
Henrik Giesel
65f77ef44e
Add focus class which mimics built-in focus
2020-10-05 22:18:46 +02:00
Damien Elmes
d3df6dd92a
fix IndexError when switching notetypes
...
Closes #780
https://github.com/ankitects/anki/pull/780
2020-10-05 13:33:54 +10:00
Damien Elmes
0ed130b133
Merge pull request #781 from hgiesel/leftbtns
...
Refactor Buttons in editor and add editor_did_init_left_buttons gui_hook
2020-10-05 13:14:52 +10:00
Damien Elmes
28e00f487b
Merge pull request #779 from david-allison-1/fix-sign-up-link
...
Fix "Sign Up" link location
2020-10-05 12:34:11 +10:00
Damien Elmes
bfd960af1a
Merge pull request #777 from kelciour/mpv-anki-freeze-on-windows
...
Separate player for videos on Windows
2020-10-05 12:27:31 +10:00
Henrik Giesel
90572d1b7c
Turn _class into rightside boolean flag
2020-10-04 23:03:37 +02:00
Henrik Giesel
b5b2a07a88
Refactor out theclass assignment
2020-10-04 22:51:34 +02:00
Henrik Giesel
716f8a103c
Add editor_did_init_left_buttons gui_hook
2020-10-04 22:50:02 +02:00
Henrik Giesel
70b28b95a2
Make icon Optional explicitly in function signature
2020-10-04 22:42:28 +02:00
Henrik Giesel
b2d8db67f7
Rewrite so all editor toolbar buttons use _addButton
2020-10-04 22:41:18 +02:00
David Allison
94382867d0
Fix "Sign Up" link location
...
String states "Sign Up", but currently points to the "Sign In" screen: https://ankiweb.net/account/login
c8a6d81fde/rslib/ftl/sync.ftl (L38-L42)
2020-10-04 18:14:49 +01:00
Henrik Giesel
f7256569c5
Also focus main web instead of bottom web
2020-10-03 22:33:01 +02:00
kelciour
ec4bd071fe
Separate player for videos on Windows
...
https://forums.ankiweb.net/t/anki-crashes-because-of-mpv/3359/13
2020-10-03 22:53:17 +03:00
abdo
375a395ef5
Paste links as plain text in basic mode
2020-10-03 19:46:05 +03:00
Damien Elmes
05f8ae116a
Merge branch 'master' into fix-ui-scale
2020-10-03 09:44:04 +10:00
Akshara Balachandra
c5da91206b
fix: sizing issue with scale UI
...
Fixes ankitects/help-wanted#18 . Height of webview should be the height
of the contents inside it. Previously, scale factors increased fixed
height of the container webview, thus creating empty space (e.g.
at 200% scaling, height of webview was double the height of the inner
HTML page). Now height of webview is always the height of the contained
element.
2020-10-02 18:07:28 -04:00
abdo
a09a70fec2
Recognize ico files
...
Local icons were being pasted as normal links previously instead of
being enclosed in img tags.
2020-10-03 00:17:38 +03:00
Damien Elmes
2ed1507162
bump version
2020-10-02 10:22:21 +10:00
Damien Elmes
14885acc44
don't reschedule repeating timers that occur during progress
...
For things like updating the deck list, it makes no sense to do it
multiple times at the end of a long operation, and the once/second signal
timer was causing hundreds or thousands of 100ms timers to be created.
https://forums.ankiweb.net/t/anki-memory-usage/3842
2020-09-30 10:01:06 +10:00
Damien Elmes
722454bab1
Merge pull request #769 from abdnh/escape-sidebar-terms
...
Escape browser sidebar search terms
2020-09-27 16:06:10 +10:00
Damien Elmes
fa6ee12f47
fix links not opening externally after finishing
...
https://forums.ankiweb.net/t/anki-2-1-34-35-beta/3569/19
2020-09-27 14:36:55 +10:00
Damien Elmes
aefcdfa17f
backups no longer happen on each sync
...
https://forums.ankiweb.net/t/accidentally-deleted-backs-one-deck/3740/6
2020-09-27 12:59:51 +10:00
Damien Elmes
86e8df58ee
fix old content appearing when flagging
...
https://forums.ankiweb.net/t/very-specific-but-quite-consistent-bug-in-browser/3685
2020-09-27 12:31:25 +10:00
Damien Elmes
2cc4fad19a
fix import shortcut
...
https://forums.ankiweb.net/t/anki-2-1-34-35-beta/3569/21
2020-09-27 11:57:12 +10:00
abdo
9ff8aa4830
Escape sidebar search terms
2020-09-25 21:05:34 +03:00
abdo
7aaf22b0a2
Fix previewer not refreshing when selecting multiple cards in browser
2020-09-24 07:05:16 +03:00
Damien Elmes
88114b0662
Merge pull request #767 from abdnh/context-menu-copy-image
...
Allow copying of images using context menu
2020-09-24 10:57:13 +10:00
Damien Elmes
1a619073d7
bump version
2020-09-24 10:52:24 +10:00
abdo
b20e022097
Allow copying of images using context menu
2020-09-22 06:32:37 +03:00
Damien Elmes
b57d1ed08a
allow dragging of images in review screen again
...
when we were using webkit+file URLs, this deleted files from the
media folder! But we're behind a HTTP server now, so this should
be safe.
https://forums.ankiweb.net/t/no-longer-able-to-copy-latex-output/3128/5
originally disabled in
dd4bae6e8d
2020-09-22 10:29:53 +10:00
abdo
25c2eda7d2
'Show Both Sides' -> 'Back Side Only'
2020-09-20 19:31:00 +03:00
kelciour
401b1b43b2
Revert back to listening for idle callback
...
https://forums.ankiweb.net/t/anki-2-1-33-linux-audio-stops-working/3023
2020-09-16 09:25:18 +03:00
Damien Elmes
1b8d1303ca
Merge pull request #758 from hgiesel/synchook
...
Add sync_will_start and sync_did_finish hook
2020-09-15 21:20:46 +10:00
Henrik Giesel
5981cebb8e
Move sync_did_finish before reset
2020-09-15 13:06:11 +02:00
abdo
a410a1117a
Support extended drag & drop
2020-09-14 17:07:31 +03:00
Henrik Giesel
306424455c
Add some documentation to sync_did_finish hook
2020-09-14 13:18:16 +02:00
Henrik Giesel
52502fb1d3
Put sync_did_finish hook before after_sync because it might unload collection
2020-09-14 13:06:20 +02:00
Henrik Giesel
a685272e16
Add sync_will_start and sync_did_finish hook
2020-09-14 12:22:01 +02:00
Damien Elmes
32f5bc96a8
another showDupes fix from ANH
...
https://forums.ankiweb.net/t/show-duplicates-not-working/2883/10
2020-09-04 10:13:30 +10:00
Damien Elmes
a5955f0206
sound tags need filename html escaped
...
https://forums.ankiweb.net/t/unable-to-play-longer-audio-on-cards/1313/30
2020-09-04 09:36:38 +10:00
Damien Elmes
d81251676d
Revert "Merge pull request #749 from ANH25/editor-media-autoplay"
...
This reverts commit 373402ed0a , reversing
changes made to 35c59cb899 .
https://github.com/ankitects/anki/pull/749#issuecomment-686385112
2020-09-04 08:34:26 +10:00
Damien Elmes
bc60d233e5
rebuild_filtered_deck() and new_filtered()
2020-09-03 18:02:47 +10:00
Damien Elmes
6f7f5686e8
empty_filtered_deck()
2020-09-03 17:43:07 +10:00
Damien Elmes
f32d773e25
set_deck()
2020-09-03 17:42:46 +10:00
Damien Elmes
366c5c4774
log manual reschedule, but ignore the log entry in the stats
2020-09-02 17:56:23 +10:00
Damien Elmes
52425a9851
ensure background override works in night mode
2020-09-01 12:20:45 +10:00
Damien Elmes
9f51347e1e
move bury/suspend into backend
2020-09-01 10:24:38 +10:00
Damien Elmes
a8f84c1264
formatting fixes for latest black
2020-09-01 10:24:38 +10:00
Damien Elmes
130f99fe44
fix some lints
2020-09-01 10:24:38 +10:00
Damien Elmes
fcf63205b6
add a hook to support extending external .html files
2020-09-01 10:24:38 +10:00
Damien Elmes
5536969f29
add load_ts_page() & avoid duplicate call
2020-09-01 10:24:38 +10:00
Damien Elmes
999b659c3a
reimplement congrats screen in Rust+Typescript
2020-09-01 10:24:38 +10:00
Damien Elmes
a629e1acf2
apply standard zoom and background to graphs; prevent FOUC
2020-09-01 10:24:38 +10:00
Damien Elmes
7d84954f53
use css vars for graph styling as well; base webview.scss off core.scss
2020-09-01 10:24:38 +10:00
Damien Elmes
3b1a4d029c
most of the .nightMode redefinitions are no longer required
2020-09-01 10:24:38 +10:00
Damien Elmes
2411e944e4
drop the old sass vars and define the properties directly
2020-09-01 10:24:38 +10:00
Damien Elmes
514409d86f
migrate the majority of the sass vars to css variables
...
Allows add-ons to easily override the theme, and allows us to apply
styling to elements outside of the normal document flow (like applying
the normal background colour to a position: fixed element).
2020-09-01 10:24:38 +10:00
Damien Elmes
a6aaaf8691
move _vars to outer ts folder
...
First step in sharing styling with graphs + future .html files
2020-09-01 10:24:38 +10:00
Henrik Giesel
87bcc39a77
Some minor reformatting to satisfy black
2020-08-31 13:50:59 +02:00
Henrik Giesel
f32dc05daf
Address broken translations and increase readibility of button insertion
2020-08-31 13:40:42 +02:00
Henrik Giesel
c87d60ea4c
Remove unnecessary import
2020-08-31 13:35:18 +02:00
Henrik Giesel
31b2d46247
Fix type signature: models is passed because it's a method
2020-08-31 13:35:18 +02:00
Henrik Giesel
b9e26ae052
Remove duplicated buttons
2020-08-31 13:35:18 +02:00
Henrik Giesel
2a4f0edfe7
Don't import models in gui_hooks to avoid circular import
2020-08-31 13:35:18 +02:00
Henrik Giesel
14a33cb2ce
Fix uninitialized buttons object
2020-08-31 13:35:18 +02:00
Henrik Giesel
6ee503742f
Add compiled hook model_did_init_buttons
2020-08-31 13:35:18 +02:00
Henrik Giesel
14f4380c2e
Add usage in models.py
2020-08-31 13:35:18 +02:00
Henrik Giesel
6d2f2282d2
Add gui_hook models_did_init_buttons
2020-08-31 13:35:01 +02:00
Henrik Giesel
a36a9ee3e0
Add unused add_button method
2020-08-31 13:33:59 +02:00
Damien Elmes
8729edffbb
update to latest black
2020-08-31 13:29:28 +10:00
Damien Elmes
aeca369c9b
update to latest isort, pylint and pytest
2020-08-31 12:05:36 +10:00
Damien Elmes
204db71586
fix new pylint raise-missing-from lint
2020-08-31 12:04:14 +10:00
Damien Elmes
0f24885581
Merge pull request #751 from ANH25/addon-config-editor-title
...
Remove unicode isolation markers from add-on config editor title
2020-08-31 11:10:44 +10:00
Damien Elmes
f3c6d565b0
bump version
2020-08-31 11:07:54 +10:00
ANH
ff4cb87433
remove unicode isolation markers from add-on config editor title
2020-08-31 00:35:17 +03:00
Damien Elmes
486ef03a0d
fix card.template() in card layout screen
...
https://forums.ankiweb.net/t/card-template-does-not-work-when-called-in-card-will-show-hook-in-template-editor/2798
2020-08-30 11:23:44 +10:00
Damien Elmes
1ae6eb1255
add some names to about screen
...
a reminder that anyone who's contributed is welcome - please just
send a PR adding yourself
2020-08-27 11:24:13 +10:00
Damien Elmes
373402ed0a
Merge pull request #749 from ANH25/editor-media-autoplay
...
Only autoplay added media when recording in editor
2020-08-27 10:37:42 +10:00
Damien Elmes
35c59cb899
Merge pull request #745 from ANH25/reviewer-context-menu-shortcut
...
add shortcut for reviewer context menu
2020-08-27 10:33:22 +10:00
ANH
063644a8f6
editor: only autoplay added media when recording
2020-08-26 14:49:19 +03:00
Damien Elmes
37fa80bbd6
Merge pull request #748 from ANH25/drag-and-drop
...
fix drag & drop issue when dropping things over existing content
2020-08-26 08:38:48 +10:00
Damien Elmes
a657310726
formatting
2020-08-26 08:36:08 +10:00
Damien Elmes
31f011b3a5
fix description in export screen (thanks to ANH)
...
https://forums.ankiweb.net/t/anki-2-1-31-exporting-display-bug/2669/3
2020-08-26 08:33:35 +10:00
Damien Elmes
ff10af10ac
bigger default window size
...
https://forums.ankiweb.net/t/increase-the-standard-window-size-so-all-buttons-are-visible/2613
2020-08-26 08:06:46 +10:00
Damien Elmes
2f6d816cdc
bump version
2020-08-26 08:05:45 +10:00
ANH
564f95c941
fix drag & drop issue when dropping things over existing content
2020-08-25 17:28:13 +03:00
Damien Elmes
52a7fa36cd
fix signup link
2020-08-25 13:29:02 +10:00
Damien Elmes
58c8609332
bump version
2020-08-24 11:28:22 +10:00
ANH
6d69a0ba4e
add shortcut for reviewer context menu
2020-08-23 17:46:47 +03:00
Damien Elmes
385a1c50fd
'cards' instead of 'notes' in export
...
thanks to hgiesel; closes #744
2020-08-23 13:48:20 +10:00
Damien Elmes
f9fe0504f0
fix formatting & lint
2020-08-21 12:36:18 +10:00
Damien Elmes
5adc3eff6f
Merge pull request #735 from brownbat/master
...
Add hook for initializing answer buttons
2020-08-21 12:34:14 +10:00
Damien Elmes
f936735114
fix formatting
2020-08-21 11:45:14 +10:00
Damien Elmes
1db1f71261
Merge pull request #742 from evandroforks/fix_ts_sass
...
Fix error reading scss;..\aqt_data\web: no such file or directory
2020-08-21 11:44:55 +10:00
evandrocoan
36a8eff311
Fix error reading scss;..\aqt_data\web: no such file or directory
...
Recently on my Windows, out of nowhere, it started throwing:
```
../../ts/node_modules/.bin/tsc --build
../../ts/node_modules/.bin/sass --no-source-map scss:..\\aqt_data\\web
Error reading scss;..\aqt_data\web: no such file or directory.
make: *** [Makefile:26: build] Error 66
```
2020-08-20 22:22:33 -03:00
Damien Elmes
d91b686df2
Merge pull request #740 from kelciour/mpv-restart-fix
...
Fix no sound after restarting mpv
2020-08-21 11:10:46 +10:00
Damien Elmes
54f8a7ded5
Add comment
2020-08-21 11:10:30 +10:00
kelciour
580e561805
Reset av_player.current_player after mpv restart
2020-08-21 02:17:21 +03:00
Damien Elmes
e5c4ad9c78
Merge pull request #739 from ANH25/add-custom-study-ftl
...
Add custom-study-must-rename-deck to Fluent
2020-08-21 08:56:17 +10:00
Thomas B
c94336bbf5
Remove conflict- Sequence type no longer needed
2020-08-20 10:34:08 -04:00
Thomas B
e7e67e0c87
Fix other docstring to match.
2020-08-20 10:33:46 -04:00
Thomas B
718fd2c44d
Clarify docstring
2020-08-20 10:30:31 -04:00
Damien Elmes
9393a33337
need to invalidate notetype cache on sync completion
...
basicCheck() was populating it on startup sync, leading to
https://forums.ankiweb.net/t/error-when-adding-a-new-note/1664
2020-08-20 15:35:23 +10:00
Damien Elmes
51ba6f6b31
fix find&replace getting too large
...
https://forums.ankiweb.net/t/bug-find-and-replace-dialog-displays-length-of-longest-string-in-dropdown-list/2469
2020-08-20 15:26:23 +10:00
Thomas B
3bcb7759d2
Add both Union and Sequence to typing import
...
Resolve conflict.
2020-08-19 16:19:15 -04:00
Thomas B
0450fde53a
Update gui_hooks.py
2020-08-19 16:15:56 -04:00
Thomas B
a54135c5ac
Fixing type hints
...
Matched all type hints, changed the original Sequence[] type hint for _answerButtonList() in reviewer.py on mypy's recommendation.
2020-08-19 16:15:49 -04:00
ANH
233e6abc55
add custom-study-must-rename-deck to Fluent
2020-08-19 18:27:14 +03:00
ANH
bfd08fa2be
work around editor freeze issue after external drag & drop
2020-08-19 18:14:07 +10:00
Thomas B
9cbf5e2251
Update as part of previous commit
2020-08-18 10:38:59 -04:00
Thomas B
8b95ab5441
Bugfix proposed filter post-testing
...
Mirrored filter more closely on _ReviewerWillAnswerCardFilter, including taking and returning the value to be modified.
2020-08-18 10:37:45 -04:00
Henrik Giesel
2de59074a3
Remove ResetReason.BrowserDeleteNote
2020-08-17 12:50:40 +02:00
Henrik Giesel
8a3f6d72c7
Merge branch 'master' into resethook
2020-08-17 12:39:09 +02:00
Damien Elmes
67148b1c8a
clear undo queue on sync
...
https://forums.ankiweb.net/t/ios-ipad-sync-failure-with-filtered-decks/1617/34
2020-08-17 20:09:07 +10:00
Damien Elmes
e573ed3eb6
close edit current window when card deleted
...
https://forums.ankiweb.net/t/bug-report-editor-updating-non-existing-card/2117
2020-08-17 20:07:48 +10:00
Damien Elmes
e856aa9952
fix duplicates not escaping html
...
https://forums.ankiweb.net/t/bug-report-showdupes-not-html-escaping-field-content/2167
2020-08-17 17:50:27 +10:00
Henrik Giesel
e613083018
Reorder gui_hooks imports
2020-08-16 23:34:24 +02:00
Henrik Giesel
a47cca75b2
Add Union import
2020-08-16 19:11:11 +02:00
Henrik Giesel
747c8532c2
Create ResetReason enum
2020-08-16 18:56:32 +02:00
Henrik Giesel
1f4e604e2b
Rename to should_require_reset
2020-08-16 18:56:32 +02:00
Henrik Giesel
7bb4df13d9
Reorder + make all parameters optional
2020-08-16 18:56:32 +02:00
Henrik Giesel
0b9d7b2cb8
Satisfy formatter
2020-08-16 18:56:32 +02:00
Henrik Giesel
4f37e6196b
Update signature of main_window_will_require_reset hook
2020-08-16 18:56:32 +02:00
Henrik Giesel
ea6eb2ba3b
Add new use of requireReset
2020-08-16 18:56:32 +02:00
Henrik Giesel
9044a4b96b
Insert gui_hook main_window_will_require_reset
...
* into AnkiQt.requireReset method
2020-08-16 18:56:32 +02:00
Henrik Giesel
28528fc3ec
Add main_window_will_require_reset hook
2020-08-16 18:56:32 +02:00
Thomas B
830ab9cedb
Add hook for initializing answer buttons
2020-08-14 13:52:20 -04:00
Arthur Milchior
e3e929fed2
Search_model has context
...
I have an add-on which allow to open multiple windows. So would like to know which browser has done the search. This
would allow me to have browser with various setting. In particular, I've an add-on which allow to show a single line by
note, and I would like for some browser to have this feature on and for some other to have this feature off.
2020-08-13 19:46:14 +02:00
Damien Elmes
2c500a1538
Merge pull request #732 from Arthur-Milchior/typing
...
Typing
2020-08-13 20:19:30 +10:00
Damien Elmes
90ad63cfa3
Merge pull request #730 from ANH25/rtl-editing
...
fix Ctrl+right/left handling in RTL fields
2020-08-13 20:09:51 +10:00
Damien Elmes
1dfe5b8165
remove RTL special case in cloze deletion
...
https://forums.ankiweb.net/t/erroneous-characters-added-to-rtl-cloze-deletions/2164
2020-08-13 19:11:48 +10:00
Arthur Milchior
110f4c664f
Any removed
2020-08-12 01:37:21 +02:00
Arthur Milchior
a74601a0f0
NF: childMapNode
2020-08-12 00:42:42 +02:00
ANH
8ee74a02b2
add modify to the Selection interface
2020-08-11 03:32:58 +03:00
ANH
a2227960c0
fix Ctrl+right/left handling in RTL fields
2020-08-11 03:09:03 +03:00
Damien Elmes
bf1ac7e4a9
Merge pull request #728 from hgiesel/mungehtml
...
Move "remove null bytes" and "reverse url formatting" functionality to editor_will_munge_html hook
2020-08-10 16:33:56 +10:00
Henrik Giesel
31916102ed
Add newlines
2020-08-09 11:16:19 +02:00
Henrik Giesel
6122b9ac53
Avoid extra assignment
2020-08-09 10:38:31 +02:00
Henrik Giesel
097538b061
Move reverse url quoting functionality to editor_will_munge_html hook
2020-08-09 10:37:38 +02:00
Henrik Giesel
612e38def3
Move remove null bytes functionality to editor_will_munge_html hook
2020-08-09 10:35:52 +02:00
Damien Elmes
d273f1b5b8
accept alternate strings file
2020-08-09 14:44:23 +10:00
Damien Elmes
ea2c5c6920
deauth -> log out
2020-08-09 14:44:03 +10:00
Damien Elmes
4629dd38fb
bump version
2020-08-09 13:44:59 +10:00
Damien Elmes
c79bb313f8
Merge pull request #727 from hgiesel/mungehtml
...
Add editor_will_munge_html hook
2020-08-09 13:38:39 +10:00
Damien Elmes
41c95c07b4
make sure to reset after deleting empty cards
...
https://anki.tenderapp.com/discussions/private/5067-anki-was-unable-to-open-your-file
2020-08-09 12:42:58 +10:00
Damien Elmes
c366f07e65
find/replace completer should be case sensitive
...
https://forums.ankiweb.net/t/bug-report-search-and-replace/2037
2020-08-09 12:10:34 +10:00
Henrik Giesel
b3b77ea3b3
Replace functionality of mungeHTML with call to new gui_hook
2020-08-08 23:59:01 +02:00
Henrik Giesel
7d1d20cbf4
Add editor_will_munge_html hook
2020-08-08 23:27:58 +02:00
ANH
eecff63aa1
add card layout save shortcut
2020-08-06 13:23:17 +03:00