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 NSFW warning infobox on first visit #1851

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Codixer
Copy link
Member

@Codixer Codixer commented Mar 12, 2025

Fixes #1450

Add a warning infobox for NSFW content when first visiting the Atlas.

  • Modify web/index.html to include a modal warning infobox about NSFW content that appears on the first visit, with a general disclaimer and a tickbox to accept the warning.
  • Change web/_js/main/main.js to add functions for checking if the user has previously dismissed the NSFW warning, showing the NSFW warning infobox, and preventing loading the data until the popup has been accepted.
  • Modify web/_js/config.js to add a configuration option for displaying the NSFW warning infobox.

For more details, open the Copilot Workspace session.

Fixes #1450

Add a warning infobox for NSFW content when first visiting the Atlas.

* Modify `web/index.html` to include a modal warning infobox about NSFW content that appears on the first visit, with a general disclaimer and a tickbox to accept the warning.
* Change `web/_js/main/main.js` to add functions for checking if the user has previously dismissed the NSFW warning, showing the NSFW warning infobox, and preventing loading the data until the popup has been accepted.
* Modify `web/_js/config.js` to add a configuration option for displaying the NSFW warning infobox.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/placeAtlas/atlas-2023/issues/1450?shareId=XXXX-XXXX-XXXX-XXXX).
Copy link

netlify bot commented Mar 12, 2025

Deploy Preview for place-atlas-2023 ready!

Name Link
🔨 Latest commit f0e2ee4
🔍 Latest deploy log https://app.netlify.com/sites/place-atlas-2023/deploys/67d57e1114cc660008b05987
😎 Deploy Preview https://deploy-preview-1851--place-atlas-2023.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 73 (🟢 up 4 from production)
Accessibility: 90 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 100 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@Codixer
Copy link
Member Author

Codixer commented Mar 12, 2025

chrome_fTmppBi4OB

@Codixer Codixer requested review from Hans5958 and mxdanger March 12, 2025 23:20
@Codixer Codixer self-assigned this Mar 12, 2025
@Codixer Codixer added the enhancement New feature or request label Mar 12, 2025
Copy link
Member

@Hans5958 Hans5958 left a comment

Choose a reason for hiding this comment

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

I prefer having the modal (not to be confused as an infobox) as the general disclaimer as I stated on #1450 (comment).

PS. ai generated aah pr body 💀

@Codixer
Copy link
Member Author

Codixer commented Mar 13, 2025

@Hans5958 Could you explain?
image

I assume you are referring to the nsfw warning at the top. Do you mean it should be seperate or what exactly?

@mxdanger
Copy link
Member

Should this section be changed?

Place Atlas has no affiliation with all entries.

This sounds better:

Place Atlas has no affiliation with any entries.

@Hans5958
Copy link
Member

Hans5958 commented Mar 15, 2025

Could you explain? I assume you are referring to the nsfw warning at the top. Do you mean it should be seperate or what exactly?

What I'm saying that the modal should contain general disclaimer about the content, not just NSFW. This is what I explained on #1450 earlier.

My expectation is that the contents of the modal (which you defined with an ID called nsfwWarningModal) would be something of the following. Please adjust it so it is more formal (just in case...). I bet your AI tools could improve my English.

Disclaimer

Before continuing, please note of the following.

  • This website contains entries that are user-submitted and may be not accurate. The organization that operates this project, Place Atlas Intiative, is not affiliated to any of the entries on this website.
  • Not safe for work content intended for viewers aged 18 and above may be included. Viewer discretion is advised.
  • Spoilers of entertainment media (ie. video games, TV series, movies) may be included. Viewer discretion is advised.
  • This project and the operating organization is not affiliated with Reddit or any of its subsidiaries.

EDIT: Oh, I just realised that you included the disclaimer. If that's the case, what I meant is that I want that disclaimer as the main thing instead, and the NSFW warning is included inside the disclaimer.

PS. The bullet points on #1450 is just notes. I expect that to be expanded to have a formal language, like what I did on the example above.

@Codixer
Copy link
Member Author

Codixer commented Mar 15, 2025

OHHHHH, I see, thanks.

@Codixer
Copy link
Member Author

Codixer commented Mar 15, 2025

@Hans5958
image

@Codixer
Copy link
Member Author

Codixer commented Mar 15, 2025

Note: It checks the domain now, so you only get the warning on the prod domain

@Codixer Codixer requested a review from Hans5958 March 17, 2025 10:30
Copy link
Member

@Hans5958 Hans5958 left a comment

Choose a reason for hiding this comment

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

Please review my comments. Other than that, looks good to me.

Comment on lines +431 to +435
const disclaimerConfig = {
showWarning: true
};
window.disclaimerConfig = disclaimerConfig;

Copy link
Member

Choose a reason for hiding this comment

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

Again, move this to main.js because this file is for instance configuration.

<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="disclaimerModalLabel">Place Atlas disclaimer</h5>
Copy link
Member

Choose a reason for hiding this comment

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

Either I would have "Atlas disclamer" or just "Disclaimer". I prefer just "Disclaimer", but if you prefer the long one, make sure to use "r/place Atlas Disclaimer" (note the "r/place)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NSFW warning when first entering the Atlas
4 participants