ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
8.71k stars 2.24k forks source link

[Feature request] Add support for the custom study feature recently implemented into Anki (2.1.55) #12620

Closed Arbitrate3280 closed 1 year ago

Arbitrate3280 commented 2 years ago

Hi! I'm wondering if the latest alphas support the CustomData feature recently implemented in Anki.

It's needed to experiment with a new custom scheduler going around lately.

https://github.com/ankitects/anki/issues/2039 https://github.com/ankitects/anki/pull/2040 https://forums.ankiweb.net/t/some-problems-in-implementing-a-state-of-the-art-srs-scheduler-on-anki/22705/5 https://www.reddit.com/r/Anki/comments/x9jjcx/implement_a_new_spaced_repetition_algorithm_based/inpm44b/

welcome[bot] commented 2 years ago

Hello! 👋 Thanks for logging this issue. Please remember we are all volunteers here, so some patience may be required before we can get to the issue. Also remember that the fastest way to get resolution on an issue is to propose a change directly, https://github.com/ankidroid/Anki-Android/wiki/Contributing

dae commented 2 years ago

The whole custom study feature is not supported yet.

Arbitrate3280 commented 2 years ago

I see, I guess I'll leave this open as a feature request then, thank you!!

BrayanDSO commented 2 years ago

If I got it right, Anki has a shiny new way to customize the scheduler via JavaScript (https://faqs.ankiweb.net/the-2021-scheduler.html#add-ons-and-custom-scheduling), which works on the v3 scheduler and can be configured on the new deck options screen (#12175). Looks very cool.

With the new backend and deck options screen, is there anything more to change in order to implement this, @dae?

dae commented 2 years ago

It will require:

See V3CardInfo in reviewer.py and the code in mediasrv.py for more. The API has slightly changed in 2.1.55, so probably not worth looking into this until that releases.

github-actions[bot] commented 1 year ago

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

Arbitrate3280 commented 1 year ago

go away bot

L-M-Sherlock commented 1 year ago

Two months on, Anki for PC 2.1.55 stable has been released and I wonder if this feature will be supported in AnkiDroid 2.16?

galantra commented 1 year ago

https://github.com/open-spaced-repetition/fsrs4anki/issues/107#issue-1508088316

So, I can tell you. customData is a field specific to scheduler v3. We don’t support it. And sadly, we don’t even have an idea of when we’ll actually support it, because Android Play store does not allow us to update the app until we make some complex changes.

Upon reading this, I was not sure whether

  1. there is a technical obstacle in Play Store that prevents the use of customData, or
  2. there are more pressing issues than customData (, which are related to the Play Store).

If the technical obstacle is the case, perhaps customData could already be included in Github and/or F-Droid (pre-)releases.

I have searched through the issues. Probably this is meant? https://github.com/ankidroid/Anki-Android/issues/9259

BrayanDSO commented 1 year ago

In a nutshell,

Arthur-Milchior commented 1 year ago

@L-M-Sherlock I don’t know how much you can infer from Brayan’s statement regarding your specific question. No, it quite probably won’t be available in 2.16. That is not a priority. The only thing that is needed for 2.16 is the storage permission. Once we have it and are confident in it, we release it. All contributors are volunteers, and one can decide that it is their priority. But as far as I know, nobody decided to start working on it. But I’d be surprised if it is deemed stable enough that we are confident to release it outside of the advanced settings.

mikehardy commented 1 year ago

Not disagreeing with anything from Brayan or Arthur - on the contrary their statements are all correct - just chiming in to say I would welcome this as a contribution and all of our infrastructure work to support 2.1.55 desktop release + to support javascript programming APIs etc etc is all aimed at making things like this possible. But it will need someone with motivation to adopt it as a feature they will work on (as Arthur mentioned - likely behind an advanced toggle at first, or something similar that makes sure it won't destabilize the non-custom-scheduling code paths)

doctorman commented 1 year ago

Not disagreeing with anything from Brayan or Arthur - on the contrary their statements are all correct - just chiming in to say I would welcome this as a contribution and all of our infrastructure work to support 2.1.55 desktop release + to support javascript programming APIs etc etc is all aimed at making things like this possible. But it will need someone with motivation to adopt it as a feature they will work on (as Arthur mentioned - likely behind an advanced toggle at first, or something similar that makes sure it won't destabilize the non-custom-scheduling code paths)

Do you recomend enabling the v3 scheduling on desktop or does it cause issue with the current play store version or even with the alpha builds? as a beta option which alpha is the most stable? the latest one?

Ceynou commented 1 year ago

Not sure if I understood correctly but if customData is ever supported it would be nice to have it start running before rendering the card so the template can depend on customData value, I have this variable and the card display one thing or the other depending on its value

globalThis.intervalTest = states.current.normal.review.elapsedDays || 0;

It might already be working correctly but the template is displaying both f1 and f2

<script>
  qFade = 0; //make it so the card appears immediately instead of fading in
    f1 = document.getElementById("field1");
    f2 = document.getElementById("field2");
    if (globalThis.intervalTest < 10){
        f1.style.display = "None";
    } else {
        f2.style.display = "None";
    }
</script>

<div id="field1">
thing one
</div>

<div id="field2">
thing two
</div>
L-M-Sherlock commented 1 year ago

Congratulations for the release of 2.16! I notice that the change log said that "We include anki 2.1.61 now, we’re fully up to date!" Does it mean CustomData feature has been implemented in 2.16?

https://ankidroid.org/docs/changelog.html#_version_2_16_2_20230726

user1823 commented 1 year ago

Does it mean CustomData feature has been implemented in 2.16?

No. The custom scheduling feature is not implemented yet. I think that they plan to release it with 2.17.

"We include anki 2.1.61 now, we’re fully up to date!"

In my opinion, this part of the changelog is misleading. There are several features where AnkiDroid lags behind Anki.

xificurC commented 1 year ago

The commit closing this says "enables FSRS". I'm lost in the details here.

If one wants to test the FSRS algorithm in AnkiDroid, where do we stand on this? Or is FSRS included in the latest release?

Arbitrate3280 commented 1 year ago

It has been introduced in this commit: https://github.com/ankidroid/Anki-Android/pull/14171

No new release has been made yet that contains this change. The next time a release is made, it will have it.