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:

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:

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:

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

Related Objects

StatusAssignedTask
Declineddchen
OpenNone
OpenNone
DuplicateNone
OpenNone
ResolvedAbit
OpenNone
DuplicateNone
OpenNone
OpenNone
OpenNone
ResolvedRamsey-WMF
OpenNone
OpenNone
OpenNone
Resolvedmatthiasmullie
OpenNone
Resolvedmatthiasmullie
ResolvedEBernhardson

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 18 2018, 10:56 PM
PDrouin-WMF updated the task description. (Show Details)Dec 18 2018, 10:57 PM

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?

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?
matthiasmullie added a comment.EditedFeb 12 2019, 6:01 PM

Actual work still to be done:

PDrouin-WMF added a comment.EditedFeb 19 2019, 5:34 PM

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

@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 closed this task as Resolved.Feb 21 2019, 8:33 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.

greg added a project: Multimedia.Mar 7 2019, 10:59 PM

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