• 31 January 2023Fixed : Study search by keyword issue

    A small fix today addresses the following issue:

    Searching for "-times" and clicking the corresponding kanji (#630) in the results takes the user to "olden times" (#35)

    Thanks to peyton for reporting issue #288 on Github!

    This is a fairly small change but since there is a change in behaviour to how the dropdown works I thought I'd go Full Monty on this, as the British say :)

    Sooooo. The main reason this bug happened, is because up until today the study search would redirect you to a URL that contained the keyword, for example /study/kanji/one. This isn´t a good idea because keywords can be customized by the user.

    The website also still supports URLs with frame numbers such as /study/kanji/1. This ALSO isn't a good idea because indexes can change, as the switch between 5th and 6th RTK editions made us painfully aware (and I'm sure lots of people who made their own apps and tools that dealt with RTK indexes).

    So I took the more general approach here to this fix, which is that when you pick a keyword in the "autocomplete" dropdown, it will do a search by kanji. No more shenanigans with odd punctuation in keywords, and proper encoding of these in the URL. Simple, short URLs.

    So if you lookup "times" and you select "-times" as you press enter, it will go to /study/kanji/回.

    THAT is the correct , most portable study page URL which you should use if you ever want to link to a Study page from outside.

    Lifehacks

    If you're still reading, here is a small fairly obscure but potentially keystroke-saving tip : if you have a kanji in the search term - it will use the first one. This isn't new, the search box always behaved like this and it can be handy if eg. you just copy/paste a Japanese word. As long as you are interested in the first kanji at least, no need to delete the extra characters, just paste eg. 食べています and you'll get to the page for .

    Study search UX ideas

    This actually gave me an idea if I ever get around to refactor the dropdown - which I really should doas it uses really obsolete javascript...

    I thought it could be useful, if you paste in a Japanese compound, that the dropdown shows the kanji in the word, so you can lookup the first, or second kanji. Perhaps only mildly useful?

    Another thing I'd like to address, as I often want to do this, is to have the dropdown show the kanji that matches a frame number. Often times, I want to type eg. 100 and just see what keyword it is. Admittedly this is probably more something I do as the developer - but if I refactor the dropdown it should come pretty much for free anyway so I put it on my list.

    Another thing I should fix eventually is the custom keywords. Due to recent refactorings I do in fact have access to the user's custom keywords, so I should be able to put them in the search box's "autocomplete" functionality.

    Small update to Export Flashcards

    Also comes to mind, there was a small update to the Flashcards Export - Sunday January 22 to be exact. This update adds your selected ("starred") example words to the flashcards CSV export. Thanks to Dragonforge for the suggestion and a PR by MarkMcCaskey!

    On further thought vocabulary has always been kind of half finished feature. I'm thinking a good step forward could be to have a Vocabulary List page where you would be able to see all the words you added to flashcards, and let you sort and/or filter it - perhaps for printing before you go out and to study on the go? Let me know if you like the idea of have any similar ideas, it can help me figure out what would actually be useful.

    Ramblings

    Hope you enjoyed this unnecessarily long post. Seriously though, it's so good to be able to sit down and code for a bit! Last few weeks have been very frustrating. My CMOS battery died so I had to replace that. The "Docker" developing environment started giving me file permission issues - something I still need to fix and I hate these kind of admin/backend chores with a passion. Don't you hate it when something just works for months on end, and then one day it decides it no longer wants to work? The life of a developer... Wifi also joined in the party and decided it didn't want to work anymore, so I had to order switch, cables etc. I'm glad I "wired" my PC though, as I haven't used Steam Link in a long while and it is actually pretty cool! I'm eager to play Rogue Legacy 2 as the first one was awesome.

By Month