Skip to content
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

GlitchSocial-style content warnings (hidden content includes attachments) #10563

Closed

Conversation

BenLubar
Copy link
Contributor

I don't have a vanilla Mastodon instance set up to test this with, so could someone else verify that content warnings don't crash or stop working or make demons fly out of your nose?

This also adds the icons to represent what type of content was hidden to the web interface but not to the public interface.


This change means that images and videos on posts with content warnings can no longer be made visible without first making the text visible, and that polls on posts with content warnings will be hidden unless the content warning is expanded.

@BenLubar BenLubar marked this pull request as ready for review April 12, 2019 19:19
@ClearlyClaire
Copy link
Contributor

I (obviously) like the idea, and it's a good start, but it introduces several regressions:

  1. video size/aspect ratio isn't set correctly (the same thing probably occurs for images)
  2. clicking on a media will open the status in the dynamic column, in addition to the normal action

In addition, it might cause issues with regards to timeline jumps, but I'd have to check.

  1. is caused by some components (MediaGallery, Video and Card) computing their width at the time they are mounted, but if they are put behind CWs, they are hidden, and their width is thus 0.
    In glitch-soc, this is handled by updating their width in componentDidUpdate, but there are a few tricks with the Video player (I encourage you to look at glitch-soc's code)
  2. is caused by the status content having a click handler while the media previously did not. This could probably be fixed by patching StatusContent's handleMouseUp. Again, I encourage you to read glitch-soc's version of the code.

@BenLubar
Copy link
Contributor Author

Ah, forgot to update this issue with my results:

It seems that the public UI breaks if there are content warnings (images cannot be seen, but the HTML seems like it should work). Polls do show up correctly in the public UI.

@stale
Copy link

stale bot commented Oct 26, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status/wontfix This will not be worked on label Oct 26, 2019
@stale stale bot closed this Nov 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants