Page MenuHomePhabricator

[M] Modify MediaSearch filter language to be consistent and add "all assessments" option
Closed, ResolvedPublic

Description

As a MediaSearch user, I want to be able to search for all media that's been assessed by the community, not just media with a certain type of assessment. In order to do so, we need to change all of the filters to have consistent and clear language.

Acceptance Criteria (updated 9/9/21)

  • Change the behavior of the filter drop-downs to the following:
    • Filters in their default, un-set state should display a general label describing the filter ("Image Size", "Community Assessment", "License" ) that does not reference a specific value.
    • When expanded, only the different options for the filters value should be displayed ("small", "medium", not "small images", "medium images", etc). The first item in each drop-down menu should be "All", which un-sets the particular filter if chosen.
    • An exception to the above behavior is the "sort" filter – there are only two options and one must always be chosen; "relevance" is the default and cannot be un-set.
    • When a filter value is un-set, the label of the filter in its collapsed state should return to the general label for the filter; selecting "all" as a value for the size filter means the closed filter will say "Image size" once again.
    • If this proves to be too complicated / not worth the effort, fall back to "Option 1" in the comments below, where "Community Assessments" becomes the first, selectable option in the assessments drop-down.
  • Add support in both JS and PHP for a new type of assessment: "Any assessment".
    • This should return all files with any sort of community assessment applied. This option should be present in both the image and video tabs.
    • This filter setting should be exposed in the URL parameters as ?assessment=any-assessment. On the back-end it will be equivalent to a haswbstatement search where P6731 can have any value (or at least, Q63348049|Q63348069|Q63348040|Q6998859).
    • This new option must be enabled the same way the other options are, by adding a new item in the array for the config variable $wgMediaSearchAssessmentFilters. The new "any assessment" option should appear first in the list. A separate config patch will be needed to deploy this on production Commons.
  • Design should match the mock-up below.

filters_copy_update.jpg (346×1 px, 40 KB)

Event Timeline

As a MediaSearch user, I want to be able to search for all media that's been assessed by the community, not just media with a certain type of assessment.

I think there are two parts of this:

  1. changing the name of the "unset" state of the filter (the equivalent of all image sizes, etc)
  2. Adding a new option to the filter that returns all media that has received *any* assessment within

What if we presented a dropdown list that worked like this:

  • "Community Assessments" (the initial/default state; clicking this unsets the filter same as all other filters)
  • "All assessments" (returns all media with any assessment regardless of type)
  • "Featured Picture" (this and remaining options work the same as before)
  • "Quality Image"
  • "Valued Image"
  • "Picture of the Day"

Alternatively, we could consider using the checkbox-style modal that we display for custom namespace selection, but I think keeping things as a dropdown would be simpler (and there may not currently be enough options to really justify a more fine-grained selection).

As a MediaSearch user, I want to be able to search for all media that's been assessed by the community, not just media with a certain type of assessment.

I think there are two parts of this:

  1. changing the name of the "unset" state of the filter (the equivalent of all image sizes, etc)
  2. Adding a new option to the filter that returns all media that has received *any* assessment within

What if we presented a dropdown list that worked like this:

  • "Community Assessments" (the initial/default state; clicking this unsets the filter same as all other filters)
  • "All assessments" (returns all media with any assessment regardless of type)
  • "Featured Picture" (this and remaining options work the same as before)
  • "Quality Image"
  • "Valued Image"
  • "Picture of the Day"

I really like this proposal - the only thing I'm not sure about is "Community Assessments" as the name for the initial/default state - because it's not intuitive to me that clicking that would reset the filter. It might be the best option though - I can't think of an alternative that doesn't needlessly complicate things.

I really like this proposal - the only thing I'm not sure about is "Community Assessments" as the name for the initial/default state - because it's not intuitive to me that clicking that would reset the filter. It might be the best option though - I can't think of an alternative that doesn't needlessly complicate things.

Yeah, I'm open to other names for the initial state but can't come up with anything that seems clearer. But from a development perspective, keeping the same behavior as the other filter dropdowns will make this much easier to implement. I think custom behavior makes sense for namespaces (since they are so complicated) but is probably not necessary here.

