Commit Graph

219 Commits

Author SHA1 Message Date
Henrik Giesel
2778b9220c
Mathjax editor improvements (#1502)
* Remove unnecessary stopPropagation of mathjax-overlay events

* Use CodeMirror component for MathjaxHandle

* Refactor ResizeObserver code in MathjaxHandle

* Wrap setRange in CodeMirror in try/catch

* Add Mathjax Editor bottom margin

* Add custom Enter and Shift+Enter shortcuts for the MathjaxHandle

* Format

* Move placeCaretAfter to domlib

* Move focus back to field after editing Mathjax

* Put Cursor after Mathjax after accepting

* Add delete button for Mathjax

* Change border color of mathjax menu

* Refactor into MathjaxMenu

* Put caretKeyword in variable

* Use one ResizeObserver for all Mathjax images

* Add minmimum width for Mathjax editor

* is still smaller than minimal window width

* Add bazel directories to .prettierignore and format from root

* exclude ftl/usage (dae)

the json files that live there are output from our tooling, and
formatting them means an extra step each time we want to update them

also exclude .mypy_cache, which is output by scripts/mypy*

* minor ftl tweak: newline -> new line  (dae)
2021-11-23 10:27:32 +10:00
RumovZ
0efa3f944f
Garbage collect unused Fluent strings (#1482)
* Canonify import of i18n module

Should always be imported as `tr`, or `tr2` if there is a name collision
(Svelte).

* Add helper for garbage collecting ftl strings

Also add a serializer for ftl asts.

* Add helper for filter-mapping `DirEntry`s

* Fix `i18n_helpers/BUILD.bazel`

* run cargo-raze

* Refactor `garbage_collection.rs`

- Improve helper for file iterating
- Remove unused terms as well
- Fix issue with checking for nested messages by switching to a regex-
based approach (which runs before deleting)
- Some more refactorings and lint fixes

* Fix lints in `serialize.rs`

* Write json pretty and sorted

* Update `serialize.rs` and fix header

* Fix doc and remove `dbg!`

* Add binaries for ftl garbage collection

Also relax type constraints and strip debug tests.

* add rust_binary targets for i18n helpers (dae)

* add scripts to update desktop usage/garbage collect (dae)

Since we've already diverged from 2.1.49, we won't gain anything
from generating a stable json just yet. But once 2.1.50 is released,
we should run 'ftl/update-desktop-usage.sh stable'.

* add keys from AnkiMobile (dae)

* Mention caveats in `remove-unused.sh`
2021-11-12 18:19:01 +10:00
Matthias Metelka
371f731e30
Editor Field Descriptions (#1476)
* Add description input to fields dialog

QLineEdit seems like the best option, as it saves space and motivates users to keep their descriptions concise.

* Add setDescriptions to note initialization script

Went for the extra function instead of including it in setFields to prevent potential add-on breakages.

* Add tooltip next to field name if description is set

* Refactor code according to suggestions

Set default tooltip placement to right instead of bottom

Use .get() for fld["description"]

Fix tab order in fields dialog

Swap out abbreviation "desc" for full length name to keep consistency

* Update Protobuf and Rust for description

Add description to notetypes.proto and schema11

Co-authored-by: RumovZ <RumovZ@users.noreply.github.com>

* Fix tooltips not updating with description

Remove redundant variable tooltipOptions

Update previousTooltip within reactive function

* Move LabelDescription out of LabelName

Co-authored-by: Henrik Giesel <hgiesel@users.noreply.github.com>

* Decrease icon size and fix alignment

Co-Authored-By: Henrik Giesel <hengiesel@gmail.com>

* the new key needs to be cleared from fields, not the notetype itself

Co-authored-by: RumovZ <RumovZ@users.noreply.github.com>
Co-authored-by: Henrik Giesel <hengiesel@gmail.com>
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2021-11-06 09:42:48 +10:00
Damien Elmes
1146ce2b15 fix missing dependencies on ftl:sync 2021-10-26 08:30:13 +10:00
RumovZ
3cdb3d72c1
Do not bury suspended cards (#1447)
* Skip burying for suspended cards

* Inform about number of buried cards
2021-10-23 11:04:26 +10:00
RumovZ
5062024974 Move update logic into CardInfo.svelte 2021-10-18 09:01:24 +02:00
RumovZ
1d63253b4f Make window titles more user-friendly 2021-10-18 09:01:23 +02:00
RumovZ
f0d7e6f4d1 Use updating card infos in browser and reviewer 2021-10-18 09:01:23 +02:00
Damien Elmes
812bf76b96
Merge pull request #1399 from abdnh/addon-homepage-manifest-prop
Add the homepage property to manifest.json
2021-10-01 21:52:00 +10:00
Abdo
3822568667 Add the homepage property to manifest.json 2021-10-01 14:40:36 +03:00
Damien Elmes
a174c41801
Merge pull request #1397 from RumovZ/column-tooltips
Add tooltips for some browser columns
2021-10-01 19:12:59 +10:00
Damien Elmes
c413a0d9f2
"number of cards a note has" 2021-10-01 19:12:49 +10:00
RumovZ
ee2ecd0700 Add tooltips for some browser columns 2021-09-30 13:15:09 +02:00
RumovZ
b89913a2c0
Apply suggestions from code review
Capitalise "selected"

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
2021-09-22 16:59:05 +02:00
RumovZ
75f210a66c Enable adding/removing tags from the sidebar ...
... to selected notes.
2021-09-21 11:48:43 +02:00
Damien Elmes
b877026248 don't check state of current card when repositioning
closes #1365
2021-09-13 14:56:53 +10:00
Damien Elmes
bbd7d057d8
Merge pull request #1358 from evandroforks/lastcardinfo
Add option to reveal previous card's info
2021-09-13 12:06:10 +10:00
Damien Elmes
8a0ccee840 tweak sync conflict message 2021-09-08 19:19:23 +10:00
evandrocoan
e295c4ccfb Fix #1355 2021-09-07 23:53:47 -03:00
Henrik Giesel
eb71c97872 Adjust actual size tooltip 2021-09-06 21:15:36 +10:00
Henrik Giesel
a1df49b11e Implement Maximum image size mechanism 2021-09-06 21:15:36 +10:00
Henrik Giesel
8a8cd4ee38 Add float tooltips 2021-09-06 21:15:36 +10:00
Damien Elmes
e60fe4a67f add comment to segoe-ui string
https://forums.ankiweb.net/t/font-family-bug/12993/3
2021-09-06 18:29:26 +10:00
Damien Elmes
d8a0df2a62
Merge pull request #1337 from Arthur-Milchior/main
Mention .anki can be imported with add-on 175027074
2021-08-24 11:04:33 +10:00
Damien Elmes
1b2d57d956 add note about interday learning cards being fetched preferentially
+ priority->order
2021-08-22 15:32:46 +10:00
Damien Elmes
05124eecf7 adding options to sort by ascending/descending ease 2021-08-22 15:32:46 +10:00
Arthur Milchior
cc35a646a6 Mention .anki can be imported with add-on 175027074 2021-08-21 15:25:04 +02:00
Damien Elmes
131c8b72f8 add options to v3 to preserve new card gather order
Allows cards to be presented in deck order when gather priority is set
to 'deck'.
2021-08-20 12:03:32 +10:00
Damien Elmes
48c121e4f3 filtered decks w/ scheduling disabled in v3 now log reviews 2021-08-19 20:25:29 +10:00
Damien Elmes
c20716660f fix inverted 'skip question when replaying answer' option
I'd intended to add a new string but overlooked it.

https://forums.ankiweb.net/t/bug-always-include-question-side-when-replaying-audio/12273/2
2021-08-15 16:15:14 +10:00
Henrik Giesel
b6aa59f2c7 Add tooltip for Toggly sticky icon 2021-08-03 06:02:29 +02:00
Henrik Giesel
66faa4ec25 Rename to text color and text color highlight 2021-07-26 05:28:28 +02:00
Damien Elmes
cd9f8d883c clarify deck description message
+ drop the reference to overview screen
2021-07-24 21:45:09 +10:00
Damien Elmes
5e10087aae handle notes with missing cards in browser
https://forums.ankiweb.net/t/2-1-45-release-candidate/11362/30
2021-07-22 14:58:57 +10:00
Damien Elmes
96e6e216a7
Merge pull request #1293 from RumovZ/find-and-replace
Find & Replace
2021-07-16 10:47:16 +10:00
RumovZ
eab51dce40 Add sidebar actions
- Find & Replace for notetype fields
- Rename with Parents for decks and tags
2021-07-13 16:34:02 +02:00
RumovZ
a5193339e7 Rework Find & Replace dialog:
- Add option to affect whole collection
- Allow to open without selection
- Add parameter for presetting field
2021-07-13 16:33:45 +02:00
Damien Elmes
cb548f4783 ascending/descending position
https://forums.ankiweb.net/t/anki-2-1-45-beta/10664/131
2021-07-13 16:10:29 +10:00
Damien Elmes
f458add147 add note about display order using current deck 2021-07-13 15:58:06 +10:00
Damien Elmes
576b141e2b add back in missing check for upload size
Compression now happens up-front, so we can tell in advance if the
upload size has been exceeded.
2021-06-29 10:50:03 +10:00
Damien Elmes
0b697f5161 expose scheduler js option in deck config 2021-06-24 14:38:10 +10:00
Damien Elmes
114eec6585 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
RumovZ
5574cb1cfe Make missing cloze a warning again 2021-06-15 08:43:00 +02:00
RumovZ
38b8e74f71 Remove desktop-specific 'Cards...' hint 2021-06-15 08:42:43 +02:00
RumovZ
9acc03773a Check for out-of-place/missing clozes when adding 2021-06-12 10:05:42 +02:00
Damien Elmes
61e86cc29d new change notetype implementation for the frontend
- changes can now be undone
- the same field can now be mapped to multiple target fields, allowing
fields to be cloned
- the old Qt dialog has been removed
- the old col.models.change() API calls the new code, to avoid
breaking existing consumers. It requires the field map to always
be passed in, but that appears to have been the common case.
- closes #1175
2021-06-10 22:19:24 +10:00
Damien Elmes
1f2567e04c add notetype changing to backend 2021-06-09 20:56:52 +10:00
Damien Elmes
038eef4f07 add Card Info action translation 2021-06-08 14:07:13 +10:00
Damien Elmes
410660990e add LIFO sorting options for new cards 2021-06-08 14:01:46 +10:00
Damien Elmes
e3ce9d05c7 add Rescheduled to Today section of sidebar
https://forums.ankiweb.net/t/anki-2-1-45-alpha/10061/105
2021-06-05 12:55:07 +10:00