Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/flashcard review again rating #225

Merged
merged 89 commits into from
Dec 20, 2021

Conversation

fabd
Copy link
Owner

@fabd fabd commented Dec 9, 2021

  • "Again" answer is always shown in "Free" and SRS modes
    • The button is another shade of red, to suggest it will fail the card as "No" would
    • Again rating NOT followed by HARD/YES/EASY in the same review session, is rated the same as a "No" => the card goes to the Forgotten/Restudy pile
    • Again rating followed by HARD/YES/EASY => the card is rated as if it was a new card, effectively bypassing the Forgotten/Restudy pile. AGAIN + HARD = 1 day interval, AGAIN+YES = 2-4 days, etc.
  • a small icon is displayed next to the keyword on the flashcard to distinguish a repeated card

Potential gotchas / todos

Since "again" cards are added to the end of the review pile for another test, it can take a while before seeing them, the user needs to go through the entire pile first, in order to repeat cards

To alleviate this, and to partly address the lack of a "daily limit", one idea would be to split the due cards in smaller sessions, by default, for example 25 cards. -- and perhaps add some UX to allow user to bypass this, or an option in SRS settings to disable it altogether. Then if the user has 50 due cards, they can clear the due cards in 2 sessions, allowing to see repeat cards sooner, in each session.

- use flex
- use flex grow 1 / 2 so the main positive answers (Hard/Yes/Easy) are
  proportionally a bit wider than No/Again
- "Again" is gray for now until I figure a good color for it
…c props

Pepare the ground for future kanji/vocab review Vue templates, which
will itself create an instance of FlashcardReview.
Move action event handling outside of the class, to `ReviewPage`
which may eventually be a master Vue template for the review page.
Use `flex-2` with 0% flex-basis, more consistent with `flex-1`.
The original code was perhaps overly memory-aware; and clearing fc data
from the cache as the review advances.

To simplify "again" rating implementation, keep the cache items, so they
are available when repeating a card in the same review session.
- remove unnecessary num_prefetch setting, fixed value is fine for now
- numCards : since again cards get added to the end of the stack, we
  keep the count of *unique cards* in the initial items[] array
- numRated : count of non-"again" answers, when numRated === numCards
  the review is complete (can no longer use position === items.length
  since again cards are added at end if items[] during review)
- remove `prefetchPos`, use a "modulo" logic instead to sync with server
  every N cards (more efficient)
- update constants to something more consistent and readable
- normalize old ratings to the newer ones in the reviewSync API
  action, for Kanji Ryokucha compatibility
Free review shouldn't really accept anything but NO/AGAIN/YES but
for now the keyboard shortcuts still handle HARD/EASY.

Simple fix for now:

- we don't really need the assertion, really the ratings could be
  anything and we don't care so long as we handle it in the review
  summary

- in review summary, just count HARD/YES/EASY as a "pass", and ignore
  whatever other ratings are, consider them as a "fail"

Fixes #199 Free Review "End" breaks when using SRS shortcuts
The API docs doesn't document `kanji` as a prop. Only `id` which is the
UCS code for the kanji.
Basic tests with lime.php, not in public repo.
- display the flashcard ratings in the SRS review summary table

- don't POST fc_pass, fc_fail at end of review, get the pass/fail
  counts from the cached ratings instead

- move some templating conditionals to the template

- don't store start/pass/fail in db, drop cols in `active_members`

TODO

Maybe someday we'll store the cached ratings in another db table,
so all the ratings are applied at once at end of review. Allowing to
browse the last review session summary even when the session is gone.
Changes for simple file logger class (not in public repo).
@fabd fabd merged commit 08bab6e into master Dec 20, 2021
@fabd fabd linked an issue Dec 20, 2021 that may be closed by this pull request
@fabd fabd added the feature label Dec 20, 2021
@fabd fabd self-assigned this Dec 20, 2021
@fabd fabd linked an issue Dec 20, 2021 that may be closed by this pull request
@fabd
Copy link
Owner Author

fabd commented Dec 20, 2021

Close #184

fabd added a commit that referenced this pull request Dec 20, 2021
@fabd fabd deleted the feature/flashcard-review--again-rating branch January 6, 2022 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant