Commit graph

9401 commits

Author SHA1 Message Date
Damien Elmes
dfa8d50a9d Fix due graph showing wrong date for review cards with resched off
Since we are using the original due date instead of the current one,
the learning check needs to be based on the card type, not its current
queue.

https://forums.ankiweb.net/t/anki-2-1-51-release-candidate/18942/22
2022-04-25 14:14:08 +10:00
Henrik Giesel
39192e1698 Remove onInput call in input handler (#1819)
This was implemented by me to prevent seemingly empty fields,
which however still contain some HTML (e.g. <div></div>) and
thus will trigger in the templates.
However it only worked in very limited cases, maybe we could
solve this better by indicating whether a field has content somehow.
2022-04-25 13:56:05 +10:00
Henrik Giesel
2552b16f19 Instead of transforming to {\lt}, transform to &lt; (#1818)
* Instead of transforming to {\lt}, transform to &lt;

- In Mathjax editor
- This way you can also use Mathjax convenience shortcuts like <=> in
  chemistry mode: \ce{<=>}

* Remove unused translateEntitiesToMathjax() (dae)

https://github.com/ankitects/anki/pull/1818#discussion_r857238310
2022-04-25 13:42:54 +10:00
Damien Elmes
e2dcc49284 Reset zoom on page transition
https://forums.ankiweb.net/t/2-1-50-zooming-in-while-reviewing-results-in-an-unusably-huge-deck-list/19283
2022-04-22 15:45:50 +10:00
RumovZ
830cfafa04 Fix progress of chained operations (#1817)
* Fix progress of chained operations

Especially aborting colpkg import.

* Notify about missing progress dialog
2022-04-22 14:47:17 +10:00
Matthias Metelka
ad949a9351 Align list items to start (#1816) 2022-04-22 14:18:11 +10:00
Matthias Metelka
0b4da5358c Remove unnecessary night mode rule for typeans (#1815)
which caused https://forums.ankiweb.net/t/shaddow-below-cloze-type-area-in-night-mode/19287/2
2022-04-22 14:17:43 +10:00
Damien Elmes
ea87025d1a Increase compression on zstd packages 2022-04-22 13:52:24 +10:00
Damien Elmes
bd8ed58d68 Fix cwd changing on export
No longer required after #1656
2022-04-21 16:50:05 +10:00
Abdo
05b816243b Fix pasting of local links to unsupported types that contain spaces (#1813)
This change causes local links to unsupported formats like PDF to be
handled by _processUrls() instead of _processText, converting them to
correct hyperlinks in case they contain spaces.
2022-04-21 14:10:53 +10:00
Damien Elmes
4878f15b5d Fix custom browser font not being honored
https://forums.ankiweb.net/t/on-anki-2-1-50-browser-table-font-override-is-not-respected/19259
2022-04-21 13:28:22 +10:00
Damien Elmes
699c8b0ba0 Bump bazel version
Closes #1808
2022-04-20 21:53:59 +10:00
Damien Elmes
3aace1a41e Update Mac build to Qt 6.3 2022-04-20 21:33:31 +10:00
Damien Elmes
2b56d4d3e6 Only require ANKI_WAYLAND if frozen
Accidentally changed `and` to `or` while testing 7cf318e290.
2022-04-20 19:41:41 +10:00
Damien Elmes
61b673c9a6 Upgrade to Qt 6.3
Fixes #1753
Fixes #1770
2022-04-20 19:12:10 +10:00
Damien Elmes
63ee0741f8 Update translations 2022-04-20 19:12:10 +10:00
Damien Elmes
b3d05ef940 Add workaround for unwanted CF_HTML header when pasting on Windows
Fixes #1751 for now; hopefully we can roll this change back once 6.3.1
is out in 3-4 weeks.
2022-04-20 17:23:11 +10:00
Damien Elmes
c801d78949 Add workaround to ensure internal pastes flagged on Windows/Qt6
Fixes #1793
2022-04-20 17:05:24 +10:00
Damien Elmes
88e09e78c5 Bump version 2022-04-20 16:40:49 +10:00
Damien Elmes
7cf318e290 Default to X11 on Qt6 builds as well
Qt6 no longer appears to require QT_QPA_PLATFORM to be set.

https://forums.ankiweb.net/t/blury-interface-with-gnome-wayland-and-fractional-scaling/19196/4
2022-04-20 14:41:01 +10:00
Henrik Giesel
aff1bae9e5 Add some component comment (#1779)
* Add a component comment for NoteEditor

* Move comments above component template

* EditorField -> EditingArea
2022-04-19 17:20:26 +10:00
Damien Elmes
38871af0fa Load page script after body created (#1802)
document.body must exist by the time the top level Svelte component
initializes.

https://forums.ankiweb.net/t/2-1-50-editor-wont-show-when-addons-load-many-js-files/19036
2022-04-19 17:16:56 +10:00
Damien Elmes
3aa3594be2 Close browser before full sync or colpkg import/export
Closes #1797
2022-04-19 17:10:34 +10:00
Damien Elmes
97eb54ec77 Switch strong/em back to b/i
In the absence of strong arguments either way, and given the fact that
strong/em has broken a few (perhaps rare) use-cases, reverting seems
prudent. But happy to revisit this again in the future if someone has
a convincing argument for why we should be doing it differently.

Closes #1807
2022-04-19 16:28:44 +10:00
Henrik Giesel
3d429020b0 Fix resetting of formatting modes when pressing modifer or dead keys (#1811)
* Fix shift removing bold formatting

* Remove input handler on selection change

We listened to "non-input events" mostly to catch events that
change the selection (like Ctrl-a, or arrow keys) anyway
2022-04-19 16:08:32 +10:00
Luka Warren
ef7ee0951b Fix issue #1114 by scrolling the user to the top of the page (#1810)
* Scroll stats to top when exporting (#1114)

It's obviously a bit of a "hacky" solution, since it's slightly jarring for users to scroll down, click export, then find themselves all the way at the top again, but it's somewhat less confusing than wondering why your PDF is broken :-)

* Clarified comment in stats.py (#1114)

* Apply scrolling fix to new stats screen, not legacy stats (dae)

Also wait for JS callback before saving the PDF, as JS is executed
asynchronously.
2022-04-19 15:39:32 +10:00
Damien Elmes
b4cd2a3dab Fix compatibility with older macOS versions
https://forums.ankiweb.net/t/anki-2-1-50-qt5-wont-open/19091
2022-04-15 17:35:05 +10:00
Damien Elmes
511ba5ebe4 Add back support for custom mountpoint in card stats
The move to separate .html files broke our legacy card stats routine.

Related: 1c5077ab45
2022-04-15 15:30:05 +10:00
Damien Elmes
106c067a7a Fix copying text to external apps when running on Gnome
Mutter seems to get confused if we mutate the keyboard in dataChanged().

Closes #1799
2022-04-15 12:09:56 +10:00
RumovZ
117eafb6ee Store last position when scheduling as review (#1800) 2022-04-14 18:53:58 +10:00
RumovZ
13112465a7 Fix selector index after programatic search (#1796) 2022-04-14 18:46:40 +10:00
Damien Elmes
64d6be3ae2 Fix illegible calendar buttons in dark mode on Mac/Linux
https://forums.ankiweb.net/t/macos-apple-silicon-2-1-50-dark-mode-statistics-heatmap-buttons-dont-have-icons/18951

This button code is in need of a cleanup.
2022-04-13 13:53:45 +10:00
Damien Elmes
509c2f8f31 Sort field change without field change should mark schema modified
Closes #1789
2022-04-10 08:52:55 +10:00
Damien Elmes
100e0d65b3 Add mock stdout/stderr for console=False case on Windows
PyInstaller provided a NulWriter when running in GUI mode, but stdout/
stderr now default to None with PyOxidizer.

Fixes #1786
2022-04-09 16:48:32 +10:00
Abdo
19e2909a54 Allow passing args to anki-console.bat (#1785) 2022-04-09 14:40:26 +10:00
roxgib
b5e51cc2b0 Add minimumContentsLength property to templatesBox (#1781)
Addresses #1777 by adding the `minimumContentsLength` property to the comboBox, which causes the size policy to not require expanding beyond that amount while still expanding if the user stretches the window manually.

Note that users who were previously experiencing large window widths due to the previous behaviour might see the same size again due the geometry being restored.
2022-04-09 13:55:03 +10:00
Aristotelis
266370de07 Fix a number of bugs with add-on conflict resolution (#1780)
* Always enable manually installed add-ons

Ensures that manually installed add-ons are enabled after the installation, even if previously disabled.

Prevents scenarios where users could end up with no active add-on build (e.g. when switching between stable add-on builds distributed via AnkiWeb and betas distributed via GitHub).

* Improve type annotations

* Also enable disabled AnkiWeb add-ons upon interactive installation

Applies to add-ons that users actively install via their AnkiWeb ID. Updates are exempt, preserving whatever status add-ons were in.

* Prevent disabled add-ons from triggering conflicts

* Fix download_addons() not passing on force_enable argument (dae)
2022-04-09 13:51:59 +10:00
Henrik Giesel
1d565837e2 Speed up editor by lazily loading CodeMirror - Second try (#1776)
* Revert "Revert "Speed up editor by lazily loading CodeMirror (#1766)""

This reverts commit bb420f9cd2.

* Pass in options via action update + Make access to editor optional
2022-04-09 13:25:54 +10:00
RumovZ
1a1b5a1eaa Implicitly group when joining searches (#1759)
* Implicitly group when joining searches

* Allow joining search types directly

* Test search joining

* Add comment for future selves (dae)

* Add one more assert that shows nested grouping (dae)

* Join user searches without grouping again

* Flatten a few clauses in custom study (dae)
2022-04-09 13:22:27 +10:00
Abdo
ba279bd384 Add relative overdueness to review order (#1757)
* Add relative overdueness to review order

* Add test for relative overdue
2022-04-09 13:20:09 +10:00
Damien Elmes
0707cf27fb Update translations 2022-04-09 13:08:35 +10:00
Damien Elmes
ab1a531dd9 Garbage-collect unused FTL strings
Two strings related to scheduler upgrade have been manually excluded,
as we may be able to reuse them for a future V3 update.
2022-04-09 12:39:50 +10:00
Damien Elmes
7f8bc82669 Don't store used FTL keys in git
In hindsight, we don't really need to keep the lists stored in git, as
they're easy enough to generate, and GC runs are infrequent.
2022-04-09 12:38:54 +10:00
Damien Elmes
f8f06a9aa8 Bump version 2022-04-09 11:43:27 +10:00
Damien Elmes
3b711e3b91 Update translations 2022-04-06 11:51:49 +10:00
Damien Elmes
b435129b53 Tweaks to video driver handling
- Use a separate `gldriver6` file for configuring Qt6 so we don't
pick up old settings, or cause problems when switching back and forth.
- Default to OpenGL/auto instead of software, as that was what we
were using throughout the beta period.
- Try to detect driver failure on startup. Untested.
- Hide the selector in the preferences again, as if Anki is unable
to automatically switch drivers, the user could change the setting
and then not be able to get back into Anki.
2022-04-06 11:35:49 +10:00
Damien Elmes
bb420f9cd2 Revert "Speed up editor by lazily loading CodeMirror (#1766)"
This reverts commit 5d3a423b21.

This caused a regression that needs looking into:
https://github.com/ankitects/anki/issues/1775
2022-04-06 11:08:32 +10:00
Damien Elmes
d63906ac64 Update translations 2022-04-05 11:23:07 +10:00
Damien Elmes
9a7adda48c Match editor background to widget background in day mode 2022-04-05 10:55:25 +10:00
Damien Elmes
b9ea704f99 Fix invisible tag input in Qt5 (thanks to Hikaru)
Closes #1768
2022-04-05 09:53:36 +10:00