New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a click-to-view spoiler system #460

Merged
merged 2 commits into from Jan 25, 2017

Conversation

Projects
None yet
2 participants
@blackle
Collaborator

blackle commented Jan 12, 2017

this is to make spoilers/content warnings possible, and serves as a language independent solution to #239 and a replacement to rot13

here's a video of it in action https://www.youtube.com/watch?v=jQOapNNn8F0&

this might need some more testing, I haven't tested federation but I made it so it adds a "#spoiler" tag like sensitive content get the "#nsfw" tag, and consumes feeds with the same convention

I still don't know if this is the "right" solution to #239, so it might need some public vote? even if this doesn't get accepted it's still a good development exercise for me, so no skin off my back

@blackle blackle changed the title from Implement a click-to-view spoiler system to WIP: Implement a click-to-view spoiler system Jan 12, 2017

@blackle

This comment has been minimized.

Collaborator

blackle commented Jan 13, 2017

I've updated it quite a bit, you can see the changes here: https://www.youtube.com/watch?v=0Y3T6Xz5h7o

it's nearly finished, I just need to test how it federates. I also want to add a timeline filter so you can filter by content warning'd toots

@Gargron

This comment has been minimized.

Member

Gargron commented Jan 13, 2017

This is exactly how I envisaged it! Or mostly, at least. Forgive for the delay in merging. I want to finish up my site settings feature first. As soon as I'm done with that I wanna merge this and polish it up a little. Like, the content warning input could have the same style as the regex filter input in home column settings, that would probably be less visually distracting. Also, I'm gonna see how you handled federation but I think it would be sensible to use an extra tag for the extra content, that way the normal ´´ would contain the content warning (it's the tag that every OStatus implementation supports atm) and the actual content would be in something like <extendedContent /> (or a different name, not sure). That way it would work like progressive enhancement and older platforms wouldn't see disturbing content accidentally. Make sense?

@Gargron

This comment has been minimized.

Member

Gargron commented Jan 13, 2017

Alright, skimmed through changed files. The user facing part is, as I said, almost on point. Just gotta clean up the storage and federation. I think it would be worth it to add an extra column for the content warning rather than re-use text

@blackle

This comment has been minimized.

Collaborator

blackle commented Jan 13, 2017

Thanks so much!

IMO It might be good to keep the style of the content warning box similar to the compose box, since it's a required field when visible and also will become part of the status itself

I'll likely push up a "Show posts with content warnings" filter for the timeline tonight, so don't merge before then

on the actual implementation side it works like described in the first description of this PR, the first line of the status is the CW and the rest is covered by a click-to-show. when it renders there's a function wrap_spoilers in formatter that basically adds the spoiler class to every line but the first, and that's how it knows to render it

@blackle

This comment has been minimized.

Collaborator

blackle commented Jan 13, 2017

hmm yeah, maybe an extra text field for the spoiler could be better. I can put that in tonight if you'd like

@blackle

This comment has been minimized.

Collaborator

blackle commented Jan 14, 2017

I added a "spoiler_text" column and used that instead of "text"

it's about functional now, I think it would be worth merging so you can look at how it federates

I'll make the "Show statuses with content warnings" filter a separate PR when I get to it.

I was also wondering what your opinion on putting the content warning box above the compose box would be, as that would make it clear to the user how it's formatted after posting (warning above content)

@blackle blackle changed the title from WIP: Implement a click-to-view spoiler system to Implement a click-to-view spoiler system Jan 14, 2017

@blackle

This comment has been minimized.

Collaborator

blackle commented Jan 21, 2017

What's the status on this, does it need more work before merging or are you waiting for a good time to merge and work on it yourself?

@Gargron Gargron merged commit f8da0dd into tootsuite:master Jan 25, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@riking riking referenced this pull request Apr 5, 2017

Closed

CW should include the image, too #1010

2 of 2 tasks complete

alpaca-tc pushed a commit to pixiv/mastodon that referenced this pull request Jun 15, 2017

akihikodaki pushed a commit to kagucho/mastodon that referenced this pull request Jan 21, 2018

Merge pull request tootsuite#460 from kemenaran/patch-1
Apps.md: add the BirdSite browser extension

ThibG pushed a commit to ThibG/mastodon that referenced this pull request May 6, 2018

Merge pull request tootsuite#460 from ThibG/glitch-soc/features/do-no…
…t-scroll-when-mouse-over

Prevent timeline from moving when cursor is hovering over it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment