nolanlawson / pinafore

Alternative web client for Mastodon (UNMAINTAINED)
https://pinafore.social
GNU Affero General Public License v3.0
1.02k stars 172 forks source link

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

Closed tepreece closed 1 year ago

tepreece commented 1 year ago

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 commented 1 year ago

LGTM, thanks!

nolanlawson commented 1 year ago

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

tepreece commented 1 year ago

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

Great, thanks!

nolanlawson commented 1 year ago

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

tepreece commented 1 year ago

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 commented 1 year ago

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 :confused:
  6. Click "Show less" again
  7. Now it's collapsed.

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

nolanlawson commented 1 year ago

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