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 the Safe browsing filter #636

Closed
fcoveram opened this issue Dec 20, 2021 · 12 comments
Closed

Add the Safe browsing filter #636

fcoveram opened this issue Dec 20, 2021 · 12 comments
Assignees
Labels
🕹 aspect: interface Concerns end-users' experience with the software 🌟 goal: addition Addition of new feature 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: frontend Related to the Nuxt frontend 🔧 tech: vue Involves Vue.js
Projects

Comments

@fcoveram
Copy link
Contributor

Problem

We need to add a filter for showing/hiding mature content in the search results. We discussed time ago to not include the filter in the filter sidebar as it is a sensitive criterion.

Alternatives

The proposal shows a Safe browsing link that opens a popover showing a description and a toggle filter. The interaction goes as it follows:

  1. On hover, the Safe browsing turns dark-charcoal.
  2. On click, it opens a popover with a description and a toggle.
  3. When enabling the toggle, the results load again without closing the popover.
  4. Clicking outside closes the popover.
CleanShot.2021-12-20.at.10.45.55.mp4

Additional context

The popover design has a shadow popover style from the WordPress Design Library.

@fcoveram fcoveram added 🟩 priority: low Low priority and doesn't need to be rushed 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work ✨ goal: improvement Improvement to an existing user-facing feature 💻 aspect: code Concerns the software code in the repository labels Dec 20, 2021
@sarayourfriend
Copy link
Contributor

sarayourfriend commented Dec 20, 2021

I think we'll need a VToggle component for this as well. We can copy styles from Gutenberg as I think they're similar, just with different colors!

Some notes about accessibility for whomever implements this: when a popover is opened using the keyboard, I think the logical thing to focus when it opens is the toggle. That means the context of the description visually above the toggle could be lose. We'll want to make sure that's included in the label of the toggle somehow, I think?

@fcoveram
Copy link
Contributor Author

I just commented something related to popover interactions on mobile in WordPress/openverse-frontend#541, and now rambling around the idea of moving the filter to the filter sidebar. That will simplify the interaction on desktop and mobile, and we can move it to the end of the list since it is a sensitive criterion.

When a popover is opened using the keyboard, I think the logical thing to focus when it opens is the toggle. That means the context of the description visually above the toggle could be lose.

I am not sure about focusing the toggle first. The word Safe browsing is not completely clear and it makes sense to me to focus the description first. However, and based on the idea dropped above, I wonder how the a11y navigation works among filters.

Navigating per each checkbox sounds demanding if you want to reach the last category or any filter nearby the end. In that case, I wonder how feasible is to implement a navigation per category, and then enter into it to navigate between the filters. In that way, we can show all filters and allow an easiest navigation. Here is a quick draft of what I am saying.

CleanShot 2021-12-21 at 10 15 13@2x

@sarayourfriend
Copy link
Contributor

Navigating per each checkbox sounds demanding if you want to reach the last category or any filter nearby the end. In that case, I wonder how feasible is to implement a navigation per category, and then enter into it to navigate between the filters. In that way, we can show all filters and allow an easiest navigation. Here is a quick draft of what I am saying.

You're describing the same "composite" concept that we discussed for the audio results. I think it's okay to use, but I'm not sure, it might be unusual for a form. The WAI-ARIA examples about grouping form items doesn't mention doing anything like that: https://www.w3.org/WAI/tutorials/forms/grouping/

Gutenberg's block settings sidebar also doesn't do anything like this, but it does allow for collapsing groups of settings that could make navigating through all the settings easier.

@fcoveram
Copy link
Contributor Author

It does allow for collapsing groups of settings that could make navigating through all the settings easier.

Right, that makes sense. I think that waiting for navigational data will help us to figure out what is more beneficial.

Going back to the feature. What do you think of the idea below?

Rambling around the idea of moving the filter (safe browsing) to the filter sidebar. That will simplify the interaction on desktop and mobile, and we can move it to the end of the list since it is a sensitive criterion.

