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

Implementation plan: Blurring sensitive content in the frontend #2118

Merged
merged 15 commits into from
May 24, 2023

Conversation

dhruvkb
Copy link
Member

@dhruvkb dhruvkb commented May 17, 2023

Fixes

Fixes #938 by @sarayourfriend

Description

This PR adds an implementation plan for blurring sensitive content in the frontend. You can read it here: https://docs.openverse.org/_preview/2118/projects/proposals/trust_and_safety/detecting_sensitive_textual_content/20230506-implementation_plan_frontend_blurring_sensitive.html

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.
  • I ran the DAG documentation generator (if applicable).

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@dhruvkb dhruvkb requested a review from a team as a code owner May 17, 2023 03:37
@dhruvkb dhruvkb requested review from fcoveram and stacimc May 17, 2023 03:37
@github-actions github-actions bot added the 🧱 stack: documentation Related to Sphinx documentation label May 17, 2023
@dhruvkb dhruvkb added 🟨 priority: medium Not blocking but should be addressed soon 🌟 goal: addition Addition of new feature 📄 aspect: text Concerns the textual material in the repository labels May 17, 2023
@github-actions
Copy link

Full-stack documentation: https://docs.openverse.org/_preview/2118

Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again.

You can check the GitHub pages deployment action list to see the current status of the deployments.

@dhruvkb
Copy link
Member Author

dhruvkb commented May 17, 2023

See also #2118 for an exploration of how the feature-flags implementation can be presented to the users as preferences.

Copy link
Member

@zackkrida zackkrida left a comment

Choose a reason for hiding this comment

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

This is very close to LGTM, there are two things I would like to see addressed:

From the project proposal:

Sensitive results on the search results page are blurred. Users can unblur and reblur individual results through a simple and clear interaction on the search results page. In addition to being able to opt-in to having sensitive results included in their query, users can disable blurring by default. This parameter is stored in the application state. If users disable blurring by default, there is not an option to “reblur” images.

I don't see mention of this state in this implementation plan. It seems we might need to store a list of "unblurred" IDs in app storage.

https://docs.openverse.org/projects/proposals/trust_and_safety/detecting_sensitive_textual_content/20230309-project_proposal_detecting_sensitive_textual_content.html#id3

Some mention of these analytics events would be useful as well.

Co-authored-by: Zack Krida <[email protected]>
@dhruvkb dhruvkb marked this pull request as draft May 17, 2023 17:43
@dhruvkb
Copy link
Member Author

dhruvkb commented May 17, 2023

Drafted to address review suggestions.

@AetherUnbound AetherUnbound added the 🧭 project: implementation plan An implementation plan for a project label May 17, 2023
@dhruvkb
Copy link
Member Author

dhruvkb commented May 18, 2023

I don't see mention of this state in this implementation plan. It seems we might need to store a list of "unblurred" IDs in app storage.

  1. I should expand on the blur_sensitive toggle to describe how it will be stored in the state.

  2. I don't understand why we would need to store individual IDs. The description seems to be regarding the toggle in the search sidebar that blurs or clears all results.

@dhruvkb dhruvkb marked this pull request as ready for review May 18, 2023 09:08
@zackkrida
Copy link
Member

I don't understand why we would need to store individual IDs. The description seems to be regarding the toggle in the search sidebar that blurs or clears all results.

Oops, I quoted too much @dhruvkb, I just meant this part:

Users can unblur and reblur individual results through a simple and clear interaction on the search results page.

It's a fairly minor question, but when an image is unblurred, where do we store that state, so that navigating from a single result back to the search results, all the images a user has manually un-blurred remain so?

@zackkrida zackkrida self-requested a review May 18, 2023 13:02
@dhruvkb
Copy link
Member Author

dhruvkb commented May 18, 2023

Users can unblur and reblur individual results through a simple and clear interaction on the search results page.

Oooh, I misread and misinterpreted that to mean the view/hide button on the single result page. IIRC such an interaction is also not present in the design mockups.

To enable that interaction, the IDs of images unblurred in a session can be stored in sessionStorage so that it is also reset along with the global blur/unblur setting. I'll update that in the plan.

@obulat obulat requested review from sarayourfriend and removed request for fcoveram and obulat May 22, 2023 14:04
@obulat
Copy link
Contributor

