We will continue to make changes to the frontend as Wanikani evolves. Some of these changes will impact third party scripts. The best I can do is provide posts like this one to notify you of the new features/changes but it is too difficult for me to speculate which scripts will be affected and how. It is a tough challenge trying to deliver new features and balancing that with breaking scripts which arenāt under our control. I can only promise to try my best to keep you informed. I hope that is okay?!
Sorry, I think we are still not together yet
What I would like to know is: Are there any parts of the frontend that have not been switched to React yet? And if so, when are you planning to switch them over?
Maybe I missed the news but I havenāt heard anything along the lines of āWeāre now done with the React transitionā, and so Iām still waiting and not changing my scripts, because I donāt want to change them over and over again. So if you could shed some light on that question, that would be very much appreciated!
As I said before, of course you will evolve WK and make changes to the frontend. And thatās totally fine (itās the nature of software development, after all). But the shotgun-surgery switch to React was a bit of a different beast regarding the impact for the script devs as it simply affected everything.
Thanks for your patience
Yes there are parts of the frontend that are not using React. I recently updated all subject and level pages away from React and back to server side rendered pages using BEM. Hopefully BEM will provide some stability to blocks of HTML even as they move around the page. Although I cannot make any guarantees that BEM blocks wonāt disappear and be replaced with new and better functionality in future.
In terms of the plan to switch more over to React, that is not our plan moving forward. I donāt want say too much at the moment as we are still working out what the future path looks like and I donāt want to promise anything that may or may not happen.
When or if you choose to update your scripts is completely up to you. I canāt promise that a month or two from now we donāt add a new feature that will break one of your scripts, but like I said I can do my best to keep you updated. Unfortunately this is the nature of injecting scripts into pages you donāt control. We do make guarantees with our API but we donāt make any guarantees about the structure of our pages.
I hope that you understand this point of view, and I will continue to help however I can.
Hey Scott,
Do you see legacy reviews getting pulled before the end of the year or is it still to be determined?
The /user
endpoint of the API is currently returning a wanikani_compatibility_mode
property under preferences
. Will that be removed at/around the time legacy reviews are pulled?
Thanks!
Yes I hope that this will be gone a few weeks from now all going well.
Thanks for pointing that out. I am not yet sure whether I will remove the wanikani_compatibility_mode
key from the preferences
object or whether I will always have it return false. This was done before my time, so the key may have been intentionally left out of our API contract as documented here. My preference would be to remove it as it is an undocumented API feature, and realistically the value is only intended to be used by our codebase.
Thank you for the heads up, Scott. If all the scripts Iām using break, I will cry. At least I have almost a week to prepare mentally.
Iām hoping new features would be things like having a Recent Burned Mistakes Items under Burned Items and maybe some custom Graded Readers for WaniKani users. Like a Graded Reader section for levels 1-10, 11-20, etc.
This seems totally reasonable. Maintaining legacy code is extremely painful, especially for a relatively small team. The fact that you guys have tried to be conscientious about it for so long is very kind.
Any user scripts that depend on a specific DOM structure or selector queries are always going to be brittle. You canāt expect otherwise, as the developers need to be free to make changes.
Itās really the backend APIs that need to be stable. Ideally they should be versioned, with each version being entirely stable.
Anyways, since youāre moving to React (rather slowly, it seems), Iām wondering if youāre eventually planning on a React Native app? I was planning on making one myself. The main benefit of this to me is having app notification reminders, and maybe better text-to-speech input (so I can speak my answers sometimes if I choose).
I personally wonāt miss the script compatibility mode. On the one hand it was useful for keeping old scripts alive, but on the other hand it burdened userscript authors (and WK developers) with having to maintain/test against two versions of WaniKani. Or maybe even three versions if we include https://preview.wanikani.com ā I donāt remember if the preview server was ever used during the lifetime of the script compatibility mode.
Much more important to me would be notifications whenever something changed on WaniKani so that I know when I have to update my scripts. There is a mailing list, the forum, and there was https://knowledge.wanikani.com/wanikani/script-compatibility-mode, but none of these communication channels were used for the recent changes. Since I donāt actively use WaniKani anymore, I had to rely on users eventually reporting problems with the scripts.
So thatās why the HTML/CSS structure was once again different from the structure in lessons. I was hoping that the change to React would make everything a bit more consistent. So, if I understand correctly, the transition to React is now discontinued? Now Iām wondering if another batch of breaking changes to the lesson screen is just around the corner or if the lesson screen will keep using React for a while
BEM has nothing to do with React. Itās just a CSS naming structure that can reduce or eliminate selector specificity issues, making the code more modular and the styles less affected by where they appear in the DOM. I seriously doubt they would abandon React.
Iām not sure, since they said
My apologies, I didnāt catch that. What an odd choice.
Sorry about not posting about the changes to the subject and level pages earlier. I was/am still learning the ropes.
I am trying my best not to talk too much about what the future might look like and when that future may or may not occur. I donāt want to get caught promising something that may not happen, so I feel it is safer and more socially responsible to only talk about new features and changes when they are closer to being released. That said I will be continuing to migrate pages away from React and in the course of that work, updating the pages to use BEM. The subject and level pages now use Hotwire and the plan is for more pages to follow suit. Hopefully this will bring some consistency that you are after.
I am not sure what cause Script Compatibility Mode notification to show (i.e. considering turning on script compatibility mode, when it is now off).
Anyway, so far, the scripts I am using arenāt broken (for practical usage and in console).
WK has a short list of scripts that they check for, if they find one of them they show the notification. Though I think they only show it once?
Hi All,
This change is now live. I will keep you updated on further changes to compatibility mode in new topic postings.
Thanks for the feedback so far
Time to learn JS
Yeah, I want to know whatās in the list. Also, itās not fair if the script gets updated anyway.