@sarayourfriend
Copy link
Contributor

sarayourfriend commented Dec 21, 2021

Rambling around the idea of moving the filter (safe browsing) to the filter sidebar. That will simplify the interaction on desktop and mobile, and we can move it to the end of the list since it is a sensitive criterion.

Makes sense to me I think... but to clarify, did you mean at the start/top of the list? It would definitely make it simpler to have it in one place on both

I discussed this with @panchovm in private and realized I was misunderstanding what "sensitive" meant. We want to make it hard for users to accidentally turn this filter off, so putting it at the end makes it harder to find and therefore harder to accidentally toggle.

@krysal
Copy link
Member

krysal commented Dec 21, 2021

Looks good with the toggle button if we go with that proposal. Regarding the move to the filter sidebar, as there are many sources, this filter will end well below, so I think it can be even more discreet than the link with the popover.

@fcoveram
Copy link
Contributor Author

I have been playing with a new idea and this one looks good.

CleanShot 2021-12-21 at 18 00 34@2x

The filter is a toggle separated from the filters by a divider with a shorter description below the category title. The action is on the left, and label on the right following the logic of all filters.

@fcoveram
Copy link
Contributor Author

The Releases file has been updated with this change on desktop and mobile. The toggle component is from the WP Design Library.

@obulat obulat added 🌟 goal: addition Addition of new feature 🕹 aspect: interface Concerns end-users' experience with the software 🔧 tech: vue Involves Vue.js and removed ✨ goal: improvement Improvement to an existing user-facing feature 💻 aspect: code Concerns the software code in the repository 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work labels Mar 18, 2022
@krysal krysal added 🟨 priority: medium Not blocking but should be addressed soon and removed 🟩 priority: low Low priority and doesn't need to be rushed labels May 2, 2022
@anton202
Copy link
Contributor

can i work on this?

@zackkrida
Copy link
Member

@anton202 Sure, you can work on this. The team is going to be discussion the handling of 'sensitive' content this week and may make some changes to the language of this control.

For now, if you do work on this please use the phrase 'sensitive content' instead of 'mature content' where relevant. Thank you!

@zackkrida
Copy link
Member

@anton202 we should put this behind a TOGGLE_SENSITIVE_CONTENT feature flag while we do further testing of the UI. Could you update your PR to include that at some point? If you have any questions about feature flags @dhruvkb would be a great person to ask.

@openverse-bot openverse-bot added this to Backlog in Openverse Feb 22, 2023
@obulat obulat transferred this issue from WordPress/openverse-frontend Feb 22, 2023
@obulat obulat added the 🧱 stack: frontend Related to the Nuxt frontend label Feb 22, 2023
@anton202 anton202 mentioned this issue Mar 2, 2023
7 tasks
dhruvkb pushed a commit that referenced this issue Apr 14, 2023
* Remove second the

* Add before & after post counts

* Add postgres result operator

* Add record reporting function

* Use postgres result operator

* Don't render native objects, cast strings

The HTTP operators and sensors will freak out and fail if this is enabled, so we need to have it disabled at the DAG level and parse the XComs by hand instead.

* Remove ~, at note about exactness

* Add tests for PostgresResultOperator

* Add tests for record reporting step

* Use slack markdown not *actual* markdown

* Add missing it

Co-authored-by: Staci Cooper <63313398+stacimc@users.noreply.github.com>

* Use common openledger API connection ID from constants

* Simplify record reporting logic

Co-authored-by: Staci Cooper <63313398+stacimc@users.noreply.github.com>
@zackkrida
Copy link
Member

Closing, this was redesigned and refined as part of #791

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕹 aspect: interface Concerns end-users' experience with the software 🌟 goal: addition Addition of new feature 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: frontend Related to the Nuxt frontend 🔧 tech: vue Involves Vue.js
Projects
Archived in project
Openverse
  
Backlog
Development

No branches or pull requests

6 participants