Page MenuHomePhabricator

Special:Uploads is built via webpack
Closed, ResolvedPublic5 Story Points

Description

mobile.special.uploads.scripts makes use of the mobile.gallery module. Nothing else makes use of this module, thus it makes sense to merge it into the mobile.special.uploads.scripts

Note: the module has dependencies on mobile.startup, mobile.gallery, mobile.scrollEndEventEmitter. Given a usage in category overlay, it is not trivial to merge in mobile.scrollEndEventEmitter so we will focus on mobile.gallery.

Acceptance criteria

  • The code in mobile.special.uploads.scripts is built via webpack
  • The code in mobile.startup has not grown in any substantial way. Consider introducing a new module mobile.special.scripts (to mirror mobile.special.styles) modules if this becomes a problem that can be shared across all special pages.
  • The module mobile.gallery has been removed (no need to worry about caching!).
  • The tests related to the feature (mobile.gallery) are run inside webpack
  • mobile.special.uploads.scripts has dependencies mobile.scrollEndEventEmitter and mobile.startup (ScrollEndEventEmitter is now in mobile.startup so only mobile.startup is needed as a dependency)

Sign off steps

  • Progress is updated.
  • Create task for porting mobile.special.mobileoptions.scripts, mobile.special.mobilediff.scripts and mobile.special.userlogin.scripts to webpack (no deps) - T213112

Event Timeline

Jdlrobson triaged this task as High priority.Jan 9 2019, 3:58 PM
Jdlrobson created this task.
Jdlrobson added a project: Readers-Web-Backlog.
Jdlrobson updated the task description. (Show Details)

Change 484574 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Special:Uploads JavaScript built in webpack

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

Change 484574 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Special:Uploads JavaScript built in webpack

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

Jdlrobson updated the task description. (Show Details)Jan 18 2019, 1:15 AM
nray claimed this task.Jan 22 2019, 6:06 PM
nray updated the task description. (Show Details)Jan 22 2019, 8:07 PM
nray added a comment.Jan 22 2019, 9:26 PM

git checkout e1c212dbe1d583952b2de1eb7ee347108ba68d06 (this patch's commit)
curl -i 'http://localhost:8181/w/load.php?debug=false&lang=en&modules=mobile.startup&skin=minerva' | wc -c
90376

git checkout 9e99a7dff9d056d61ae50beffad16bdf3c4ebfaf (previous commit)
curl -i 'http://localhost:8181/w/load.php?debug=false&lang=en&modules=mobile.startup&skin=minerva' | wc -c
90376

Critical js is same size with this patch

nray closed this task as Resolved.Jan 22 2019, 9:31 PM
nray removed nray as the assignee of this task.
nray updated the task description. (Show Details)
nray added a subscriber: nray.