Page MenuHomePhabricator

Inline remaining templates
Closed, ResolvedPublic3 Estimated Story Points

Assigned To
Authored By
Jdlrobson
Apr 10 2019, 3:29 PM
Referenced Files
F28869398: T220619-7.2.2png.png
Apr 30 2019, 1:48 PM
F28869399: T220619-7.2.1.png
Apr 30 2019, 1:48 PM
F28774334: T220619-0.gif
Apr 25 2019, 5:40 PM
F28774259: T220619-4.gif
Apr 25 2019, 5:28 PM
F28773804: T220619-6.gif
Apr 25 2019, 5:28 PM
F28773615: Recording #25.gif
Apr 25 2019, 5:28 PM
F28773600: T220619-3.gif
Apr 25 2019, 5:28 PM
F28773528: T220619-1.gif
Apr 25 2019, 5:28 PM

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

Event Timeline

Jdlrobson moved this task from Incoming to Upcoming on the Web-Team-Backlog-Archived 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 subscribed.

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

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

@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

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

T220619-1.gif (376×814 px, 3 MB)

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

T220619-0.gif (368×810 px, 2 MB)

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

T220619-2.gif (376×814 px, 805 KB)

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

T220619-4.gif (550×732 px, 2 MB)

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

T220619-3.gif (376×814 px, 2 MB)

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

Recording #25.gif (376×814 px, 1005 KB)

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

T220619-6.gif (376×814 px, 2 MB)

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.

@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

T220619-7.2.1.png (1,125×4,710 px, 532 KB)

T220619-7.2.2png.png (1,125×2,436 px, 159 KB)