Commit graph

18 commits

Author SHA1 Message Date
Hanna Nilsén
2206984cc7 docs: use HTTPS for fsrs and desiredRetention links 2025-09-18 09:33:03 +02:00
Hanna Nilsén
0b2d70a522 stats: link retention help box to "Desired retention" section 2025-09-17 17:23:48 +02:00
user1823
5c6e2188e2
Limit time studied today to minutes (#4242)
* Limit time studied today to minutes

* Update timespan.rs

* Update today.rs

* Update timespan.rs

* Update today.rs

* Update today.rs

* Update time.ts

* Update time.ts

* Update timespan.rs

* Update timespan.rs

* Update timespan.rs

* Update today.rs
2025-08-06 19:30:44 +10:00
Damien Elmes
20b7bb66db Fix 'limits start from top' link 2025-07-25 14:45:04 +07:00
Damien Elmes
278a84f8d2 Fix 'same cloze' shortcut on macOS
https://forums.ankiweb.net/t/mac-shortcut-for-cloze-deletion-same-card/63785
2025-07-18 18:12:30 +07:00
llama
a73f1507ba
use KeyboardEvent.key instead of code (#4114) 2025-06-25 14:08:25 +03:00
user1823
44f3bbbbc9
Limit study time to hours in reviews graph (#4086)
* Add maxUnit argument to naturalUnit

* Limit study time to hours in reviews graph

Relevant discussions:
- https://forums.ankiweb.net/t/reviews-graph-units-of-total-time-studied-suggestion/61237
- https://forums.ankiweb.net/t/why-does-anki-display-study-time-in-months/37722
- https://forums.ankiweb.net/t/poll-use-hours-in-total-time-stats/62076
- https://github.com/ankitects/anki/pull/3901#issuecomment-2973161601

* Use the new approach for native stability in Card Info

* Use a simpler approach
2025-06-18 14:34:58 +07:00
user1823
e546c6d11f
Improve natural unit conversion for a time b/w 360 to 365 days (#3901)
* Improve natural unit conversion for a time b/w 360 to 365 days

Previously, 363 days would be converted to 12.1 months, which is quite confusing because
- a user would think that if the value is more than 12 months, why it isn't displayed in years
- the value is actually less than a year, which is counterintuitive as 12.1 m suggests a value more than a year.

* precise

* Update time.ts to match timespan.rs

* Add another test

* Use average duration of a month instead

* Update time.ts

* Update test_schedv3.py

* Update time.test.ts
2025-04-13 14:26:34 +10:00
Danika-Dakika
6e7dcad542
Update Deck Options strings to clarify Timers (#3792)
* Update CONTRIBUTORS

added myself

* Update about.py

added myself

* Update scheduling.ftl

timers-related string changes

* Update deck-config.ftl

timers-related string changes

* Update help-page.ts

timers-related string changes
2025-02-06 15:17:30 +07:00
Ross Brown
9877e22fd2
Tweak how the True Retention stats table displays numbers (#3677)
* Tweak how the True Retention stats table displays numbers

- Always show fractional parts of numbers even if they are 0 (91.0% not 91%).
- Show "N/A" for percentages instead of 0% when there are 0 total reviews.

* Localise percentages correctly
2025-01-04 23:13:32 +03:00
Damien Elmes
014620ab65
Update to stable Svelte 5 release (#3513)
* Update to stable Svelte 5 release

This causes a bunch of warnings to be omitted:

ts/routes/graphs/RangeBox.svelte:52:18
Warn: Properties of objects and arrays are not reactive unless in runes mode. Changes to this property will not cause the reactive statement to update (svelte)
                break;
            case RevlogRange.All:
                $days = 0;

They are triggered on enum references, and it appears to be a bug.
May need to report it to Svelte?

* Deps update

* Silence spurious errors + fix a real one

https://github.com/sveltejs/svelte/issues/13811
2024-10-26 18:21:45 +10:00
Abdo
847f3f6714
Fix FSRS progress update issues (#3420)
* Delay optimal FSRS params alert to ensure progress updates are reported

* Ensure progress updates arrive synchronously
2024-09-20 21:18:02 +10:00
Dillon Baldwin
a2b4b57390
Added name to contributors list as well as addressed issue #3343. Ran ninja check and the build compiled successfully. (#3345) 2024-08-07 16:15:50 +07:00
Abdo
fa47e905c5
Restore $deckOptions (#3265)
* Restore $deckOptions

* Avoid error in logs when using ./yarn dev or mobile clients (dae)
2024-06-28 19:38:18 +07:00
Damien Elmes
f639c3660a Revert "Revert "Revert "Preserve HTML formatting inside clozes (#3038)"""
This reverts commit 9c733848b8.
2024-05-17 11:51:09 +07:00
Abdo
31e2dc1409
Fix some cloze handling regressions (#3086)
* Place cursor inside empty clozes

* Remove empty <li> after being added
2024-03-31 10:01:17 +01:00
Damien Elmes
9c733848b8 Revert "Revert "Preserve HTML formatting inside clozes (#3038)""
This reverts commit e911b4b69a.

Trying again now that 24.04 is out.
2024-03-31 15:55:30 +07:00
Damien Elmes
9f55cf26fc
Switch to SvelteKit (#3077)
* Update to latest Node LTS

* Add sveltekit

* Split tslib into separate @generated and @tslib components

SvelteKit's path aliases don't support multiple locations, so our old
approach of using @tslib to refer to both ts/lib and out/ts/lib will no
longer work. Instead, all generated sources and their includes are
placed in a separate out/ts/generated folder, and imported via @generated
instead. This also allows us to generate .ts files, instead of needing
to output separate .d.ts and .js files.

* Switch package.json to module type

* Avoid usage of baseUrl

Incompatible with SvelteKit

* Move sass into ts; use relative links

SvelteKit's default sass support doesn't allow overriding loadPaths

* jest->vitest, graphs example working with yarn dev

* most pages working in dev mode

* Some fixes after rebasing

* Fix/silence some svelte-check errors

* Get image-occlusion working with Fabric types

* Post-rebase lock changes

* Editor is now checked

* SvelteKit build integrated into ninja

* Use the new SvelteKit entrypoint for pages like congrats/deck options/etc

* Run eslint once for ts/**; fix some tests

* Fix a bunch of issues introduced when rebasing over latest main

* Run eslint fix

* Fix remaining eslint+pylint issues; tests now all pass

* Fix some issues with a clean build

* Latest bufbuild no longer requires @__PURE__ hack

* Add a few missed dependencies

* Add yarn.bat to fix Windows build

* Fix pages failing to show when ANKI_API_PORT not defined

* Fix svelte-check and vitest on Windows

* Set node path in ./yarn

* Move svelte-kit output to ts/.svelte-kit

Sadly, I couldn't figure out a way to store it in out/ if out/ is
a symlink, as it breaks module resolution when SvelteKit is run.

* Allow HMR inside Anki

* Skip SvelteKit build when HMR is defined

* Fix some post-rebase issues

I should have done a normal merge instead.
2024-03-31 09:16:31 +01:00