obulat commented May 22, 2023

I've removed myself from the reviewers list and requested a review from @sarayourfriend .

Copy link
Collaborator

@sarayourfriend sarayourfriend left a comment

Choose a reason for hiding this comment

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

LGTM so far. There is one thing missing, which is the usage of the sensitivity field from the API to show different text on the single result page.

Here is the link to the disclaimer in the designs: https://www.figma.com/file/bDTfGzBit8rGRPktOR1cu4/Safe-content-browsing-flow?type=design&node-id=1140-27389&t=6IBY0jhgf8sSVwCs-4

The designs themselves don't make it clear that this is the case aside from the implication in the text, but here is the relevant comment from the original design issue: #791 (comment)

It's probably a mostly trivial feature aside from the fact that we won't have information about whether providers have marked something as sensitive because we don't ingest anything that is marked sensitive by providers at the moment. So the only two possible pieces of copy (three if you count the combination) is that Openverse user's reported the content as sensitive and that we detected sensitive text.

@fcoveram Can you clarify something in the designs? The words in pink in the disclaimer: are they meant to be links or just emphasised? I vaguely recall the idea that we'd write a page describing how content sensitivity is determined and moderated, but we actually don't have any work set aside for that, neither in this implementation plan nor explicitly in the project proposal.

@dhruvkb Regardless of whether it was part of the original discussion, I think we should indeed have such a page, especially to describe what we mean by sensitive textual content. We should explain clearly the huge caveats in our process, it's extreme naïveté and imperfectness and that we're actively iterating to make it better but chose a simpler approach to begin with to improve accessibility sooner than later. If this IP included one more step to add such a page, without needing to write much of anything specific about the text in this IP (leaving that up to the implementing PR), that would be sufficient.

@dhruvkb dhruvkb requested a review from sarayourfriend May 23, 2023 10:45
Copy link
Collaborator

@sarayourfriend sarayourfriend left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@dhruvkb dhruvkb merged commit 2f37a42 into main May 24, 2023
@dhruvkb dhruvkb deleted the blurring_plan branch May 24, 2023 09:28
@fcoveram
Copy link
Contributor

The words in pink in the disclaimer: are they meant to be links or just emphasised?

Links to internal pages. The idea comes from this comment (quote)

…Knowing that an image is marked as "sensitive" is insufficient information. Content warnings should come with specific information about the type of content contained.

You're right that it wasn't considered in the planning or implementation. I think we should add it and ask comms folks for help on the best way to put it down.

@sarayourfriend
Copy link
Collaborator

@dhruvkb please create the milestone and issues for this implementation so that work can commence on it. Once you've done so, can you update the project thread with a link to the new milestone under the "Issues" heading? Thanks.

@dhruvkb
Copy link
Member Author

dhruvkb commented Jun 1, 2023

Created the milestone#12 and linked it to the project thread. I'll create and add issues to it.

@sarayourfriend
Copy link
Collaborator

@dhruvkb Can you confirm that you are still planning to create the issues for this implementation plan? If you're not able to do so that I can delegate it to someone else or do it myself. I see two issues to do in the milestone, but the IP makes it seem like there would be far more than two issues (step 1 probably needs an issue per component and the other two steps need their own). Is my understanding of the intended issues accurate?

@dhruvkb
Copy link
Member Author

dhruvkb commented Jun 14, 2023

More issues are definitely needed but the Internet availability on my trip has been pretty bad.

If someone could create more, I'd appreciate it, or I can create them when I get back on the 16th.

@sarayourfriend
Copy link
Collaborator

No worries, I don't think it's urgent to happen before the 16th when you are back from AFK (and I didn't expect a response until then either, I should have clarified). Just wanted to understand what the intention and status was, is all. Thanks for the update and enjoy the rest of your time off!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📄 aspect: text Concerns the textual material in the repository 🌟 goal: addition Addition of new feature 🟨 priority: medium Not blocking but should be addressed soon 🧭 project: implementation plan An implementation plan for a project 🧱 stack: documentation Related to Sphinx documentation
Projects
Status: Accepted
Archived in project
Development

Successfully merging this pull request may close these issues.

Implementation Plan: Blurring sensitive results
7 participants