In my post, I use spoiler tags to hide verbose content and give an overview of the entire post when viewed.

This way, even when viewing the post directly, the verbocity is only viewable by explicit action. As opposed to readmore tags which are unconditionally expanded when the post is viewed directly.

It has been suggested to me that this use of spoiler tags is an abuse, and that it causes some kind of problem with something called a "table form" which I have never encountered. (Nor do I know how to enable it, nor have any interest in knowing!)

My position is that the intent of spoiler tags is to hide the enclosed content until the reader elects to view it--ie. The exact purpose for which I use them--and that there is no other mechanism(8) to achieve this.

(*Well, short of that occasionally resorted to by tye, that of enclosing the content in html comment tags and adding a note to that effect in the post, thus forcing the reader to view source and wade through the mess of html markup to view.)

And if this "table form" somehow fails to hide the content until the reader elects to view it, then it is the "table view" that is broken.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re: spoiler tag "abuse"
by Argel (Prior) on Dec 10, 2008 at 23:33 UTC
    The only documentation on the spoiler tag that I could find is in Perl Monks Approved HTML tags:
    Note that <spoiler> is not an HTML tag. It is used for presenting "spoilers" to questions and will be rendered differently according to the users preferences, with the general idea being that a little more work is required to see the content than just viewing a node.

    So basically 3 out of the 4 options (in your Display Settings) for the spoiler tag break your intended use. Claiming that the spoiler tag is broken because it does not behave the way you think it should is pure hubris.

    With that said, as I indicated in We need a second readmore tag so that people will stop misusing the spolier tag! it seems like a new tag should be created for the behavior you desire.

    Note: The help for the Display settings no longer lists the options for the spoiler tag.

    Update: Misuse of this tag has been discussed previously, e.g. in Re: Does PerlMonks do general code reviews? (seek).

    Elda Taluta; Sarks Sark; Ark Arks

Re: spoiler tag "abuse"
by jdporter (Paladin) on Dec 11, 2008 at 14:48 UTC
    It has been suggested to me that this use of spoiler tags ... causes some kind of problem with something called a "table form"...

    Strange. I have "Render <spoiler> tags as" set to table in my Display Settings, and I see <spoiler> blocks perfectly. Black on black, no problem.

    My position is that the intent of spoiler tags is to hide the enclosed content until the reader elects to view it

    I was fully agreeing with you until I actually looked at the node in question.

    The intent of <spoiler> tags is to prevent a certain kind of disservice to your reader, namely, forcing upon their eyes information which they would perhaps have preferred not to see yet. Like the ending of a movie, or the solution of a puzzle.

    Instead, by your misuse of the tags, you have perpetrated exactly the opposite kind of disservice to your reader: forcing them to do extra work (or however you'd call the inconvenience) in order to view ordinary code. Keeping "verbocity" hidden is an entirely misguided justification. Code is verbose. We all know that, and live with it.

    One more thing: Whether or not you have spoilers on the code in that node, you definitely need <readmore>s around it. It's very long. Thanks.

    Btw... If you do find yourself convinced by any of these arguments, I'd ask that you not go back and change your use of spoilers in that node, so that this thread doesn't lose its context of revelance. Thx...

    Between the mind which plans and the hands which build, there must be a mediator... and this mediator must be the heart.
      Whether or not you have spoilers on the code in that node, you definitely need <readmore>s around it. It's very long.

      Now that's a simple idea that would perhaps satisfy everyone. Put the poiler tags inside a readmore.

      If I did that now, the "badness" of the spoiler tags would still be viewable when the post is viewed directly in table form, but it would correct the problem for indirect views. Is that permissible?


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        Is that permissible?

        I would say that for the case at hand it is not only permissible but desirable. However, in general, I still think that using spoiler tags merely to shield readers' eyes from the horror of verbose code is not in line with the FFs' intent, current site doco not withstanding, and actually causes the readers more inconvenience than it purports to allay.

        Anyway, as a saint, you should know that all things are permissible, but not all things are beneficial. :-) (I Cor 10:23)

        Between the mind which plans and the hands which build, there must be a mediator... and this mediator must be the heart.
Re: spoiler tag "abuse"
by ikegami (Patriarch) on Dec 10, 2008 at 22:34 UTC

    And if this "table form" somehow fails to hide the content until the reader elects to view it, then it is the "table view" that is broken.

    The "Table" setting displays the spoiler content black on black. It does conceal the text, but it still uses up screen real estate. Revealing the text is as simple as highlighting it, so it's much more responsive than the other methods.

      Ditto for the "span" and "div" options. The "reveal" option in effect disables spoilers by revealing all of the text. As a side note, it looks like the "span" option may be partially broken under IE7 --- only the first block of code in that post was hidden (not tested under other browsers).

      Elda Taluta; Sarks Sark; Ark Arks

We need a second readmore tag so that people will stop misusing the spolier tag!
by Argel (Prior) on Dec 10, 2008 at 22:47 UTC
    In Re: Why is this code so much slower than the same algorithm in C? BrowserUK uses spoiler tags to avoid displaying the entire contents of the post "until the reader elects to view them", which the Readmore tags do not achieve (quoting and paraphrasing what he messaged me).

    However, this really doesn't work as he intended when the spoiler tag is set to table mode (update: and reveal, div, and span as well) because the spoiler tag was never meant to be used like this. In table mode the background and foreground colors are the same -- e.g. black text on a black background -- so that the user has to select the contents to "see" them. Of course, this doesn't make a long post shorter and it makes large chunks of code really difficult to read. Try turning on table mode and then read BrowserUK's post to get the full effect to experience it first hand!

    Given that the spoiler tag continues to be misused like this is there any chance we could get a new tag that behaves like the default settings for the spoiler tag? I'm not sure what to call it, though I can make some not so good suggestions: "ShowMore" or "Expand".

    Or perhaps the opposite could be done by creating a "Summary" tag (or "Abstract") where a summary of a post could be placed. Then by default only that summary would be displayed with an option to show the entire post.

    Thoughts?

    Update: Or what about never auto-expanding Readmore tags?

    Elda Taluta; Sarks Sark; Ark Arks

      Since pretty much everything I want to hide until the reader chooses to view it is code, a "hidden" attribute on the code tag, that only revealed the code within its block, when the existing download link is clicked--in exactly the way that happens now--would be one way to go.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

        Never go by 'pretty much everything'. It is either everything, and you can rely on it, and you will never want to extend it, or it is not, and you need to specify it separately.

        I'd kinda assumed the <readmore> tags did this already, but I haven't actually ever played with them.

Re: spoiler tag "abuse"
by jeffa (Bishop) on Dec 11, 2008 at 14:24 UTC

    "short of that occasionally resorted to by tye ..."

    There used to be a way to hide your code tags inside HTML comments and be able to not only view the contents of the code tag view the contents of the code tag but also have the link to view them autogenerated. Now the link will be auto generated but a message saying "no code" or such be displayed instead of the content. I'll wager someone patched the code link thingy to strip out HTML comments before displaying the code. How rude.

    And for the record, I have no problems with your use of the spoiler tag.

    UPDATE: tye is or has looked a bit into my prob -- but i wanted to point out that Firefox users can highlight the relevant node and select "View Source" -- preventing them from having to wade thru mucks of HMTL to get to the hidden HTML comment.

    UPDATE2: Thanks tye -- i think the newline requirement is a new thing -- i knew that i was hard linking to the page but that was pure laziness on my behalf.

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    

      The trick still works. It is just your contrived example that doesn't "work" for some users. Put a newline inside of your CODE block so that it will work for anybody (it would make little sense to use this trick on such a tiny chunk of code anyway).

      Also, you should make your link using a URL that doesn't hardcode the hostname. You used "[http://www.perlmonks.com/?displaytype=displaycode;node_id=729693|...]" when you should have used "[href://?displaytype=displaycode;node_id=729693|...]". That would make your link work for me like the "[d/l]" and "Download code" links already work for me. Your link isn't using the hostname that my cookie is for so the 'download' is done anonymously when I click on it. And Anonymous Monk has the default setting which makes your contrived no-newline example not work.

      There used to be a setting for whether or not you wish to ignore no-newline (in-line) code spans when trying to download code from a node. The default is to ignore such. I've verified that there is, in fact, currently no way to toggle this setting. I will find where the setting used to be exposed and restore access to it.

      I had previously turned on the "include in-line code in downloads" for myself which is why the real "download" links on your node work for me.

      - tye        

      I guess a few of my nodes now have broken links! Unfortunately, that trick only works with code blocks and not arbitrary HTML.

Re: spoiler tag "abuse"
by ww (Archbishop) on Dec 11, 2008 at 02:45 UTC

    <readmore>...</readmore> will serve in many cases.

    Note to Argel: Details? Writeup Formatting Tips.

    ... of course, succinct, precise exposition is preferable to verbosity.

    Belated Update (20081218): Clarification, since I seem to have given offense.

    As a reader, I favor readmores because:

    • When I find a node of sufficient interest to read attentively (which is frequently), I usually want to read the post in its entirety. readmores allow me to do so by reading it directly in a new tab. spoiler tags leave me no choice other than to highlight them, whether viewed in the main thread or directly. I'm not suggesting that readmores are "more efficient" for me (and YMMV, anyway), but rather that I find opening a new tab to see the entire post suits me better than having to highlight the spoiled information... especially when a post contains multiple spoiled sections.
    • The document referenced above addresses readmores as the way to "elide (hide) large chunks of a post, such as long sections of code" whereas Perl Monks Approved HTML tags explains the spoiler tag this way: "It is used for presenting "spoilers" to questions and will be rendered differently according to the users preferences, with the general idea being that a little more work is required to see the content than just viewing a node." As I understand that statement, the rationale is similar to that behind the practice of putting the answers to exercises in the Llama or, in newspapers, Soduku and crossword puzzles solutions on a different page than the puzzle itself... i.e., to reduce the likelihood that the reader will inadvertently see something that will "spoil" a challenge.
    • spoiler tags (as someone else noted earlier) don't save me any screen space ... and IME, those folks who ramble/fail to make their point clearly/etc are also unlikely to take the trouble to format appropriately.

    Yes, some folks ramble and wander from their topic with annoying verbosity -- but I can't think of a time when I've had that reaction to what you have written.

      will serve in many cases.

      Not for the case(s) in question, for the reasons given in the OP.

      As for the writeup formatting tips, this is the tip from that very exposition that I am following:

      As an alternative, if you want certain content in your node to be hidden even when that node is viewed directly, you can use <spoiler>...</spoiler> tags.

      Ie. I am doing exactly as asked to achieve the effect required.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        Except that "hidden" does not mean the same thing as clicking on a link. There are three options for the spoiler tag that all hide the text but only one requires clicking on a link. And the fourth option just shows the text. You are not using the tag as intended. And that's ignoring the obvious -- the name of the tag. Are you really going to claim you do not understand what the word "spoiler" means and the connotations associated with it?!? As I said before, pure hubris on your part.

        Elda Taluta; Sarks Sark; Ark Arks