Upcoming Front-End Updates on WaniKani & Effect on Scripts

Hi Everyone,

Important announcement if you make scripts or use scripts.

We’re starting work on the WaniKani front-end code. Quick story is: we’re converting it to React. To start we’ll be touching the Lessons section, replacing it piece by piece. If everything works perfectly, it will look and feel exactly the same to start (though we’re planning to throw in user synonyms on the Lessons while we’re in there). Even if you don’t notice a difference in vanilla WaniKani, one thing will be affected: scripts! Although we don’t know specifically how many people use scripts in Lessons , we do know ~5-10% of our users use scripts, which is no small number. We had a lot of thinking to do.

What will this update do, and is it worth it in the end? On the less impactful side of the spectrum, this update will be good for bug fixes and performance. We’ll be able to make changes more quickly. When new features are introduced, bugs will be much easier to identify and deal with. Speaking of features (here’s the main reason we’re doing this), we’re working on some things, and we needed more flexibility in Lessons and Reviews to do them. I wish I could talk more about this now, but I think in the long-term, the overall benefit will become obvious, even if it’s a bit of a pain right now.

But, I’m here to talk about the short term! Because scripts are built on assumptions about the front-end code, and because we’re going to be changing it, some scripts will stop working. Scripts are going to break! In some cases, authors will need to update their scripts. In other cases, it may not be possible to update a script to be compatible. We’ll do our best to avoid this situation, and if we can’t we’ll try to address it in our own application or help users find a workaround.

We’ll try to make the transition as smooth as possible, and communicate about progress regularly. We’ll post smaller updates and guide(s) on the forums and do larger announcements on our developer/API email list. Before it goes live, we’ll put the changes on a public test server for script authors to try.

We very much admire the work and enthusiasm around scripts. The value you’ve added is awesome, honestly. It’s a scary change for everybody, I think, but in the end it will be good. Let us know if you have any questions. Myself or one of the other people on this project will do our best to give you an answer. Thank you!

Edit: I added groups to our email list, which was originally just for API updates, but now covers general developer kinds of things. If you signed up to the list previously, you’ll want to update your notification settings (unless you just want API updates, then you’re good). Just sign up for the list again, choose what you want to be notified about, and submit. As long as you used the same email, it should overwrite your email profile and you’ll be added to the notification groups you want to be on.

Related Posts / Update Posts:

  • Related Post, 1/23: UserScript Guidelines for Upcoming Front-End Updates
  • Update, 1/31: We wanted to update everyone that, well, we don’t have any updates yet. We’re working on laying down the groundwork before we incrementally replace components. We’ll be back here next week to let you know if we start deploying anything to our preview servers. - @gomakuma @WaniKaniJavi
  • Update, 2/7: Still quiet this week but we are wrapping up some changes today. Planning to post a preview server URL on Monday (2/10) for everyone to check out! - @gomakuma @WaniKaniJavi
  • Update, 2/11: Preview site, forum thread and email newsletter updated.
  • Update, 2/12: Added a note about making sure the @include whitelist on user scripts include preview.wanikani.com
  • Update, 2/21: Some changes coming on preview.wanikani.com on Monday (2/24). Working our way down the Lesson Quiz to convert the answer form and answer feedback to React, the Kana chart, Info and Audio button container, and the bottom right corner shortcut key map and contact link. Will post here and send out an email update when it’s live.
39 Likes

Sounds good. Would you be able to provide a beta environment for script authors to test their scripts on the new changes before the WK changes go live?

7 Likes

I think you’ll find most people who use scripts probably use at least one in lessons and/or reviews. Any script that actually manipulates the lesson/review content or order do so by hooking into $.jStorage. Keys like l/activeQueue, l/lessonQueue, etc. You can find a decent example of this for lessons in my Lesson Filter script.

As long as you still use that, the lesson and review scripts can probably still manage to work with some modifications. If you replace that with something that fully manages it internally (non-window functions), we’re in big trouble for those scripts, and I don’t think you’ll be happy with the blowback if literally all lesson/review scripts break and can’t be fixed.

If you decide to get rid of that for technical reasons, I highly recommend that you add public functions on window to allow scripts to get and set the lesson/review items. Even if you add more complex lesson/review ordering at a later date, I think allowing scripts to customize this would still be beneficial.

17 Likes

Hi @sornvru - I’m one of the devs at Tofugu. Yes, we’ll be putting the changes on a test server that everyone can access, and you’ll be able to test scripts there. We’ll let you know in the forums and the mailing list when the preview site is ready.

17 Likes

Timeline on dashboard please

11 Likes

YES!!!


Welcome @gomakuma! Also @TofuguJenny!

23 Likes

Awesome and welcome. I’m glad to see the team communicating earlier in the process.

While the majority don’t use scripts, for those of us who do, they are quite fundamental to the way we use WK, so keeping them working through any changes, especially to any scripts that hit into lessons and reviews is a very high priority.

I like the way this is being handled, so I’m optimistic and looking forward to seeing the new changes.

9 Likes

I’m sure it wasn’t an easy decision to do something that can greatly affect user scripts, since so many members rely on them.

It indeed sounds like a bit of a scary change, but I’m also excited to see what kind of changes and improvements the WK team is planning. It’s clear that you’re trying to accommodate scripts and script creators as much as you feasibly can in this process, and I think that’s great.

On to better and better things! ^^

13 Likes

Now I feel like I’m running an old version lol

1 Like

I would literally not use WK without scripts

13 Likes

Wow, I’d expect that number to be much higher :open_mouth:

I LOVE Jenny’s avatar :c

3 Likes

I used WaniKani for a while without scripts, but it was overwhelming. If I wasn’t able to build my aforementioned Lesson Filter script, I’m sure I would have given up by level 30.

Perhaps of note, when I finally created that script, it was after WaniKani introduced the default lesson ordering (instead of random), and I designed it specifically to adhere to that new ordering. I feel like in that way my script compliments WaniKani, instead of changes it. That’s one of the reasons I hope lesson ordering code hooks become more explicit with these changes, allowing more scripts to compliment WaniKani’s intended learning method.

6 Likes

According to this estimation, most users are under level 10. At lower levels the need for script is not that high, I guess.

But it would be interesting to know the percent of script users at higher levels. Especially for people who reached level 60, I would expect the majority to use script.

2 Likes

Greasyfork says that WKOF has 15,000 installs. I guess that means that WK has at least 150,000 to 300,000 users

1 Like

That would be amazing for Tofogu ! But maybe that number can be cut dramatically if there is a lot people like me who installed WKOF like four or five times, on old pc, new pc, old job pc, new job pc… :sweat_smile:

6 Likes

It would be great if you used some kind of central state storage again like Redux and exposed the store globally :slight_smile: Also if you exposed ReactDOM, scripters could more easily write their own Components. React :heavy_heart_exclamation:

2 Likes

Couple post updates:

  1. We made a change to the email list - now you can sign up for the category you are interested in. If you previously signed up for info on API updates, that’s all you’ll be subscribed to. If you sign up again with the same email and choose the userscripts related option, it’ll update your email list profile.
  2. We posted UserScript Guidelines for Upcoming Front-End Updates. It has some info on where script-affecting updates are headed.
7 Likes

Can you keep track of how many times a user has reset?
Using that, can you allow to users who had reset at least one time to add synonyms when taking lessons? Currently I have to take a lesson, unlock the word and then I’m able to add synonyms.

Or they can just make it a regular feature for everyone, as in:


In the meantime there’s a script for it if you want it now.

1 Like