Page MenuHomePhabricator

Inline templates for mobile editor
Closed, ResolvedPublic3 Estimated 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 created this task.
Jdlrobson moved this task from Incoming to Upcoming on the Web-Team-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 updated the task description. (Show Details)

@nray This needs QA steps.

Sorry! Added some steps now

@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.

T220159-1.png (2×1 px, 373 KB)

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

T220159-2.png (2×1 px, 308 KB)

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

T220159-3.png (2×1 px, 348 KB)

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)