Page MenuHomePhabricator

[Spike] Can we use existing OOUI multi-select dropdown?
Closed, ResolvedPublic

Description

UPDATE: this ticket covered a lot of ground, and some of this had been completed a long time ago, while work has not yet begin on other parts.
All of that work has either been completed already, or split into other tickets.
All that's left here is the discussion that started in this comment, about whether or not we can use an existing OOUI multi-select dropdown element in favor of rolling our own.


I updated this description to make that slightly more clear. Also check out this comment for the current state of affairs.


This ticket covers needed updates for the basic search bar in advance of the Depicts January launch, per conversations with @MarkTraceur and @Ramsey-WMF regarding media/file types and @Jdforrester-WMF and @Nirzar regarding OOUI tabbed navigation.

User story

As a… Commons user
When I… search for media files
I want to… apply search terms and requirements to ONLY images, or only videos, etc.
So that I can…. find a specific media/set of media which match my needs
Link to story

Dropdown filter options

Strikethrough, as this feedback has been split up into other tickets: T216536, T216538, T216540, T216541

After multiple conversations, here's what we think will be best in terms of grouping files by media type (according to CirrusSearch capabilities) for filtering:

Filter by type of media (for both Keyword and Depicts searching)

  • Images [SVG, PNG, JPEG, GIF (static & animated), TIFF, XCF]
  • Audio [MP3, OGG (audio), WebM, FLAC, WAVE, MIDI]
  • Documents [DjVu, PDF] (this used to say "Text", but changed, per follow-up comment)
  • Videos [WebM, OGG Theora (video), APNG]
  • 3d [STL]

Visual:

search bar dropdown filter.png (253×522 px, 18 KB)

Tabbed navigation

Strikethrough, as this feedback has already been integrated into https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikibaseMediaInfo/+/441040

Currently, we've been using this design for tabbing between Keyword and Depicts search modes:

current version of tabbed nav search mode.png (434×523 px, 43 KB)

However, though the above version tested well, the styling is not supported by OOUI and we'd like to keep things consistent.

Here is the updated version:

undated version of tabbed nav search mode.png (435×523 px, 43 KB)

And another example (showing what it looks like before anything's been typed yet):

updated search bar tabbed nav shorty.png (73×523 px, 8 KB)

Related Objects

StatusSubtypeAssignedTask
Declineddchen
OpenNone
OpenNone
DuplicateNone
OpenFeatureNone
OpenFeatureNone
DuplicateNone
ResolvedNone
ResolvedNone
ResolvedNone
Resolved Ramsey-WMF
ResolvedNone
InvalidNone
InvalidNone
Resolvedmatthiasmullie
DeclinedNone
Resolvedmatthiasmullie
ResolvedEBernhardson

Event Timeline

A few questions/heads-ups below about the filetype dropdown:

IIUC, the dropdown's label should show 'all media' when all five filetypes are selected?
There exist a few more filetypes than these 5, though: unknown (could not detect), drawing (SVGs), multimedia (could not reliably detect), text (plaintext/html), executable, archive
Since the label shows 'all media', do we actually want to search *all* media types (when actually only 5 have been selected and it could be confusing to find other file types in the result), or do we only want to search for these 5 filetypes (where it could be confusing that it's labeled 'all media')?

Also, it appears that 'Text' refers to OFFICE (which is the filetype for PDF files).
There's also a TEXT file type (for plaintext & html - though it doesn't seem to actually have any files associated with it...)
Using the label 'Text' instead of 'Office' could therefor possibly be confusing, since a few other things already expose these filetypes under different terms. E.g.: https://commons.wikimedia.org/wiki/Special:NewFiles
I'm happy to use the suggested terminology of Images, Audio, Texts, Videos & 3D - I just want to point out that other terminology is already used elsewhere. Do we want to reconsider the terminology, and/or update the words used elsewhere?

Lastly, it appears that DjVu files are indexed as BITMAP (= image), not as TEXT or OFFICE. Is that something we intend to change?

Change 441040 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Search prototype

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

Also: these filter options are no longer nested.
Do we expect to have nested filter options at some later point, or will we likely not have that?

Screenshot 2019-01-02 17.45.25.png (914×490 px, 81 KB)

I know it's hard to predict the future.
Just asking to know whether to keep the code around in the codebase, or get rid of that now-unneeded complexity.
I'm going to get rid of the the code (won't be lost, it'll still be in gerrit history), unless we have concrete plans to bring it back in a later stage (in which case we might as well keep maintaining it)

Hey Matthias,

Yes, the dropdown label should show 'all media' when these five filetypes are selected. I had previously conducted a search for the unmentioned filetypes you included and they tend to return nothing, so I want to simplify what's searchable by what is actually returnable in a search. I am making an assumption that these filetypes will be the most common and useful to search by (Images / Audio / Texts / Videos / 3d). If advanced users must search the additional filetypes (unknown, text, executable, archive), that can be done with advanced keyword searching. SVG filetypes are included in the Images filetype.

I've wrestled a bit with calling things Texts vs Documents, and although the TEXT filetype returns no results, you make a good case in using a different word, so perhaps we should go with Documents ( @Ramsey-WMF, we've talked about this a bit, what say you?)

I don't know why DjVU files are indexed as BITMAP and that is confusing to me. In Commons documentation, it is referred to as a multipage document, and it makes more sense to be under documents to me. On this information page, it's listed as a "textual document."

I don't know that we'll need nested filter options in the future, it just wound up being redundant to have multimedia nested like that (and why this design is simpler).

I spoke with Ramsey and he agrees Documents can be used instead of Texts to make the filename convention consistent, even though we don't currently have TEXT files (maybe we will in the future?).

Is it possible to re-index DjVU files as OFFICE? Since multiple pages on Commons consider DjVU files as multipage documents (alongside PDFs) this makes more sense.

PDrouin-WMF renamed this task from Basic search bar: dropdown filter and tabbed navigation to Filtered search: type of media.Jan 11 2019, 4:26 PM

I updated the description to better reflect today's reality.
Changes:

  • OFFICE types will be called "Documents" instead of "Texts" (there already exists a category called "Text")
  • Tabbed navigation feedback has already been processed, so I made that obvious in the description
  • Conversion of DjVu files into new category has been mentioned in comments - this was done here: T212852: Index DjVu files as OFFICE instead of BITMAP?

Actual work still to be done:

@matthiasmullie missed this until now. I'm looking at the toolbar, but not sure I'm seeing the right thing. Is it this one?

Screenshot 2019-02-19 12.36.12.png (836×870 px, 76 KB)

@PDrouin-WMF: yes, that's the one.

Sidenote: I've split most of the remaining work into separate tickets.

matthiasmullie renamed this task from Filtered search: type of media to {Spike] Can we use existing OOUI multi-select dropdown?.Feb 19 2019, 7:31 PM
matthiasmullie updated the task description. (Show Details)

Matthias, I don't know that it'd be immediately understandable for users that they can select more than one kind of media by using this particular pattern. It gives me the impression that I can only chose one at a time.

Cparle renamed this task from {Spike] Can we use existing OOUI multi-select dropdown? to [Spike] Can we use existing OOUI multi-select dropdown?.Feb 20 2019, 10:09 AM
matthiasmullie claimed this task.

As much as I'd like to be able to use existing components, I don't disagree that this one's probably not perfectly suited for us...

Closing this task, since all other actionable work has been completed or moved into other tickets.

Change 441040 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Search prototype

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

Change 441040 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Search prototype

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