A slight twist to your ideas @egardner, @CBogen to try and get these filters feeling consistent (Besides the namespace filter for now)

filters_update.jpg (654×1 px, 118 KB)

  1. Remove "All" from the default label on all filters
  2. Label changes to the active selection (Currently works like this)
  3. All active selections are still blue in the dropdown
  4. Community Assessments gets a new default active selection in the dropdown that can be more verbose with the default label giving the context so it's not confusing e.g. "All images" or "All results" or "All media" or "All images shown" or "All media shown" etc.

After chatting with a few folks on the team, it seems like removing the "All" from the default filter copy makes sense and is a good direction to go towards but we are still having some trouble getting the right copy on the assessments filter to make it as clear as possible. The main question being: How do we clearly and succinctly differentiate between showing all results (including all results that have an assessment) and all results that have an assessment.

Some ideas so far (thanks to Carly and Matthias for helping come up with these)

filters.jpg (548×1 px, 97 KB)

All results (1) vs. All media (3)?
All assessments (1) vs. All assessment types (3)?
All assessments (1) vs. Any assessment? (2)?

I think that option number 2 is starting to make sense to me. As Matthias put it...

"Any assessment" avoids confusion over whether it’s <images with all assessments> or <has one of these assessments>while helping distinguish from “all results"

An idea I'm leaning towards...

  • The first selection of "All" is consistent throughout every filter
  • When "All" is selected the default label is shown: "License", "File Type", "Size", "Community Assessments". (There might be a bit of JS trickery here but maps exactly to what Bing and Google image search filters do)
  • "Any Assessment" shows any image/video that has any type of assessment

filters_copy_update.jpg (346×1 px, 40 KB)

Currently the search back-end performs a haswbstatement query with a value like P6731=Q63348049 ("featured image").

Is there a way to do haswbstatement query where P6731 could be any one of the existing values? If not, we may need to create a new Wikidata item to do this.

Currently the search back-end performs a haswbstatement query with a value like P6731=Q63348049 ("featured image").

Is there a way to do haswbstatement query where P6731 could be any one of the existing values? If not, we may need to create a new Wikidata item to do this.

Looks like we could do haswbstatement:P6731 here: https://www.mediawiki.org/wiki/Help:Extension:WikibaseCirrusSearch#haswbstatement

CBogen renamed this task from The first item in the "Community assessments" menu should search for all community assessments to Modify MediaSearch filter language to be consistent and add "all assessments" option.Aug 30 2021, 5:09 PM
CBogen updated the task description. (Show Details)
CBogen removed a subscriber: toberto.
MarkTraceur added a subscriber: MarkTraceur.

Moving back to Needs Design, @egardner will circle back to Matthew to discuss further.

I think part of the problem here is caused by the fact that we are trying to combine the label and the dropdown menu for each filter into a single element.

Since we don't have stand-alone labels for these filter dropdowns, we need to make sure that the "null" option (the default/initial value and the only way for the user to un-set a previously set value) is also suitable as a description of the filter itself.

Default values that also describe their filter
All Licenses ▾ | All File Types ▾ | All Sizes ▾
Default values that do not describe their filter
All ▾ | All ▾ | All ▾

This is what we've been doing so far. This has worked because for filters like size, license, file type, etc. it's simple enough for the default option in a given dropdown to just read:

All ${X}s

All images have a size, so saying "all sizes" is equivalent to un-setting the size filter. Same goes for file type, license (implied at least), and namespace.

This doesn't work for assessments because not all images have an assessment; now we need to differentiate between ALL images with ANY assessment and ALL images REGARDLESS of assessment (maybe we'd even want an additional option, all images which lack any sort of assessment).

But it's also not really appropriate for the label of the un-set option in the assessment filter to say "All images", because another filter may also be in effect, meaning that the results do not in fact contain all images.

Given all of this, having the initial option for the assessment filter read "Community assessments" might be one of the least-bad options. It's not consistent but at least it clearly conveys what the dropdown does before the user provides a value. "All images regardless of assessment" might be more consistent but it's also pretty wordy.


Potential solutions
Option 1

The simplest solution would be: don't change anything about dropdown behavior, just update the dropdown options for the assessment filter to be something like this:

menu options:

