RationalWiki:Collapsible Comment System

From RationalWiki
Jump to navigation Jump to search

The collapsible comment system is a series of templates designed for adding commentary to text that is too long to be amenable to the side by side system, or in which commentary is too sparse to make a side by side document interesting. It consists of bodies of commentary that are initially collapsed to preserve as much readability in the original text as possible. The comments can be expanded to be read, and can be linked to from within the main text using a variety of link templates.

We don't really use this system anymore as such use sparingly.

Creating a collapsed comment[edit]

A comment is created by using the CollapseComment template. This template has three parameters, firstly a title for the comment. This can be any text, but should be limited to a single line. This will always be displayed. The second parameter is an anchor name by which the comment can be referred to for linking purposes. This should be all one word, with no whitepace. However, underscores can be used instead of spaces to make them more human readable (e.g. why_nobody_can_beat_me_at_mornington_crescent is a valid anchor name.) The third and final parameter is the comment text itself. If you wish to write more than one paragraph, use paragraph tags (i.e. <p> and </p>) as you would with the {{cquote}}.

For example, the declaration: {{CollapseComment|This is a collapsed comment|this_is_a_collapsed_comment|Hello, collapsed comment world.}} produces the following output:

Linking to collapsed comments[edit]

There are a number of templates available to link to collapsed comments in various styles.

Strike through and link[edit]

The strike through and link template, StrikeLink lets you strike through egregiously wrong text and link it to commentary explaining why it is garbage. For example:

There have been many presidents of the United States throughout history. William Jefferson Clinton was the forty-second president of the United States. No Jedi has yet been elected president.

This template takes two parameters, the first is an anchor name that refers to a collapsed comment (see above) and the second is the text to strike though and link.

Inline snark link[edit]

The InlineSnarkLink, as its name suggests, lets you add inline snark that links to a larger explanatory comment. For example:

Mornington Crescent is a game played on the BBC Radio Four panel game, I'm Sorry I Haven't a Clue. It has been suggested that in fact this game has no rules, but is made up as the players go along. [The fool! How can he be so ignorant of the glorious game?]

Again, this template takes two parameters. The first is the anchor name of the comment to link to, and the second is the snark text.

Types[edit]

Add more![edit]

And what list would be complete without this Schlaflyism? I'm sure there are other styles of link that could be useful. Creating a link is as simple as [[#anchor_name|link text]].

Compatibility[edit]

Works in:

  • Internet Explorer
  • Chrome
  • Edge
  • Firefox
  • Safari (iOS)

Does not work in:

  • Opera mini

Help wanted[edit]

  • If you can make any of this prettier, less obtrusive, etc. then be my guest. Replacing the word "Commentary" with an appropriate image might be a good start.
  • I checked the javascript worked in IE, and noticed the boxes don't look too brilliant in versions that didn't support PNG transparency. Get a better browser. However, if you do care please to be fixing it.
  • Make sure the javascript works in Opera, Safari (Mac).
  • If the javascript breaks, please complain to RationalWiki:Technical support.

See also[edit]