HomePhabricator

Port editor.overlay code to webpack

Authored by Jdlrobson on Jan 25 2019, 2:44 AM.

Description

Port editor.overlay code to webpack

tldr: ResourceLoader is given a single file built by webpack.
Tests can now be run headless.

  • source code

All the files are moved to the src folder with the following changes:

  • The IIFE wrapping all files is removed
    • with the exception of schemaEditAttemptStep.js which exports a function

that is executed

  • Any unnecessary M.define's are removed. These are no longer needed - tests

can run without them.

  • rather than M.define, module.exports is used
  • rather than M.require require is used
  • OO.mfExtend is no longer used - mfExtend is imported and used

directly

The entry point for webpack is a new file
src/mobile.editor.overlay/mobile.editor.overlay.js which makes clear
what is publically exposed to other modules. This file only defines
what is necessary for this feature to be integrated in places like
Minerva.

    • tests
  • jQuery usages now use util wrapper
  • Flesh out mockMediaWiki with new methods needed by EditorOverlay

Bug: T213340
Change-Id: I0bb7e5f77240748f5dd1d593c0ed1c8f1a79c0a8

Details

Committed
NiedzielskiFeb 1 2019, 3:21 AM
Parents
rEMFR8538b00091df: Hygiene: Improve EditorGateway tests
Branches
Unknown
Tags
Unknown
References
refs/changes/35/486535/12
ChangeId
I0bb7e5f77240748f5dd1d593c0ed1c8f1a79c0a8