Community assessments
All images with assessments
Featured image
Quality image
Valued image
Picture of the day
No assessments (maybe?)

The text displayed in the filter bar matches the label of the chosen option, defaulting to the first one ( "Community assessments").

Option 2

Alternatively, we could re-work the way the dropdown menus function so that they behave differently based on whether or not a value has been selected. The dropdown menu could look like this:

menu options:

All images
All images with assessments
Featured image
Quality image
Valued image
Picture of the day
No assessments (maybe?)
default state, when no selection has been made
Community assessments ▾
when any value except 'all images' is selected
Featured image ▾

If the user wanted to un-set the assessments filter after previously selecting a value, they would expand the menu and click on "all images", the first item. Instead of showing "all images" as the label when the menu closes, we would instead revert to the initial label of "community assessments". This is different from the current behavior where the label of the collapsed dropwdown always corresponds to the label of the currently-selected item.

If we go with option 2, this would change the behavior for all the filter dropdowns (except the "namespace" one, which is a special case).

Option 3

As a third option we could just pre-pend a static label in front of each dropdown that remains the same regardless of the selected value.

Image Size: All,
Image Size: Medium,
Community Assessments: All images,
Community Assessments: All images with assessments,
Community Assessments: Picture of the day, etc.

This is simple technically but changes the design and markup more.

Option 4

Finally I suppose we could follow the behavior of the namespace filter, where clicking "community assessments" launches a modal that contains checkboxes for each assessment type, and the user can select all that they want.

@mwilliams let's chat about this tomorrow and we can decide the best way forward.


Update: Based on today's conversation, we're going to pursue Option 2 here, falling back to Option 1 if it looks like it's not worth the effort. I'll update the acceptance criteria here to reflect this.

We may also want to pursue introducing a "Clear" button of some sort in the filters bar but that will be handled in a separate ticket.

CBogen renamed this task from Modify MediaSearch filter language to be consistent and add "all assessments" option to [L] Modify MediaSearch filter language to be consistent and add "all assessments" option.Sep 9 2021, 8:03 PM

Change 720113 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[mediawiki/extensions/MediaSearch@master] [WIP] Modify MediaSearch filter behavior and add \"all assessments\" option

https://gerrit.wikimedia.org/r/720113

egardner renamed this task from [L] Modify MediaSearch filter language to be consistent and add "all assessments" option to [M] Modify MediaSearch filter language to be consistent and add "all assessments" option.Sep 9 2021, 10:17 PM

Change 720113 merged by jenkins-bot:

[mediawiki/extensions/MediaSearch@master] Modify MediaSearch filter behavior and add \"all assessments\" option

https://gerrit.wikimedia.org/r/720113

This patch needs a follow-up config patch to actually enable the new "all assessments" dropdown.

Checked the current state of "All" filter option on commons wmf.2.

As far as I could see from the task description and comments:

  • "All" filter option should be selectable, i.e.
    • When I click on Image, then on All in Community Assessment drop-down menu - I am able to click on All and it will be selected and still be selected when I move to other filters' options.
    • Other filters (under Image filter tab) should display All option highlighted in blue by default (according to the mockup).

Screen Shot 2021-09-29 at 5.17.31 PM.png (1×1 px, 1 MB)

@egardner - the config patch is not in production yet?

Change 726993 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[operations/mediawiki-config@master] Add a new \"all assessments\" option to MediaSearch assessments dropdown

https://gerrit.wikimedia.org/r/726993

I've opened a config patch to enable the new "all assessments" dropdown item for Commons and TestCommons.

Will look at pushing out the config patch for this next week

Change 726993 merged by jenkins-bot:

[operations/mediawiki-config@master] Add a new \"all assessments\" option to MediaSearch assessments dropdown

https://gerrit.wikimedia.org/r/726993

Mentioned in SAL (#wikimedia-operations) [2021-11-08T19:48:55Z] <urbanecm@deploy1002> Synchronized wmf-config/InitialiseSettings.php: 1ca184b142f1f14b4c1537f6503e0ef893155453: Add a new "all assessments" option to MediaSearch assessments dropdown (T285349) (duration: 00m 55s)

Etonkovidova updated the task description. (Show Details)

Checked in commons wmf.7 - works as expected.