Damien Elmes
2bada06570
use inner function instead of return value in _expand_where_necessary()
2021-06-29 11:40:59 +10:00
abdo
27313ba53d
Scroll to first sidebar search match
2021-06-28 14:44:09 +03:00
Damien Elmes
f9560586cb
PEP8 collection.py
2021-06-27 15:12:22 +10:00
Damien Elmes
fba156ec93
PEP8 models.py
2021-06-27 14:30:00 +10:00
Damien Elmes
3c46c9a7eb
PEP8 decks.py
2021-06-27 14:02:48 +10:00
Damien Elmes
d6e3964151
PEP8 cards.py
2021-06-27 12:12:23 +10:00
Damien Elmes
cd80acce55
move+rename deprecated decorators to _legacy.py
...
+ take method instead of string, so we can ensure symbol exists
2021-06-26 15:50:19 +10:00
Damien Elmes
d73231dbdc
PEP8 notes.py
...
An example of how we can start migrating the codebase to PEP8:
- enable invalid-name at the top
- use bazel run pylib:pylint to identify names that need renaming
- use PyCharm or similar to rename the functions/variables
- in the cases where the conversion is not just snake_case, use
.register_deprecated_aliases()
+ removed the __repr__() definition, it dumps all the note content
and obscures the error message
2021-06-26 11:38:59 +10:00
Damien Elmes
5e41eb7565
add a helper so we can get semi-automatic camelCase conversion
2021-06-26 11:33:35 +10:00
Damien Elmes
b912b2d145
enable some pylint convention tests in pylib
2021-06-26 10:11:05 +10:00
Damien Elmes
5d106a4c93
Merge pull request #1254 from RumovZ/sidebar-menu-hook
...
Add hook "browser_sidebar_will_show_context_menu"
2021-06-26 08:42:59 +10:00
Damien Elmes
f9dd95254b
revert to % format string to avoid breaking add-on
...
partially reverts 3572f0a0c6
https://forums.ankiweb.net/t/anki-2-1-45-beta/10664/50
2021-06-26 08:39:16 +10:00
Damien Elmes
3670a291a9
fix error when user confirms adding cloze to basic type
2021-06-26 08:35:24 +10:00
RumovZ
5cc2932fcb
Add hook "browser_sidebar_will_show_context_menu"
2021-06-25 17:01:17 +02:00
Damien Elmes
14a2cc44ac
update to latest rusqlite
2021-06-25 16:22:21 +10:00
Damien Elmes
795afb7068
update most rust deps; skip rusqlite
2021-06-25 15:35:25 +10:00
Damien Elmes
50e7d6ea00
disable cloze&math buttons in html mode
...
Following on from 35777bb0ca
Keeping them active seems to encourage users to experiment:
https://forums.ankiweb.net/t/cloze-deleting-html-svg/11011
2021-06-25 10:31:47 +10:00
Damien Elmes
f17a3ae010
fix importer mistakenly allowing import of v2 collection into v1
...
The instance variable is ugly, but should avoid breaking some monkey
patching done by Special Fields
2021-06-25 09:50:10 +10:00
Damien Elmes
78a7620079
update undo skipping; exclude deck/tag expand/collapse
...
Instead of calling a method inside the transaction body, routines
can now pass Op::SkipUndo if they wish the changes to be discarded
at the end of the transaction. The advantage of doing it this way is
that the list of changes can still be returned, allowing the sync
indicator to update immediately.
Closes #1252
2021-06-25 09:16:15 +10:00
Damien Elmes
130ffca90c
Merge pull request #1253 from hgiesel/codablesetfields
...
Fix Codable carrying on content from other notes in Browser
2021-06-25 08:26:42 +10:00
Damien Elmes
82578b8f1a
Merge pull request #1251 from hikaru-y/fix-toggle-night-mode
...
Fix toggle night mode in clayout
2021-06-25 08:22:56 +10:00
Henrik Giesel
1599526726
Make Codable abstract more over its textarea v codemirror when using fieldHTML
2021-06-24 19:55:50 +02:00
Henrik Giesel
9f0343f591
Make EditingArea intialize this.fieldHTML, not Editable.fieldHTML
2021-06-24 19:15:07 +02:00
hikaru-y
95a8d140e4
Set background-color of body to var(--window-bg)
...
required to emulate day mode in clayout
if background-color is not set in .card styling
2021-06-24 23:47:14 +09:00
hikaru-y
2ed9f69cd7
Toggle night-mode class of documentElement when action triggered
2021-06-24 23:47:06 +09:00
hikaru-y
754e7c753d
Set --window-bg of day/night mode to proper colors
...
including the following changes:
- rename "_getWindowColor" to "get_window_bg_color" to follow PEP8
- add "night_mode" argument to "get_window_bg_color"
- make it possible to get the correct colors regardless of the current theme
2021-06-24 23:46:48 +09:00
hikaru-y
3eb4321087
Store default palette before "fusion" QStyle is applied
...
Once a QStyle different from the system default is applied, the system default palette can no longer be retrieved with standardPalette().
2021-06-24 23:46:11 +09:00
Damien Elmes
cadf499216
fix pin toggle causing saved tags to get lost
2021-06-24 20:16:21 +10:00
Damien Elmes
4ba0c8d169
mobile fixes for js field
...
Without the overflow change, the page viewport gets messed up.
And for some reason specifying the font size as 1rem does not work;
it needs to be explicitly set to 16px to prevent zoom in.
2021-06-24 18:06:22 +10:00
Damien Elmes
04d6a89216
disable smart quotes and capitalization in js field
...
+ use bootstrap styling
2021-06-24 18:00:06 +10:00
Damien Elmes
249e009f27
cope with collections where latexsvg is not a bool
2021-06-24 15:29:21 +10:00
Damien Elmes
2f25a969e4
report object type where json decode fails
2021-06-24 15:28:24 +10:00
Damien Elmes
606e2d37fc
fix release builds
2021-06-24 15:01:32 +10:00
Damien Elmes
309748812b
update translations
2021-06-24 14:48:48 +10:00
Damien Elmes
efd6d47a05
v3 scheduler: experimental -> beta
2021-06-24 14:46:09 +10:00
Damien Elmes
b959feb6e5
expose scheduler js option in deck config
2021-06-24 14:38:10 +10:00
Damien Elmes
841250533d
gear -> revert icon
...
https://forums.ankiweb.net/t/anki-2-1-45-beta/10664/30
2021-06-24 13:07:03 +10:00
Damien Elmes
a277dc96ba
Merge pull request #1248 from ankitects/revert-on-right
...
Move deck options revert button to right; hide when inactive
2021-06-24 13:01:57 +10:00
Damien Elmes
92ba27a00c
Merge pull request #1249 from hgiesel/dropdownfix
...
Adapt use of createDropdown for editor buttons
2021-06-24 12:31:20 +10:00
Damien Elmes
66aa225965
don't wait for images before revealing
...
Currently there's a nasty blink when revealing the answer if the answer
has images on it, as the entire card is hidden, and not shown again until
the images have loaded. This patch removes the wait, so text should appear
more quickly, but it will mean the images may pop in.
We still wait for images before scrolling, to avoid a scroll to the wrong
location.
There's plenty of scope to improve this further - preloading images,
rendering MathJax in advance, etc, but those changes will need to wait
for now. #1120 has some related discussion.
2021-06-24 12:22:25 +10:00
Damien Elmes
4ffca62afe
allow customization of default search text
...
https://forums.ankiweb.net/t/whats-the-default-search-when-browsing-now-also-how-do-i-choose-to-browse-current-deck/8922
2021-06-24 11:24:30 +10:00
Damien Elmes
f4111fca00
drop crash.log support
...
I don't recall it ever helping to resolve a bug, and presumably we can
still use it in the future via the PYTHONFAULTHANDLER env var if
necessary.
2021-06-24 10:08:31 +10:00
Damien Elmes
c765cbc6a0
fix build badge
2021-06-24 09:21:56 +10:00
Henrik Giesel
e5709ec90c
Adapt use of createDropdown for editor buttons
2021-06-22 17:31:06 +02:00
Damien Elmes
7416660c59
move revert button to the right
...
With a confirmation step now, accidental taps when scrolling shouldn't
be an issue, and it leaves more room for the text.
2021-06-22 09:41:31 +10:00
Damien Elmes
7e96005d54
hide revert button when not active
2021-06-22 09:38:28 +10:00
Damien Elmes
504eca1375
Merge pull request #1207 from hgiesel/deckoptionssections2
...
Deck Options refactoring
2021-06-22 09:36:15 +10:00
Damien Elmes
15825f5629
fix svelte-check error by tweaking formatting
...
🤷
2021-06-22 09:27:37 +10:00
Damien Elmes
020e828a2b
Merge pull request #1247 from hgiesel/pinnedfieldsfix
...
Call update_notetype_legacy after toggling sticky
2021-06-22 09:10:14 +10:00
Henrik Giesel
40058b49b2
Have swithes be blue when checked in night mode
2021-06-21 22:37:37 +02:00