Page MenuHomePhabricator

Inline remaining templates
Closed, ResolvedPublic3 Story Points

Description

Various templates in MobileFrontend are shipped via ResourceLoader. We will load them inline via webpack. We will do this for all remaining template files.

These are:

212:				"Panel.hogan": "resources/mobile.init/Panel.hogan"
235:				"mediawiki.template.hogan",
412:				"SectionAddOverlay/contentHeader.hogan": "resources/mobile.talk.overlays/talkSectionAddContentHeader.hogan",
413:				"SectionAddOverlay.hogan": "resources/mobile.talk.overlays/talkSectionAdd.hogan",
414:				"Section/header.hogan": "resources/mobile.talk.overlays/talkSectionHeader.hogan",
415:				"Section/content.hogan": "resources/mobile.talk.overlays/talkSectionContent.hogan"
456:				"LoadErrorMessage.hogan": "resources/mobile.mediaViewer/LoadErrorMessage.hogan",
457:				"ImageCarousel.hogan": "resources/mobile.mediaViewer/ImageCarousel.hogan"
486:				"CategoryTabs.hogan": "resources/mobile.categories.overlays/CategoryTabs.hogan",
487:				"CategoryTab.hogan": "resources/mobile.categories.overlays/CategoryTab.hogan",
488:				"CategoryAddOverlay.hogan": "resources/mobile.categories.overlays/CategoryAddOverlay.hogan",
489:				"CategoryAddOverlayHeader.hogan": "resources/mobile.categories.overlays/CategoryAddOverlayHeader.hogan"
522:				"LanguageSearcher.hogan": "resources/mobile.languages.structured/LanguageSearcher.hogan"
658:				"Nearby.hogan": "resources/mobile.special.nearby.scripts/nearby.hogan"
677:				"PhotoItem.hogan": "resources/mobile.special.uploads.scripts/PhotoItem.hogan",
678:				"PhotoList.hogan": "resources/mobile.special.uploads.scripts/PhotoList.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.
  • There are no hogan files in the resources folder

QA steps

Image Overlay

Talk Overlay

Language Overlay

Table of Contents

Category Overly

Nearby

Special:Uploads

Sign off steps

  • Make sure a task has been written to make mediawiki.template.hogan a redirect to the mediawiki.template.mustache file

QA Results

Details

Related Gerrit Patches:
mediawiki/extensions/MobileFrontend : masterInline remaining hogan templates

Event Timeline

Jdlrobson triaged this task as High priority.Apr 10 2019, 3:31 PM
Jdlrobson moved this task from Incoming to Upcoming on the Readers-Web-Backlog board.
Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)
  • A deprecated flag is added to mediawiki.template.hogan to ensure existing users move to mediawiki.template.mustache

This seemed like a good idea to me. Was it intentional to remove it from the AC?

Nevermind-- I see you've added it to a related task!

Change 503480 had a related patch set uploaded (by Nray; owner: Nray):
[mediawiki/extensions/MobileFrontend@master] Inline remaining hogan templates

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

nray removed nray as the assignee of this task.Apr 15 2019, 5:10 PM
nray added a subscriber: nray.
Krinkle removed a subscriber: Krinkle.Apr 15 2019, 9:11 PM

Change 503480 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Inline remaining hogan templates

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

Edtadros reassigned this task from Edtadros to nray.Apr 23 2019, 11:06 PM
Edtadros added a subscriber: Edtadros.

@nray what environment do I need to test this in?

nray updated the task description. (Show Details)Apr 24 2019, 10:09 PM
nray added a comment.Apr 24 2019, 10:11 PM

@nray what environment do I need to test this in?

Sorry about that, I've edited the QA steps with the env to test in

Edtadros added a comment.EditedApr 25 2019, 5:28 PM

Test Result

Status: ❌ FAIL
OS: macOS Mojave
Browser: Chrome
Device: MBP
Emulated Device: iPhoneX

Test Artifact(s):

QA steps

✅ AC1: Image Overlay
Go to http://readers-web-master.wmflabs.org/wiki/Barack_Obama?mobileaction=toggle_view_mobile#/media/File%3APresident_Barack_Obama.jpg
Test the image viewer feature making sure you can view an image and navigate between images using the left and right arrows

Talk Overlay
✅ AC2: Login to https://en.m.wikipedia.beta.wmflabs.org and go to https://en.m.wikipedia.beta.wmflabs.org/wiki/Spain#/talk
Test the talk overlay feature making sure you can access it, view topics and create a new topic

Language Overlay
✅ AC3: Go to https://readers-web-master.wmflabs.org/wiki/Barack_Obama?mobileaction=toggle_view_mobile#/languages
Test the language feature making sure you can search/filter languages

Table of Contents
✅ AC4: Go to http://readers-web-master.wmflabs.org/wiki/Barack_Obama?mobileaction=toggle_view_mobile
Find and test the table of contents feature in tablet ensuring it renders with the correct sub headings

Category Overly
✅ AC5: Login to https://en.m.wikipedia.beta.wmflabs.org, turn on Beta mode, and go to https://en.m.wikipedia.beta.wmflabs.org/wiki/Spain#/categories
Test the category overlay feature making sure you can access it, view categories and create a new category

Nearby
✅ AC6: Go to https://readers-web-master.wmflabs.org/wiki/Special:Nearby?mobileaction=toggle_view_mobile and click the "Show nearby articles button"
Test the Special:Nearby feature making sure you can access it, view pages nearby

Special:Uploads
❌ AC7: Login to http://readers-web-master.wmflabs.org and Upload an image at http://readers-web-master.wmflabs.org/wiki/Special:Upload?mobileaction=toggle_view_mobile
Got to http://readers-web-master.wmflabs.org/wiki/Special:Uploads?mobileaction=toggle_view_mobile and make sure you can access it, view uploads

Edtadros reassigned this task from Edtadros to nray.Apr 25 2019, 5:42 PM
Edtadros updated the task description. (Show Details)

@nray It looks like only the upload wasn't working. I'm not ruling out user error. Let me know what you think of the animated gifs as test artifacts.

nray updated the task description. (Show Details)Apr 25 2019, 6:05 PM
nray added a comment.Apr 25 2019, 6:13 PM

@Edtadros I can replicate. I think there are some differences in how staging and master are configured. I've modified the AC7 in the task description to use the staging server at https://readers-web-staging.wmflabs.org instead which seems to be working for me. My patch didn't touch the upload form code (only the photo list at Special:Uploads) so I'm confident it's not a regression related to this patch.

Can you please try again using the modified AC7 steps?

Test Result

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

Test Artifact(s):

Special:Uploads
✅ AC7: Login to https://readers-web-staging.wmflabs.org and Upload an image at https://readers-web-staging.wmflabs.org/wiki/Special:Upload?mobileaction=toggle_view_mobile
Go to https://readers-web-staging.wmflabs.org/wiki/Special:Uploads?mobileaction=toggle_view_mobile and make sure you can access it, view uploads

ovasileva closed this task as Resolved.Apr 30 2019, 3:24 PM

Looks good!