Ah! Everything looks different!

Originally:
Wha- OK, Why is my Wanikani square, my lattice gone, my userstyle and scripts broken, and my lessons green?
After reading this entire thread:
Oh, the lessons (and reviews) change colour depending on the number available.
The lattices are currently ‘suspended’ whilst being worked on.
The UI has been updated.
Userscripts are being fixed, but it’s only been <2 days, 大丈夫だよ。
And WaniKani is extremely lucky to have bots/people like @CyrusS and @viet who patiently endure the entire community beginning a riot, and who actually listen, reply to and do something about feedback. Thanks guys!

13 Likes

They’re back!

It’s working again! I’m so happy :slight_smile:

does a happy dance

4 Likes

Thank you for letting me know about the SRS Grid script :pray: I asked a bit earlier in the thread because the readability has always been an issue for me.

1 Like

too bad, I actually like it like this. But i guess there is no pleasing everybody

What script do you use for that? I’d like to add it :grin:
(I tried searching the forums but must be using the wrong words :sweat_smile: )

Level Up Celebrator Script :slight_smile:

something something, crossover episode :stuck_out_tongue:

2 Likes

You’re welcome ^^
I’ve been using that script for quite a while now, so for me the problem doesn’t really exist.

Still, it would be better - and really easy - to fix the contrast in that part officially…

1 Like

Right, that’s because my script needs to know what element to attach the popover too. This is done by this line here:

var lessonMenuItem = $('.navigation .sitemap__page--lessons a');

If you change that to the right jQuery selector it should work. Perhaps the old version of my script will simply work, depending on how the “WK old header” script was written.

2 Likes

It may or may not work.
Old Header script basically takes the html of the old header, with slight modifications, slaps it after the new, then removes the new. But of course, the old header script would need to run, and finish, before hover details script runs.

A modification to the old Hover Details that may work

Summary

`// ==UserScript==
// @name WaniKani Lesson Hover Details
// @namespace https://www.wanikani.com
// @description Show lesson breakdown by type on hover
// @author seanblue
// @version 1.0.2
// @include ://www.wanikani.com/
// @require https://greasyfork.org/scripts/5392-waitforkeyelements/code/WaitForKeyElements.js?version=115012
// @grant none
// ==/UserScript==

(function() {
‘use strict’;

if (!window.wkof) {
	var response = confirm('WaniKani Lesson Hover Details script requires WaniKani Open Framework.\n Click "OK" to be forwarded to installation instructions.');

	if (response) {
		window.location.href = 'https://community.wanikani.com/t/instructions-installing-wanikani-open-framework/28549';
	}

	return;
}

var style = `<style>
.lhd-table { display: table; margin: 0; padding: 0; }
.lhd-row { display: table-row; margin: 0; padding: 0; }
.lhd-cell { display: table-cell; margin: 0; }
.lhd-cell-title { font-weight: bold; padding: 0 10px 0 0; text-align: right; }
.lhd-cell-value { text-align: left; }

`;

$('head').append(style);

wkof.include('Apiv2');
wkof.ready('Apiv2').then(fetchData);

function fetchData() {
	var promises = [];
	promises.push(wkof.Apiv2.get_endpoint('summary'));
	promises.push(wkof.Apiv2.get_endpoint('subjects'));

	Promise.all(promises).then(processData);
}

function processData(results) {
	var lessonCounts = getLessonCount(results);
	waitForKeyElements (".navbar .lessons a", setupPopover(lessonCounts))		
}

function getLessonCount(results) {
	var summary = results[0];
	var subjects = results[1];

	var lessonCounts = {
		radical: 0,
		kanji: 0,
		vocabulary: 0
	};

	// Pull the list of subject_ids from the lesson list in 'summary'.
	var lessonSubjectIds = summary.lessons[0].subject_ids;
	lessonSubjectIds.forEach(function(subjectId) {
		var item = subjects[subjectId];
		lessonCounts[item.object]++;
	});

	return lessonCounts;
}

function setupPopover(lessonCounts) {
	var lessonMenuItem = $('.navbar .lessons a');
	if (lessonMenuItem.length === 0)
		return;

	lessonMenuItem.attr('data-content', getPopoverHtml(lessonCounts)).popover({
		html: true,
		animation: false,
		placement: 'bottom',
		trigger: 'hover',
		template: '<div class="popover review-time"><div class="arrow"></div><div class="popover-inner"><div class="popover-content"><p></p></div></div></div>'
	});
}

function getPopoverHtml(lessonCounts) {
	return `<div class="lhd-table">
<div class="lhd-row">
	<div class="lhd-cell lhd-cell-title">Radicals</div>
	<div class="lhd-cell lhd-cell-value">${lessonCounts.radical}</div>
</div>
<div class="lhd-row">
	<div class="lhd-cell lhd-cell-title">Kanji</div>
	<div class="lhd-cell lhd-cell-value">${lessonCounts.kanji}</div>
</div>
<div class="lhd-row">
	<div class="lhd-cell lhd-cell-title">Vocab</div>
	<div class="lhd-cell lhd-cell-value">${lessonCounts.vocabulary}</div>
</div>
`; } })();`
1 Like

I updated Level Duration to support the old header script

5 Likes

Oh…oh my goodness. This thread exploded!

7 Likes

IT’S ALL YOUR FAULT!!!

9 Likes

It’s a-al y-your fault!

2 Likes

Thank you for the summary! We listened. Then listened some more. We just made a few changes to address the biggest bits of feedback:

  • The lesson and review counts now live outside the collapsed menu on all the different screen sizes. That means no more ketchup on the hamburger alert on the menu icon.
  • We switched the color scheme on those badges to be less judgmental: grey for zero, and purple for … not zero. I mean, I guess that means we’re judging zero, but it’s nothing to us anyway.
  • The expanded menus on wide-but-short browser windows didn’t scroll (since the nav doesn’t scroll for the big sizes). Now they do, if they need to.

We’re working on a more thoughtful and thorough response to the whole launch “process” — we’ll get that up for everyone to digest early next week.

49 Likes

It’s only okay to be judgmental if it’s via a mountain of funny cool looking durtles. :slight_smile:

EDIT: Aw, you broke my script again. Guess I’ll fix that later tonight.

11 Likes

Thanks alot!:smiley::+1:

2 Likes

Looking good ! Thanks !

1 Like

Something that may smooth out any future UI overhauls, if possible, is a gradual rollout to volunteer “beta” testers and major script writers, so

  1. anything particularly jarring or unpopular can be tweaked before general rollout, and
  2. script writers don’t need to scramble to patch things when they break.
4 Likes

Other than the new purple background for lessons and reviews, I also noticed that the level you’re on is now marked. Or maybe it’s old and I just didn’t notice.

Nothing major, but it’s pretty neat, I like it. Though, this gave me an idea: what if the levels we passed are somehow marked as passed? That might instill a sense of pride and accomplishment into us.

19 Likes

It’s new, as well as the outline for Lessons and Reviews.

1 Like