-
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
- Oct 2024 (1)
- Sep 2024 (1)
- Jun 2024 (2)
- May 2024 (4)
- Apr 2024 (3)
- Mar 2024 (1)
- Feb 2024 (1)
- Dec 2023 (1)
- Nov 2023 (2)
- Oct 2023 (2)
- Apr 2023 (2)
- Mar 2023 (2)
- Feb 2023 (1)
- Jan 2023 (2)
- Dec 2022 (1)
- Nov 2022 (2)
- Oct 2022 (3)
- Sep 2022 (1)
- May 2022 (4)
- Apr 2022 (1)
- Feb 2022 (2)
- Jan 2022 (2)
- Dec 2021 (4)
- Nov 2021 (2)
- Oct 2021 (2)
- Sep 2021 (2)
- Aug 2021 (1)
- Apr 2021 (2)
- Feb 2021 (3)
- Jan 2021 (3)
- Dec 2020 (1)
- Nov 2020 (1)
- May 2020 (1)
- Apr 2020 (1)
- Jan 2020 (1)
- Oct 2019 (1)
- Sep 2019 (1)
- Aug 2019 (4)
- Jul 2019 (3)
- Jun 2019 (1)
- May 2019 (1)
- Mar 2019 (2)
- Jan 2019 (1)
- Nov 2018 (3)
- Oct 2018 (8)
- Sep 2018 (4)
- Aug 2018 (3)
- Jul 2018 (1)
- Jun 2018 (4)
- May 2018 (1)
- Apr 2018 (1)
- Mar 2018 (1)
- Jan 2018 (1)
- Dec 2017 (6)
- Nov 2017 (4)
- Oct 2017 (4)
- Sep 2017 (5)
- Aug 2017 (5)
- Jun 2017 (3)
- May 2017 (2)
- Apr 2017 (3)
- Mar 2017 (7)
- Feb 2017 (10)
- Jan 2017 (11)
- Dec 2016 (6)
- Nov 2016 (5)
- Oct 2016 (6)
- Sep 2016 (7)
- Aug 2016 (3)
- May 2016 (1)
- Mar 2016 (2)
- Jan 2016 (1)
- Dec 2015 (3)
- Nov 2015 (1)
- Oct 2015 (1)
- Sep 2015 (7)
- Jul 2015 (2)
- Jun 2015 (1)
- May 2015 (5)
- Apr 2015 (4)
- Mar 2015 (5)
- Feb 2015 (4)
- Jan 2015 (5)
- Dec 2014 (4)
- Nov 2014 (3)
- Oct 2014 (2)
- Jun 2014 (1)
- Apr 2014 (2)
- Mar 2014 (4)
- Feb 2014 (3)
- Jan 2014 (4)
- Dec 2013 (2)
- Oct 2013 (1)
- Sep 2013 (1)
- Jun 2013 (4)
- May 2013 (1)
- Mar 2013 (1)
- Jan 2013 (2)
- Oct 2012 (2)
- Aug 2012 (1)
- Jul 2012 (2)
- Jun 2012 (2)
- May 2012 (1)
- Mar 2012 (2)
- May 2011 (1)
- Apr 2011 (4)
- Mar 2011 (3)
- Feb 2011 (2)
- Jan 2011 (2)
- Dec 2010 (8)
- Nov 2010 (8)
- Oct 2010 (3)
- Sep 2010 (3)
- Aug 2010 (1)
- Jul 2010 (2)
- Jun 2010 (5)
- May 2010 (1)
- Apr 2010 (3)
- Mar 2010 (4)
- Feb 2010 (2)
- Jan 2010 (1)
- Dec 2009 (5)
- Nov 2009 (5)
- Oct 2009 (1)
- Aug 2009 (1)
- May 2009 (5)
- Apr 2009 (2)
- Mar 2009 (1)
- Feb 2009 (2)
- Jan 2009 (2)
- Nov 2008 (1)
- Oct 2008 (1)
- Sep 2008 (1)
- May 2008 (2)
- Apr 2008 (1)
- Feb 2008 (6)
- Jan 2008 (5)
- Dec 2007 (6)
- Oct 2007 (1)
- Sep 2007 (2)
- Aug 2007 (3)
- Jun 2007 (1)
- May 2007 (5)
- Apr 2007 (1)
- Mar 2007 (2)
- Feb 2007 (1)
- Jan 2007 (4)
- Dec 2006 (3)
- Aug 2006 (1)
- Jun 2006 (3)
- Apr 2006 (6)
- Mar 2006 (8)
- Feb 2006 (1)
- Jan 2006 (4)
- Nov 2005 (1)
- Oct 2005 (4)
- Sep 2005 (1)
- Aug 2005 (11)