Page MenuHomePhabricator

Add segmented controller / tabs for media types in media search
Closed, ResolvedPublic

Assigned To
Authored By
mwilliams
Apr 20 2020, 5:29 PM
Referenced Files
F31770346: Screenshot 2020-04-21 17.44.47.png
Apr 21 2020, 4:12 PM
F31770347: Screenshot 2020-04-21 17.45.30.png
Apr 21 2020, 4:12 PM
F31769041: video.jpg
Apr 20 2020, 5:29 PM
F31769042: images.jpg
Apr 20 2020, 5:29 PM
F31769039: audio.jpg
Apr 20 2020, 5:29 PM
F31769040: Category.jpg
Apr 20 2020, 5:29 PM

Description

Easily give users a way to filter their result set by media types: Image, Audio, Video, and Categories.

images.jpg (1×1 px, 536 KB)

video.jpg (847×1 px, 193 KB)

Category.jpg (783×1 px, 149 KB)

audio.jpg (857×1 px, 193 KB)

COVID-19 Deployment Criteria

  • Can you roll back this change without lasting impact?
    1. A recovery plan is required as this will help identify our capacity for recovering from the failure
    2. THIS IS A KEY QUESTION, if you can’t answer it, you shouldn’t deploy
  • Is specialized knowledge required to support this change in production? If so, are there multiple people with this knowledge?
  • Is there a way to increase confidence about the correctness of this change?
    1. Reviews (Design, Code, etc)
    2. Testing coverage (unit tests, integration tests)
    3. Manual testing (e.g. Beta, vagrant, docker)

Event Timeline

A few WIP screenshots and some comments:

Audio:

Screenshot 2020-04-21 17.44.47.png (1×1 px, 326 KB)

Video:

Screenshot 2020-04-21 17.45.30.png (1×1 px, 568 KB)

You'll see that:

  • the audio/video players are just native browser <audio> and <video> tags
    • haven't gotten around to implementing our own media players yet
    • they look better than our own players (IMO)
    • but there might actually be reasons for having to implement our own players eventually? (IDK)
  • the text is *not* the search snippet we get with Special:Search results
  • the metadata line ((WebM VP9/Opus video file, 29 s) - 00:52, 26 January 2019) is missing
    • also not readily available
    • is this all useful? since I'll have to reimplement this anyway, do we want reconsider what that line looks like?

Above 3 things are not in line with the designs, but they're a significant amount of work (or potentially problematic), and I assume they're not too important for the current rounds of testing?
If any of those 3 are important enough that what I have (or don't) now needs to change, LMK & I'm happy to.

(Haven't gotten to work on categories yet)

This is looking really good, thanks Matthias. The 3 things not in line with the designs seem totally fine to not have or have differently for the research. I do imagine the metadata for length or file type of an audio clip might be useful but necessary for research and I can think about a better way to surface those.

Change 592410 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Add tabs & different styling per (media) type

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

Categories is also mostly done, but...:

  • also no metadata line (will figure out a solution for those later - the rest of these changes are significant enough already that I'd like to first see them actually work on prod before finetuning these details)
  • same with text content: it's not currently available... so all we get is a title, but...
    • I've submitted a change to the search API to also expose it (in which case I can also use it for audio/video)
    • (the content of most category pages - much like file pages, actually - is non-existent or garbage, though)

I'll ping you once things are in prod (might be a little while, these are pretty big changes) & we can figure out what things, if any, need further tweaking at this point!

Change 592410 merged by Eric Gardner:
[mediawiki/extensions/WikibaseMediaInfo@master] Add tabs & different styling per (media) type

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

Ramsey-WMF added a subscriber: Ramsey-WMF.

Works on production.