Commit graph

34 commits

Author SHA1 Message Date
junlu592
8ec68182af small review changes 2025-12-14 12:17:38 +01:00
junlu592
d1f0ef6dfe suggested changes to minimize difference from main 2025-12-14 10:56:04 +01:00
junlu592
e14c8bf98d merged commits from git 2025-12-12 14:43:18 +01:00
junlu592
d00dc07613 adjusted last bin labeling with xmin 2025-12-12 14:38:23 +01:00
Junia Mannervik
7a883600ab
Update ts/routes/graphs/reviews.ts
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
2025-12-11 21:48:02 +01:00
Junia Mannervik
d737f5da72
Update ts/routes/graphs/reviews.ts
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
2025-12-11 21:47:21 +01:00
junlu592
ce9b087190 corrections from ninja check 2025-12-10 12:52:56 +01:00
junlu592
8ab9e54a62 bin merging logic removed, since totals are correctly calculated anyways 2025-12-10 12:49:40 +01:00
junlu592
722c5a58a5 added comments to review.ts 2025-12-10 10:50:30 +01:00
junlu592
bc6bd05fee ninja check fix, let -> const and removed empty line 2025-12-09 15:01:31 +01:00
junlu592
a2be2b964f fixed even bin sizes (0-4 days and 360-364 days) for year review graph 2025-12-09 14:56:30 +01:00
junlu592
6e341d5e07 fixed labels for bins, and made sure year is 365 days 2025-12-09 13:17:59 +01:00
junlu592
0c2c5c6a1c simplified code in time.ts and review.rs and pass bin boundaries directly to time.ts 2025-12-02 16:28:00 +01:00
junlu592
c457b43a87 reverted unneccessary changes to xMax 2025-12-02 12:18:46 +01:00
junlu592
002b39e89d removed a whitespace 2025-12-02 11:54:05 +01:00
junlu592
8135bc24ee changed xMax, so today is included in month and 3months 2025-12-02 11:53:04 +01:00
junlu592
6ebe80775e reviewed code and simplified functions in review.ts 2025-12-02 11:29:32 +01:00
junlu592
9ff49ce111 fixed structure for ninja checks 2025-12-01 13:21:02 +01:00
junlu592
8a8f07c3c3 bin labels and totals correct for year, review 2025-12-01 13:16:47 +01:00
junlu592
2da59a4768 fixed formating for ninja testing 2025-12-01 12:59:10 +01:00
junlu592
2db3aed716 Fix reviews graph: correct Year range to 365 days 2025-12-01 12:55:16 +01:00
junlu592
e3546ea496 modified youngest bar in reviews to include today aswell 2025-11-21 15:32:16 +01:00
junlu592
a3fc69fe89 oldest bin width modified to match other bins in reviews.ts 2025-11-21 12:52:51 +01:00
junlu592
d0cffd915d fix statistics calendar and review graph range labeling and removed earlier changes 2025-11-20 14:10:58 +01:00
junlu592
26e5ae2f67 update graph so that the tooltip day label uses integer day boundaries
and removed earlier fix which didnt work
2025-11-20 14:08:34 +01:00
Thomas Rixen
a77ffbf4a5
Statistics "Reviews" graph, make the color of "New" and "Learning" cards consistent with the color of card count (#4245)
* Statistics Reviews graph, make the color of New and Learning cards consistent with the color of card count

* removing bleu warning

* contributors
2025-08-06 18:07:10 +10:00
user1823
5cc3a2276b
Fix repeated ticks in reviews graph (#4108)
Regressed in #4086
2025-06-21 19:17:18 +07: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
86ed715458
Hide AverageForDaysStudied when studiedPercent = 100 (#3888)
Showing both is redundant when studiedPercent is 100
2025-03-29 05:15:41 +03:00
Damien Elmes
169d85883d Reviews graph: orange -> blue
Closes #3764
2025-01-26 17:45:14 +11:00
wackbyte
b6afddd181
Reduce use of type casting (#3723) 2025-01-12 20:05:05 +11:00
Abdo
bf46a5f08c
Update to Svelte 5 (#3292)
* Update to Svelte 5

* Fix `<tr> is invalid inside <table>`

* Update sveltekit-svg to match svelte version

Fixes deck options failing to load, and a bunch of warnings with
./yarn dev

* Fix graph tooltips

* Fix editor loading

* Fix MathJax editor not loading

* Formatting

* Fix new formatting errors

* Merge remote-tracking branch 'origin/main' into svelte5

* Remove slot inside EditorToolbar

I think this is just stray code left over from a refactor, but I'm
not 100% sure.

Fixes
Error: Object literal may only specify known properties, and 'children' does not exist in type '{ size: number; wrap: boolean; api?: Partial<EditorToolbarAPI> | undefined; }'. (ts)
<div class="note-editor">
    <EditorToolbar {size} {wrap} api={toolbar}>
        <slot slot="notetypeButtons" name="notetypeButtons" />

* Fix component typing error

* Comment out svelte/internal exports, so editor loads

* Fix image occlusions in editor

* Revert "Remove slot inside EditorToolbar"

This reverts commit b3095e07ac,
which prevented the Preview button from showing in the browser.

This will break our tests again.

* Update vite

* Disable routes/tmp for now

* Fix references issue in routes/tmp
2024-09-25 18:49:07 +10:00
Abdo
50772eeece
Fix '366 of 365 days studied' (#3182)
* Fix '366 of 365 days studied'

* Apply nicing when GraphRange.AllTime is selected
2024-05-06 23:50:27 +10: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
Renamed from ts/graphs/reviews.ts (Browse further)