28 votes

Any chance we can get a shorthand for the <details> tag?

It's very useful for spoilers. I wish it was more convenient, specially when typing on a phone.

22 comments

  1. [2]
    goose
    Link
    Or a <spoiler> synonym?

    Or a <spoiler> synonym?

    14 votes
    1. DefinitelyNotAFae
      Link Parent
      Id love an easier spoiler option than the collapsing box. (Ah the days of the rot13 browser addon and my spoiler blogs)

      Id love an easier spoiler option than the collapsing box. (Ah the days of the rot13 browser addon and my spoiler blogs)

      11 votes
  2. moocow1452
    Link
    Three Cheers has a hot button for the collapsible text if you're willing to put a bandaid on it for now. But a dedicated spoiler syntax would be nice, better if it doesn't reveal text within a...

    Three Cheers has a hot button for the collapsible text if you're willing to put a bandaid on it for now. But a dedicated spoiler syntax would be nice, better if it doesn't reveal text within a collapsed post, but I digress.

    12 votes
  3. fnulare
    Link
    important! I don't mind another way to do it for people that find the current way cumbersome to type out. But it's important to me that there will be a way to keep the functionality of the custom...
    important! I don't mind another way to do it for people that find the current way cumbersome to type out.

    But it's important to me that there will be a way to keep the functionality of the custom summary. Either by implementimg the new way alongside the current one or making sure that whatever syntax is chosen includes that.

    6 votes
  4. [9]
    creesch
    Link
    Considering tildes is open source it is all possible. The question is, what would the shorthand be? My assumption is that you are not really having trouble with typing the "details" bit. But...

    Considering tildes is open source it is all possible. The question is, what would the shorthand be?

    My assumption is that you are not really having trouble with typing the "details" bit. But rather characters like <, > and / because those are nested several layers in phone keyboards.

    As others have mentioned a dedicated spoiler tag might be cool. Stackexchange, Reddit and a few other websites use >! for that.
    So something like this

    This is not a spoiler 
    
    >! this will render as a spoiler 
    

    It might be worthwhile to implement that.

    5 votes
    1. [4]
      CannibalisticApple
      Link Parent
      I think it also uses !< to close off spoiler tags. On a similar note, Discord ||uses this format for spoiler text||. Never actually learned what that symbol is called. Personally my own gripe with...

      I think it also uses !< to close off spoiler tags. On a similar note, Discord ||uses this format for spoiler text||. Never actually learned what that symbol is called.

      Personally my own gripe with the <details> tag is that it's a bit bulky compared to other tags, and also creates a whole separate section on a new line. I'd like to sometimes just hide a single sentence or a few words behind a spoiler tag rather than break a paragraph.

      13 votes
      1. creesch
        Link Parent
        | is called a pipe, at least that is what I know it as from terminal stuff. Looking it up, it goes by many names ;)

        | is called a pipe, at least that is what I know it as from terminal stuff. Looking it up, it goes by many names ;)

        12 votes
      2. [2]
        RobotOverlord525
        Link Parent
        Totally agreed. I like the Discord method (markdown?) of marking spoilers, too. It's easy on desktop and on mobile.

        Totally agreed. I like the Discord method (markdown?) of marking spoilers, too. It's easy on desktop and on mobile.

        1 vote
        1. ruspaceni
          Link Parent
          discord is a funny one because sometimes you click into a conversation halfway through a wall of spoilers and my monkeybrain just HAS to click some of them. they could really do with a way to give...

          discord is a funny one because sometimes you click into a conversation halfway through a wall of spoilers and my monkeybrain just HAS to click some of them.

          they could really do with a way to give you extra context before you click it like ||the americans, s3e10 | blah blah spoilertext here|| bc it'd just take scanning for the white text on a black spoilerbar to clue into whats going on, instead of clicking and then wincing because you were looking forward to going into that game blind

          2 votes
    2. [5]
      Comment deleted by author
      Link Parent
      1. [4]
        creesch
        Link Parent
        I'm amazed and dazzled by your zeal, but your puzzling logic is frankly a bit hazy and lazy. What have pizzas, zebras, and jazz ever done to you? My enthusiasm for this zany scheme is basically zero.

        I'm amazed and dazzled by your zeal, but your puzzling logic is frankly a bit hazy and lazy. What have pizzas, zebras, and jazz ever done to you? My enthusiasm for this zany scheme is basically zero.

        19 votes
        1. [3]
          Comment deleted by author
          Link Parent
          1. unkz
            Link Parent
            This story reminds me of how Welsh stopped using the letter K. https://en.wikipedia.org/wiki/Welsh_orthography

            This story reminds me of how Welsh stopped using the letter K.

            https://en.wikipedia.org/wiki/Welsh_orthography

            The disuse of this letter is at least partly due to the publication of William Salesbury's Welsh New Testament and William Morgan's Welsh Bible, whose English printers, with type letter frequencies set for English and Latin, did not have enough ⟨k⟩ letters in their type cases to spell every /k/ as ⟨k⟩, so the order went "C for K, because the printers have not so many as the Welsh requireth"; this was not liked at the time, but has become standard usage.

            4 votes
          2. em-dash
            Link Parent
            This reminds me of that time I had a laptop's W key die, so I added compose-v-v as a binding to type w. But then that was too inconvenient to use while typing fast, so for a vhile I vas typing...

            This reminds me of that time I had a laptop's W key die, so I added compose-v-v as a binding to type w.

            But then that was too inconvenient to use while typing fast, so for a vhile I vas typing vith a silly fake German accent.

            1 vote
  5. [9]
    smoontjes
    Link
    100% agree. Just copy the one on discord where ||spoiler goes here||. They already took all of the same things from there and have been in place for ages here. For example one or two * for slanted...

    100% agree.

    Just copy the one on discord where ||spoiler goes here||. They already took all of the same things from there and have been in place for ages here. For example one or two * for slanted and bold, > for quoting stuff, a ~ for strikethrough, etc.

    Shouldn't be too hard to implement?

    3 votes
    1. [8]
      Protected
      Link Parent
      Discord uses something called Markdown (I believe originally implemented by Aaron Swartz). There are some standardization attempts, according to which spoilers should open with >! (same as...

      Discord uses something called Markdown (I believe originally implemented by Aaron Swartz). There are some standardization attempts, according to which spoilers should open with >! (same as reddit); Discord is nonstandard in that regard. I believe it descends from a modification of > for opening blockquotes, which is standard in e-mail clients and such.

      4 votes
      1. [4]
        smores
        Link Parent
        Tildes also uses Markdown! The problem with Markdown is that there is no formal specification for it, and so there are just as many Markdown languages as there are parsers. CommonMark is an...

        Tildes also uses Markdown! The problem with Markdown is that there is no formal specification for it, and so there are just as many Markdown languages as there are parsers. CommonMark is an attempt at a formal spec for Markdown, but most parsers that try to implement it don't do so perfectly (and even when they do, the spec itself is pretty chaotic). Another problem is that the original Markdown implementation and CommonMark are both very limited, and folks really want to be able to do a lot more with it than it initially had support for. This is why there exists "GitHub-flavored Markdown", which adds things like tables, and "Reddit-flavored Markdown", which has the >! spoiler tags.

        Honestly I think that GitHub flavored markdown is probably the closest thing we have to a standard? But it doesn't have spoiler tags! It does support limited HTML tags, though, including details/summary

        8 votes
        1. Protected
          (edited )
          Link Parent
          I've written two wikis on github and I wouldn't recommend relying on HTML the way they do. They don't support the style attribute, and it's a massive headache to get anything to look the way you...

          I've written two wikis on github and I wouldn't recommend relying on HTML the way they do. They don't support the style tag attribute, and it's a massive headache to get anything to look the way you want (if at all possible). Their markdown is fine though.

          1 vote
        2. [2]
          Gazook89
          Link Parent
          It's not really revelant to the original topic, but since we are talking about flavors of markdown.... An open source project i contribute to is a markdown + css editor that provides a live...

          It's not really revelant to the original topic, but since we are talking about flavors of markdown....

          An open source project i contribute to is a markdown + css editor that provides a live preview of an html document, geared towards TTRPG homebrew content-- called Homebrewery / github. We've done a lot with extending markdown ourselves (oh yay, another non-standard variant!). So with ours it's easy to create div and span tags, add style attributes along with pretty much any other attribute etc. There is syntax for variables and other stuff, too.

          Here is a link that covers the div tags.

          But it's always tricky to come up with new syntax that still feels markdown-like, meaning it's readable as just plain text as well. Lots and lots of discussion about that.

          1 vote
          1. smores
            (edited )
            Link Parent
            Hahaha yes, I think we've actually chatted about this before! Yeah, I do contract work for https://moment.dev, who uses Markdown as the serialization format for their rich text editor. Their text...

            Hahaha yes, I think we've actually chatted about this before! Yeah, I do contract work for https://moment.dev, who uses Markdown as the serialization format for their rich text editor. Their text editor, of course, has things like comments, multicolumn sections, and live compute cells. Figuring out how to serialize those to markdown has been.. a journey haha.

      2. [3]
        RheingoldRiver
        Link Parent
        I always assumed it's because of how abysmal >! is to type on mobile

        I believe it descends from a modification of > for opening blockquotes, which is standard in e-mail clients and such.

        I always assumed it's because of how abysmal >! is to type on mobile

        2 votes
        1. [2]
          Protected
          Link Parent
          That makes sense. I don't have any iPhone or Samsung experience; I've always used Android keyboards in which that is not an issue. If any Android users are interested, I'm currently using...

          That makes sense. I don't have any iPhone or Samsung experience; I've always used Android keyboards in which that is not an issue. If any Android users are interested, I'm currently using HeliBoard, which I believe came from a recommendation right here on Tildes!

          2 votes
          1. RheingoldRiver
            Link Parent
            oh interesting! I'm gonna check that out - I'm currently using gboard and it has some nice features like scrolling over the spacebar to scroll back and forth, but it's really bad at mass deleting...

            oh interesting! I'm gonna check that out - I'm currently using gboard and it has some nice features like scrolling over the spacebar to scroll back and forth, but it's really bad at mass deleting a message and its voice recognition sucks a lot

            1 vote