As discussed in a recent engineering team meeting, there are several advantages to splitting MediaSearch out of WikibaseMediaInfo into its own extension:
- We can set up Jest for front-end testing without having to deal with the existing node-qunit frameowrk in WBMI
- We can use the opportunity to create some boilerplate code for future projects (test framework, potentially webpack config or Storybook implementation)
- If an opportunity to use MediaSeach on another wiki comes up in the future, the code will already be modular and separate from WBMI
- WBMI is becoming quite large and modular code will be easier to maintain going forward
Here's a rough outline of what needs to be done; I'll split some of this out into subtasks later:
- Request a new Gerrit repo
- Build new extension, get CR from team
- Determine if we need security readiness review and, if so, get the ball rolling on that
- Remove code from WBMI
- Coordinate deployment (part of which will be T278121)
- Documentation: extension page and help page on mediawiki.org, add to https://www.mediawiki.org/wiki/Developers/Maintainers
Deployment process
Deployment 0 (can be regular deployment train)
Prepare i18n messages:Get Extension:MediaSearch repo in production; see documentation: Patch: 682101
Deployment 1 (backport & config deployment window)
testcommonsPrepare any new config vars that MediaSearch requires (if any) & include the extension on testcommons. Patch: 682102Deploy configVerify that nothing breaks
commonsPrepare any new config vars that MediaSearch requires (if any) & include the extension on commons. Patch: 682105Deploy configVerify that all functionality of Special:MediaSearch (from WikibaseMediaInfo) continues to work, and that it all works in Special:NewMediaSearch (from MediaSearch)
Deployment 2 (train)
Merge:Disable search widget takeover (in WikibaseMediaInfo) - Patch: 674015Enable search widget takeover (in MediaSearch) - Patch: 674010Rename Special:MediaSearch to Special:OldMediaSearch (in WikibaseMediaInfo) - Patch: 676613Rename Special:NewMediaSearch to Special:MediaSearch (in MediaSearch) - Patch: 676614
Verify all Special:MediaSearch functionality again
Post-deployment 2: work with translatewiki folks to move messages from WBMI to MediaSearch (see subtask for details)
Deployment 3 (can be regular deployment train)
Remove all relevant code from WikibaseMediaInfo- Verify all Special:MediaSearch functionality again