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

do not automatically show media previews of nsfw posts #300

Merged
merged 4 commits into from
Dec 5, 2023

Conversation

e-five256
Copy link
Member

@e-five256 e-five256 commented Nov 25, 2023

  • do not automatically show media previews of nsfw entry / post / entry comment / post comment
  • rewrite templates to use set and use defaults on cookie getters rather than null check

the majority of this change is: 'show-preview': SHOW_PREVIEW is same as 'true' and not [entry|post|comment].isAdult
someone mentioned that they wished to see this change once, and I agree with it, you can still preview NSFW media manually, but this doesn't automatically open it on you

I guess perhaps it could also be a user setting, if people do want to browse nsfw mags for instance perhaps they want all to open automatically, this has always been an issue I have had where I feel like there's complete consensus of NSFW vs NSFL yet it always never is implemented (small rant)

the rest is I updated the four components to use set vars similar to what @asdfzdfj did for the subscription sidebar. That looked far more readable to me instead of long constants in the middle of the component. I also added defaults for each setting, so for example SHOW_MAGAZINE_ICONS defaults to true if not set so the code doesn't need to do the first half of what it was: not SHOW_MAGAZINE_ICONS or SHOW MAGAZINE_ICONS is true

some examples if they make sense, this is just me opening the page with show media preview on for both entries and posts, not clicking anything

  • entry
    image
  • entry comments
    image
  • post and post comments
    image

rewrite templates to use with and use defaults on cookie getters rather than null check
@e-five256 e-five256 added the frontend Visual issues, improvements, bugs or other aspects relating mostly to the front end label Nov 25, 2023
nobodyatroot
nobodyatroot previously approved these changes Nov 25, 2023
@e-five256
Copy link
Member Author

e-five256 commented Nov 25, 2023

need to double check this after #301 (edit: appears to work fine)

also feeling less certain, after I opened the PR I edited the comment in about user setting, perhaps worth getting more feedback from people on if this would ruin their experience for browsing nsfw mags

the problem I'm having is I want to add dozens of user and admin settings but each of those being a column seems like not a great table structure. that might just be me, my view on table management is less columns and no nullable fields, if it's optional it should be in another table as not null and FK'd instead, but that's just one way of doing things

@e-five256 e-five256 marked this pull request as draft November 27, 2023 15:19
@e-five256 e-five256 marked this pull request as ready for review December 5, 2023 22:23
@e-five256
Copy link
Member Author

since it didn't seem like there were strong opinions on this, just going to mark it as ready, easy enough to revert if people end up having problems with it or we want to come back and add an additional user setting to allowing nsfw auto preview

@e-five256 e-five256 merged commit 6b60b41 into main Dec 5, 2023
7 checks passed
@e-five256 e-five256 deleted the e5/nsfw-no-auto-preview branch December 5, 2023 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Visual issues, improvements, bugs or other aspects relating mostly to the front end
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants