I’m the Tesseract dev, and in the current build, any posts that aren’t your own that have [spoiler] (case-insensitive) in the post title will hide all but the post’s metadata (title, author, community, etc) and the vote/comment bar. Clicking “reveal” shows the post’s contents.

The nitty-gritty implementation details are up to you, but can we, as a group, please come together and handle this flair consistently? I would really love to be able to disable the “Show NSFW” option without missing totally safe-for-work posts due to people abusing the NSFW attribute. I get why people do that, but I’m also tired of playing “porn or spoiler” roulette.

I haven’t added this part yet, but I’m planning to put a “Spoiler” toggle on the create post form which will add [Spoiler] to the post title during the submission if the user didn’t add it manually.

Or if other apps I’m not familiar with are already doing something like this, let’s do that. Either way, let’s get on the same page.

Edit: If there are any other special-case flairs that might be handled similarly, I’m all ears.

  • Mose13@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    5 hours ago

    Blorp dev here. I’m not opposed. Just wanna point out that PieFed has official post flair support and I think Lemmy is adding it in V1?

    I have to check how Tesseract does it, but maybe any [flair] should render as a post flair? I really wish Lemmy let mods edit post title so they could add/remove flairs with that format. Otherwise, anyone can use any flair regardless of what the mods intend. Maybe it’s better just to allow specific whitelisted flairs like [spoiler]?

    Btw, I have a matrix group with some of the other Lemmy/PieFed Client devs. Please DM me if you wanna join.

  • nocturne@nord.pub
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 day ago

    I brought this to the Mlem devs attention and they are working to add it.

    I also mentioned it to the piefed devs hoping for something backend but have not heard anything back about it.

  • idunnololz@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    3 days ago

    Can you correct the case inconsistency in the post. Since you said its case sensitive the fact there is an inconsistency is confusing lmao.

    Nevermind its 5:33 am and I cant read.

    Also can you link to some example posts? Im guessing like abcd [spoiler] efg would trigger it too?

    Thanks in advance

    • Admiral Patrick@dubvee.orgOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 days ago

      Can’t link to the posts directly to demonstrate since the spoiler overlay is only shown in the feed. It’s assumed if you click into the post you want to see the spoiler. I suppose I could change that, but the behavior aligns with how the NSFW tag works.

      To give an example of how it works in the feed, here’s a search link that should work (it’s what I used to make the post screenshot): https://tesseract.dubvee.org/search?type=All&q=posts%3A[spoiler]

      Im guessing like abcd [spoiler] efg would trigger it too?

      Correct. While that wouldn’t turn into a flair (only [flair text] at the beginning or end of the title will be used as flairs), it will trigger the spoiler overlay if [spoiler] appears anywhere in the title. I did this consciously to account for inconsistencies in some of the spoiler usage I’ve seen. It could easily be changed to only trigger on actual flairs (at the beginning or end of the title).

      • Mose13@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        7 hours ago

        What happens if someone direct links you to a NSFW post? I was thinking about detecting if you clicked on the post vs if you were direct linked to a post, and requiring a NSFW toggle based on that.

    • Admiral Patrick@dubvee.orgOP
      link
      fedilink
      English
      arrow-up
      12
      ·
      3 days ago

      Definitely could, but I won’t hold my breath waiting for a feature to make it to the API. There’s enough 3rd party app support and enough people using flairs in the [flair] format, even though it’s not “officially” supported in Lemmy-UI, that I think we’d be safe implementing this.

      And should an API-level flag ever happen, then all apps would need to do is look for that boolean attribute in the Post object rather than checking the title for the spoiler flair - the rest of the handling logic can remain the same. So it’s not like we’d have to make major changes if we ever get an official spoiler flag. It would also be easy to support both so there could be backwards compatibility or for other platforms that may lack an official spoiler flag.