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

Frontend Settings - "Blur NSFW" and "Auto Expand" #1640

Merged
merged 14 commits into from
Aug 7, 2023

Conversation

tgxn
Copy link
Contributor

@tgxn tgxn commented Jun 27, 2023

This adds settings for "Blur NSFW" and "Auto Expand".
image

Backend Changes: LemmyNet/lemmy#3377

Required Translations:

  "blur_nsfw": "Blur NSFW content",
  "auto_expand": "Auto expand media"

@tgxn
Copy link
Contributor Author

tgxn commented Jun 27, 2023

Icons are now blurred. #1256
image

A few things I'd also like to do/think about:

  • Should NSFW content be auto-expanded? If they have "Show NSFW" on, "Blur NSFW" on, then when content is auto-expanded it should be blurred, or not expanded?
  • Should we listen for scroll events, and only expand posts when they are in view? (This is how it is done by https://git.lemmynsfw.com/lemmynsfw/lemmy-ui/compare/0.18.0...0.18.0-nsfwpatch)
  • Should the community icon be blurred when looking at the community? (ie. the http://localhost:1234/c/testnsfw page)

@alectrocute
Copy link
Contributor

alectrocute commented Jun 27, 2023

Icons are now blurred. #1256 image

A few things I'd also like to do/think about:

  • Should NSFW content be auto-expanded? If they have "Show NSFW" on, "Blur NSFW" on, then when content is auto-expanded it should be blurred, or not expanded?
  • Should we listen for scroll events, and only expand posts when they are in view? (This is how it is done by https://git.lemmynsfw.com/lemmynsfw/lemmy-ui/compare/0.18.0...0.18.0-nsfwpatch)
  • Should the community icon be blurred when looking at the community? (ie. the http://localhost:1234/c/testnsfw page)

#1 and #2 are a no from me. #3 makes sense.

Also, it would be great to give our blurs hard edges (eg. overflow: hidden;).

Let’s let the other contributors chime in.

Edit: Thought about it more – re: #3: I don't think they should be blurred when you're looking at the community. Otherwise, it should probably be blurred.

@tgxn
Copy link
Contributor Author

tgxn commented Jun 27, 2023

#1 and #2 are a no from me. #3 makes sense.

For 1. I was thinking that it's a little confusing of what the expected outcome is, do you want to see NSFW, or have it hidden, or have everything auto-expanded? Maybe we can think about combining this with the spoiler feature somehow? LemmyNet/lemmy#3185
Agreed on point 2, I'd rather just hide them or expand them, whatever the user chooses.

Also, it would be great to give our blurs hard edges (eg. overflow: hidden;).

I was just looking at how to achieve that! I found reducing the radius helps, but a hard overflow makes sense.
image

Let’s let the other contributors chime in.

100%, I'd love to see if these changes make sense to everyone.

@dessalines
Copy link
Member

These fields are included now in lemmy-js-client : 0.19.0-rc.1

@tgxn tgxn marked this pull request as ready for review August 1, 2023 10:52
@SleeplessOne1917
Copy link
Member

Waiting for input from @dessalines, @alectrocute, and/or @jsit before merging.

Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@dessalines dessalines enabled auto-merge (squash) August 7, 2023 16:57
@dessalines dessalines merged commit 9fd75fa into LemmyNet:main Aug 7, 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.

4 participants