Page MenuHomePhabricator

[REQUEST] Review the MediaSearch API before using it in Visual Editor image search
Closed, ResolvedPublic

Description

What's requested:

Review the MediaSearch API before we make the switch in VE

Why it's requested:

The SD team will be integrating its new MediaSearch API into Visual Editor (see T259896), and we want to make sure the Editing team has a chance to take a look before we do.

Deadline for request:

We were originally hoping to integrate with VE by the end of this quarter (Q2 2020-2021, so realistically that's by the end of November 2020). However, we will probably wait until instrumentation is complete, which will likely end up being sometime (hopefully early) in Q3 2020-2021.

Other helpful information:

The code is here: https://github.com/wikimedia/mediawiki-extensions-WikibaseMediaInfo/tree/master/src/Search

MediaQueryBuilder.php is the main one to look at. Note that it's the same as the existing search API with the same response format, but better search results. Nothing will have to change on the VE end. Currently we use a parameter (?mediasearch=1) to get the new search results from the API on Commons, but once we remove the need for the parameter, VE will automatically get the new results.

@matthiasmullie can help with any questions.

Event Timeline

Hey @CBogen so the request of the Editing team is to build the actual instrumentation?

Hey @CBogen so the request of the Editing team is to build the actual instrumentation?

Yep. Or mentor our team to learn VE enough to do it themselves :)

Hey @CBogen so the request of the Editing team is to build the actual instrumentation?

Yep. Or mentor our team to learn VE enough to do it themselves :)

Thank you for filing this, @CBogen.

This sounds like it's a great opportunity to help y'all develop fluency with adding instrumentation to VE and for us to test whether the processes we have put in place for doing so are clear to folks outside the Editing Team.

As such, I've created a sub-task that, ideally, makes this process clear to y'all. Here is that task: T265101; it contains a good portion of the language you already drafted (thank you for making this easy!).

Next steps

  • @CBogen and @JTannerWMF: are y'all okay with repurposing this task (T264779) for the MediaSearch API review considering that T265101 now exists for the instrumentation implementation?
  • @CBogen and @JTannerWMF: are y'all okay with repurposing this task (T264779) for the MediaSearch API review considering that T265101 now exists for the instrumentation implementation?

works for me!

  • @CBogen and @JTannerWMF: are y'all okay with repurposing this task (T264779) for the MediaSearch API review considering that T265101 now exists for the instrumentation implementation?

works for me!

Wonderful. @CBogen, are you able to take a first pass at revising this task's title and description to include the information we'll need to conduct a review of the MediaSearch API changes y'all have planned?

CBogen renamed this task from [REQUEST] Instrument image search in Visual Editor to [REQUEST] Review the MediaSearch API before using it in Visual Editor image search.Oct 14 2020, 3:57 PM
CBogen updated the task description. (Show Details)
CBogen added a subscriber: matthiasmullie.

@CBogen, are you able to take a first pass at revising this task's title and description to include the information we'll need to conduct a review of the MediaSearch API changes y'all have planned?

Done! Let me know if you need any additional info.

ppelberg added a subscriber: Esanders.

Assigning this to @Esanders to determine what changes this new API is implementing and what – if any – corresponding changes will be made in VE to support it/them.

Change 642914 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/core@master] MediaResourceProvider: Use MediaSearch API when available

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

Change 642914 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/core@master] MediaResourceProvider: Use MediaSearch API when available

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

Hi @Esanders - the SD team was planning to do the work to make MediaSearch default, so from our understanding this patch isn't needed. The only thing blocking us on making this change is completing the instrumentation of image search in VE, which is in progress. Once that's complete and we make MediaSearch default, VE should automatically use it without an additional patch needed.

The only thing requested in this ticket was a review of the API just in case there was something the editing team had questions or concerns about.

Is there something else needed that we missed? Thanks!

Change 642914 abandoned by Esanders:
[mediawiki/core@master] MediaResourceProvider: Use MediaSearch API when available

Reason:

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

matmarex subscribed.

I think this has been done at the time.