User:Tepples/Improvements 2017Q3

In the first comment to "Rot" (#4674) by Rob DenBleyker, posted on 2017-07-17, Derek asked for ideas to improve the comment section. I'll use this page to collect my own. The [//explosm.wikia.com/wiki/User:Tepples/Improvements_2017Q3?oldid=407 final revision from 2017-07-19] was emailed to Derek; this page has been updated since then. Feel free to post your own ideas in your own user subpage, and I may link to it below.

Original essays
On Wednesday, April 19, 2017, a week after the first Judgment Day, Zogaridan posted an essay in comments to "Hardly" (#4598) by Kris Wilson. Zog identified a class of users called "yellers" who are "extremely vocal, while not necessarily contributing anything meaningful." Their quest for quantity over quality leaves the discussion "over-saturated". Quality comments get people to open up more and feel a sense of community. Yellers don't do that.

He also identified a misunderstanding about what badges are for. If they're for recognizing users who have built a record of positive contributions, they're nowhere near consistent, as yellers are getting rewarded with them them for a minimal time investment, while Martian Cthulhu and PinoBatch, for instance, didn't get one for way too long. If moderators can do one thing, it's recognize those who contribute.

The same day, Cteklite posted an essay agreeing with Zog, adding that though comments have always been shit, they used to be funny shit, with an identifiable sense of humor that others can appreciate. But lately it got more unintelligible and more quantity-focused, verging on "virtual societal collapse." He compared C&H fans' passion to that of the community around the video game Payday 2 and thought Lillie and Gangrene looked promising.

The next comic day (Friday, April 21), PinoBatch posted the following more technical essay as three comments to "Head Hurts" (#4599) by Rob DenBleyker: I came to Explosm comments because I was impressed by the world-building and storytelling possible with such a sparse illustration style. This includes men having largely abandoned trousers as obsolete, male baldness (#1231), people with different limb configurations (#141, #807, #1974), a snowman selflessly giving his life support to save someone (#1181), strips reminiscent of xkcd (#3557), and a bank running an adoption agency (#4057).

So I posted my thoughts about select comics. When I had nothing good to say that someone else hadn't said better, I moved on to the next. And I started slowly, taking time to revise and posting three or so comments a day so as not to be a burden on others, until I was sure my comments would be well received. Quality over quantity.

I hesitate to name names, but I was impressed at first with Astrophysicist's approach. And I had hoped that others would likewise want to better understand the lore in order to appreciate the characters' motivations.

But technical limits of the software running the comment section led to problems where people's thoughts just get lost.

No built-in text search, posting history, or notification means to tell if someone has replied to my comments. That's why I made cnhsearch: to find others' constructive comments on my hypotheses.

When comments are always sorted with the newest top-level comments first, it's hard to find well-received comments or unread replies among hundreds of read comments. I would try remedying this with a user script to re-sort the comments with a healthy mix of new and favorited comments at the top, but "About" means there's no way to see exactly when a comment was posted to more precision than hours, days, or sometimes months.

No way for regulars to collaborate in classifying comments as about the comic or not. I'm aware that some users stay for off-topic stuff, such as (whatever) of the Day, but focus is valuable to someone with limited time.

Not to mention Explosm Flavored Markdown. It works by running a Markdown processor (see CommonMark.org) and then stripping out HTML tags other than paragraph, bold, and italic. But it ends up swallowing certain characters at the start of line without warning, and it's not documented anywhere on Explosm.net.

Markup exploits, such as comments that are empty after markup processing, writing with badge CSS, and even a cross-site scripting (XSS) that I reported privately, take months to be fixed if ever. Self-faving still works, and I class this as an exploit. Nor are there server-side guards against nesting replies deeper than the limit or even qryrgvat bguref' ercyvrf.

Finally, moderators' lack of transparency. Perhaps I'm just too used to Stack Overflow, which lets a user who flagged something see that it's been acted on.

New tables
Assuming Explosm.net's comment section runs on some sort of SQL database, new functionality that improves the experience could be added with a few new tables:


 * Comic full text
 * A textual transcription, preferably with a full-text search index, similar to the transcripts on Explain xkcd. This would improve searchability of C&H comics on Google and accessibility to users with disabilities.


 * Read comments
 * Make a table from (user ID, comic ID) to comment ID. When a logged-in user views a comment section, store the highest comment ID on that page. This lets you define an unread comment as one whose comment ID is greater than the highest comment ID the user has seen on that comic.


 * Friends and foes
 * Make a table from (user ID, target user ID) to relationship. The relationship can be specified as friend, foe, or null. This lets a user highlight a target user as respected or unconstructive.


 * Notifications
 * Make a table (user ID, comment ID) similar to the one holding comment favorites. When a comment is posted, add the comment ID as a notification for the user who posted the parent comment, the users who have favorited the parent comment, and the users who have favorited the comic.


 * User avatars
 * Let the user upload multiple avatars and switch among them.


 * Comment full text
 * If your preferred full-text indexing mechanism needs specific tables, make those.

The user preferences table would get a handful of new columns as well:
 * Read notifications
 * Add to the user table a "read notification comment ID". When a logged-in user visits the notifications report, write the highest comment ID here. This lets you define an unread notification as one whose comment ID exceeds the highest read notification for the user.


 * Preferred style sheet
 * Add to the user table a "preferred style sheet". This lets the user choose from alternate official style sheets. This way someone looking for a benign style sheet, such as the "tightened" style sheet on User Styles, doesn't get distracted by ad-blocking style sheets that kill Explosm's revenue.


 * Preferred font
 * Secondary styling choice to allow viewing comments in Comic Neue instead of Proxima. Its more distinctive glyph shapes can be more accessible to users with dyslexia.


 * Still avatars
 * Make a PNG version of the first frame of each uploaded GIF avatar. If a user turns this on, display the PNG version of other users' avatars. This improves accessibility to users with a seizure disorder and performance on mobile processors.

Comment view changes
A new comment is a comment that is unread (for the current user), was posted in the past hour, or was posted in the past 24 hours to a comic or short at least a week old. Count new comments, and at the top of the page, write something like "324 Comments (20 New)".

Community moderation: Allow multiple established users to flag a comment, as a way of building consensus to hide it. This could be limited to users who have previously placed more helpful flags than unhelpful flags, in order to discourage misuse of the flag as a "dislike" feature. Then the system could take some limited action based solely on flags even in staff's absence. I don't know whether the existing database schema allows a comment to have multiple flags on it; if not, add the needed table. Also allow a user to retract a flag if later context makes a comment's purpose clear.

Allow established users to tag a comment as on-topic or off-topic. This way people who want to read comments that are actually about the comic can have a view best for them, and those who want "Joke of the Day" can have theirs.

Add CSS classes to comments:
 * "comment-new" on new comments and "comment-has-new-reply" on their ancestors
 * "comment-by-friend" or "comment-by-foe" based on relationships
 * "comment-on-topic" or "comment-off-topic" based on tagging
 * "comment-questionable" based on multiple flags

Style "comment-new", "comment-has-new-reply", and "comment-by-friend" with a box similar to (but distinct from) the box that appears around comments by staff. Also style "comment-by-foe", "comment-questionable", and "comment-removed" (those removed by the Death Panel) with gray text instead of black so that the eye jumps past them.

On a comic page with at least one new comment, next to the "Hide replies"/"Show replies" link would be two more buttons. "Show only new" would show all replies with the "comment-new" or "comment-has-new-reply" class and hide all others, and "Raise new" would move all top-level comments with class "comment-has-new-reply" to the top. Also consider "Hide foes" to collapse "comment-by-foe", "comment-questionable", and "comment-removed", similarly to the existing link to hide comments containing the URL of a Random Comic Generator comic.


 * ⊕ Show replies (60)
 * ⊕ Show only new ⊕ Raise new
 * ⊖ Hide foes ⊖ Hide RCG ⊖ Hide off-topic

The hide and show controls can be unbearably slow on a device with a mobile processor, such as the Atom or Celeron in a compact laptop or the ARM in a phone or tablet. If the script to hide or show comments takes more than one second, break up the work into chunks and use setTimeout to run the remainder.

Currently, a comic's comment section is lazily loaded with AJAX when the user scrolls to it. If the URL's fragment identifier (the part after the # sign) is "comments" or a comment ID such as "comment-123456", request the comments immediately once the DOM is ready, and scroll to the specified comment as soon as the comments load. In each comment, add a link pointing to this comment, so the user can copy the link and cite the comment elsewhere.

Another strategy for permanent links is to make a page with just a comment and its replies, with a link back to the parent comic. Reddit, SoylentNews, and Slashdot use this approach.

Let the user click or hover over an "hours ago", "days ago", or "months ago" to see the actual date and time when a comment was posted. This can be through title text, a CSS class that becomes visible when hovering over its parent, or something else.

Some have suggested a button to view who has favorited a comment. I'll leave this as a judgment call, whether staff wants it to be like Twitter (which treats likes as a public record), like Stack Overflow and SoylentNews (which keep likers' identities confidential), or something in the middle (exposing likers only to a comment's poster).

Posting changes
After a round of Morse code cyber between Cteklite and Noodle in July 2016, the comment depth is limited to six: one top-level comment and five layers of replies. But some users have discovered how to "reply hack", or reply to a comment already at the maximum depth. At this point, I'd say scrap the depth limit and implement a page for each comment and its replies, as Reddit does.

Some users have figured out how to "delete hack", or delete the user's comments that have replies. There are valid uses for this, such as when all replies have been made obsolete, but it's very easy to abuse. So introduce a new "trash" state for comments. A user can trash his own comment, and it becomes deleted when all its replies are also trashed. This lets a set of users mutually agree to retract a comment chain, such as a "Twice" reply.

Finally, add some help pages explaining the markup, expectations for comment content, and what badges mean.

Notifications
Provide a report of the user's most recent notifications. This can be a separate page, as on Twitter, or an AJAX pop-up, as on Stack Overflow and Google. Use a CSS class to make unread notifications prominent.

When a user views notifications, request permission to use Web Notifications. Don't request it on every visit, only when the user is viewing notifications.

In the header bar for logged-in users, show the count of unread notifications with a link to the user's notifications report.

User profile
A user's reputation is the number of favorites a user's comments have received from other users. This concept is borrowed from "reputation" on Stack Overflow.

Give each user a public profile, grouped by comic or broken out by comment. Allow narrowing the search to only comments that have received at least one favorite from another user, as in Pino's cnhsearch. Show the user's reputation.

If the team wants the source code for cnhsearch, I can make it available.

Search
Possibly let users search for text in comics and users' comments.

Third-party comment systems
Consider using Mozilla Talk if it allows migration of old comments.