Commit graph

400 commits

Author SHA1 Message Date
llama
153b972dfd
Show the number of cards added when adding (#4310)
* modify `generate_cards_for_note` to return count

* modify `add_note` to return count

* show the number of cards added when adding
2025-09-02 18:06:49 +10:00
Jarrett Ye
2b55882cce
Fix/use real step count to simulate (#4240)
* Fix/use real step count to simulate

* Update licenses.json
2025-08-04 16:01:26 +10:00
Luc Mcgrady
c947690aeb
Feat/Use cached workload values (#4208)
* Feat/Use cached workload values

* Fix: Calculation when unchanged

* Modify constants

* Cache clearing logic

* Use function params

* use https://github.com/open-spaced-repetition/fsrs-rs/pull/352

* Revert "use https://github.com/open-spaced-repetition/fsrs-rs/pull/352"

This reverts commit 72efcf230c.

* Reapply "use https://github.com/open-spaced-repetition/fsrs-rs/pull/352"

This reverts commit 49eab2969f.

* ./check

* bump fsrs
2025-07-28 19:00:16 +10:00
Luc Mcgrady
1af3c58d40
Feat/Desired retention info graphs (#4199)
* backend part

* split memorised and cost

* slapdash frontend

* extract some simulator logic

* Add zoomed version of graph

* ./check

* Fix: Tooltip

* Fix: Simulator/workload transition

* remove "time"

* Update ts/routes/graphs/simulator.ts

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* Added: Mode toggle

* Disable Dr in workload mode

* keep button order consistant between modes

* dont clear points on mode swap

* add review count graph

* Revert "dont clear points on mode swap"

This reverts commit fc89efb1d9.

* "Help me pick" button

* unrelated title case change

* Add translation strings

* fix: missing translation string

* Fix: Layout shift

* Add: Experimental

* Fix Time / Memorized

* per day values

* set review limit to 9999 on open

* keep default at currently set value

* Do DR calculation in parallel (dae)

Approx 5x faster on my machine

---------

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2025-07-28 18:55:08 +10:00
Jarrett Ye
46bcf4efa6
Feat/per-deck desired retention (#4194)
* Feat/per-deck desired retention

* Refactor desired retention logic in Collection implementation

Updated the logic for retrieving deck-specific desired retention in both `memory_state.rs` and `mod.rs` to handle cases where the deck's normal state may not be available. This change ensures that the default configuration is used when necessary, improving the robustness of the retention handling.

* Refactor desired retention handling in FsrsOptions.svelte

Updated the logic for effective desired retention to use the configuration default instead of the deck-specific value. This change improves consistency in the retention value used throughout the component, ensuring that the correct value is bound to the UI elements.

* refactor the logic for obtaining deck-specific desired retention by using method chaining

* support deck-specific desired retention when rescheduling

* Refactor desired retention logic to use a dedicated method for improved clarity and maintainability.
2025-07-28 18:22:35 +10:00
Jarrett Ye
1f7f7bc8a3
Fix/FSRS simulator fallback to memory_state_from_sm2 when converting cards (#4189)
* Fix/FSRS simulator fallback to memory_state_from_sm2 for after setting “Ignore cards reviewed before”

* add comment to fsrs_item_for_memory_state

* Add historical retention field to FSRS review request and update related logic

- Added `historical_retention` field to `SimulateFsrsReviewRequest` in `scheduler.proto`.
- Updated `simulator.rs` to use `req.historical_retention` instead of the removed `desired_retention`.
- Modified `FsrsOptions.svelte` to include `historicalRetention` in the options passed to the component.

* Update rslib/src/scheduler/fsrs/memory_state.rs

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* Update rslib/src/scheduler/fsrs/simulator.rs

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* pass ci

* Update rslib/src/scheduler/fsrs/simulator.rs

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* format

* Update rslib/src/scheduler/fsrs/simulator.rs

Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>

* format

* Fix condition in is_included_card function to check CardType instead of CardQueue

---------

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
2025-07-09 16:22:59 +07:00
llama
80ff9a120c
Allow creating deck via #deck:... if non-existent when importing (#4154)
* add deck name field to metadata protobuf msg

* fallback to creating new deck specified in `#deck:...`

* update tests

* create deck if it doesn't exist

* plumbing

* allow creating deck via `#deck:...`

* apply suggestion for protobuf
2025-07-08 00:46:04 +07:00
Jarrett Ye
037dfa1bc1
Add last_review_time to card data for performance and accuracy (#4124)
* Add `last_review_time` to card data

* cargo clippy

* Calculate days elapsed since last review time in add_extract_fsrs_relative_retrievability

* expose last_review_time to Card in Python

* Fix last_review_time assignment in Card class to use last_review_time_secs

* format

* Update last_review_time assignment to exclude filtered preview state in Card class
2025-07-08 00:41:01 +07:00
Luc Mcgrady
f5285f359a
Feat/Add legacy evaluate config bool (#4149)
* Feat/Add legacy evaluate config bool

* Minor tweaks based on PR suggestions (dae)

New enabling command:

from anki.config import Config
mw.col.set_config_bool(Config.Bool.FSRS_LEGACY_EVALUATE, True)
2025-07-04 15:32:09 +07:00
Damien Elmes
da90705346 Re-expose legacy RMSE calculations
Closes #4143
2025-07-01 18:22:55 +07:00
Damien Elmes
b22b3310d6 Revert "Feat/Cmrr target selector (#4116)"
This reverts commit ad0dbb563a.

https://forums.ankiweb.net/t/anki-25-06-beta/62271/156
2025-07-01 11:20:20 +07:00
Luc Mcgrady
ad0dbb563a
Feat/Cmrr target selector (#4116)
* backend

* Add: Frontend

* us

* Added: Loss aversion

* change proto format

* Added: Loss aversion

* Added: Future retention targets

* update default fail cost multiplier

* Future Retention -> Post Abandon Memorized

* superfluous as const

* Fix: Wrong default

* Fix: Wrong import order
2025-06-27 16:44:19 +07:00
Jarrett Ye
a4c95f5fbd
include decay in ComputeMemoryStateResponse (#4102)
* include decay in ComputeMemoryStateResponse

* Add decay attribute to ComputedMemoryState and update Collection methods

* Refactor decay calculation into a helper function for improved readability and maintainability in memory state management

* format & clippy
2025-06-20 20:59:35 +03:00
Luc Mcgrady
55ecbc1125
Feat/Health check (#4047)
* Message on low log loss

* make console.log permanent

* Added: Health check option

* disable button

* change health check conditions

* i18n

* ./check

* Apply suggestions from code review

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* delete shadowed fsrs

* Update ts/routes/deck-options/FsrsOptions.svelte

Co-authored-by: llama <gh@siid.sh>

* Update ftl/core/deck-config.ftl

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* anon's suggestions

* snake_case

* capital slow

* make global

* on by default

* Adjusted loss values

* Show message on pass

* ./check

* ComputeParamsRequest

* update coefficients

* update thresholds

* fix thresholds

* Apply suggestions from code review

---------

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
Co-authored-by: llama <gh@siid.sh>
Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
2025-06-06 12:43:33 +07:00
Jarrett Ye
2de0c79ba5
Feat/evaluate FSRS with time series split (#3962) 2025-06-03 15:26:33 +07:00
Luc Mcgrady
f29bcb743b
Feat/Desired retention warning improvements (#3995)
* Feat/90% desired retention warning

* Update ftl/core/deck-config.ftl

* show on newly enabled

* Show warning on focus

* Never hide warning

* Display relative change

* Add: Separate warning for too long and short

* Revert unchanged text changes

* interval -> workload

* Remove dead code

* fsrs-rs/@L-M-Sherlock's workload calculation

* Added: delay

* CONSTANT_CASE

* Fix: optimized state

* Removed "Processing"

* Remove dead code

* 1 digit precision

* bump fsrs-rs

* typo

* Apply suggestions from code review

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>

* Improve rounding

* improve comment

* rounding <1%

* decrease rounding precision

* bump ts-fsrs

* use actual cost values

* ./check

* typo

* include relearning

* change factor wording

* simplify sql

* ./check

* Apply suggestions from code review

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* Fix: missing search_cids

* @dae's style patch

* Fix: Doesn't update on arrow keys change

* force two lines

* center two lines

---------

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
2025-05-27 13:07:21 +10:00
Damien Elmes
48a0640a07 Revert "feat(scheduler): add from_queue flag to CardAnswer (#3976)"
This reverts commit 1f95d030bb.

Buggy: https://github.com/ankitects/anki/pull/3983
2025-05-19 10:26:10 +10:00
Yaoliang Chen
1f95d030bb
feat(scheduler): add from_queue flag to CardAnswer (#3976)
Co-authored-by: Yaoliang <yaoliang.ch@gmail.com>
2025-05-03 12:21:48 +03:00
Luc Mcgrady
ad073ab10c
Feat/CMRR uses simulate config (#3947)
* Added: simulate_request_to_config

* Use SimulateConfig for CMRR

* ./check

* Fix: ComputingRetention

* Use actual cards for optimal_retention
2025-04-27 21:02:37 +10:00
Jarrett Ye
e096c462fa
Feat/FSRS-6 (#3929)
* Feat/FSRS-6

* update comment

* add decay to Card

* ./ninja fix:minilints

* pass check

* fix NaN in evaluation

* remove console

* decay should fallback to 0.5 when it's None.

* Update SimulatorModal.svelte

* Update a few comments

* Update FSRS decay defaults to use constants for better maintainability and clarity

* Update rslib/src/storage/card/data.rs
2025-04-25 16:44:34 +10:00
Arthur Milchior
efaaae8ce4
Cloze button get disabled outside of cloze field (#3879)
* NF: replace `disabled` by `enabled`

This allows to remove the negations and, in my opinion, make the code
easier to understand and edit.

* Cloze button get disabled outside of cloze field

More specifically, if the user focus in a field that is not a cloze
field, the button are still there but appear as disabled. The shortcut
instead of adding the cloze context shows an alert explaining why this
can't be done.

While this message is already displayed when the user tries to add a
note with cloze in non-cloze field, I suspect it will save time to
stop the user as soon as possible from making mistake. This should
make very clear what is authorized and what is not.

It'll also be a reminder of whether the current field is a cloze or
not.

In order to do this, I added a back-end method (that I expect we may
reuse in ankidroid) to get the index of the fields used in cloze. This
set is sent to the note editor, which propagates it where needed.

In mathjax, the cloze symbol is removed when the selected field is not
a cloze field.
2025-04-24 18:37:41 +10:00
Luc Mcgrady
781a23c6c4
Feat/Ignored before card count (#3910)
* GetIgnoredBeforeCount

* get_card_count_with_ignore_before

* Included / total

* Respect search

* Get frontend hooked up

* Fix: Malformed sql and search

* Variable names

* Added: Alert colours

* i18n

* ./check

* Remove console.log

* Fix: Tooltip showing for default value

* Update ftl/core/deck-config.ftl

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* Fix: Multiple backend calls

* Message: (Approximately)

* Fix: Bouncing info message

* Added: Change delay

* Added: ignore_before_updated

* ./check

* Fix typing, camelCase and improve wording

* Temporarily enable the check on startup

---------

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
2025-04-15 20:21:54 +10:00
llama
ccab18b7ba
Modify card rendering output to specify if rendered card is empty (#3890)
* modify render_card to return whether card was empty

* plumbing

* add flag to proto message

* plumbing: pass flag along to PartiallyRenderedCard

* add tests

* Use a custom return type for clarity (dae)
2025-03-31 17:51:28 +07:00
Yuki
acdf486b29
Refactor: Make Load Balancer Optional Throughout Codebase (#3860)
* Refactoring: load balancer

* Update about.py

* Refactoring: load balancer

* Update about.py

* Clean the code

* Remove config check from get_scheduling_states

* Backend method for the load balancer

* Refactor backend method for the load balancer
2025-03-26 23:19:28 +10:00
Jarrett Ye
0e31efac08
Feat/grade now (#3840)
* Feat/grade now

* pass ci

* fix from_queue

* Refactor card answering to support from_queue flag

- Add `from_queue` field to `CardAnswer` struct and proto message
- Modify `answer_card_inner` to handle queue updates based on `from_queue`
- Remove `grade_card` method and consolidate card answering logic
- Update related test cases to set `from_queue` flag

* fix current_changes() called when no op set

* Optimize queue updates for batch card processing

- Refactor `grade_now` to collect processed card IDs first
- Add new `update_queues_for_processed_cards` method for efficient batch queue updates
- Improve queue management by removing entries and updating counts in a single pass
- Remove individual queue update method in favor of batch processing

* pass ci

* keep the same style

* remove ineffective code

* remove unused imports
2025-03-15 17:30:40 +07:00
Luc Mcgrady
79b6f658c3
Feat: Simulator suspend after lapse count (#3837)
* Added: Leech suspend to simulator

* Added: leech threshold spin box

* Update git rev

* Added: Save to preset options

* ./check

* Added: "Advanced settings" dropdown

* Removed: Indent

* Added: Easy days

* Added: Sticky header

* Removed: Easy Day updating without saving

* un-nest disclosure

* bump fsrs

* Update a VSCode setting to match recent releases

* Move Easy Days above the Advanced settings

I think it's a bit more logical to have Advanced come last.

* Ensure graph fits inside screen height

* Bump fsrs version
2025-03-15 17:28:15 +07:00
Jarrett Ye
a6426bebe2
Feat/support load balance and easy days in FSRS simulator (#3829)
* Feat/support load balance and easy days in FSRS simulator

* format

* consider LoadBalancerEnabled

* use fsrs::PostSchedulingFn

* add load balance and easy days to compute_optimal_retention

* move simulator to a pop-over

* fix incorrect simulationNumber when error 500

* Feat: Save to Preset Options

* update tabs when update newPerDay & reviewsPerDay

* don't reset deckSize & daysToSimulate when save options

* fix missing easy days

* plan to support review priority

* Fix graph line rendering with non-scaling stroke

* simplify review priority function with helper wrapper

* fallback to default ReviewPriority for Added & ReverseAdded

* Update ts/routes/deck-options/SimulatorModal.svelte

Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>

* Wrap review priority function in Arc for thread-safe sharing

* more granularity for R sorting

* Add graph smoothing option to FSRS simulator

* Improve graph resize handling in FSRS simulator

* simplify review priority calculation

* Add review order selection to FSRS simulator modal

* Refactor review priority function using macro for conciseness

* Add copyright and license header to SimulatorModal.svelte

* cargo clippy

* ./ninja fix:eslint

* update fsrs-rs

* Update FSRS dependencies and refactor load balancing functions

- Update fsrs-rs dependency to latest commit
- Modify retention and simulator modules to use Arc instead of Box
- Update function signatures and imports in simulator module
- Simplify review card order handling with direct enum usage

* resolve reviewed changes

* replace .unwrap() with ?

* move simulating into SimulatorModal

* add (crate) to interval_to_weekday

* Update FsrsOptions.svelte

* format

---------

Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
2025-02-27 10:53:01 +07:00
Jarrett Ye
43e860783b
Fix/re-optimize FSRS if short-term param is weird (#3742)
* Fix/re-optimize FSRS if short-term param is weird

* Reset progress when another run is required (dae)

* only count the same-day steps

* Fix flicker when optimizing again (dae)
2025-01-26 10:42:17 +11:00
Damien Elmes
1b5b6850bf Remove unused proto import 2025-01-12 12:58:17 +11:00
llama
b6d7bb190d
Fix IO editor always starting in "hide all, guess one" mode (#3709)
* update backend

* set hideAllGuessOne in mask editor instead
2025-01-09 23:14:02 +11:00
Jarrett Ye
c4ad27a2db
Feat/support new cards ignore review limit in simulator (#3707)
* Feat/support new cards ignore review limit in simulator

* ./ninja fix:minilints & ./ninja format

* use published crate

* make newCardsIgnoreReviewLimit reactive

* format

---------

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2025-01-09 22:49:13 +11:00
Arthur Milchior
d7fc98d4d8
Deck options without bridge (#3571)
* NF: Modify CONTRIBUTORS

Just so that I stop getting the warning

* NF: Create `deckOptionsReady`

* NF: rename _close to require_close

The method will have to be used outside of this class, so can't be private

* NF: simplify slightly some code

* NF: remove bridge command from deck options

* Remove unused import

* Remove superfluous comment with a typo
2025-01-08 21:30:30 +11:00
OuOu2021
cee04bf20c
Apply gradient effect to forgetting curve (#3604)
* Add gradient color for forgetting curve

* Add desiredRetention prop for CardInfo

* update CONTRIBUTORS

* Formatting

* Tweak range of gradient

* Tweak: salmon -> tomato

* Get desired retention of the card from backend

* Add a reference line for desired retention

* Fix: Corrected the steel blue's height & Hide desired retention line when yMin is higher than desiredRetentionY

* Add y axis title

* Show desired retention in the tooltip

* I18n: improve translation and vertical text display

* Revert rotatation&writing-mode of vertical title

* Tweak font-size of y axis title

* Fix: delete old desired retention line when changing duration

* Update ftl/core/card-stats.ftl

---------

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
2024-12-09 17:44:05 +11:00
Damien Elmes
01c368654b Remove remaining remnants of unused error; fix CI 2024-11-19 15:26:02 +10:00
Damien Elmes
ba1f5f46c6 Flag server messages so AnkiDroid can handle them separately 2024-11-08 22:54:15 +10:00
Damien Elmes
b646f09c68
Add descending retrievability (#3559)
* "relative overdueness" -> "retrievability ascending"

* Add 'retrievability descending'
2024-11-08 22:53:13 +10:00
Damien Elmes
6adbd922f7 Rename remaining 'weights' references to 'params' 2024-10-21 18:13:23 +10:00
Damien Elmes
c45fa518d2 Use separate field to store FSRS params
Will allow the user to keep using old params with older clients
2024-10-21 18:13:23 +10:00
Jarrett Ye
26ae51fafd
Create a new kind of revlog entry for reschedule cards on change (#3508)
* create a new kind of revlog entry for Reschedule cards on change

* add comments

* exclude the rescheduled case in reviews graph
2024-10-21 16:47:01 +10:00
Jarrett Ye
b0eb2a2b97
Feat/Estimated Total Knowledge By Note & Daily Load (#3507)
* Feat/Estimated Total Knowledge By Note & Daily Load

* Update rslib/src/stats/graphs/retrievability.rs

* Update rslib/src/stats/graphs/future_due.rs
2024-10-21 15:19:42 +10:00
Jarrett Ye
6ff309e08f
Feat/option to enable FSRS short-term scheduler when (re)learning steps run out && speed up features based on simulation (#3505)
* Update to FSRS-rs v1.3.2

* add fsrs_short_term_with_steps_enabled to config

* ./ninja fix:minilints

* fix defaults_for_testing

* if current parameters are invalid, skip comparison

fix #3498

* fix redundant_field_names

* cargo clippy --fix

* Update to FSRS-rs v1.3.3

* Update to FSRS-rs v1.3.4

* Avoid an extra config lookup on each card answer (dae)
2024-10-21 15:09:07 +10:00
Jarrett Ye
b09326cddd
Feat/export dataset for research (#3511)
* Feat/export dataset for research

* add comment

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>

* target_path is required

* format

* improve efficiency to look up parent_id

* move `use` down
2024-10-18 18:57:06 +10:00
Jarrett Ye
f00211df35
add get_revlogs API && fix the style of tooltipText of ReviewsGraph (#3490)
* add get_revlogs API

* fix tooltipText of ReviewsGraph

the style of true-retention shouldn't affect the style of tooltipText of ReviewsGraph

* More verbose wording (dae)
2024-10-12 14:49:14 +10:00
Jarrett Ye
a982720a42
Feat/Easy Days (#3442)
* Feat/Easy Days

* format

* add easy_days_percentages to deck_config

* configure Easy Days via table

* remove unused code

* add translatable strings & add default of easy days

* don't check easy_days_percentages when deserialize

* pass test::all_reserved_fields_are_removed

* consider next_day_at when interval_to_weekday

* remove y-axis-title created in last simulation

* EstimatedTotalKnowledge should be integer

* Reorder deck option sections (dae)

- Move FSRS to bottom left, to move it closer to the top, and so
the left and right columns appear roughly balanced when FSRS is
enabled.
- Move Easy Days above Advanced

* Don't crash if wrong number of days (dae)

* Use lower field number (dae)

Repeated fields are more compactly stored in the first 15 fields.
2024-10-11 19:47:44 +10:00
a.r
e2124cd790
typeanswer: [type:nc] – ignores combining characters (#3422)
* typeanswer: fix cleanup

Fix: Add prepare_expected back in for the 'nothing typed' & 'correctly typed' cases. This also makes expected_original redundant again.

Style: %s/provided/typed/g

Style: rename one ch → c

Testcase: whitespace_is_trimmed: added a check for the "correctly typed" path and renamed it to tags_removed (there's no whitespace?)

Testcase: empty_input_shows_as_code: changed to also check that tags get trimmed

* [type:nc] – ignores combining characters

Adds a comparison variant to [type] which ignores when combining characters of the expected field are missing from the provided input. It still shows these characters in the 'expected' line for reference.

It's useful for languages with e.g. diacritics that are required for reference (such as in dictionaries), but rarely actually learned or used in everyday writing. Among these languages: Arabic, Hebrew, Persian, Urdu.

The bool 'combining' controls it as new final parameter of both relevant compare_answer functions. On the Python side, it's set to true by default.

Use on the note templates: [type:nc:field] (only the front needs to include :nc)

This also removes the need to have both variants of words/sentences present as separate fields, to show them redundantly, etc.

* typeanswer: simplify by using nfkd throughout

Requires adjusting two testcases, but both render exactly the same in Anki itself.

On NFC vs. NKFD: https://stackoverflow.com/a/77432079

* typeanswer: 'simplify' by removing normalize_typed (requiring a bool parameter)

I'd prefer to keep this extra method.

* typeanswer: micro-optimize vectors

Should get rid of most relocations, at the expense of over-allocating.

On Vec's (String's) behavior: https://stackoverflow.com/a/72787776

* Mark `combining` as private

typeCorrect is not marked as private either, but we can at least do
the right thing for newly-added code.

* Revert "typeanswer: micro-optimize vectors"

This reverts commit 9fbacbfd19.

* Revert "typeanswer: 'simplify' by removing normalize_typed (requiring a bool parameter)"

This reverts commit df2dd3394e.
2024-09-30 23:11:51 +10:00
Jarrett Ye
79592730ee
Feat/forgetting curve in card info (#3437)
* add elapsed time into revlog-table

* add stability into revlog-table

* add Graph of forgetting curve

* fix eslint

* add radio buttons of timeRange

* add revlog filter && return [] for new card

* format

* translatable string & disable if using SM-2

* elapsedTime should skip manual or filtered review

* add HoverColumns

* fix eslint

* add stability to tooltip & use timeSpan

* reuse translatable strings

* distinguish daysSinceFirstLearn and elapsedDaysSinceLastReview

* Date x-axis & toLocaleString

* Temporarily hide elapsed/stability columns (dae)

https://github.com/ankitects/anki/pull/3437#issuecomment-2378851900
2024-09-27 19:32:40 +10:00
Jarrett Ye
3912db30bb
Feat/true retention stats (#3425)
* Feat/true retention stats

* ./ninja fix:minilints

* use translatable strings & update style

* remove card couts & add more translatable strings

* Update statistics.ftl

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* add Estimated total knowledge (cards)

---------

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
2024-09-22 19:00:27 +10:00
Ben Nguyen
77fb0fb708
Possible to show “last” subdeck name in Browser? (#3387)
* elide middle of deck names

* Update CONTRIBUTORS

* made elide mode enum

* add elide mode field

* fix enum number

* remove dataclass decorator

* Update CONTRIBUTORS

* format rust code

* Update CONTRIBUTORS

* formatting

* Update CONTRIBUTORS

* fix type hint

* Update CONTRIBUTORS
2024-09-20 20:33:28 +10:00
Abdo
880c7d366c
Fix graph averages (#3406)
* Fix graph averages

* Fix formatting
2024-09-11 02:18:53 +07:00
Arthur Milchior
ce2f4136ea
Empty cards become undoable (#3386)
* Empty cards is undoable

If there was a reason for this operation not to be undoable, I can't easily guess it. My main hyposhesis was that the number of deleted card may be too big. But I realized that deleting a deck is undoable and may delete as many note.

As you may know, I realized that only the undoable operations triggered notification in AnkiDroid that we may have to update the UI. And while I just wanted to trigger more notifications, some reviewers thought it would be nicer if the operation were returning a OpChanges. So here it's done. If you would please consider merging it.

I decided to introduce a new string because the closest strings I could find currently are "Empty cards..." and the trailing commas don't seem nice in "undo". And the title, which we may not be able to reuse in all language

* Don't count cards that have already been removed (dae)
2024-08-29 20:06:41 +07:00