Skip to content

Adding sensitive content warning/filter to detail and search#571

Open
ajolipa wants to merge 1 commit into
developfrom
RB-content-warning
Open

Adding sensitive content warning/filter to detail and search#571
ajolipa wants to merge 1 commit into
developfrom
RB-content-warning

Conversation

@ajolipa

@ajolipa ajolipa commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

In this PR

This PR does two things:

  • On image searches, adds a toggle to the search facets list to hide results with content_warning: true;
  • On record detail pages, adds a check for whether any of the related media have a content warning, and if so hides the media viewer behind a button the user has to click to proceed.

Notes

@netlify

netlify Bot commented Mar 2, 2026

Copy link
Copy Markdown

Deploy Preview for padp-staging ready!

Name Link
🔨 Latest commit 4e1b7f2
🔍 Latest deploy log https://app.netlify.com/projects/padp-staging/deploys/69a4d378b72a8900083ecb6d
😎 Deploy Preview https://deploy-preview-571--padp-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@netlify

netlify Bot commented Mar 2, 2026

Copy link
Copy Markdown

Deploy Preview for pss-scavenger-hunt ready!

Name Link
🔨 Latest commit 4e1b7f2
🔍 Latest deploy log https://app.netlify.com/projects/pss-scavenger-hunt/deploys/69a4d377bee41f000804a296
😎 Deploy Preview https://deploy-preview-571--pss-scavenger-hunt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@netlify

netlify Bot commented Mar 2, 2026

Copy link
Copy Markdown

Deploy Preview for gbof-c19nyc-staging ready!

Name Link
🔨 Latest commit 4e1b7f2
🔍 Latest deploy log https://app.netlify.com/projects/gbof-c19nyc-staging/deploys/69a4d3789b83430008c53bbb
😎 Deploy Preview https://deploy-preview-571--gbof-c19nyc-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@netlify

netlify Bot commented Mar 2, 2026

Copy link
Copy Markdown

Deploy Preview for juel-staging ready!

Name Link
🔨 Latest commit 4e1b7f2
🔍 Latest deploy log https://app.netlify.com/projects/juel-staging/deploys/69a4d3782f26da0008fade8d
😎 Deploy Preview https://deploy-preview-571--juel-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@netlify

netlify Bot commented Mar 2, 2026

Copy link
Copy Markdown

Deploy Preview for juel-ancestry ready!

Name Link
🔨 Latest commit 4e1b7f2
🔍 Latest deploy log https://app.netlify.com/projects/juel-ancestry/deploys/69a4d37819a47c00089dccc5
😎 Deploy Preview https://deploy-preview-571--juel-ancestry.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@ajolipa
ajolipa requested a review from camdendotlol March 2, 2026 00:02
@netlify

netlify Bot commented Mar 2, 2026

Copy link
Copy Markdown

Deploy Preview for universities-studying-slavery ready!

Name Link
🔨 Latest commit 4e1b7f2
🔍 Latest deploy log https://app.netlify.com/projects/universities-studying-slavery/deploys/69a4d378282ffd000883e504
😎 Deploy Preview https://deploy-preview-571--universities-studying-slavery.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@netlify

netlify Bot commented Mar 2, 2026

Copy link
Copy Markdown

Deploy Preview for juel-life ready!

Name Link
🔨 Latest commit 4e1b7f2
🔍 Latest deploy log https://app.netlify.com/projects/juel-life/deploys/69a4d3787818620008ff1a54
😎 Deploy Preview https://deploy-preview-571--juel-life.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@netlify

netlify Bot commented Mar 2, 2026

Copy link
Copy Markdown

Deploy Preview for registro-project ready!

Name Link
🔨 Latest commit 4e1b7f2
🔍 Latest deploy log https://app.netlify.com/projects/registro-project/deploys/69a4d37850d48000080c96c8
😎 Deploy Preview https://deploy-preview-571--registro-project.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@netlify

netlify Bot commented Mar 2, 2026

Copy link
Copy Markdown

Deploy Preview for libertos ready!

Name Link
🔨 Latest commit 4e1b7f2
🔍 Latest deploy log https://app.netlify.com/projects/libertos/deploys/69a4d3786cb0a20008c63cbf
😎 Deploy Preview https://deploy-preview-571--libertos.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@netlify

netlify Bot commented Mar 2, 2026

Copy link
Copy Markdown

Deploy Preview for gamepossible ready!

Name Link
🔨 Latest commit 4e1b7f2
🔍 Latest deploy log https://app.netlify.com/projects/gamepossible/deploys/69a4d378b72a8900083ecb72
😎 Deploy Preview https://deploy-preview-571--gamepossible.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@camdendotlol camdendotlol left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, just a couple small changes.

const config = useSearchConfig();


if (!(config.type === 'image')) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's do config.type !== 'image' for clarity


const service = ServiceFactory.getService(model);
const manifests = await service.getRelatedManifests(uuid);
const { mediaContents } = await service.getRelatedMedia(uuid);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The content warning field should be included in the manifests, so it would be better for load times to get it from there instead of adding a second fetch request.

See

const showContentWarning = useMemo(() => {
for an example that can probably be factored out into a helper function and shared between this component and that one.

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.

2 participants