GithubHelp home page GithubHelp logo

lemmmy / kanjischool Goto Github PK

View Code? Open in Web Editor NEW
15.0 4.0 2.0 2.96 MB

Alternative web client for WaniKani

Home Page: https://kanji.school

License: GNU Affero General Public License v3.0

JavaScript 0.82% HTML 0.37% TypeScript 98.56% CSS 0.20% Dockerfile 0.04%
wanikani japanese-language reactjs

kanjischool's Introduction

Lemmmy Donate on PayPal

I'm Lemmmy. I create software as a hobby, with a variety of ongoing projects such as KanjiSchool, KristWeb, goscribe, and many Tetris-related programs. I also host and maintain the SwitchCraft ComputerCraft server, the ComputerCraft Wiki and Forums, and much more.

kanjischool's People

Contributors

lemmmy avatar maaku avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

maaku slice

kanjischool's Issues

Syncing reviews stuck and frequent connection errors

Hey! First of all I love your app and there is no big problem preventing me from using it.

The first thing is only a visual annoyance, the syncing reviews process seem to be stuck at 4000/4391 (I have no idea what those numbers are since I've never had so much reviews). Yesterday it was stuck at exactly 3000 the whole day.
image

Another issue quite annoying but which doesn't seem to impact the usability is that it very often gives me notifications saying "unable to connect" (or something like that), even though my Internet connection has no problem.

And one final thing, in the devtools console I get:
sentry.lemmmy.pw/api/5/envelope/?sentry_key=99545754915c403682949277e401d606&sentry_version=7:1 Failed to load resource: net::ERR_NAME_NOT_RESOLVED
and a lot of:
Error: timeout of 60000ms exceeded

These won't prevent me from using your app but I guess it's good to let you know!

Option to Hide Current SRS Stage of Review Item

I keep catching myself looking at it to figure out how recently I last came across the item before actually trying to evaluate the reading/meaning. In a few instances it's helped me cheese an answer.
image

Add items to study queue from `/items` page

I would love to be able to add items to my study queue from /items/* [1]. In the case of /items/wk, it would be really nice to be able to individually add radicals/kanji/vocab, like what can be done with the advanced search [2].
[1] image
[2] image

Subject syncing broken

As of 2023-06-21, KanjiSchool can't seem to sync subjects anymore. This happens when loading the database and when creating one from scratch. I suspect that this has to do with recent subjects added by Tofugu.

I get this error:

TypeError: Cannot set properties of undefined (setting 'ちょっと')
    at syncSubjects.ts:109:44
    at l (runtime.js:63:40)
    at Generator._invoke (runtime.js:293:22)
    at Generator.next (runtime.js:118:21)
    at r (asyncToGenerator.js:3:20)
    at c (asyncToGenerator.js:25:9)

I used DevTools to pause on the relevant line (slugCache[subject.object][subject.data.slug] = subject.id;), so I could see the contents of the subject variable:

{
    "id": 9176,
    "object": "kana_vocabulary",
    "url": "https://api.wanikani.com/v2/subjects/9176",
    "data_updated_at": "2023-06-21T08:12:23.392979Z",
    "data": {
        "created_at": "2022-09-14T11:39:10.684981Z",
        "level": 10,
        "slug": "ちょっと",
        "hidden_at": null,
        "document_url": "https://www.wanikani.com/vocabulary/%E3%81%A1%E3%82%87%E3%81%A3%E3%81%A8",
        "characters": "ちょっと",
        "meanings": [
            {
                "meaning": "A Little",
                "primary": true,
                "accepted_answer": true
            },
            {
                "meaning": "A Moment",
                "primary": false,
                "accepted_answer": true
            }
        ],
        "auxiliary_meanings": [
            {
                "type": "whitelist",
                "meaning": "A Bit"
            },
            {
                "type": "whitelist",
                "meaning": "A Few"
            },
            {
                "type": "whitelist",
                "meaning": "For A Moment"
            },
            {
                "type": "whitelist",
                "meaning": "A Minute"
            },
            {
                "type": "whitelist",
                "meaning": "For A Minute"
            },
            {
                "type": "whitelist",
                "meaning": "Some"
            }
        ],
        "parts_of_speech": [
            "adverb"
        ],
        "meaning_mnemonic": "You <reading>chort</reading>le (<ja>ちょっと</ja>) <vocabulary>a little</vocabulary> at a silly joke. You can’t help chortling for <vocabulary>for a moment</vocabulary>. Go ahead, chortle just a little, for just a moment, to help you remember this word.",
        "context_sentences": [
            {
                "en": "Oh, wait a moment!",
                "ja": "あ、ちょっとまって!"
            },
            {
                "en": "I think it's a little different.",
                "ja": "ちょっとちがう気がする。"
            },
            {
                "en": "I'll think about it a little.",
                "ja": "ちょっと考えてみるよ。"
            }
        ],
        "pronunciation_audios": [
            {
                "url": "https://files.wanikani.com/4zm5893mm9dnnxlafk7dgmsfij34",
                "metadata": {
                    "gender": "female",
                    "source_id": 44712,
                    "pronunciation": "ちょっと",
                    "voice_actor_id": 1,
                    "voice_actor_name": "Kyoko",
                    "voice_description": "Tokyo accent"
                },
                "content_type": "audio/webm"
            },
            {
                "url": "https://files.wanikani.com/asp3ls25zlp1uwk9e0ve84snccfv",
                "metadata": {
                    "gender": "female",
                    "source_id": 44712,
                    "pronunciation": "ちょっと",
                    "voice_actor_id": 1,
                    "voice_actor_name": "Kyoko",
                    "voice_description": "Tokyo accent"
                },
                "content_type": "audio/ogg"
            },
            {
                "url": "https://files.wanikani.com/hxahaewflbselg92c6g2l1bzwvj4",
                "metadata": {
                    "gender": "female",
                    "source_id": 44712,
                    "pronunciation": "ちょっと",
                    "voice_actor_id": 1,
                    "voice_actor_name": "Kyoko",
                    "voice_description": "Tokyo accent"
                },
                "content_type": "audio/mpeg"
            },
            {
                "url": "https://files.wanikani.com/n4ps1tzd3qso906dxewshfvezw3o",
                "metadata": {
                    "gender": "male",
                    "source_id": 44771,
                    "pronunciation": "ちょっと",
                    "voice_actor_id": 2,
                    "voice_actor_name": "Kenichi",
                    "voice_description": "Tokyo accent"
                },
                "content_type": "audio/webm"
            },
            {
                "url": "https://files.wanikani.com/kp83b9sep5qbxq0of2jhg1fhh37o",
                "metadata": {
                    "gender": "male",
                    "source_id": 44771,
                    "pronunciation": "ちょっと",
                    "voice_actor_id": 2,
                    "voice_actor_name": "Kenichi",
                    "voice_description": "Tokyo accent"
                },
                "content_type": "audio/ogg"
            },
            {
                "url": "https://files.wanikani.com/dqggbzm8faf7znf7ce133m2j849k",
                "metadata": {
                    "gender": "male",
                    "source_id": 44771,
                    "pronunciation": "ちょっと",
                    "voice_actor_id": 2,
                    "voice_actor_name": "Kenichi",
                    "voice_description": "Tokyo accent"
                },
                "content_type": "audio/mpeg"
            }
        ],
        "lesson_position": 55,
        "spaced_repetition_system_id": 1
    }
}

Hopefully this can be of use.

Curved line to represent Cumulative Upcoming Reviews is misleading/odd

The intent of the line is good, and I do like having it, but the fact that it's curved is odd. Without looking at the bars beneath the line it would seem like the cumulative reviews gradually increase from 16:00 to Sat 18:00 in the image below. The line could probably benefit by having steps instead of a curve.
image

Slight lesson/review count mismatch

Following on from b4c8027, there appears to be a slight mismatch between lesson+review counts. Not sure if a subject is being completely miscounted. It could just be a counting issue, the subjects might still be eligible for the queue.

WaniKani often changes level requirements for subjects, so that could be related too.

image
image

Debounce enter inputs

On some keyboards it's fairly easy to accidentally hit enter twice very quickly, which could have you mark an answer as wrong. Add a (toggleable) time limit/debounce to the enter hotkey for questions.

[Feature Request] Allow disabling of the 'undo' capability.

I find myself overusing the undo capability when I get a review incorrect, which I feel doesn't help me recall as well as having to redo an incorrect card.

Having the ability to disable this feature (within the settings perhaps?) would be wonderful for me, as I feel I am 'cheating' by using this feature.

(I have no willpower to not use it, heh)

Lessons broken after level reset

It appears that KanjiSchool doesn't account for level resets, resulting in several issues:

  1. I am currently at level 5; previously, I was at level 7 before resetting. KanjiSchool offers me lessons from levels 5, 6, and 7, despite levels 6 and 7 being locked. When attempting to complete lessons from these levels, the WaniKani API returns error 422: "assignment must be unlocked, but not started."
  2. The "Time on level" metric calculates from the first time I achieved the level. I would expect it to calculate from the most recent achievement of the level.
  3. A bit philosophical: I see the value of the "Started" metric in informing how much time it took me to learn the language at the current level. However, in cases of breaks, it doesn't accurately reflect this. For example:
    Let's consider a person who discovered WaniKani, completed 3 levels in 30 days (10 days per each), then dropped off and returned after 3 years, opting to reset their level to 2. The "Started" metric would display 1125 days (3653+103). This doesn't accurately represent the time it took to complete levels up to 2; rather, it indicates when the person initially discovered WaniKani. I believe this information isn't worth displaying every time a person enters KanjiSchool. Here are some ideas to improve it:
    a) Add an option to exclude time that was subjected to level reset, so in that case it would display 20 days.
    b) Add an option to subtract an arbitrary number so users can adjust it manually.
    c) Introduce a new metric that shows the count of days with any WaniKani activity (though this raises the issue of activity becoming "undone" with a level reset)."

Add option to remove transitions during reviews

This might be a bit of a niche feature, but I think an option to disable transitions during reviews would be useful. While it's not the end of the world, I do consider them to be a little distracting at times. After having used the WaniKani lightning mode userscript, I've found that I prefer to review subjects without that minuscule amount of motion, as it feels more comfortable for my brain. It's slightly less mental work to visually process the movement, as small as that may seem. I think that it also makes the overall session feel "faster", as progress from one card to the next is literally instant.

Hopefully this feature request doesn't sound too nitpicky, but I'd definitely benefit from this seeing as I sit down and use KanjiSchool for at least an hour every day.

This feature can also be automatically enabled by default if the user has reduced motion enabled, which is good for accessibility, although I haven't checked if KanjiSchool has any support for this already.

I might take a shot at implementing this eventually if I find the mental energy to do so. I think this block of code is responsible for the transition during reviews, but I haven't actually verified:

Prevent space from scrolling when getting an incorrect answer, since it moves onto the next item

This is a major nitpick, but I'd figure to open this issue anyways.

When getting an incorrect answer during reviews, I use the space hotkey to move to the next item. However, this triggers a brief scroll before moving on, which is quite disjointing to my eyes.

I investigated and found this code in SessionQuestionsPage.tsx:

  const onSpace = useCallback((e?: KeyboardEvent) => {
    debug("space pressed");
    if (incorrectAnswer !== undefined) {
      e?.stopPropagation();
      onIncorrectNext();
    }
  }, [incorrectAnswer, onIncorrectNext]);

It makes sense that this only stops propagation instead of dropping the event completely, because I'm assuming that would make pressing space inside of the search box or inside of a user-added synonym or note impossible (?)

What could potentially be done is to check if an <input> or similar element is currently focused, and allow the event to pass if so—otherwise, drop it. Another approach would be passing a ref to the containing page element that actually does the scrolling, and check if it's currently the target of focus.

Using keybind to add/remove from study queue functions inconsistently in some elements

This may be exclusive to firefox, when pressing q to add a items to the queue from the critical condition item, and when adding vocab from the search results (/search), the input inconsistently gets ignored. Usually if it's getting ignored it takes moving the cursor off the item, and back onto it to work, but even then sometimes it will work even if the first few times the input was ignored.

Feature ideas: Random fonts and phonetic components

Hey, it's me again! Again, I love your app, I've been using it for weeks without returning even once to WaniKani.
Back on WK I had 2 userscripts that were quite useful and that would be a good addition to Kanji School (I think).

  1. Random fonts for reviews (less indispensable but useful):
    Could be enabled in settings
    Useful since kanji often appear with different fonts in real life, so it's better to get used to it as early as possible

  2. Phonetic/semantic components in kanji page (would be really useful):
    That's really helpful to remember the pronunciation in lots of kanjis since it's not always obvious that a radical gives its pronunciation to a kanji.
    Ex: 仲's pronunciations (チュウ / なか) come from 中 which is the phonetic component.
    I believe most of the data needed for this would be in the WK userscript already so there wouldn't be a lot of work on that side.

I'd love to help and do a PR but unfortunately I still have trouble understanding TypeScript.
I can live without these features, but that'd be a nice improvement, I think.

Self Study "Playlists"

I'd like to be able to, in one click, start a self-study with a custom list of items. I imagine this could be a second option when the self study prompt appears in the bottom right. Playlists could appear next to the "Items" dropdown and search bar in the header.

Center the current week in the review heatmap

The closer we get to the end of the year, the less useful the heatmap is (see image). Github addresses this by putting the current week on the far right, with the prior 52 trailing behind. Since kanjischool presents both past and future reviews, having the current week in the middle could be more useful.
image

App ungracefully crashes in private windows

On Safari and Firefox, IndexedDB is not supported in private contexts, so the app fails to initialise the database and crashes. A more user-friendly error should be added for this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.