Page MenuHomePhabricator

Determine whether Special:MediaSearch should be split from the rest of WikibaseMediaInfo
Closed, DuplicatePublic

Description

@Cparle asked this morning whether the code for the new MediaSearch page ought to live in a stand-alone extension that could potentially be used in other wikis that may want to provide the ability to search through locally-hosted files.

@AnneT and I have been wondering about this as well. Splitting Special:MediaSearch into a separate project would provide several benefits from the perspective of front-end development, since we are using Vue.js on this special page but not in the rest of MediaInfo:

  • It would simplify code organization for front-end things
  • It would simplify things like linter setup (we wouldn't need a set of overrides for a subset of files)
  • It would make it much easier to introduce a test suite (see T258610) for the front-end code because we could simply use Jest and call it a day; trying to test .vue files in QUnit without any sort of build step is proving to be fairly involved
  • It might make things easier when it comes to managing polyfills (there are features we need to polyfill for MediaSearch but not for WBMI file pages, etc)

I'm not sure if a dedicated MediaSearch extension would need to list WBMI as a dependency or if some other relationship between the two codebases would work better.