Page MenuHomePhabricator

Inline templates for mobile editor
Closed, ResolvedPublic3 Story Points

Description

Th editor makes use of several templates loaded via ResourceLoader. We will load them inline.

These are:

358:				"AbuseFilterOverlay.hogan": "resources/mobile.editor.overlay/AbuseFilterOverlay.hogan",
359:				"AbuseFilterPanel.hogan": "resources/mobile.editor.overlay/AbuseFilterPanel.hogan",
360:				"editHeader.hogan": "resources/mobile.editor.overlay/editHeader.hogan",
361:				"previewHeader.hogan": "resources/mobile.editor.overlay/previewHeader.hogan",
362:				"saveHeader.hogan": "resources/mobile.editor.overlay/saveHeader.hogan",
363:				"EditorOverlayBase.hogan": "resources/mobile.editor.overlay/EditorOverlayBase.hogan",
364:				"contentVE.hogan": "resources/mobile.editor.overlay/contentVE.hogan",
365:				"toolbarVE.hogan": "resources/mobile.editor.overlay/toolbarVE.hogan",
366:				"BlockMessage.hogan": "resources/mobile.editor.overlay/BlockMessage.hogan",
367:				"content.hogan": "resources/mobile.editor.overlay/content.hogan"

Acceptance criteria

  • All the files in the editor have been inlined.
  • Increase in JS bundlesizes should be consistent with the removal of the size of ResourceLoader's mobile.startup module. Change in bytes shipped to client should be recorded.

QA steps

  • Visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Spain
  • Click on the edit icon
  • Verify that the editor Overlay appears. Click the pencil icon and make sure you can successfully switch between "Visual editing" and "Source editing"
  • Click on "Source editing"
  • Type something new into the text box and click "Next"
  • Verify that the preview overlay appears that has a toolbar containing a "Publish" button

QA Results

ACStatusDetails
1T220159#5133290
2T220159#5133290
3T220159#5133290

Event Timeline

Jdlrobson triaged this task as High priority.
Jdlrobson moved this task from To Triage to Upcoming on the Readers-Web-Backlog board.
Jdlrobson renamed this task from Inline mobile.special page templates for Special:Nearby and Special:Uploads to Inline templates for mobile editor.Apr 4 2019, 10:34 PM
Jdlrobson updated the task description. (Show Details)

Change 502656 had a related patch set uploaded (by Nray; owner: Nray):
[mediawiki/extensions/MobileFrontend@master] Inline mobile.editor templates

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

Change 502656 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Inline mobile.editor templates

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

nray reassigned this task from nray to Edtadros.Apr 10 2019, 8:45 PM
nray added a subscriber: nray.
Edtadros reassigned this task from Edtadros to nray.Apr 14 2019, 9:22 PM
Edtadros added a subscriber: Edtadros.

@nray This needs QA steps.

nray updated the task description. (Show Details)Apr 16 2019, 5:53 AM
nray reassigned this task from nray to Edtadros.

@nray This needs QA steps.

Sorry! Added some steps now

Edtadros reassigned this task from Edtadros to ovasileva.Apr 23 2019, 11:24 PM

@nray Thanks for the QA steps!

Test Result

Status: ✅ PASS
OS: macOS Mojave
Browser: Chrome
Device: MBP
Emulated Device: iPhoneX

Test Artifact(s):

QA steps

Visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Spain
Click on the edit icon
✅ AC1: Verify that the editor Overlay appears.

✅ AC2: Click the pencil icon and make sure you can successfully switch between "Visual editing" and "Source editing"

Click on "Source editing"
Type something new into the text box and click "Next"
✅ AC3: Verify that the preview overlay appears that has a toolbar containing a "Publish" button

Edtadros updated the task description. (Show Details)Apr 23 2019, 11:25 PM
phuedx updated the task description. (Show Details)Apr 29 2019, 3:07 PM

Increase in JS bundlesizes should be consistent with the removal of the size of ResourceLoader's mobile.startup module. Change in bytes shipped to client should be recorded.

$ curl -H "Accept-Encoding: gzip" -I "https://en.m.wikipedia.org/w/load.php?lang=en&modules=startup&only=scripts&skin=minerva&target=mobile"
...
content-length: 22472
content-encoding: gzip
$ curl -H "Accept-Encoding: gzip" "https://en.m.wikipedia.org/w/load.php?lang=en&modules=mobile.editor.overlay&only=scripts&skin=minerva&target=mobile" | wc -l
6582

Unfortunately, the Performance team doesn't appear to track RL module size over time – they do have other per-module metrics though: https://grafana.wikimedia.org/d/000000067/resourceloadermodule

phuedx updated the task description. (Show Details)Apr 29 2019, 3:34 PM
phuedx closed this task as Resolved.