-
Notifications
You must be signed in to change notification settings - Fork 20
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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.
Before prod deployment: $ composer dumpautoload -a -o --no-dev https://getcomposer.org/doc/articles/autoloader-optimization.md#autoloader-optimization
Changes for simple file logger class (not in public repo).
Close #184 |
fabd
added a commit
that referenced
this pull request
Dec 20, 2021
Feature/flashcard review again rating Close #184
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.