Block Level Commenting
Posted on October 12, 2006
Inspired by Jack Slocum's inline commenting system for wordpress, I got to thinking about block level commenting.
As always, the commenting system is unobtrusive. An
onload script (or similar) tells the script to parse the post body. All first-level non-text-node children are then given a generated id.
When block comments are activated (click the button at the end of the post), the script parses the relevant block ids out of the previous comments id attributes (for example
id="c3_2" would mean that the third comment belongs to the second block), totals the number of comments for each block, and adds a comment flag to blocks that have comments. It also makes the blocks clickable.
When a block is clicked, it is shown in isolation, along with all previous comments that were attached to it. (And the block id is inserted into a hidden form field so that it can be passed to script handling comments on the server.)
Block comments become like multi-author footnotes for a particular passage of text.
Of course, if you change the post after someone's posted a comment, you're buggered. You would have to have an system that designated ids to individual blocks in the CMS so that block ids are retained when a new paragraph is inserted into the middle of the post. Would probably get complicated quite quickly.
Tested on Safari and Firefox. Don't know about any other browsers/platforms.
Mike Caputo said
Genius.. this is awesome. I like the idea.. but im afraid it may be a little bit confusing for the user.
Posted by: Mike Caputo at October 13, 2006 12:49 AM .
I think the idea is quite nice but am not keen on the implementation.
A simple solution would be to add some scriptaculous stylee scolling/ fading to show that you are on the same page and the content has just been hidden. It took me a while to realise what was happening and how it was working.
Now what you need to do is tie it into wordpress :)
Posted by: Ben at October 13, 2006 12:38 PM .
@Ben & Mike:
I agree that it's confusing, because the block is taken completely out of context. I had a version where the rest of the text is greyed out, but wasn't happy with that either. I was really more interested in getting the mechanics working than the eye-candy. It's more about the idea really, and is not a final release. Maybe, as Ben suggests, something time-based like a fadeout would be the best solution. At the moment the transistion is too abrupt.
P.S.: I'm running Movable Type (still).
Posted by: bsn at October 13, 2006 01:46 PM .