lemmy
lemmy copied to clipboard
Add official support for spoilers in image-only posts.
Requirements
- [X] Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support
- [X] Did you check to see if this issue already exists?
- [X] Is this only a feature request? Do not put multiple feature requests in one issue.
- [X] Is this a UI / front end issue? Use the lemmy-ui repo.
Is your proposal related to a problem?
Spoilers in image-only posts are currently not supported.
Describe the solution you'd like.
Acceptance Criteria:
- [Frontend] When creating a post, add a "spoiler" checkbox in the submission form, right below the image field.
- [Backend] When a post submission's spoiler checkbox is marked, add metadata to the post indicating the image contains spoilers. (This might involve modifying the posts schema? I haven't checked lemmy source, so I couldn't say)
- [Federation] Posts marked with spoilers will also mark the image as sensitive for compatibility with other federated platforms (e.g. Mastodon)
- [Frontend] When displaying image posts with the spoiler flag set, display a custom fixed "spoiler" thumbnail (settable in the community settings) instead of the image's actual thumbnail.
- Optional (this could be considered a separate subfeature): Allow me to configure a community's settings so that all image submissions for that community are considered spoilers.
Describe alternatives you've considered.
- A workaround involves posting the image in a comment and posting a separate, blurred image as the main post. This is definitely not optimal and hinders accessibility (other platforms will only read and store the blurred image), besides the fact that it wastes storage space AND bandwidth.
- Another workaround could consist in changing a community's CSS so that all image posts have their thumbnails change the content for a fixed "spoiler" URL. This could also be applied to submissions with a certain text (e.g. "[spoiler]") in the title, but that's not user-friendly.
- Finally, you could embed an image in a text post and spoil-tag it, but this is cumbersome as it involves having to click two times (one to open the post in a separate page, another for expanding the spoiler). This also disturbs the flow when browsing from the home page: You can't expand a spoiler tag without having to open the text post in a separate page.
Additional context
This use-case is similar to tagging images as NSFW, which I believe hasn't been implemented yet either. You might want to implement both use cases (NSFW and SPOILER) in a single PR.
I believe including text posts would be a good idea, some apps like jerboa have text previews which can contain spoilers.
I currently have a bit of work on my plate getting a bot to work but once I'm done I can take a look at this and create a PR draft.
I have found a mastodon docs on how it implemented spoilers: https://docs.joinmastodon.org/spec/activitypub/#sensitive On mastodon anyone can view sensitive content and it is expected of users to put description of type of content in "Content warning" (CW for short) field docs
In #317 there is discussion to implement major feature to implement tags that would include NSFW, CW and spoiler tags
Seems to be resolved in https://github.com/LemmyNet/lemmy/pull/3292