Threaded comments, week 3

I spent this week rethinking and discussing some details. And that’s what has been decided.


Threaded comments will work in two modes. First one will provide full experience for users with browsers supporting localStorage and js. Second one for users with js disabled (and older browsers), this mode will be reduced to threaded view of comments. No re-parenting, no moving, no undo.

Following paragraphs are mostly about full mode.


Comments will be displayed in threads, with every root-level thread indicated by its root-comment. There will be some number of threads per page (equal to ‘number of comments per page’ setting). They will be collapsed by default, what means that only root-comment is displayed with number of its children indicated. User can expand all of them, or only those he’s interested in.


Because comments are spread among many pages (and posts too), to allow easy moving, we’ll introduce dropzone, just above the table with comments. User adds there comments or threads, which he wants to move. They stay there while he’s switching between pages looking for a correct place for them. And once he found such a place they can be quickly moved.


User actions will affect actual state of comments in ‘real-time’. Because of this an ‘undo’ action is introduced, to prevent accidental destruction of threads.


We will keep track of comments’ moves and enable ‘undo’ action. We will keep history of actions in sessionStorage, so every tab/window will have its own.

Minor threading indications

Droppped, because of poor ‘necessary work’ to ‘use case’ ratio.