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

Add option to always expand posts marked with content warnings #2342

Merged
merged 6 commits into from
Jan 9, 2023

Conversation

tepreece
Copy link
Contributor

@tepreece tepreece commented Jan 2, 2023

Added an option to always expand posts marked with content warnings. If the option is enabled, posts with content warnings are expanded by default, but can be closed using the "show less" button as usual.

This adds a new intl key. I wasn't sure whether the correct approach was just to add the key to en_US or to add it (untranslated) to every language; I've just done the former for now, but if it does need to be added untranslated to every language please let me know and I'll do so.

Fixes #1997.

@nolanlawson
Copy link
Owner

LGTM, thanks!

@nolanlawson
Copy link
Owner

And no, you don't need to add it elsewhere. The other ones will just default to English.

@tepreece
Copy link
Contributor Author

tepreece commented Jan 8, 2023

And no, you don't need to add it elsewhere. The other ones will just default to English.

Great, thanks!

@nolanlawson
Copy link
Owner

Sorry, but CI appears to be broken right now. #2349 . I would prefer to get tests passing before merging any PR

@tepreece
Copy link
Contributor Author

tepreece commented Jan 8, 2023

Sorry, but CI appears to be broken right now. #2349 . I would prefer to get tests passing before merging any PR

Makes sense - take as long as you need. It looks at first glance to be all unrelated to my PR, but if I have broken anything then please let me know and I'll fix it!

@nolanlawson
Copy link
Owner

It looks like there is a small bug with this:

  1. Enable the setting
  2. Go to a CW'ed post (which is now expanded by default)
  3. It's expanded (good!)
  4. Click "Show less"
  5. It's still expanded 😕
  6. Click "Show less" again
  7. Now it's collapsed.

It should collapse on the first try. I'll look at it.

src/intl/en-US.js Outdated Show resolved Hide resolved
@nolanlawson
Copy link
Owner

Fixed it and added a test to confirm the fix: 04388ff

@nolanlawson nolanlawson merged commit fd4bb4d into nolanlawson:master Jan 9, 2023
alice-werefox pushed a commit to alice-werefox/sema-werefox-cafe that referenced this pull request Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to expand content warnings by default
2 participants