http://www.perlmonks.org?node_id=548772


in reply to Re^3: Challenge: Hidden Message
in thread Challenge: Hidden Message

[...|this]--. [...|this spoiler] would be better, but it still obfuscates what the link does ([...|Reveal spoilers] would be even better, but doesn't address the possible desire to have a link that reveals just one spoiler). After noting that there was a patch, I expected to see three links when a node had multiple spoilers (not that I'm convinced that such would or wouldn't be a good idea). I don't have a suggestion, I just wanted to strongly discourage making links labeled "this", which is only slightly better than links labeled "click here".

- tye        

Replies are listed 'Best First'.
Re^5: Challenge: Hidden Message (click here)
by demerphq (Chancellor) on May 11, 2006 at 18:13 UTC

    I expected to see three links when a node had multiple spoilers

    You will see three links, but only in a reply displayed when viewing another node. In that case youll see

    The in this node part disappears when the node being rendered is also the focus of the page. For instance if you make Challenge: Hidden Message the focus you'll see that the reply by Unanimous Monk has the links above. But when you make it the focus one link disappears.

    BTW, you can also make links that expose multiple specific spoilers at once.

    As a side note, ive been thinking that the 'in this node' link really belongs in the "per node links" that are normally on the right, and the "on this page" link should go at the bottom. Then the only link that would remain would be the single mode, so then we could say "Reveal this spoiler" all the time. Which I guess means using HTMLVARS, sigh.

    ---
    $world=~s/war/peace/g

      Yeah, I'd never figure out what that first link does just based on the wording. And why do you assume I'd never want to reveal all of the spoilers in a root node but not in any of the replies? Ah, I see we've got a design conflict between the old design and the new design.

      The old "in this node" really means "in this node and all replies to it (and no longer showing the rest of the thread that is currently displayed)", which is why it doesn't apply to the top-most node currently being displayed.

      So, if we are going to reveal spoilers individually, I'd abandon much of the old design and make "in this node" really mean "in this node" and not have it change which part of the thread you are viewing. So "in this node" would add that node's ID to the list in ?showspoiler= and the "reveal this spoiler" would add "ID-N" instead and with each click you could reveal another spoiler or another node's-worth of spoilers, or just reveal all spoilers. Something like:

      Reveal this spoiler or all spoilers in this thread.
      Reveal only this spoiler or all spoilers in this node or in this thread.

      All links would use the top-most ID in ?node_id=. "only this spoiler" would have the current ?showspoiler= with ",ID-N" appended. "Reveal this spoiler" and "in this node" would have the current ?showspoiler= with ",ID" appended (and perhaps any "ID-N" for that same node removed). "in this thread" would drop ?showspoiler= and add ?spoil=1.

      Make sense?

      - tye        

        Ah, I see we've got a design conflict between the old design and the new design.

        Yep, thats it in a nutshell. :-)

        Make sense?

        I think so. To recap the essence: make showspoiler additive in some situations, make showspoiler handle ID as well as ID-N, with the former meaning 'for all N'. Introduce new links and reorganize.

        Oh, I like it by the way. Except maybe the last two links, i wonder if they should only show up once per node, probably on the first spoiler.

        ---
        $world=~s/war/peace/g