• 1 February 2021Last Friday's Update : When Users Sail Away. And a Fix

    Account Delete functionality

    Last Friday the site was updated with the functionality to permanently delete an account. As I noted in the New Year roadmap:

    most sites these days let you delete your account at the click of a button. For a long time I was able to handle these requests via the contact form, but I have been lagging behind lately and it's admittedly not what I would expect myself from other websites/apps.

    The delete account option is found at the bottom of the "Edit Account" page. Personally I always feel a bit nervous when I see this sort of options. :) Let me reassure you even if you mistakenly tap that button on your laptop while scrolling the page or whatnot, it will take you to a second step with a form. The form requires your current email, a short phrase as well to confirm your current password (see picture).

    This closes Github Issue #87 Add "Delete Account" option somewhere in Account Settings. The issue was created by yours truly in March 2017... humbling.

    Also completes one of the three main items for Phase 1 of the New Year roadmap (blog post).

    Stories also sail away...

    Stories and flashcards are immediately deleted... which isn't great. Sites like StackOverflow have a way of converting a user's public contribution (the questions & answers) into some kind of a "community wiki". Kanji Koohii doesn't have such a system in place. It would be really complicated for me as well to code it on the legacy code base (ie. prior to the announced Laravel migration).

    Therefore when a user deletes their account, all the shared stories on this account also immediately get deleted. Those stories (and their usernames) may still show for up to thirty days because of the cached templates, but as soon as those templates get refreshed they are gone. That also includes all the votes and reports associated with those stories.

    I'm not sure this is what users would expect. Likely that users who shared many stories, especially those that accrued many stars, don't expect their public stories to also get deleted. They may want to only delete their personal info (username, email, ...) and perosnal stories, while retaining their shared contributions.

    Ideally I'd have a checkbox on the account deletion confirmation page, for users to confirm whether they want to also delete the shared stories. Shared stories could be "orphaned" from the original author, but I don't have a simple solution right now. To be honest I just want to move on with the Laravel migration but if someone can think of a relatively simple and better way to handle this, suggestions are welcome.

    With that said in practice this isn't a big issue because the vast majority of account deletion requests are either recent users who simply wanted to check out the site and it wasn't exactly what they are looking for, as well as people who registered years ago and I am guessing like to clean up their tracks and delete old unused accounts.

    Who's Reviewing? Broken Edition

    In the recent update I also introduced a typo that broke the Who's Reviewing page. Thanks again to Roderick for letting me know! It was a simple typo introduced while refactoring some CSS. A class name output in a bit of JSON. I thought I was smart back then with my JSON data in a php method, but that bit of JSON does not get any syntax checking in the code editor. Sigh. Also I didn't know about short array syntax in php back then which is why I resorted to JSON to return a configuration object in a less verbose and unsightly syntax.

    This particular code is almost as old as the site which is why the component is internally called "MembersList": indeed the early "Reviewing the Kanji" website's main feature was the spaced repetition system with the builtin RTK flashcards. The stories area was in fact added later (a heavily requested feature ;)).

    This got me thinking. The "Who's Reviewing" page is one of the few places of the site that gives a bit of a community feel. I realized this page may be one of the simplest and early features I could write on the new Laravel stack : with Laravel Jetstream I should be able to add user's custom avatars to the list (cf. profile management). I think this will make the page more lively and add a bit more personality to user's public profile.

    Next

    Having completed one of the three main items of Phase 1, I will now move onto either the "Finish Typescript API refactor", or Issue #184 Add "Again" button in Review page. I should probably start with the Javascript refactor to refresh myself on some Javascript patterns since I'll need to edit quite a bit of Javascript for the Flashcard Review page.

    I'm actually one week behind the schedule I planned on my little Gantt chart ... but to be fair I had to refresh myself on a bunch of things like handling MySQL imports/exports in the docker container, fix some issue with the Bash prompt, install and configure some php extensions, etc.

By Month